Eu não sei qual efeito certo iria ser, então eu só editei para aparecer um efeito em você e no player.
Aqui está o script:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local position = {x = 1045, y = 1048, z = 4} -- pos pra onde sera levado o cara
local mana = 10000
local efeito = 1 --numero do efeito
local temp = {
exhausted = 600, --delay
storage = 301 -- storage
}
if (not doCreatureAddMana(cid, -mana)) then
return doPlayerSendCancel(cid, "Você não tem mana.")
end
if getTilePzInfo(getCreaturePosition(cid)) then
return doPlayerSendCancel(cid, "O item nao tem poder em Protection Zones.")
end
if getPlayerStorageValue(cid, 301) > 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
doSendMagicEffect(getCreaturePosition(cid), 196)
doSendMagicEffect(itemEx.uid, efeito)
doTeleportThing(itemEx.uid, position)
doPlayerSay(cid, 'KAMUI', TALKTYPE_ORANGE_1)
doSendMagicEffect(getCreaturePosition(cid), 196)
setPlayerStorageValue(cid, temp.storage, os.time() + temp.exhausted)
else
return doPlayerSendCancel(cid, "Você só pode usar esse item em players.")
end
return true
end




info
Grupo: Artesão
Registrado: 31/12/10
Posts: 136
Reputação: +1
er
Editado Março 26 por Wiihtop