local cd = { cdtime = 30, --//-- quanto tempo fica sem usar o item str = 65545, --- não mexa pos = {x = 81, y = 339, z = 7}, --- pos para onde o player vai } function onUse(cid, item, fromPosition, itemEx, toPosition) if getPlayerStorageValue(cid, cd.str) < os.time() and not getCreatureCondition(cid, CONDITION_INFIGHT) then setPlayerStorageValue(cid, cd.str, os.time() + cd.cdtime) doPlayerSendTextMessage(cid, 19, "Voce foi transportado de volta a File City") -- mensagem que sairá quando ele for teleportado doTeleportThing(cid, cd.pos) doSendMagicEffect(getThingPos(cid), 10) doRemoveItem(item.uid, 1) elseif getPlayerStorageValue(cid, cd.str) >= os.time() then doPlayerSendTextMessage(cid, 19, "Espera para usar novamente") else doPlayerSendTextMessage(cid, 19,"Impossivel usar esse item em batalhas!") doSendMagicEffect(getThingPos(cid), 2) end return true end





info
Grupo: Campones
Registrado: 18/03/13
Posts: 18
Reputação: 0
Boa noite galera.
Bom, eu tenho aqui um script de tp scroll bem simples e queria que ele tivesse duas funções a mais, que seriam:
-Delay de 10 minutos para usar novamente
-Não poder usar em batalha
Se alguém puder me ajudar