XZero 68 Postado Abril 1, 2017 Share Postado Abril 1, 2017 Toda vez que tento chamar o poke da ball ele nao sai e da este erro : Spoiler [01/04/2017 20:44:22] [Error - Action Interface] [01/04/2017 20:44:22] data/actions/scripts/basic/goback.lua:onUse [01/04/2017 20:44:22] Description: [01/04/2017 20:44:22] data/actions/scripts/basic/goback.lua:50: attempt to call global 'doCreateMonsterNick' (a nil value) [01/04/2017 20:44:22] stack traceback: [01/04/2017 20:44:22] data/actions/scripts/basic/goback.lua:50: in function <data/actions/scripts/basic/goback.lua:1> Goback.lua Spoiler function onUse(cid, item, fromPosition, itemEx, toPosition) local function setGoBackDelay(cid) if not isCreature(cid) then return true end setPlayerStorageValue(cid, storages.gobackDelay, -1) end --doItemSetAttribute(item, "poke", pokemon) if getPlayerSlotItem(cid, 8).uid ~= item.uid then return doSendMsg(cid, "Coloque a pokebola no local correto.") end if isRiderOrFlyOrSurf(cid) then return true end local name = getPokeballName(item) local effe = getBallEffect(item) local name_2 = getPokeballName(item) if getItemAttribute(item.uid, "copyName") then name = getItemAttribute(item.uid, "copyName") end if isPokeballOn(item) then if getPokeballName(item) ~= "" then if getPlayerStorageValue(cid, storages.gobackDelay) == 1 then return end if getPokemonLevel(getPokeballName(item)) > getPlayerLevel(cid) then return doSendMsg(cid, "Você precisa ser no mínimo level "..getPokemonLevel(getPokeballName(item)).." para usar esse pokemon.") end setPlayerStorageValue(cid, storages.gobackDelay, 1) addEvent(setGoBackDelay, 250, cid) local pos = getFreeTile(getThingPos(cid)) local farWay = false if isPosEqual(getFreeTile(getThingPos(cid)), farWayPos) then farWay = true end if getBallNickName(item) ~= 0 then doCreateMonsterNick(cid, name, getBallNickName(item), pos, true) else doCreateMonsterNick(cid, name, name_2, pos, true) end local poke = getCreatureSummons(cid)[1] if farWay then doTeleportThing(poke, farWayPos) doTeleportThing(poke, getThingPos(cid)) end setPlayerStorageValue(poke, 510, name) getPokeDistanceToTeleport(poke) doGoHungreEffect(poke) setMoveSummon(cid, true) doCreatureSetLookDir(poke, getCreatureLookDir(cid)) doSendMagicEffect(getThingPos(poke), effe) doTransformItem(item.uid, item.itemid+1) -- "Using ball" setCreatureMaxHealth(poke, getBallMaxHealth(cid, item)) doCreatureAddHealth(poke, -(getCreatureHealth(poke)-1)) doCreatureAddHealth(poke, (getBallHealth(cid, item)-1)) doItemSetAttribute(item.uid, "healthChanged", getCreatureName(cid)) doOTCSendPokemonHealth(cid) doSendPlayerExtendedOpcode(cid, opcodes.OPCODE_BATTLE_POKEMON, tostring(poke)) poke = getCreatureSummons(cid)[1] ----///////////// Registrar eventos \\\\\\\\\\\\\\\---- if isTorneio(cid) then setPlayerStorageValue(cid, stors.balls2, getPlayerStorageValue(cid, stors.balls2)-1) end for i = 1, #allStatus do if getBallStatus(item.uid, allStatus) then setPokemonStatus(poke, allStatus, getItemAttribute(item.uid, allStatus), getItemAttribute(item.uid, allStatus.."Damage"), true, 0) end end for i = 1, 14 do if getBallMoveDelay(item.uid, i) then setPokemonMoveDelay(poke, i, getItemAttribute(item.uid, "move"..i)) end end ----///////////// Registrar eventos \\\\\\\\\\\\\\\---- local function setStorageGRRR(cid) if not isCreature(cid) then return true end setPlayerStorageValue(cid, 8085, 1) end addEvent(setStorageGRRR, 15, cid)-- nao tire isso doPlayerSay(cid, getCreatureNick(poke)..orderTalks["gopoke"].talks[math.random(#orderTalks["gopoke"].talks)]) end elseif isPokeballUse(item) then if getPlayerStorageValue(cid, storages.gobackDelay) == 1 then return end if #getCreatureSummons(cid) <= 0 then doTransformItem(item.uid, item.itemid+1) return true end setPlayerStorageValue(cid, storages.gobackDelay, 1) addEvent(setGoBackDelay, 250, cid) local poke = getCreatureSummons(cid)[1] local health = getCreatureHealth(poke) local maxHealth = getCreatureMaxHealth(poke) setBallHealth(item, health, maxHealth) doSendMagicEffect(getThingPos(poke), effe) doPlayerSay(cid, getCreatureNick(poke)..orderTalks["backpoke"].talks[math.random(#orderTalks["backpoke"].talks)]) doRemoveCreature(poke) doTransformItem(item.uid, item.itemid-1) setPlayerStorageValue(cid, 8085, 0) -- nao tire isso ----///////////// Registrar eventos \\\\\\\\\\\\\\\---- if isTorneio(cid) then setPlayerStorageValue(cid, stors.balls, getPlayerStorageValue(cid, stors.balls)-1) doCheckBalls(cid) end ----///////////// Registrar eventos \\\\\\\\\\\\\\\---- elseif isPokeballOff(item) then doPlayerSendCancel(cid, "Este pokemon está morto.") return true end return true end Link para o comentário Compartilhar em outros sites More sharing options...
Crypter 136 Postado Abril 2, 2017 Share Postado Abril 2, 2017 59 minutos atrás, XZero disse: Toda vez que tento chamar o poke da ball ele nao sai e da este erro : Ocultar conteúdo [01/04/2017 20:44:22] [Error - Action Interface] [01/04/2017 20:44:22] data/actions/scripts/basic/goback.lua:onUse [01/04/2017 20:44:22] Description: [01/04/2017 20:44:22] data/actions/scripts/basic/goback.lua:50: attempt to call global 'doCreateMonsterNick' (a nil value) [01/04/2017 20:44:22] stack traceback: [01/04/2017 20:44:22] data/actions/scripts/basic/goback.lua:50: in function <data/actions/scripts/basic/goback.lua:1> Goback.lua Mostrar conteúdo oculto function onUse(cid, item, fromPosition, itemEx, toPosition) local function setGoBackDelay(cid) if not isCreature(cid) then return true end setPlayerStorageValue(cid, storages.gobackDelay, -1) end --doItemSetAttribute(item, "poke", pokemon) if getPlayerSlotItem(cid, 8).uid ~= item.uid then return doSendMsg(cid, "Coloque a pokebola no local correto.") end if isRiderOrFlyOrSurf(cid) then return true end local name = getPokeballName(item) local effe = getBallEffect(item) local name_2 = getPokeballName(item) if getItemAttribute(item.uid, "copyName") then name = getItemAttribute(item.uid, "copyName") end if isPokeballOn(item) then if getPokeballName(item) ~= "" then if getPlayerStorageValue(cid, storages.gobackDelay) == 1 then return end if getPokemonLevel(getPokeballName(item)) > getPlayerLevel(cid) then return doSendMsg(cid, "Você precisa ser no mínimo level "..getPokemonLevel(getPokeballName(item)).." para usar esse pokemon.") end setPlayerStorageValue(cid, storages.gobackDelay, 1) addEvent(setGoBackDelay, 250, cid) local pos = getFreeTile(getThingPos(cid)) local farWay = false if isPosEqual(getFreeTile(getThingPos(cid)), farWayPos) then farWay = true end if getBallNickName(item) ~= 0 then doCreateMonsterNick(cid, name, getBallNickName(item), pos, true) else doCreateMonsterNick(cid, name, name_2, pos, true) end local poke = getCreatureSummons(cid)[1] if farWay then doTeleportThing(poke, farWayPos) doTeleportThing(poke, getThingPos(cid)) end setPlayerStorageValue(poke, 510, name) getPokeDistanceToTeleport(poke) doGoHungreEffect(poke) setMoveSummon(cid, true) doCreatureSetLookDir(poke, getCreatureLookDir(cid)) doSendMagicEffect(getThingPos(poke), effe) doTransformItem(item.uid, item.itemid+1) -- "Using ball" setCreatureMaxHealth(poke, getBallMaxHealth(cid, item)) doCreatureAddHealth(poke, -(getCreatureHealth(poke)-1)) doCreatureAddHealth(poke, (getBallHealth(cid, item)-1)) doItemSetAttribute(item.uid, "healthChanged", getCreatureName(cid)) doOTCSendPokemonHealth(cid) doSendPlayerExtendedOpcode(cid, opcodes.OPCODE_BATTLE_POKEMON, tostring(poke)) poke = getCreatureSummons(cid)[1] ----///////////// Registrar eventos \\\\\\\\\\\\\\\---- if isTorneio(cid) then setPlayerStorageValue(cid, stors.balls2, getPlayerStorageValue(cid, stors.balls2)-1) end for i = 1, #allStatus do if getBallStatus(item.uid, allStatus) then setPokemonStatus(poke, allStatus, getItemAttribute(item.uid, allStatus), getItemAttribute(item.uid, allStatus.."Damage"), true, 0) end end for i = 1, 14 do if getBallMoveDelay(item.uid, i) then setPokemonMoveDelay(poke, i, getItemAttribute(item.uid, "move"..i)) end end ----///////////// Registrar eventos \\\\\\\\\\\\\\\---- local function setStorageGRRR(cid) if not isCreature(cid) then return true end setPlayerStorageValue(cid, 8085, 1) end addEvent(setStorageGRRR, 15, cid)-- nao tire isso doPlayerSay(cid, getCreatureNick(poke)..orderTalks["gopoke"].talks[math.random(#orderTalks["gopoke"].talks)]) end elseif isPokeballUse(item) then if getPlayerStorageValue(cid, storages.gobackDelay) == 1 then return end if #getCreatureSummons(cid) <= 0 then doTransformItem(item.uid, item.itemid+1) return true end setPlayerStorageValue(cid, storages.gobackDelay, 1) addEvent(setGoBackDelay, 250, cid) local poke = getCreatureSummons(cid)[1] local health = getCreatureHealth(poke) local maxHealth = getCreatureMaxHealth(poke) setBallHealth(item, health, maxHealth) doSendMagicEffect(getThingPos(poke), effe) doPlayerSay(cid, getCreatureNick(poke)..orderTalks["backpoke"].talks[math.random(#orderTalks["backpoke"].talks)]) doRemoveCreature(poke) doTransformItem(item.uid, item.itemid-1) setPlayerStorageValue(cid, 8085, 0) -- nao tire isso ----///////////// Registrar eventos \\\\\\\\\\\\\\\---- if isTorneio(cid) then setPlayerStorageValue(cid, stors.balls, getPlayerStorageValue(cid, stors.balls)-1) doCheckBalls(cid) end ----///////////// Registrar eventos \\\\\\\\\\\\\\\---- elseif isPokeballOff(item) then doPlayerSendCancel(cid, "Este pokemon está morto.") return true end return true end No Executor do servidor não tem a função doCreateMonsterNick, se tiver a source em mãos adicionar manualmente e recompile Topico com a função Link para o comentário Compartilhar em outros sites More sharing options...
XZero 68 Postado Abril 2, 2017 Autor Share Postado Abril 2, 2017 (editado) 43 minutos atrás, Crypter disse: No Executor do servidor não tem a função doCreateMonsterNick, se tiver a source em mãos adicionar manualmente e recompile Topico com a função ja vi este topico nao funciona , ta infuncional. Editado Abril 2, 2017 por XZero Link para o comentário Compartilhar em outros sites More sharing options...
Crypter 136 Postado Abril 2, 2017 Share Postado Abril 2, 2017 1 hora atrás, XZero disse: ja vi este topico nao funciona , ta infuncional. Ja usei e funciona normal Link para o comentário Compartilhar em outros sites More sharing options...
America 2 Postado Abril 2, 2017 Share Postado Abril 2, 2017 12 horas atrás, Crypter disse: Ja usei e funciona normal 14 horas atrás, XZero disse: ja vi este topico nao funciona , ta infuncional. Realmente eu já vi esse tópico o código ta infuncional. Link para o comentário Compartilhar em outros sites More sharing options...
XZero 68 Postado Abril 2, 2017 Autor Share Postado Abril 2, 2017 12 horas atrás, Crypter disse: Ja usei e funciona normal Nao nao funciono , talvez vc nem tenha testado. Link para o comentário Compartilhar em outros sites More sharing options...
Crypter 136 Postado Abril 2, 2017 Share Postado Abril 2, 2017 3 horas atrás, XZero disse: Nao nao funciono , talvez vc nem tenha testado. Refiz a source do naruto shinobi online e nele era usado esse codigo eu usei e funciona perfeitamente era pra criar clone com o nome do personagem. Link para o comentário Compartilhar em outros sites More sharing options...
Stigal 584 Postado Novembro 29, 2017 Share Postado Novembro 29, 2017 A questão neste tópico de suporte foi encerrada por falta de resposta. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta. Link para o comentário Compartilhar em outros sites More sharing options...
Posts Recomendados