Suponho que você saiba fazer a tag da spell.
data/spells/você decide:
local msg = "During %d you'll be imortal."
local STORAGE = 91811
local imortal_time = 5 --Segundos.
function onCastSpell(cid, var)
if getPlayerStorageValue(cid, STORAGE) > os.time() then
return doPlayerSendCancel(cid, "Você já está imortal.")
else
setPlayerStorageValue(cid, STORAGE, os.time() + imortal_time)
doPlayerSendTextMessage(cid, 27, msg:format(imortal_time))
end
return true
end
data/creaturescripts/scripts:
--[[
Tags no creaturescripts.xml:
<event type="statschange" name="Imortal" event="script" value="nome do arquivo.lua"/>
<event type="login" name="ImortalLogin" event="script" value="nome do arquivo.lua"/>
]]--
local STORAGE = 91811
function onStatsChange(cid, attacker, type, combat, value)
if isPlayer(cid) then
if getPlayerStorageValue(cid, STORAGE) > os.time() then
return false
end
end
return true
end
function onLogin(cid)
registerCreatureEvent(cid, "Imortal")
return true
end



info
Grupo: Campones
Registrado: 15/10/11
Posts: 60
Reputação: +18
Char no Tibia: Foi Del :/
o nome da diz,uma spell que deixe o player imortal por 5 segundos,e ele só poderá usar outra vez 20 segundos depois!