Postado Setembro 7, 2018 6 anos Diga em poucas palavras a base utilizada (Nome do servidor ou nome do website). Ex. TFS : Pokemon Dash Advanced (1.0) Base: PokexGeneration server Qual erro está surgindo/O que você procura? queria ajuda em um erro no meu servidor de pokemon quando faco um shiny ele da erro no distrito Você tem o código disponível? Se tiver publique-o aqui: local evo = { --nome do shiny, qnts stones precisa ["Snorlax"] = {"Shiny Snorlax", 5}, ["Gengar"] = {"Shiny Gengar", 7}, ["Ninetales"] = {"Shiny Ninetales", 4}, ["Raichu"] = {"Shiny Raichu", 5}, ["Alakazam"] = {"Shiny Alakazam", 7}, } local pokeballs = { [2531] = {"Pokeball"}, [2557] = {"Superball"}, [2524] = {"Greatball"}, [2525] = {"Ultraball"}, [2523] = {"Masterball"}, } function onUse(cid, item, fromPosition, itemEx, toPosition) if isMonster(itemEx.uid) and getCreatureMaster(itemEx.uid) == cid then local monster = getCreatureName(itemEx.uid) if evo[monster] then if getPlayerItemCount(cid, item.itemid) >= evo[monster][2] then doPlayerSendTextMessage(cid, 27, "Congratulations! Your "..getPokeName(itemEx.uid).." evolved into a "..evo[monster][1].."!") local health, maxHealth = getCreatureHealth(itemEx.uid), getCreatureMaxHealth(itemEx.uid) doSendMagicEffect(getThingPos(itemEx.uid), 18) doRemoveCreature(itemEx.uid) doPlayerRemoveItem(cid, item.itemid, evo[monster][2]-1) doRemoveItem(item.uid, 1) doSummonMonster(cid,evo[monster][1]) local pokeball = getPlayerSlotItem(cid, 8) doItemSetAttribute(pokeball.uid, "poke", evo[monster][1]) doItemSetAttribute(pokeball.uid, "level", pokes[evo[monster][1]].level) doItemSetAttribute(ball, "hp", 1) doItemSetAttribute(ball, "happy", 110) local pk = getCreatureSummons(cid)[1] local getShinyPokeballs = balls[getPlayerSlotItem(cid, 8).itemid] doTransformItem(getPlayerSlotItem(cid, 8).uid, getShinyPokeballs.newBall) adjustStatus(pk, pokeball.uid, true, false, true) return true else return doPlayerSendTextMessage(cid, 27, "You need atleast ".. evo[monster][2] .." stones to do it!") end end end return false end [07/09/2018 06:46:32] [Error - Action Interface] [07/09/2018 06:46:32] data/actions/scripts/Shinystone.lua:onUse [07/09/2018 06:46:32] Description: [07/09/2018 06:46:32] (luaDoItemSetAttribute) Item not found [07/09/2018 06:46:32] [Error - Action Interface] [07/09/2018 06:46:32] data/actions/scripts/Shinystone.lua:onUse [07/09/2018 06:46:32] Description: [07/09/2018 06:46:32] (luaDoItemSetAttribute) Item not found [07/09/2018 06:46:33] [Error - Action Interface] [07/09/2018 06:46:33] data/actions/scripts/Shinystone.lua:onUse [07/09/2018 06:46:33] Description: [07/09/2018 06:46:33] data/actions/scripts/Shinystone.lua:42: attempt to index global 'balls' (a nil value) [07/09/2018 06:46:33] stack traceback: [07/09/2018 06:46:33] data/actions/scripts/Shinystone.lua:42: in function <data/actions/scripts/Shinystone.lua:17> Você tem alguma imagem que possa auxiliar no problema? Se sim, coloque-a aqui.
Postado Setembro 7, 2018 6 anos Solução local evo = { --nome do shiny, qnts stones precisa ["Snorlax"] = {"Shiny Snorlax", 5}, ["Gengar"] = {"Shiny Gengar", 7}, ["Ninetales"] = {"Shiny Ninetales", 4}, ["Raichu"] = {"Shiny Raichu", 5}, ["Alakazam"] = {"Shiny Alakazam", 7}, } local pokeballs = { [2531] = {newBall = 1111}, -- edite o "1111" para o id para o qual a pokeball 2531 se transformará [2557] = {newBall = 1111}, [2524] = {newBall = 1111}, [2525] = {newBall = 1111}, [2523] = {newBall = 1111}, } function onUse(cid, item, fromPosition, itemEx, toPosition) if isMonster(itemEx.uid) and getCreatureMaster(itemEx.uid) == cid then local monster = getCreatureName(itemEx.uid) if evo[monster] then if getPlayerItemCount(cid, item.itemid) >= evo[monster][2] then doPlayerSendTextMessage(cid, 27, "Congratulations! Your "..getPokeName(itemEx.uid).." evolved into a "..evo[monster][1].."!") local health, maxHealth = getCreatureHealth(itemEx.uid), getCreatureMaxHealth(itemEx.uid) doSendMagicEffect(getThingPos(itemEx.uid), 18) doRemoveCreature(itemEx.uid) doPlayerRemoveItem(cid, item.itemid, evo[monster][2]-1) doRemoveItem(item.uid, 1) doSummonMonster(cid,evo[monster][1]) local pokeball = getPlayerSlotItem(cid, 8) doItemSetAttribute(pokeball.uid, "poke", evo[monster][1]) doItemSetAttribute(pokeball.uid, "level", pokes[evo[monster][1]].level) doItemSetAttribute(pokeball.uid, "hp", 1) doItemSetAttribute(pokeball.uid, "happy", 110) local pk = getCreatureSummons(cid)[1] local getShinyPokeballs = pokeballs[getPlayerSlotItem(cid, 8).itemid] if getShinyPokeBalls then doTransformItem(getPlayerSlotItem(cid, 8).uid, getShinyPokeballs.newBall) adjustStatus(pk, pokeball.uid, true, false, true) end return true else return doPlayerSendTextMessage(cid, 27, "You need atleast ".. evo[monster][2] .." stones to do it!") end end end return false end Contato: Email: [email protected] Discord: Dwarfer#2715
Postado Setembro 7, 2018 6 anos Arrumei o bug que tinha e alguns que dariam problema no stats do pokemon local evo = { --nome do shiny, qnts stones precisa ["Snorlax"] = {"Shiny Snorlax", 5}, ["Gengar"] = {"Shiny Gengar", 7}, ["Ninetales"] = {"Shiny Ninetales", 4}, ["Raichu"] = {"Shiny Raichu", 5}, ["Alakazam"] = {"Shiny Alakazam", 7}, } local pokeballs = { [2531] = {"Pokeball"}, [2557] = {"Superball"}, [2524] = {"Greatball"}, [2525] = {"Ultraball"}, [2523] = {"Masterball"}, } function onUse(cid, item, fromPosition, itemEx, toPosition) if isCreature(itemEx.uid) and isMonster(itemEx.uid) and getCreatureMaster(itemEx.uid) == cid then local monster = getCreatureName(itemEx.uid) if evo[monster] then if getPlayerItemCount(cid, item.itemid) >= evo[monster][2] then doPlayerSendTextMessage(cid, 27, "Congratulations! Your "..getPokeName(itemEx.uid).." evolved into a "..evo[monster][1].."!") local health, maxHealth = getCreatureHealth(itemEx.uid), getCreatureMaxHealth(itemEx.uid) doSendMagicEffect(getThingPos(itemEx.uid), 18) doRemoveCreature(itemEx.uid) doPlayerRemoveItem(cid, item.itemid, evo[monster][2]-1) doRemoveItem(item.uid, 1) doSummonMonster(cid,evo[monster][1]) local pokeball = getPlayerSlotItem(cid, 8) if not pokeball then return false end doItemSetAttribute(pokeball.uid, "poke", evo[monster][1]) doItemSetAttribute(pokeball.uid, "level", pokes[evo[monster][1]].level) doItemSetAttribute(pokeball.uid, "happy", 110) local pk = getCreatureSummons(cid)[1] local getShinyPokeballs = balls[pokeball.itemid] doTransformItem(pokeball.uid, getShinyPokeballs.newBall) adjustStatus(pk, pokeball.uid, true, false, true) return true else return doPlayerSendTextMessage(cid, 27, "You need atleast ".. evo[monster][2] .." stones to do it!") end end end return false end Te ajudei ?? Que tal fazer uma contribuição ?
Postado Setembro 9, 2018 6 anos Autor Em 07/09/2018 em 09:04, Dwarfer disse: local evo = { --nome do shiny, qnts stones precisa ["Snorlax"] = {"Shiny Snorlax", 5}, ["Gengar"] = {"Shiny Gengar", 7}, ["Ninetales"] = {"Shiny Ninetales", 4}, ["Raichu"] = {"Shiny Raichu", 5}, ["Alakazam"] = {"Shiny Alakazam", 7}, } local pokeballs = { [2531] = {newBall = 1111}, -- edite o "1111" para o id para o qual a pokeball 2531 se transformará [2557] = {newBall = 1111}, [2524] = {newBall = 1111}, [2525] = {newBall = 1111}, [2523] = {newBall = 1111}, } function onUse(cid, item, fromPosition, itemEx, toPosition) if isMonster(itemEx.uid) and getCreatureMaster(itemEx.uid) == cid then local monster = getCreatureName(itemEx.uid) if evo[monster] then if getPlayerItemCount(cid, item.itemid) >= evo[monster][2] then doPlayerSendTextMessage(cid, 27, "Congratulations! Your "..getPokeName(itemEx.uid).." evolved into a "..evo[monster][1].."!") local health, maxHealth = getCreatureHealth(itemEx.uid), getCreatureMaxHealth(itemEx.uid) doSendMagicEffect(getThingPos(itemEx.uid), 18) doRemoveCreature(itemEx.uid) doPlayerRemoveItem(cid, item.itemid, evo[monster][2]-1) doRemoveItem(item.uid, 1) doSummonMonster(cid,evo[monster][1]) local pokeball = getPlayerSlotItem(cid, 8) doItemSetAttribute(pokeball.uid, "poke", evo[monster][1]) doItemSetAttribute(pokeball.uid, "level", pokes[evo[monster][1]].level) doItemSetAttribute(pokeball.uid, "hp", 1) doItemSetAttribute(pokeball.uid, "happy", 110) local pk = getCreatureSummons(cid)[1] local getShinyPokeballs = pokeballs[getPlayerSlotItem(cid, 8).itemid] if getShinyPokeBalls then doTransformItem(getPlayerSlotItem(cid, 8).uid, getShinyPokeballs.newBall) adjustStatus(pk, pokeball.uid, true, false, true) end return true else return doPlayerSendTextMessage(cid, 27, "You need atleast ".. evo[monster][2] .." stones to do it!") end end end return false end cara vlw mesmo funciono e parou os erro muito obrigado rep+
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.