testa assim
function doResetStorageValue(cid, time, storage, value)
if isPlayer(cid) then
addEvent(setPlayerStorageValue, time, cid, storage, value)
end
return true
end
info
Grupo: Conde
Registrado: 03/01/12
Posts: 884
Reputação: +233
Char no Tibia: 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.
Editado Maio 29 por nociam
info
Grupo: Administrador
Registrado: 26/02/07
Posts: 254
Reputação: +205
Gênero: Masculino
Char no Tibia: Frenvius

info
Grupo: Conde
Registrado: 04/02/13
Posts: 541
Reputação: +90
Gênero: 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
Editado Maio 28 por nociam