Postado Abril 14, 2013 12 anos Testado e funcionando no TFS 0.3.6pl1 (8.54) Vá em data/creaturescripts/scripts e crie um arquivo .lua com o nome de skillblock, adicione isto - function onAdvance(cid, skill, oldLevel, newLevel) if skill == SKILL_SWORD then if getPlayerSkillLevel(cid, SKILL_SWORD) >= 171 then doPlayerSetRate(cid, SKILL_SWORD, 0.0) end elseif skill == SKILL_SWORD then if getPlayerSkillLevel(cid, SKILL_FIST) >= 171 then doPlayerSetRate(cid, SKILL_FIST, 0.0) end return false elseif skill == SKILL_AXE then if getPlayerSkillLevel(cid, SKILL_AXE) >= 171 then doPlayerSetRate(cid, SKILL_AXE, 0.0) end return false elseif skill == SKILL_CLUB then if getPlayerSkillLevel(cid, SKILL_CLUB) >= 171 then doPlayerSetRate(cid, SKILL_CLUB, 0.0) end return false elseif skill == SKILL_DISTANCE then if getPlayerSkillLevel(cid, SKILL_DISTANCE) >= 171 then doPlayerSetRate(cid, SKILL_DISTANCE, 0.0) end return false elseif skill == SKILL_SHIELD then if getPlayerSkillLevel(cid, SKILL_FIST) >= 171 then doPlayerSetRate(cid, SKILL_FIST, 0.0) end return false elseif skill == SKILL_FISH then if getPlayerSkillLevel(cid, SKILL_FISH) >= 171 then doPlayerSetRate(cid, SKILL_FISH, 0.0) end return false end end Substitua 171 pelo limite desejado. Vá em login.lua e adicione isto - registerCreatureEvent(cid, "BlockSkills") Abra creaturescripts.xml e adicione a seguinte tag -<event type="advance" name="BlockSkills" event="script" value="skillblock.lua"/> Créditos - margoh Editado Abril 14, 2013 12 anos por LuckinhaSan (veja o histórico de edições) ►[Mega Topic] Seu Primeiro Open Tibia Server◄ ►Lista Dos Meus Trabalhos◄
Postado Abril 14, 2013 12 anos Tu repetiu o SKILL_SWORD... e se for pra ser todos iguais, dá de simplificar em 6 linhas: function onAdvance(cid, skill, oldLevel, newLevel) local skills = { SKILL_FIST, SKILL_CLUB, SKILL_SWORD, SKILL_AXE, SKILL_DISTANCE, SKILL_SHIELD, SKILL_FISH } if (inArray(skills, skill) and getPlayerSkillLevel(cid, skill) >= 171) then doPlayerSetRate(cid, skill, 0.0) end return true end(não testei) E se tu transformar em switch fica ainda mais curto, mais simples e mais fácil de usar. Editado Abril 14, 2013 12 anos por Lordfire (veja o histórico de edições)
Postado Maio 23, 2013 12 anos Script sem funçao nenhuma '-' ao relogar o bloqueio sai e ele pode upar novamente.
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.