Estou usando esse script para fazer um portal aparecer e setar uma storage após o monstro morrer... o portal abre, fica la pelos 'x' segungos mas a storage não esta sendo setada.. ja tentei pesquisar mas .. enfim.. alguém poderia corrigir e me explicar o motivo de não estar setando a storage?
(tfs 1.2)
local tpId = 1387 local tps = { ["Little Corym Charlatan"] = {pos = {x=414, y=91, z=11}, toPos = {x=409, y=93, z=11}, time = 30}, } function removeTp(tp) local t = getTileItemById(tp.pos, tpId) if t then doRemoveItem(t.uid, 1) doSendMagicEffect(tp.pos, CONST_ME_POFF) end end function onDeath(cid) local tp = tps[getCreatureName(cid)] if tp then doCreateTeleport(tpId, tp.toPos, tp.pos) doCreatureSay(cid, "A teleport appeared near and will disappear in "..tp.time.." seconds.", TALKTYPE_ORANGE_1) doCreatureSay(cid, "You have killed the disorder and proved be trustworthy", TALKTYPE_ORANGE_1) setPlayerStorageValue(cid, 21321, 1) addEvent(removeTp, tp.time*1000, tp) end return TRUE end
Grato