Ahh question reguarding exp

Posted by Rob Harper on Tue 23 Sep 2003 05:11 AM — 5 posts, 18,125 views.

#0
Ahh, I lost it, you know the message that displays the exp you gain for every hit you make, well that stoped appearing on my mud after..god knows how many changes, but I just noticed it, does anyone know where that is defaultly located?

Thanks
Canada #1
As far as I know, the message you get when you hit something only happens if one of your skills is increasing, like blades or second attack, as these are dependant on the individual hits. At the end of a battle, you should get a message that you gained XP as you level up. The first is in learn_from_success, and the second is in gain_exp, I beleive. Hope that helps.
#2
Heh, that helped me more then you know, I decided to alter the level system in a way that I would have never thought of normaly. Ahh, another question thou..I assume I would have to do it around gain_exp but do you have and idea of how I can make it that around lets say level 50, if you didnt have a certin skill, you couldnt gain any more exp?


Thanks
Canada #3
Well, assuming that you meant in a specific class, like, combat level 50, the check would be something like:
if ( ch->skill_level[COMBAT_ABILITY] == 50 && ch->pcdata->learned[gsn_YOURSKILL] != 100 )
This would go towards the beginning of the function. If you meant top level 50, same thing, but:
if ( ch->top_level == 50 && ch->pcdata->learned[gsn_YOURSKILL] != 100 )
That should work, just have it return after that. Course, I'm using SWR, it might be a little different, I think its just ch->level in smaug, but general principle shuold work.
#4
It did help, thanks again.