function onUse(cid, item, fromPosition, itemEx, toPosition)
local position = {x = 1248, y = 730, z = 6} -- pos pra onde sera levado o cara
local temp = {
exhausted = 300, --delay
storage = 303 -- storage
}
if getPlayerStorageValue(cid, 303) > os.time() then
doPlayerSendTextMessage(cid, 22, "Voce está exausto, espere " .. getPlayerStorageValue(cid, temp.storage) - os.time() .. ' segundo' .. ((getPlayerStorageValue(cid, temp.storage) - os.time()) == 1 and "" or "s"))
return true
end
if isPlayer(itemEx.uid) then
doTeleportThing(itemEx.uid, position)
doPlayerSay(cid, 'Kamui!', TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid, temp.storage, os.time() + temp.exhausted)
else
return doPlayerSendCancel(cid, "Você só pode usar esse item em players.")
end
return true
end
Tag Actions.xml:
<action itemid="IDdoITEM" script="NomeDoScript.lua" />





info
Grupo: Artesão
Registrado: 31/12/10
Posts: 136
Reputação: +1
tpw, galera eu usar tal item em algum player e ele é teleportado para y z x ....
e que tenha enxausted de 5 minutos
helppp pliz-me isso seria meu mangekyou kamui