• 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!

Compiling C++ get player skill lvl

Sun

Knowledge is power - France is bacon
Joined
Jan 26, 2015
Messages
334
Solutions
22
Reaction score
249
Aloha!
I'm trying to make a skill wall in C++, which I actually already achived by using "this->getSkill"
However "this->getSkill" has a small flaw. It doesn't check the players base skill lvl, but the displayed skill lvl. In other words: If I put the wall at, say 100 sword, and I got 85 sword + 15 from eq. Those +15 from my eq are counted by "this->getSkill" as well.

So my question is: Is there some C++ function to get base skills not including eq bonus? or a workaround.
If not, that's fine since it works. It's just that I aim for perfection.

Thanks in advance
 
Did you try:
Code:
player->skills[skillType].level

For magic level:
Code:
player->getBaseMagicLevel()
 
Gosh I forgot to add I'm using tfs 0.4 r3884 (facepalm)

Did you try:
Code:
player->skills[skillType].level

Tried this like so
Code:
if(player->skills(SKILL_SWORD, SKILL_LEVEL) >= 90)
And a couple of various ways. I get the same error everytime:`player' was not declared in this scope.

btw the piece of code that I've worked out so far that somewhat works is:
Code:
if(skill == SKILL_SWORD && this->getSkill(SKILL_SWORD, SKILL_LEVEL) >= 90)
 
Gosh I forgot to add I'm using tfs 0.4 r3884 (facepalm)



Tried this like so
Code:
if(player->skills(SKILL_SWORD, SKILL_LEVEL) >= 90)
And a couple of various ways. I get the same error everytime:`player' was not declared in this scope.

btw the piece of code that I've worked out so far that somewhat works is:
Code:
if(skill == SKILL_SWORD && this->getSkill(SKILL_SWORD, SKILL_LEVEL) >= 90)
Try using:

Code:
skills[SKILL_SWORD][SKILL_LEVEL]
 
If anyone looking to make a skillwall comes by this thread, here's how to make it work:
in player.cpp find: void Player::addSkillAdvance
and below paste
Code:
if(skills[SKILL_SWORD][SKILL_LEVEL] >= 100)
        return;
Just change SWORD to the respective skill you want to change it to (not including mlvl).

and for maglevel find: void Player::addManaSpent
and below paste
Code:
if(getVocationId() == 1 && magLevel >= 100)
        return;
If you want it to be the same for all vocs it's: if(magLevel >= 100)
If you want it to be different for each voc you need to add a new line for each vocation id(including promotion vocs)
 
Back
Top