Character Creation in Developer Help
|
|
I have some code layed out, yet it does nothing when a race is selected.
mob/verb/create_character() usr.name = input("Choose a name for your character.", "Your Name", usr.name)
usr.group = input("Choose your character's race.", "Your Race", usr.group) in list("Warrior","Guardian","Barbarian","Naturalist","Wind Wizard","Water Wizard","Fire Wizard","Earth Wizard","Dark Wizard","Holy Wizard","Witch","Archer","Dwarf","Blacksmith") if("Warrior") usr.icon = 'mob.dmi' usr << "You have chosen the race of the warriors!" sleep(5) usr << "You have the ability of leveling up faster in attack!" if("Guardian") usr.icon = 'mob.dmi' usr << "You have chosen the way of the guardians!" sleep(5) usr << "You have the ability of leveling up faster in defense!" if("Barbarian") usr.icon = 'mob.dmi' usr << "You have selected the life of a barbarian!" sleep(5) usr << "You have the ability of leveling up faster in strength!" if("Naturalist") usr.icon = 'mob.dmi' usr << "You have chosen to be a naturalist!" sleep(5) usr << "You have the ability of leveling up faster in naturalism!" if("Wind Wizard") usr.icon = 'mob.dmi' usr << "You are now a wizard of wind!" sleep(5) usr << "You have the ability of leveling up faster in wind magic." if("Water Wizard") usr.icon = 'mob.dmi' usr << "You are now a wizard of water!" sleep(5) usr << "You have the ability of leveling up faster in water magic." if("Fire Wizard") usr.icon = 'mob.dmi' usr << "You are now a wizard of fire!" sleep(5) usr << "You have the ability of leveling up faster in fire magic." if("Dark Wizard") usr.icon = 'mob.dmi' usr << "You are now a dark wizard!" sleep(5) usr << "You have the ability of leveling up faster in dark magic." if("Holy Wizard") usr.icon = 'mob.dmi' usr << "You are now a holy wizard!" sleep(5) usr << "You have the ability of leveling up faster in holy magic." if("Witch") usr.icon = 'mob.dmi' usr << "You now follow the ways of the witches!" sleep(5) usr << "You have the ability of leveling up faster in witchery." if("Archer") usr.icon = 'mob.dmi' usr << "You have chosen the life of an archer!" sleep(5) usr << "You have the ability of leveling up faster in archery." if("Dwarf") usr.icon = 'mob.dmi' usr << "You have foreseen the ways of the dwarfs!" sleep(5) usr << "You have the ability of leveling up faster in mining." if("Blacksmith") usr.icon = 'mob.dmi' usr << "You are a blacksmith!" sleep(5) usr << "You have the ability of leveling up faster in smithing."
|
How would I make it to where if you choose for example "Dwarf" word's come to the user and the user's icon is 'dwarf.dmi'.
Also the special ablilities for the certain race you choose. I have an equation to do so.
mob Stat() stat("Mining Level:",mininglvl) stat("Mining Experience:",miningexp) stat("Mining Experience Needed:",miningexpn) proc/mininglevelcheck() if(usr.miningexp >= usr.miningexpn) usr.mininglvl += 1 usr.miningexp = usr.miningexp - usr.miningexpn usr.miningexpn = usr.miningexpn * 2 usr << "Congratulations! You just advanced an mining level!" if(usr.group == "Dwarf") usr.miningexpn = usr.miningexp * 15 / 10 if(usr.mininglvl == 100) usr << "You have mastered mining!"
|
But I don't know what to put within if() to make it to where dwarfs mining level exp needed (mingexpn) multiply by 15/10 (1.5) instead of 2 when they level up mining.
Long story short, I want to know how I would make it to where if I choose "Dwarf" from a list in mob/verb/create_character() I would see some messages, have 'dwarf.dmi' as my icon, and get faster leveling up in mining.
|
For the second question, you need to learn how to replace a single damn number. That would be in the Guide.