Não testei:
local config = {
pz = "yes", -- players precisam estar em protection zone para usar? ("yes" or "no").
battle = "yes", -- players deve estar sem battle ("yes" or "no")
pos = {x=1053, y=1049, z=7},
tempo = 10, -- tempo em minutos de exhaust
strg = 50030, -- storage que salva o tempo (não precisa mexer)
}
function onUse(cid, item, frompos, item2, topos)
if(config.pz == "yes") and (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"Voce precisa estar em protection zone pra poder teleportar.")
return TRUE
end
if(config.battle == "yes") and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Voce precisa estar sem battle pra poder teleportar.")
return TRUE
end
if exhaustion.check(cid, strg) then
doPlayerSendCancel(cid, "Voce precisa aguardar "..exhaustion.get(cid, strg).." segundos para usar novamente este item.")
return TRUE
end
if item.itemid == 5957 then
doPlayerSendTextMessage(cid,25,"Voce foi teleportado para o CP de Saffron!")
doPlayerRemoveItem(cid, 13691, 1)
doTeleportThing(cid,config.pos)
doSendMagicEffect(getCreaturePosition(cid), 6)
exhaustion.set(cid, strg, tempo * 60)
end
return 1
end
Boa sorte.








info
Grupo: Campones
Registrado: 07/11/13
Posts: 86
Reputação: 0
function onUse(cid, item, frompos, item2, topos)
end
Alguem poderia colocar exhausted de 10 minutos para usar este item que teleporta?