jestemPolakiem
New Member
City Teleport
created by jestemPolakiem
created by jestemPolakiem
Introduction
Welcome all members of this forum! I would like to give you my newly-created script.
I would like now to present you the third consecutive post the script in a modern and professional style. I would just like to recall once again that everything has been translated Google Translate interpreter (which is why the upper right corner is a special icon)
Description
Action spell is quite simple - after using the object (player) locks up for 30 seconds, by which the figure showing the counter. After this time the player teleports to his temple.
Install
data/spells/spells.xml - after <spells>
PHP:
<instant name="City Teleport" words="exani hom" lvl="20" mana="0" aggressive="0" selftarget="1" exhaustion="5000" needlearn="0" event="script" value="citytp.lua">
<vocation id="1-8"/>
</instant>
data/spells/scripts/citytp.lua
PHP:
function onCastSpell(cid, var)
local function doTeleport(cid, count)
if (not isPlayer(cid)) then
return true
end
doSendAnimatedText(getCreaturePosition(cid), (30 - count).."s", COLOR_ORANGE)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_YELLOW_RINGS)
if (count == 30) then
return doCreatureSetNoMove(cid, false) and doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
else
addEvent(doTeleport, 1000, cid, count + 1)
end
return true
end
return doCreatureSetNoMove(cid, true) and doTeleport(cid, 0)
end
Termination
I greet all
jestemPolakiem