Qual o motivo deste tópico?
spell de buff dando erro na distro
Está surgindo algum erro? Se sim coloque-o aqui.
[25/08/2024 21:14:12] [Error - Spell Interface]
[25/08/2024 21:14:12] In a timer event called from:
[25/08/2024 21:14:12] data/spells/scripts/maito gai/hachimon_tonkou.lua:onCastSpell
[25/08/2024 21:14:12] Description:
[25/08/2024 21:14:12] (luaDoCreatureSetStorage) Creature not found
[25/08/2024 21:14:12] [Error - Spell Interface]
[25/08/2024 21:14:12] In a timer event called from:
[25/08/2024 21:14:12] data/spells/scripts/maito gai/hachimon_tonkou.lua:onCastSpell
[25/08/2024 21:14:12] Description:
[25/08/2024 21:14:12] (luaDoCreatureSetStorage) Creature not found
[25/08/2024 21:14:42] [Error - Spell Interface]
[25/08/2024 21:14:42] In a timer event called from:
[25/08/2024 21:14:42] data/spells/scripts/maito gai/hachimon_tonkou.lua:onCastSpell
[25/08/2024 21:14:42] Description:
[25/08/2024 21:14:42] (luaDoCreatureSetStorage) Creature not found
[25/08/2024 21:15:22] [Error - Spell Interface]
[25/08/2024 21:15:22] In a timer event called from:
[25/08/2024 21:15:22] data/spells/scripts/maito gai/hachimon_tonkou.lua:onCastSpell
[25/08/2024 21:15:22] Description:
[25/08/2024 21:15:22] (luaDoCreatureSetStorage) Creature not found
[25/08/2024 21:16:12] [Error - Spell Interface]
[25/08/2024 21:16:12] In a timer event called from:
[25/08/2024 21:16:12] data/spells/scripts/maito gai/hachimon_tonkou.lua:onCastSpell
[25/08/2024 21:16:12] Description:
[25/08/2024 21:16:12] (luaDoCreatureSetStorage) Creature not found
[25/08/2024 21:17:12] [Error - Spell Interface]
[25/08/2024 21:17:12] In a timer event called from:
[25/08/2024 21:17:12] data/spells/scripts/maito gai/hachimon_tonkou.lua:onCastSpell
[25/08/2024 21:17:12] Description:
[25/08/2024 21:17:12] (luaDoCreatureSetStorage) Creature not found
Você tem o código disponível? Se tiver publique-o aqui:
function onCastSpell(cid, var)
local storage = 55512 -- Storage para controlar a spell
local stage = getPlayerStorageValue(cid, storage) or 0 -- Obtém o estágio atual da spell, se não houver nenhum, assume 0
local waittimes = {30, 30, 40, 50, 60} -- Tempos de espera para cada estágio em segundos
local storage2 = 55513
local waittime3 = 310
if exhaustion.check(cid, storage2) then
doPlayerSendCancel(cid, "Aguarde " .. exhaustion.get(cid, storage2) .. " segundos para usar a spell novamente.")
return false
end
if not isCreature(cid) then
return false
end
if stage > 0 then
doPlayerSendCancel(cid, "Você já está sob o efeito da spell.")
return false
end
-- Definir o estágio inicial da spell
setPlayerStorageValue(cid, storage, 1)
stage = 1
-- Função para avançar para o próximo estágio após o término do atual
local function advanceStage()
if stage < #waittimes then
stage = stage + 1
setPlayerStorageValue(cid, storage, stage)
-- Programar o próximo avanço de estágio
addEvent(advanceStage, waittimes[stage] * 1000)
else
-- Resetar a storage quando todos os estágios terminarem
setPlayerStorageValue(cid, storage, -1)
end
end
-- Iniciar o avanço de estágio
addEvent(advanceStage, waittimes[stage] * 1000)
-- Definir a exhaustion e aplicar os efeitos iniciais da spell
local waittime = waittimes[1] -- Definir o tempo de exhaustion baseado no primeiro estágio
exhaustion.set(cid, storage2, waittime3)
OpenGate(cid, Select_Stages(getCreatureOutfit(cid).lookType), 1)
-- Definir a storage de volta para -1 após o término do efeito da spell
addEvent(function()
setPlayerStorageValue(cid, storage, -1)
end, waittime * 1000) -- Convertendo segundos para milissegundos
return true
end
o erro começou depois que eu coloquei uma função no creaturescript para deixar todos os player com essa storage 55512, quando relogasse para -1.
a spell não da nenhum erro na distro se o player ficar logado e completar ela inteira, mas quando o player desloga da esses erros na distro, mesmo se o player tiver deslogado continua dando o erro na distro...
alguem da uma força por favor, deixei o outro topico em que me ajudaram a acertar a spell certinho porem começou a dar este erro agora...