59 minutos atrás, XZero disse:Toda vez que tento chamar o poke da ball ele nao sai e da este erro :
[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
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






info
Grupo: Cavaleiro
Registrado: 04/03/17
Posts: 164
Reputação: +68
Gênero: Masculino
Toda vez que tento chamar o poke da ball ele nao sai e da este erro :
[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
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