potinho
Advanced OT User
Hello guys,
I have this teleport script to the temple, but I would like to improve it:
can you help me?
I have this teleport script to the temple, but I would like to improve it:
- cooldown (in hours)
- put message on screen when using
- Item disappears when used
can you help me?
Lua:
function onUse(cid, item, frompos, item2, topos)
ppos = getPlayerPosition(cid)
temple = getPlayerMasterPos(cid)
if (getCreatureCondition(cid, CONDITION_INFIGHT) == FALSE) then
doTeleportThing(cid, temple, TRUE)
doSendMagicEffect(ppos,66)
doSendAnimatedText(frompos,'Teleport!',16)
else
doPlayerSendCancel(cid,"You can't teleport immediately after fight.")
doSendMagicEffect(ppos,2)
end
return 1
end