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

Lua doPlayerAddSkillTry() i'm having a trouble, help please!

CheatsBCN

New Member
Joined
Mar 6, 2012
Messages
131
Reaction score
1
Hello, when i add doPlayerAddSkillTry(cid, SKILL_SHIELD,2000) my character with shielding 10 gets shielding 19 and 60% but the problem is that it appears EACH advancing in skill, so during 1minutes or so it start saying this:

20:07 You advanced to shielding level 11.
20:07 You advanced to shielding level 12.
20:07 You advanced to shielding level 13.
20:07 You advanced to shielding level 14.
20:07 You advanced to shielding level 15.
20:07 You advanced to shielding level 16.
20:07 You advanced to shielding level 17.
20:07 You advanced to shielding level 18.
20:07 You advanced to shielding level 19.

and its rlly anoying, i cant imagine what will hapen when i add skills 80 to my knight.. how can I avoid this??? thanks in advance!!!
 
Solution
For TFS 1.x

Find
C++:
void Player::addSkillAdvance(skills_t skill, uint64_t count)

Inside the while-loop you will find this:
C++:
        std::ostringstream ss;
        ss << "You advanced to " << getSkillName(skill) << " level " << skills[skill].level << '.';
        sendTextMessage(MESSAGE_EVENT_ADVANCE, ss.str());

Remove it. Now under the loop put this:
C++:
    if (sendUpdateSkills) {
        std::ostringstream ss;
        ss << "You advanced to " << getSkillName(skill) << " level " << skills[skill].level << '.';
        sendTextMessage(MESSAGE_EVENT_ADVANCE, ss.str());
    }


I haven't tested it but I think it should work.
i wanted to know this as well

huh, or nvm, idk why but it give me only 1 skill... even if i set n for 5 skills...
 
Last edited:
i wanted to know this as well

huh, or nvm, idk why but it give me only 1 skill... even if i set n for 5 skills...
What server are you using? For TFS 1.x at least, if you can compile I can tell you what to fix. Although my fix would make your onAdvance scripts run before the texts appear. Shouldn't be a problem unless you have onAdvance scripts sending messages which might seem odd coming before the actual advance message (although it causes no harm whatsoever).
 
What server are you using? For TFS 1.x at least, if you can compile I can tell you what to fix. Although my fix would make your onAdvance scripts run before the texts appear. Shouldn't be a problem unless you have onAdvance scripts sending messages which might seem odd coming before the actual advance message (although it causes no harm whatsoever).
Ofc i can compile, tell us
 
For TFS 1.x

Find
C++:
void Player::addSkillAdvance(skills_t skill, uint64_t count)

Inside the while-loop you will find this:
C++:
        std::ostringstream ss;
        ss << "You advanced to " << getSkillName(skill) << " level " << skills[skill].level << '.';
        sendTextMessage(MESSAGE_EVENT_ADVANCE, ss.str());

Remove it. Now under the loop put this:
C++:
    if (sendUpdateSkills) {
        std::ostringstream ss;
        ss << "You advanced to " << getSkillName(skill) << " level " << skills[skill].level << '.';
        sendTextMessage(MESSAGE_EVENT_ADVANCE, ss.str());
    }


I haven't tested it but I think it should work.
 
Last edited:
Solution
Back
Top