• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[C++] Block skill level ?

Fresh

Quack!
Joined
Oct 21, 2009
Messages
1,855
Solutions
18
Reaction score
665
Hello.
How I can block - set max skill level - example: Fist fighting to 150.

If player grow up the fist fighting to 150 he cant skill more ? Just its max level and skill not progress.
 
on players.cpp find:
void Player::addSkillAdvance

add this on the beginning
Code:
if(skill == SKILL_FIST && this->getSkill(SKILL_FIST, SKILL_LEVEL) == 150)
   return;

repeat for other skills by replacing SKILL_FIST and the 150 for the max level you want
Available skills(My version is 0.4, dunno if its the same for other versions, you can see yours in const.h)
Code:
SKILL_FIST,
SKILL_CLUB,
SKILL_SWORD,
SKILL_AXE,
SKILL_DIST,
SKILL_SHIELD,
SKILL_FISH,
SKILL__MAGLEVEL,
SKILL__LEVEL,

Rep me if it works :D
 
Back
Top