sMessage = "Tending your farm one day, you were suprised to find a myserious magical item beneath the corn stalks. Gathering up what gold you could, you left home in hopes of becoming a famous adventurer...";
GetMagicItem(oPC,TRUE,TRUE);
}
else if (iRandom < 3) //Enchanted
{
SQLocalsUUID_SetInt(oPC,"HasCustomSkin",1);
sRace = GetSubRace(oPC);
if (sRace == "")
sRace = GetRace(oPC);
sRace = "Enchanted " + sRace;
SetSubRace(oPC, sRace);
//sMessage = CreatePlayerSkin(oPC); //::: Use PRC skin instead.
sMessage = "A mysterious old man visited your farm one day and granted you enhanced powers. This experience urged you to leave the farm and seek adventure in the lands.";
iMod=1;
SQLocalsUUID_SetInt(oPC,"SpecialPowers",1);
CreateSpecialPowers(oPC);
}
else if (iRandom < 4) // Undead
{
SQLocalsUUID_SetInt(oPC,"HasCustomSkin",1);
sMessage = "You have little recollection of your death, but you well remember the beginning of your undeath. Whatever vile spells the necromancer cast went awry, though, leading to his death and to your conciousness remaining inside of your undead body.";
sRace = GetSubRace(oPC);
if (sRace == "")
sRace = GetRace(oPC);
sRace = "Undead " + sRace;
SetSubRace(oPC, sRace);
//CreateUndeadPC(oPC); //:: Use PRC template instead.
sMessage = "Exploring the cavernous area near your farmhouse, you found a chest filled with treasure. Using these riches you decided to set out into the world and seek adventure.";
}
else if (iRandom < 7)
{
IE_MagicalRing(oPC);
sMessage = "Exploring the cavernous area near your farmhouse, you found a strange magical ring. You decided to use its powers to seek adventure in the world.";
}
else if (iRandom < 8)
{
GetWeaponType(oPC);
sTag = "en3_" + GetWeaponTag(oPC) + "1";
SendMessageToPC(oPC,sTag);
oItem=CreateItemOnObject(sTag,oPC);
ip=ItemPropertyEnhancementBonus(1);
IPSafeAddItemProperty(oItem,ip);
sMessage = "Your father was an adventurer in his youth and gave you an " + GetName(oItem) + " before you set out in the world to find your own fame.";
}
else if (iRandom < 9)
{
iArmor = ENGetArmorType(oPC);
sTag = GetArmorTag(iArmor) + "1";
SendMessageToPC(oPC,sTag);
oItem=CreateItemOnObject(sTag,oPC);
ip=ItemPropertyACBonus(1);
IPSafeAddItemProperty(oItem,ip);
sMessage = "Your father was an adventurer in his youth and gave you an " + GetName(oItem) + " before you set out in the world to find your own fame.";
}
else if (iRandom < 10)
{
iAdjust = Random(20)+1;
DelayCommand(0.5f,EquipMob(oPC,1,iAdjust));
if (iAdjust < 5)
sMessage = "Your father was a minor adventurer in his youth and made sure you were propertly equipped before you set out in the world to find your own fame.";
else if (iAdjust <11)
sMessage = "Your father was a renown adventurer in his youth and made sure you were propertly equipped before you set out in the world to find your own fame.";
else if (iAdjust <16)
sMessage = "Your father was a very renown adventurer in his youth and made sure you were propertly equipped before you set out in the world to find your own fame.";
else
sMessage = "Your father was a famous adventurer in his youth and made sure you were propertly equipped before you set out in the world to find your own fame.";
}
else if (iRandom < 11)
{
if (GetLevelByClass(CLASS_TYPE_CLERIC, oPC) >= 1 || GetLevelByClass(CLASS_TYPE_DRUID, oPC) >= 1)
sMessage = "Your father was a famous adventurer in his youth and upon his death passed you a powerful magical item. Armed with this item and resolve you decided to make a name for yourself in the world.";
}
else if (iRandom < 12)
{
CreateRandomItem(oPC);
if (GetLevelByClass(CLASS_TYPE_ROGUE, oPC) >= 1)
sMessage = "After you left home you traveled to a strange city and found yourself in a shop of magical items. Seeing your oppurtunity, you grabbed one and ran but the shopkeeper alerted the guards. Fast on your feet, you escaped the city and kept running...";
else
sMessage = "Having left home to find adventure, you spotted an old man being attacked by a bandit. Rushing to his aid, you ran the bandit off and, in thanks, the old man gave you a magical item.";
}
else if (iRandom < 13)
{
SQLocalsUUID_SetInt(oPC,"Lucky",1);
sMessage = "All of your life you have had the benefit of great luck. If you gambled, you invariably won. If danger was near, you invariably survived. You decided to go out into the world to make a name for yourself armed with the knowledge that your luck would protect you.";
}
else if (iRandom < 14)
{
MakeStatue(oPC);
sMessage = "On your father's deathbed he gave you a statue that would summon forth a companion to protect you in your adventures.";
}
else if (iRandom < 15)
{
GetArtifact(oPC);
iMod = Random(2)+2;
sMessage = "Exploring the caves outside your home you discovered an artifact of immense power. You decided to use this item to seek out fame and fortunes as an adventurer.";
}
else if (iRandom < 16) // Fiendish/Celestial
{
SQLocalsUUID_SetInt(oPC,"HasCustomSkin",1);
sRace = GetSubRace(oPC);
if (sRace == "")
sRace = GetRace(oPC);
int iGoodEvil;
iGoodEvil = GetGoodEvilValue(oPC);
if (iGoodEvil < 40)
{
sMessage = "Your father was a demon from the deepest layers of the abyss. This parentage has gifted you with immense power in which you now use to make your mark in the world.";
ApplyTemplateToObject(TEMPLATE_HALF_FIEND, oPC);
sRace = "Fiendish " + sRace;
}
else
{
sMessage = "Your father was an angel who fell in love with your mother. This parentage has gifted you with immense power in which you now use to make your mark in the world.";
//CreateGodlingPC(oPC); //:: Use PRC templates instead.
SQLocalsUUID_SetInt(oPC,"SpecialPowers",3);
CreateSpecialPowers(oPC);
iMod = 1;
}
else if (iRandom < 17)
{
sMessage = "Tending your farm one day, you were suprised to find a myserious magical item beneath the corn stalks. Gathering up what gold you could, you left home in hopes of becoming a famous adventurer...";
GetMagicItem(oPC,TRUE,TRUE);
}
else if (iRandom < 18)
{
iAdjust = Random(20)+1;
DelayCommand(0.5f,EquipMob(oPC,1,iAdjust));
if (iAdjust < 5)
sMessage = "Your father was a minor adventurer in his youth and made sure you were propertly equipped before you set out in the world to find your own fame.";
else if (iAdjust <11)
sMessage = "Your father was a renown adventurer in his youth and made sure you were propertly equipped before you set out in the world to find your own fame.";
else if (iAdjust <16)
sMessage = "Your father was a very renown adventurer in his youth and made sure you were propertly equipped before you set out in the world to find your own fame.";
else
sMessage = "Your father was a famous adventurer in his youth and made sure you were propertly equipped before you set out in the world to find your own fame.";
}
else if (iRandom < 19)
{
DelayCommand(0.5f,EquipMob(oPC,1,40));
sMessage = "Your father was an extremely famous adventurer in his youth and made sure you were propertly equipped before you set out in the world to find your own fame.";
}
else if (iRandom < 20)
{
ItemOfPower(oPC);
sMessage = "Your father was an exiled king and gave you a great item of power before you went out to seek your fame.";
}
else if (iRandom < 21)
{
sMessage = "Tending your farm one day, you were suprised to find a myserious magical item beneath the corn stalks. Gathering up what gold you could, you left home in hopes of becoming a famous adventurer...";
GetMagicItem(oPC,TRUE,TRUE);
}
else if (iRandom < 22)
{
SQLocalsUUID_SetInt(oPC,"PCXPBonus",25);
SQLocalsUUID_SetInt(oPC,"Unlucky",1);
sMessage = "You have always been very unlucky and, deep in your heart, you know you will die an early death. You have, however, learned to adapt quickly.";
}
else if (iRandom < 24)
{
sMessage = "On your way to Hightop City, you spotted a small cave. Exploring, you found a minor magic item.";
GetMinorMagicItem(oPC);
}
else if (iRandom < 25)
{
IE_MagicalRing(oPC);
sMessage = "Exploring the cavernous area near your farmhouse, you found a strange magical ring. You decided to use its powers to seek adventure in the world.";
sMessage = "When you were young you befriended a friendly spirit who has become your constant companion.";
}
else if (iRandom < 28)
{
GiveGoldToCreature(oPC,49800);
sMessage = "You come from an extremely wealthy family. On the day of your father's death, you took your inheretance and went out into the world.";
}
else if (iRandom < 29)
{
if (GetAbilityScore(oPC,ABILITY_CHARISMA)>9)
{
SQLocalsUUID_SetInt(oPC,"Charming",1);
sMessage = "You have an inherent spark that causes people to like you. As such, you gather fame easier.";
}
else
{
SQLocalsUUID_SetInt(oPC,"Lucky",1);
sMessage = "All of your life you have had the benefit of great luck. If you gambled, you invariably won. If danger was near, you invariably survived. You decided to go out into the world to make a name for yourself armed with the knowledge that your luck would protect you.";
}
}
else if (iRandom < 30)
{
iRandom2 = Random(4)+1;
switch (iRandom2)
{
case 1: SQLocalsUUID_SetInt(oPC,"WeaponBonus",1); sType = "Fire"; break;
case 2: SQLocalsUUID_SetInt(oPC,"WeaponBonus",2); sType = "Lightning"; break;
case 3: SQLocalsUUID_SetInt(oPC,"WeaponBonus",3); sType = "Cold"; break;
case 4: SQLocalsUUID_SetInt(oPC,"WeaponBonus",4); sType = "Acid"; break;
}
SQLocalsUUID_SetInt(oPC, "WeaponBonus", 1);
sMessage = "You were born with amazing powers to control " + sType + " and have learned to enchant items to do more damage.";
}
else if (iRandom < 31)
{
SQLocalsUUID_SetInt(oPC, "Cursed", 1);
GetMagicItem(oPC);
sMessage = "When you were younger, you stole a magic item from a witch. In return, she cursed you and you have found life has been difficult ever since.";
}
else if (iRandom < 32)
{
iRandom2 = Random(3)+1;
SQLocalsUUID_SetInt(oPC,"Enemy",iRandom2);
switch (iRandom2)
{
case 1: sMessage = "A rich merchant gave you a magic item to cross the Red Wizards. You did so, but made a powerful enemy and have fled here hoping you will be safe from them.";
break;
case 2: sMessage = "You were instrumental in catching a theif and received a magic item as a reward, but the Thieves' Guild put a bounty on your head. You fled here hoping you will be safe from them.";
break;
case 3: sMessage = "You cheated a powerful merchant out of a magic item and he put a bounty on your head. You fled here hoping you will be safe from them.";
break;
}
if (Random(3)==0)
GetRareItem(oPC);
else
GetMagicItem(oPC);
}
else if (iRandom < 33)
{
GetEN2Weapon(oPC,oPC);
sMessage = "Your father is a hero, once saving the village of Nirra Hamlett. When you set out into the world he gave you a magical weapon from his days of adventuring.";
}
else if (iRandom < 34)
{
iRandom2 = (Random(4)+1) * 5;
SQLocalsUUID_SetInt(oPC,"PCXPBonus",iRandom2);
sMessage = "You are have always been a very quick learner and pick up new skills easily.";
}
else if (iRandom < 35)
{
SQLocalsUUID_SetInt(oPC,"HasCustomSkin",1);
sRace = GetSubRace(oPC);
if (sRace == "")
sRace = GetRace(oPC);
sRace = "Shade " + sRace;
sMessage = "You were born into shadow and from the shadows you gain power. You now use to make your mark in the world.";
SetSubRace(oPC,sRace);
//CreateGodlingPC(oPC);
SQLocalsUUID_SetInt(oPC,"SpecialPowers",4);
CreateSpecialPowers(oPC);
iMod=1;
}
else if (iRandom < 36)
{
SQLocalsUUID_SetInt(oPC,"HasCustomSkin",1);
sMessage = "You have always had great strength. You now arrive in hightop to make your mark in the world.";
SQLocalsUUID_SetInt(oPC,"SpecialPowers",5);
CreateSpecialPowers(oPC);
}
else if (iRandom < 37)
{
SQLocalsUUID_SetInt(oPC,"HasCustomSkin",1);
sMessage = "You have always had been very hardy. You now arrive in hightop to make your mark in the world.";
SQLocalsUUID_SetInt(oPC,"SpecialPowers",6);
CreateSpecialPowers(oPC);
}
else if (iRandom < 38)
{
SQLocalsUUID_SetInt(oPC,"HasCustomSkin",1);
sMessage = "You have always had been very nimble. You now arrive in hightop to make your mark in the world.";
SQLocalsUUID_SetInt(oPC,"SpecialPowers",7);
CreateSpecialPowers(oPC);
}
else if (iRandom < 39)
{
sMessage = "Upon your father's death, you inherited a rare item from him and set out in the world to seek fame and fortune.";
GetRareItem(oPC);
}
else if (iRandom < 40)
{
SQLocalsUUID_SetInt(oPC,"HasCustomSkin",1);
sMessage = "You have always had an affinity with magic. This affinity helps you manipulate and resist it.";
SQLocalsUUID_SetInt(oPC,"SpecialPowers",8);
CreateSpecialPowers(oPC);
}
else if (iRandom < 41)
{
sMessage = "Your father was a powerful sorcerer and upon his death you inherited a rare artifact that imparted some of that power to you.";
GetInfiniteSpells(oPC);
}
else if (iRandom < 42)
{
//SuperPowers
SQLocalsUUID_SetInt(oPC,"HasCustomSkin",1);
sMessage = "You are descended from an ancient race who wield special powers far beyond those of mortal man.";
iRandom2 = Random(10)+1;
//iRandom2 = 7;
switch (iRandom2)
{
case 1: sMessage = sMessage + " You were born with the power to heal from wounds almost instantly.";
SQLocalsUUID_SetInt(oPC,"SuperPowers",1);
break;
case 2: sMessage = sMessage + " You were born with super speed and dexterity.";
SQLocalsUUID_SetInt(oPC,"SuperPowers",2);
break;
case 3: sMessage = sMessage + " You were born in a quasi-ethereal state which leaves you imperveous to physical damage.";
SQLocalsUUID_SetInt(oPC,"SuperPowers",3);
break;
case 4: sMessage = sMessage + " You were born with complete immunity to magical spells.";
SQLocalsUUID_SetInt(oPC,"SuperPowers",4);
break;
case 5: sMessage = sMessage + " You were born with great control over fire.";
SQLocalsUUID_SetInt(oPC,"SuperPowers",5);
SQLocalsUUID_SetInt(oPC,"WeaponBonus",1);
break;
case 6: sMessage = sMessage + " You were born with super strength beyond that of mortal man.";
SQLocalsUUID_SetInt(oPC,"SuperPowers",6);
break;
case 7: sMessage = sMessage + " You were born with the ability to assume multiple forms.";
oItem=CreateItemOnObject("en4_forms",oPC);
SetStolenFlag(oItem,TRUE);
SQLocalsUUID_SetInt(oPC,"HasCustomSkin",0);
break;
case 8: sMessage = sMessage + " You were born with the knowledge of an ancestor who was a powerful wizard.";
oItem=CreateItemOnObject("en4_spells",oPC);
SetStolenFlag(oItem,TRUE);
SQLocalsUUID_SetInt(oPC,"HasCustomSkin",0);
break;
case 9: sMessage = sMessage + " You were born destined to become a hero of epic proportions. This destiny grants you speed, immunity to fear, death, and fatal blows, and great control over weapons.";
SQLocalsUUID_SetInt(oPC,"SuperPowers",7);
break;
case 10: sMessage = sMessage + " You were born with vampiric powers which are channeled through your weapon.";
SQLocalsUUID_SetInt(oPC,"SuperPowers",8);
break;
}
CreateSuperPowers(oPC);
}
else if (iRandom < 43)
{
if (Random(2)==0)
{
sMessage = "You were met on the road by a stange gypsy who gave you a playing card and told you that great power could come from its use, as could great ruin, and its use is limited to once per day. You are unsure of whether or not you want to use the card.";
oItem=CreateItemOnObject("en4_card",oPC);
SetStolenFlag(oItem,TRUE);
} else {
if (Random(2) == 0)
{
sMessage = "Your father was a wizard who left you a magical helm containing great powers of domination upon his death.";
oItem = CreateItemOnObject("en4_eyes",oPC);
SetStolenFlag(oItem,TRUE);
} else {
if (GetAbilityScore(oPC,ABILITY_CHARISMA)>9)
{
SQLocalsUUID_SetInt(oPC,"Charming",1);
sMessage = "You have an inherent spark that causes people to like you. As such, you gather fame easier.";
} else {
SQLocalsUUID_SetInt(oPC,"Lucky",1);
sMessage = "All of your life you have had the benefit of great luck. If you gambled, you invariably won. If danger was near, you invariably survived. You decided to go out into the world to make a name for yourself armed with the knowledge that your luck would protect you.";
}
}
}
}
else
sMessage = "You arrive in Hightop City ready to make a name for yourself.";
} else {
sMessage = "After a long journey, you arrive in Hightop City ready to make a name for yourself.";