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

Bug block skills HELP.. !

Keeq

New Member
Joined
Nov 6, 2012
Messages
100
Reaction score
0
Whats up fellas, I have a problem because I found the script on the Block Otland skills (been written and that it works at all)
function onAdvance(cid, skill, oldLevel, newLevel)
if skill == SKILL_SWORD then
if getPlayerSkillLevel(cid, SKILL_SWORD) >= 100 then
doPlayerSetRate(cid, SKILL_SWORD, 0.0)
end

elseif skill == SKILL_SWORD then
if getPlayerSkillLevel(cid, SKILL_FIST) >= 100 then
doPlayerSetRate(cid, SKILL_FIST, 0.0)
end
return false

elseif skill == SKILL_AXE then
if getPlayerSkillLevel(cid, SKILL_AXE) >= 100 then
doPlayerSetRate(cid, SKILL_AXE, 0.0)
end
return false

elseif skill == SKILL_CLUB then
if getPlayerSkillLevel(cid, SKILL_CLUB) >= 100 then
doPlayerSetRate(cid, SKILL_CLUB, 0.0)
end
return false

elseif skill == SKILL_DISTANCE then
if getPlayerSkillLevel(cid, SKILL_DISTANCE) >= 100 then
doPlayerSetRate(cid, SKILL_DISTANCE, 0.0)
end
return false

elseif skill == SKILL_SHIELD then
if getPlayerSkillLevel(cid, SKILL_FIST) >= 100 then
doPlayerSetRate(cid, SKILL_FIST, 0.0)
end
return false

elseif skill == SKILL_FISH then
if getPlayerSkillLevel(cid, SKILL_FISH) >= 100 then
doPlayerSetRate(cid, SKILL_FISH, 0.0)
end
return false

end
end
But there is a problem because when skilujemy to 100 it is well more I can not stick because it is locked but when I log off and on again wlogujemy we can knock back one more skill, and so that everyone Logout. Can anyone help? giveReepp
SOORY MY BAD ENGLISH (TRANSLATOR)
 
To fix this, put this script onLogin function instead of onAdvance.
To do this you must change a bit this script:

in creaturescripts.xml add this line:

PHP:
<event type="login" name="BlockSkills" event="script" value="blockSkills.lua"/>

and create inside data/creaturescripts/scripts the file blockSkills.lua and add this inside it:

PHP:
function onLogin(cid)

	if getPlayerSkillLevel(cid, SKILL_SWORD) >= 100 then
		doPlayerSetRate(cid, SKILL_SWORD, 0.0)

	elseif getPlayerSkillLevel(cid, SKILL_FIST) >= 100 then
		doPlayerSetRate(cid, SKILL_FIST, 0.0)

	elseif getPlayerSkillLevel(cid, SKILL_AXE) >= 100 then
		doPlayerSetRate(cid, SKILL_AXE, 0.0)

	elseif getPlayerSkillLevel(cid, SKILL_CLUB) >= 100 then
		doPlayerSetRate(cid, SKILL_CLUB, 0.0)

	elseif getPlayerSkillLevel(cid, SKILL_DISTANCE) >= 100 then
		doPlayerSetRate(cid, SKILL_DISTANCE, 0.0)

	elseif getPlayerSkillLevel(cid, SKILL_FISH) >= 100 then
		doPlayerSetRate(cid, SKILL_FISH, 0.0)
	end	

	return true
end
 
So i didnt understand what you want in you first post..

You wanna a script that when the player reaches the skill level 100, he cannot up it anymore?
 
player have 100skills level and can't skills up ... Player game off and log on serwer to can 1 skills level up / SORY MY BAD ENG
 
player have 100skills level and can't skills up ... Player game off and log on serwer to can 1 skills level up / SORY MY BAD ENG

No problem, but im trying to understand.

So actually the players has skill level 10t you pos0 and can´t skill up (because of the script thated), but when we logoff and logon again he gains one skill. This is what happening? If so, just add this in your script and ignore mine (dont use the login one).

PHP:
function onAdvance(cid, skill, oldLevel, newLevel)
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)))
end

elseif skill == SKILL_FIST then
if getPlayerSkillLevel(cid, SKILL_FIST) >= 100 then
doPlayerSetRate(cid, SKILL_FIST, 0.0)
doPlayerAddSkillTry(cid, SKILL_FIST, -(getPlayerSkillTries(cid, SKILL_FIST)))
end
return false

elseif skill == SKILL_AXE then
if getPlayerSkillLevel(cid, SKILL_AXE) >= 100 then
doPlayerSetRate(cid, SKILL_AXE, 0.0)
doPlayerAddSkillTry(cid, SKILL_AXE, -(getPlayerSkillTries(cid, SKILL_AXE)))
end
return false

elseif skill == SKILL_CLUB then
if getPlayerSkillLevel(cid, SKILL_CLUB) >= 100 then
doPlayerSetRate(cid, SKILL_CLUB, 0.0)
doPlayerAddSkillTry(cid, SKILL_CLUB, -(getPlayerSkillTries(cid, SKILL_CLUB)))
end
return false

elseif skill == SKILL_DISTANCE then
if getPlayerSkillLevel(cid, SKILL_DISTANCE) >= 100 then
doPlayerSetRate(cid, SKILL_DISTANCE, 0.0)
doPlayerAddSkillTry(cid, SKILL_DISTANCE, -(getPlayerSkillTries(cid, SKILL_DISTANCE)))
end
return false

elseif skill == SKILL_SHIELD then
if getPlayerSkillLevel(cid, SKILL_FIST) >= 100 then
doPlayerSetRate(cid, SKILL_FIST, 0.0)
doPlayerAddSkillTry(cid, SKILL_FIST, -(getPlayerSkillTries(cid, SKILL_FIST)))
end
return false

elseif skill == SKILL_FISH then
if getPlayerSkillLevel(cid, SKILL_FISH) >= 100 then
doPlayerSetRate(cid, SKILL_FISH, 0.0)
doPlayerAddSkillTry(cid, SKILL_FISH, -(getPlayerSkillTries(cid, SKILL_FISH)))
end
return false

end
end
 
not working as it should .. It is just that I dig Myself skills and have maximum (100), but as I log out and log on again start game and skills that I can knock back one more skills. but the only one which I have 101 skills, and again, I can log out skills 102 skills .. Please help me :/ / / SORY MY BAD ENG.

- - - Updated - - -

I have serwer NARUTO (character have Transform) (transform - add Hit and skills)
 
Back
Top