Remainders? in Developer Help
|
|
Ok, so a var that reaches or is over a var that is the maximum for it shall raise up another bar(yes, a levelup proc), but what if the var is over the maximum var? I have been trying to make remainders for my levelup procs, but it only works once. Here's what Ive got:
proc/LevelUp() if(src.XP == src.MaxXP) src.lvl += 1 src.MaxXP += src.MaxXP src.XP = 0 src.INT += 4 src.DA += 2 src.str += 3 src.MaxHP += 5 src.HP = MaxHP src << "<b>YOU HAVE LEVELED UP, YOU ARE NOW LEVEL [src.lvl]" if(src.lvl == 3) src << "<b>You learned Orchideous!" src.verbs += new/mob/mage/verb/Orchideous if(src.lvl == 550) src << "<b>You learned Avada Kedavra!" src.verbs += new/mob/mage/verb/Avada_Kedavra if(src.XP>src.MaxXP) src.XPremainder = src.XP - src.MaxXP src.XP += src.XPremainder LevelUp()
|
it half works, it raises the MaxXP, but it doesn't raise your stats and level
|
That should cover what you're asking for. By expanding this code you should be able to do everything you want to do with stats.