Postado Abril 12, 2017 8 anos Um cara fez um script de Level max por vocação que segue a baixo: 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(storage) == 1 then doPlayerAddExperience(cid, (getExperienceForLevel(getLevel) - getPlayerExperience(cid))) setPlayerStorageValue(storage, 1) return true end return true end Porém não está funcionando e da esse erro, alguem arruma ou ajuda? Citar [11:9:40.823] [Error - CreatureScript Interface] [11:9:40.825] data/creaturescripts/scripts/maxlevel.lua:onAdvance [11:9:40.826] Description: [11:9:40.827] (luaGetCreatureStorage) Creature not found Editado Abril 13, 2017 8 anos por Duality (veja o histórico de edições)
Postado Abril 13, 2017 8 anos @Duality tem certeza que o arquivo é esse ? O erro está apontando a chamada de uma função que que não existe, porém essa função não está declarada no script.
Postado Abril 13, 2017 8 anos Autor @KotZletY Obrigado por reparar, ele modificou e eu não tinha percebido Mas agora da esse erro: Citar [11:9:40.823] [Error - CreatureScript Interface] [11:9:40.825] data/creaturescripts/scripts/maxlevel.lua:onAdvance [11:9:40.826] Description: [11:9:40.827] (luaGetCreatureStorage) Creature not found E não funciona Editado Abril 13, 2017 8 anos por Duality (veja o histórico de edições)
Postado Abril 13, 2017 8 anos @Duality que não ia funcionar eu já sabia, mas queria saber da função.... Use este: Spoiler 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
Postado Abril 13, 2017 8 anos Autor @KotZletY Não aparenta nenhum erro, mas a vocação passa do level especificado como 501 e 601
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.