Bom em muitos servidores "avacalhados" possuem aquelas runas ou até mesmo comandos onde se teleporta para o templo sem nenhuma restrição, por exemplo:
Ta na war, a vítima se teletransporta pro templo sem nenhuma restrição com uma palavra mágica.
Ridículo, não é mesmo?
Pois é, agora acabei aperfeiçoando está ideia e vejam o script:
Rune Teleport
Crie um arquivo em actions/scripts com o nome de teleportrr.lua e adicione:
function onUse(cid, item, frompos, item2, topos)
local days = 1
if getPlayerStorageValue(cid, 7870) <= 0 and getCreatureCondition(cid, CONDITION_INFIGHT) == FALSE then
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doSendMagicEffect(getPlayerPosition(cid),10)
doPlayerSendTextMessage(cid,22,"You have just used your daily teleport rune charge.")
setPlayerStorageValue(cid, 7870, os.time()+days*3600*24)
else
horas = math.floor((getPlayerStorageValue(cid, 7870) - os.time())/(3600))
minutos = math.floor((getPlayerStorageValue(cid, 7870) - os.time())/(60))
if horas >= 1 then
return doPlayerSendCancel(cid, "You will be able to use the teleport rune in "..(minutos < 0 and 0 or minutos).." minutes")
else
return doPlayerSendCancel(cid, "You are in the middle of a fight, you cannot use the teleport rune.")
end
end
end
E adicione em actions.xml a seguinte linha:
<action itemid="2314" event="script" value="teleportrr.lua"/>
É isso e me desculpem pela demora de correções de bug!