Revive dando problema e travando o servidor

victormoaz
em Lixeira Pública

victormoaz

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 12/02/08Posts: 95Gênero: Masculino

Então galera,

Quando utilizo o revive na pokeball, aparece um erro na distro e da uma travadinha no servidor. Nada muito grave mas complica.

 

Erro:

[15/02/2014 18:40:34] [Error - Action Interface]

[15/02/2014 18:40:35] data/actions/scripts/revive.lua:onUse
[15/02/2014 18:40:35] Description:
[15/02/2014 18:40:36] data/actions/scripts/revive.lua:32: attempt to call global 'onPokeHealthChange' (a nil value)
[15/02/2014 18:40:36] stack traceback:
[15/02/2014 18:40:36] data/actions/scripts/revive.lua:32: in function <data/actions/scripts/revive.lua:1>
[15/02/2014 18:40:40] [Error - Action Interface]
[15/02/2014 18:40:41] data/actions/scripts/revive.lua:onUse
[15/02/2014 18:40:41] Description:
[15/02/2014 18:40:41] data/actions/scripts/revive.lua:32: attempt to call global 'onPokeHealthChange' (a nil value)
[15/02/2014 18:40:42] stack traceback:
[15/02/2014 18:40:42] data/actions/scripts/revive.lua:32: in function <data/actions/scripts/revive.lua:1>

Revive.lua:

function onUse(cid, item, frompos, item2, topos)
if getPlayerStorageValue(cid, 990) >= 1 then
doPlayerSendCancel(cid, "You can't use revive during gym battles.")
return true
end
if getPlayerStorageValue(cid, 52481) >= 1 then
return doPlayerSendCancel(cid, "You can't do that while a duel.") --alterado v1.6
end
--
if item2.itemid <= 0 or not isPokeball(item2.itemid) then
doPlayerSendCancel(cid, "Please, use revive only on pokeballs.")
return true
end
for a, b in pairs (pokeballs) do
if item2.itemid == b.on or item2.itemid == b.off then --edited deixei igual ao do PXG
doTransformItem(item2.uid, b.on)
doSetItemAttribute(item2.uid, "hp", 1)
for c = 1, 15 do
local str = "move"..c
setCD(item2.uid, str, 0)
end
setCD(item2.uid, "control", 0)
setCD(item2.uid, "blink", 0) --alterado v1.6
doSendMagicEffect(getThingPos(cid), 13)
doRemoveItem(item.uid, 1)
doCureBallStatus(item2.uid, "all")
cleanBuffs2(item2.uid) --alterado v1.5
if useOTClient then
onPokeHealthChange(cid) --alterei aki
end
return true
end
end
return true
end

OBS.: Servidor que utilizo é o PDA Slicer 1.9 S/ Level.
Se alguem souber rep+

Trabalhos

 

 

 

PSDO - 24h - Exp Stages

 

 

*********No level pokemon******** *

*Aleatory Shiny

*Golden Arena (Meowth Coin)

*Saffari with saffari balls

*Duel System (Order)

*Npc Duel (Gym and others)

*Clan system with task and shinys clan

*Client with Pokebar and CooldownBar

*Rocket and Police System

*Map with constant change (Several Quests)

 

 

2cful5h.png

DuuhCarvalho

:)
avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 19/01/12Posts: 988Gênero: MasculinoChar no Tibia: Xerife Woody

testa ae..

function onUse(cid, item, frompos, item2, topos)

    if getPlayerStorageValue(cid, 990) >= 1 then
        doPlayerSendCancel(cid, "You can't use revive during gym battles.")
    return true
    end
    
    if getPlayerStorageValue(cid, 52481) >= 1 then
     return doPlayerSendCancel(cid, "You can't do that while a duel.")
end
--
    if item2.itemid <= 0 or not isPokeball(item2.itemid) then
        doPlayerSendCancel(cid, "Please, use revive only on pokeballs.")
    return true
    end

    for a, b in pairs (pokeballs) do
if item2.itemid == b.on or item2.itemid == b.off then
doTransformItem(item2.uid, b.on)
doSetItemAttribute(item2.uid, "hp", 1)
for c = 1, 15 do
local str = "move"..c
setCD(item2.uid, str, 0)
     end
     setCD(item2.uid, "control", 0)
     setCD(item2.uid, "blink", 0)
doSendMagicEffect(getThingPos(cid), 13)
doRemoveItem(item.uid, 1)
doCureBallStatus(item2.uid, "all")
cleanBuffs2(item2.uid)
if useOTClient then
end
     return true
end
    end

return true
end

victormoaz

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 12/02/08Posts: 95Gênero: Masculino

Funcionou... Vlw.. REp+

Trabalhos

 

 

 

PSDO - 24h - Exp Stages

 

 

*********No level pokemon******** *

*Aleatory Shiny

*Golden Arena (Meowth Coin)

*Saffari with saffari balls

*Duel System (Order)

*Npc Duel (Gym and others)

*Clan system with task and shinys clan

*Client with Pokebar and CooldownBar

*Rocket and Police System

*Map with constant change (Several Quests)

 

 

2cful5h.png