to com um sistema de item teleport, queria por para ao usar o item levar 10 segundos usando apos isso executa o doteleport e enquanto passa os 10 segundos executar uma animação effeito num = 1004.
alguem pode me ajudar ?
function onUse(cid, item, frompos, item2, topos) local store = 23562 -- storage q salva o delay local delay = 1 -- tempo em segundos de delay local storage = 23563 local cidade = getPlayerTown(cid) local pos = getTownTemplePosition(cidade) if getPlayerStorageValue(cid, store) - os.time() >= 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, string.format("Aguarde %.2f minutos para usar novamente.", (getPlayerStorageValue(cid, store) - os.time()) / 60)) return true end if getCreatureCondition(cid, CONDITION_INFIGHT) then doPlayerSendCancel(cid, 'Voce nao pode teleportar se estiver em battle.') return true end doPlayerSendCancel(cid,"Teleportado !") doTeleportThing(cid, pos) if getPlayerStorageValue(cid, 84929) >= 1 then--torneio viktor setPlayerStorageValue(cid, 84929, -1) end doRegainSpeed(cid) doPlayerRemoveItem(cid, 2458, 1) setPlayerStorageValue(cid, store, os.time() + delay*60) doSendMagicEffect(getPlayerPosition(cid),110) return true end