Postado Abril 16, 2017 8 anos @Duality E o player está com a storage 23423 registrada com valor 1? Te ajudei? Clique em Gostei ! ²²²d¬¬b²²² "She's got a smile that it seems to me...." ♪♪
Postado Abril 17, 2017 8 anos Autor @KotZletY @luangop Vamos la oque eu fiz Criei um arquivo com o nome de maxlevel.lua local cfg = { [501] = {1, 2, 3, 4, 5, 6}, [601] = {7, 8, 9, 10}, [701] = {11, 12 ,13, 14, 15} } local storage = 23423 -- max level storage function onAdvance(cid, skill, oldLevel, newLevel) local playerVocation = getPlayerVocation(cid) getLevel = cfg[newLevel] if newLevel == getLevel and isInArray(getLevel, playerVocation) or getPlayerStorageValue(cid, storage) == 1 then doPlayerAddExperience(cid, (getExperienceForLevel(getLevel) - getPlayerExperience(cid))) setPlayerStorageValue(cid, storage, 1) return true end return true end em seguida adicionei no creaturescript.xml <event type="advance" name="MaxLvl" event="script" value="maxlevel.lua"/> Depois adicionei na login.lua -------------- Novos -------------- registerCreatureEvent(cid, "MaxLvl") local storage = 23423 -- max level storage if getPlayerStorageValue(cid, storage) == 1 then doPlayerSetExperienceRate(cid, 0.0) end Faltou alguma coisa? ou tem algo de errado? Editado Abril 17, 2017 8 anos por Duality (veja o histórico de edições)
Postado Abril 17, 2017 8 anos @Duality sim, faltou "usar o script que eu passei". Spoiler local cfg = { [578] = {1, 2, 3, 4, 5, 6}, [601] = {7, 8, 9, 10}, [701] = {11, 12 ,13, 14, 15} } local storage = 23423 -- max level storage function onAdvance(cid, skill, oldLevel, newLevel) if cfg[newLevel] and isInArray(cfg[newLevel], getPlayerVocation(cid)) then doPlayerSetExperienceRate(cid, 0.0) setPlayerStorageValue(cid, storage, 1) return true end return true end
Postado Abril 17, 2017 8 anos Autor @KotZletY Segui a ordem usando seu script.. continua sem erro e sem funcionar, os personagens passam do lvl desejado no script e estou usando a ID que está no script
Postado Abril 17, 2017 8 anos @Duality local cfg = { [578] = {1, 2, 3, 4, 5, 6}, [601] = {7, 8, 9, 10}, [701] = {11, 12 ,13, 14, 15} } local storage = 23423 -- max level storage function onAdvance(cid, skill, oldLevel, newLevel) if cfg[newLevel] and isInArray(cfg[newLevel], getPlayerVocation(cid)) then doPlayerSetExperienceRate(cid, 0.0) setPlayerStorageValue(cid, storage, 1) return true end return true end Não dê reload no creaturescript, reinicie o servidor.
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.