testa assim
function doResetStorageValue(cid, time, storage, value)
if isPlayer(cid) then
addEvent(setPlayerStorageValue, time, cid, storage, value)
end
return true
end
info
Group: Conde
Joined: 03/01/12
Posts: 884
Reputation: +233
Tibia Character: Segredo

testa assim
function doResetStorageValue(cid, time, storage, value)
if isPlayer(cid) then
addEvent(setPlayerStorageValue, time, cid, storage, value)
end
return true
end
Resolvido
function doResetStorageValue(cid)
if isCreature(cid) then
setPlayerStorageValue(cid, 4440929, 1)
addEvent(function() if isCreature(cid) then setPlayerStorageValue(cid, 4440929, -1) end end, 2000)
end
end
Obrigado, tb percebi que tava usando errado o addEvent eu deveria ter feito assim
function teste(cid)
if isCreature(cid) then
setPlayerStorageValue(cid, 21103, -1)
end
end
ai chamar o addEvent assim,--> addEvent(teste, 2000, cid).
por isso os erros.
Edited Maio 29 by nociam
info
Group: Administrador
Joined: 26/02/07
Posts: 254
Reputation: +205
Gender: Masculino
Tibia Character: Frenvius

info
Group: Conde
Joined: 04/02/13
Posts: 541
Reputation: +90
Gender: Masculino
Como posso utilizar um addevent para remover certa storage sem ta erro quanto nao tem o summon a um tempo atras tinha um post de como se usar mais nao achei?
ate fiz essa funçao pra ver mais sempre ta o erro (luaDoCreatureSetStorage) Creature not found
function doResetStorageValue(cid, time, storage, value)
if not isCreature(cid) then return true end
addEvent(setPlayerStorageValue, time, cid, storage, value)
end
obs tb usei assim e deu erro
function doResetStorageValue(cid, time, storage, value)
if isCreature(cid) then
addEvent(setPlayerStorageValue, time, cid, storage, value)
end
end
Edited Maio 28 by nociam