Postado Dezembro 29, 2012 12 anos [16:6:37.960] [Error - LuaInterface::loadFile] data/creaturescripts/scripts/reward45.lua:30: 'end' expected (to close 'if' at line 11) near '<eof>' [16:6:37.960] [Error - Event::checkScript] Cannot load script (data/creaturescripts/scripts/reward45.lua) [16:6:37.960] data/creaturescripts/scripts/reward45.lua:30: 'end' expected (to close 'if' at line 11) near '<eof>' Script: Citar local t = { 39001, { [20] = {2160, 1, "Parabéns, você chegou ao level 20 e ganhou 10k + 29 leveis!", 1}, [70] = {2160, 2, "Parabéns, você chegou ao level 70 e ganhou 20k!", 2}, [125] = {2160, 10, "Parabéns, você chegou ao level 125 e ganhou 100k!", 3}, [200] = {2160, 15, "Parabéns, você chegou ao level 200 e ganhou 200k!", 4}, [300] = {2160, 20, "Parabéns, você chegou ao level 300 e ganhou 300k!", 5} } } function onAdvance(cid, skill, oldlevel, newlevel) if skill == SKILL__LEVEL then for level, v in pairs(t[2]) do if oldlevel < level and getPlayerLevel(cid) >= level and getPlayerStorageValue(cid, t[1]) < v[4] then doPlayerAddItem(cid, v[1], v[2]) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, v[3]) -- promocao do level 20 local player = cid if(newlevel >= 20 and newlevel <= 25) then if (doPlayerAddExp(player, getExperienceForLevel(49)-(getPlayerExperience(player)))) == LUA_ERROR then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Error") end doCreatureAddMana(player, getCreatureMaxMana(player)-getCreatureMana(player)) doCreatureAddHealth(player, getCreatureMaxHealth(player)-getCreatureHealth(player)) end end doPlayerSave(cid, true) return true end
Postado Dezembro 29, 2012 12 anos Estava necessitando "end" e tinha erro em uma tag. Correto local t = { ["20"] = {2160, 1, "Parabéns, você chegou ao level 20 e ganhou 10k + 29 leveis!", 1}, ["70"] = {2160, 2, "Parabéns, você chegou ao level 70 e ganhou 20k!", 2}, ["125"] = {2160, 10, "Parabéns, você chegou ao level 125 e ganhou 100k!", 3}, ["200"] = {2160, 15, "Parabéns, você chegou ao level 200 e ganhou 200k!", 4}, ["300"] = {2160, 20, "Parabéns, você chegou ao level 300 e ganhou 300k!", 5} } function onAdvance(cid, skill, oldlevel, newlevel) if skill == SKILL__LEVEL then for level, v in pairs(t[2]) do if oldlevel < level and getPlayerLevel(cid) >= level and getPlayerStorageValue(cid, t[1]) < v[4] then doPlayerAddItem(cid, v[1], v[2]) doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, v[3]) -- promocao do level 20 local player = cid if(newlevel >= 20 and newlevel <= 25) then if (doPlayerAddExp(player, getExperienceForLevel(49)-(getPlayerExperience(player)))) == LUA_ERROR then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Error") end doCreatureAddMana(player, getCreatureMaxMana(player)-getCreatureMana(player)) doCreatureAddHealth(player, getCreatureMaxHealth(player)-getCreatureHealth(player)) end doPlayerSave(cid, true) return true end end end end
Postado Janeiro 19, 2013 12 anos Skyligh Poderia me dizer como eu fasso para por para ganhar lvl em todos os Ups do script tipo quando chega ao 70 ganha +lvl ao 100 ganha + lvl e assim vai... ? Pfv obrigado
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.