Postado Agosto 22, 2017 7 anos E ae galera, vcs tão bem? Então, como vocês viram no titulo, eu preciso de um script que limite de um char lvl 8 fique com 120 de skill. Gostaria de que fosse no estilo. Do level 1 ao 30, o máximo de qualquer skill se limite para 30. Do level 31 ao 50, o máximo seria 50. Do 61 ao 80, o máximo seria 75. No level 80, o char adquire a profissão que você deseja ser. Dentro da profissão terá varios ranks e esses ranks determinarão o limite de skill. Mas isso é pra outra hora kkkk.... Quem estiver afim de entrar em contato comigo pra conversar sobre montar uma equipe é só me mandar uma mensagem. No momento só preciso de um script que vá até level 80. Obrigado a atenção. Boa noite.
Postado Agosto 22, 2017 7 anos Este tópico foi movido para a área correta. Esta é uma mensagem automática!Pedimos que leia as regras do fórum! Spoiler This topic has been moved to the correct area. This is an automated message!Please read the forum rules.
Postado Agosto 22, 2017 7 anos Solução Em creaturescripts/scripts crie um arquivo: limitskill.lua Spoiler local t = { {level = {1, 30}, max = 30}, {level = {31,60}, max = 50}, {level = {61,80}, max = 75} } function onAdvance(cid, skill, oldLevel, newLevel) local level, skills = getPlayerLevel(cid), {SKILL_FIST, SKILL_CLUB, SKILL_SWORD, SKILL_AXE, SKILL_DISTANCE, SKILL_SHIELD} for i, k in pairs(t) do if skill == SKILL__LEVEL and newLevel == k.level[1] then for i = 0, 5 do setPlayerStorageValue(cid, 19870 + i, -1) doPlayerSetRate(cid, i, getConfigValue('rateSkill')) end end if level >= k.level[1] and level <= k.level[2] then if isInArray(skills, skill) and newLevel >= k.max then doPlayerSetRate(cid, skill, 0.0) doPlayerSave(cid) setPlayerStorageValue(cid, 19870 + skill, 1) return false end end end return true end No login.lua, adicione: registerCreatureEvent(cid, "LimitSkill") Crie outro arquivo.lua em creaturescripts/scripts: checklimit.lua function onLogin(cid) for i = 0, 5 do if getPlayerStorageValue(cid, 19870 + i) == 1 then doPlayerSetRate(cid, i, 0.0) end end return true end Adicione as tags no creaturescripts.xml: <event type="advance" name="LimitSkill" event="script" value="limitskill.lua"/> <event type="login" name="CheckLimit" event="script" value="checklimit.lua"/> Editado Agosto 22, 2017 7 anos por Dwarfer (veja o histórico de edições) Contato: Email: [email protected] Discord: Dwarfer#2715
Postado Agosto 23, 2017 7 anos Autor 3 horas atrás, Dwarfer disse: Em creaturescripts/scripts crie um arquivo: limitskill.lua Mostrar conteúdo oculto local t = { {level = {1, 30}, max = 30}, {level = {31,60}, max = 50}, {level = {61,80}, max = 75} } function onAdvance(cid, skill, oldLevel, newLevel) local level, skills = getPlayerLevel(cid), {SKILL_FIST, SKILL_CLUB, SKILL_SWORD, SKILL_AXE, SKILL_DISTANCE, SKILL_SHIELD} for i, k in pairs(t) do if skill == SKILL__LEVEL and newLevel == k.level[1] then for i = 0, 5 do setPlayerStorageValue(cid, 19870 + i, -1) doPlayerSetRate(cid, i, getConfigValue('rateSkill')) end end if level >= k.level[1] and level <= k.level[2] then if isInArray(skills, skill) and newLevel >= k.max then doPlayerSetRate(cid, skill, 0.0) doPlayerSave(cid) setPlayerStorageValue(cid, 19870 + skill, 1) return false end end end return true end No login.lua, adicione: registerCreatureEvent(cid, "LimitSkill") Crie outro arquivo.lua em creaturescripts/scripts: checklimit.lua function onLogin(cid) for i = 0, 5 do if getPlayerStorageValue(cid, 19870 + i) == 1 then doPlayerSetRate(cid, i, 0.0) end end return true end Adicione as tags no creaturescripts.xml: <event type="advance" name="LimitSkill" event="script" value="limitskill.lua"/> <event type="login" name="CheckLimit" event="script" value="checklimit.lua"/> n consegui fazer nada kkkkkkk
Postado Agosto 23, 2017 7 anos Como assim, amigo? Tente explicar melhor seu problema. Contato: Email: [email protected] Discord: Dwarfer#2715
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.