115820
Member
Hi, i want a script when player get level 500,000 him stop up level. When he get lvl 510,000, back level 500,00.
I use TFS 0.4, Tibia Version 8.6
I use TFS 0.4, Tibia Version 8.6
Sorry my english.
Last edited:
function onAdvance(cid, skill, oldLevel, newLevel)
if getPlayerLevel(cid) > 500000 then
doPlayerAddLevel(cid, -1)
end
return TRUE
end
try something like this lol, if its not good enough i'll fix it later on when im not busyLua:function onAdvance(cid, skill, oldLevel, newLevel) if getPlayerLevel(cid) > 500000 then doPlayerAddLevel(cid, -1) end return TRUE end
Don't work.test
Lua:local maxLevel = 999 function onAdvance(cid, skill, oldLevel, newLevel) if (skill == SKILL__LEVEL and newLevel > maxLevel) then return false end return true end
function onAdvance(cid, skill, oldlevel, newlevel)
if(skill == SKILL__LEVEL) then
if getPlayerLevel(cid) >= 500000 then
doPlayerAddExperience(cid, (getExperienceForLevel(500000) - getPlayerExperience(cid)))
end
end
return true
end
you should add negative experience rather than adding it onto the exp he already hasLua:function onAdvance(cid, skill, oldlevel, newlevel) if(skill == SKILL__LEVEL) then if getPlayerLevel(cid) >= 500000 then doPlayerAddExperience(cid, (getExperienceForLevel(500000) - getPlayerExperience(cid))) end end return true end
local maxLevel = 500000
function onAdvance(cid, skill, oldlevel, newlevel)
if skill == SKILL__LEVEL and newLevel >= maxLevel then
doPlayerAddLevel(cid, -(newLevel - maxLevel))
end
return true
end
Dont WORK. ERROryou should add negative experience rather than adding it onto the exp he already has
also why use SKILL__MAGLEVEL? this is for SKILL__LEVEL only
Lua:local maxLevel = 500000 function onAdvance(cid, skill, oldlevel, newlevel) if skill == SKILL__LEVEL and newLevel >= maxLevel then doPlayerAddLevel(cid, -(newLevel - maxLevel)) end return true end
L to lyou should add negative experience rather than adding it onto the exp he already has
also why use SKILL__MAGLEVEL? this is for SKILL__LEVEL only
Lua:local maxLevel = 500000 function onAdvance(cid, skill, oldlevel, newlevel) if skill == SKILL__LEVEL and newLevel >= maxLevel then doPlayerAddLevel(cid, -(newLevel - maxLevel)) end return true end
????L to l
Lua:function onAdvance(cid, skill, oldlevel, newlevel) if(skill == SKILL__LEVEL) then if getPlayerLevel(cid) >= 500000 then doPlayerAddExperience(cid, (getExperienceForLevel(500000) - getPlayerExperience(cid))) end end return true end