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

Solved [help] Skills bug

Keeq

New Member
Joined
Nov 6, 2012
Messages
100
Reaction score
0
Hi, I have a problem with "blocking skills" can you help.
I have a script that blocks such as "SWORD skill" that we can not tamp more than 100 works but if someone logs out and logs in again it can harass more than 100 skills @TRANSLATE Google

if skill == SKILL_SWORD then
if getPlayerSkillLevel(cid, SKILL_SWORD) >= 100 then
doPlayerSetRate(cid, SKILL_SWORD, 0.0)
doPlayerAddSkillTry(cid, SKILL_SWORD, -(getPlayerSkillTries(cid, SKILL_SWORD)))
 
ok i test

don't work. (my problem?)
My lua have name skillblock.lua
and in login.lua i ADD

registerCreatureEvent(cid, "skillblock")

Great? or what i must write in login.

@RE
Sory, i have in xml (BlockSkills) and in login

registerCreatureEvent(cid, "BlockSkills")

and don;t work ;/ please help me
 
Last edited by a moderator:
The script part you posted, except from "if skill == SKILL_SWORD then", because that's for the advance script.
 
Just add that in login.lua and remove the parts that belong to function onAdvance, so also the line under it and the other lines with skill ==, all return false and the last 2 ends.

In short:
Code:
for skill = 0, 6 do
     if getPlayerSkillLevel(cid, skill) >= 100 then
         doPlayerSetRate(cid, skill, 0.0)
     end
end
 
Last edited:
really do not understand, translate google translates badly :/
Can u fix the script for me? or write line in login.lua


EDIT
That is how I have so
------------------
elseif skill == SKILL_FIST then
if getPlayerSkillLevel(cid, SKILL_FIST) >= 151 then
doPlayerSetRate(cid, SKILL_FIST, 0.0)
doPlayerAddSkillTry(cid, SKILL_FIST, -(getPlayerSkillTries(cid, SKILL_FIST)))
end
return false
------------------
it now has to be so?

elseif skill == SKILL_FIST then
for skill = 0, 6 do
if getPlayerSkillLevel(cid, skill) >= 100 then
doPlayerSetRate(cid, skill, 0.0)
end
end
------------
and if not so, I do not know how to turn and it is very necessary to me;/

hmmm? please
 
Last edited by a moderator:
A you turn me that my script to make it work properly? because I can not keep this;/ Please understand you

please?
 
Last edited by a moderator:
Back
Top