OTS - Teleport rune

Open Actions.xml located in Data>Actions
Open it in wordpad or notepad
and put in

<action itemid=”3097” script=”teleportrune.lua” allowfaruse=”1”/>

Change this to any ID you would like for this rune

Anywhere, as long as its BELOW <actions> and ABOVE </actions>

Ok, Copy any .lua file and paste it in the script folder which is located in Data>Actions>Scripts

Rename it teleportrune.lua
Open it in wordpad or notepad,
Delete all the text in it
and replace it with the code below

function onUse(cid, item, frompos, item2, topos)
if getPlayerAccess(cid) 3 then
doSendMagicEffect(frompos,10)
doTeleportThing(cid,topos)
doSendMagicEffect(topos,10)
end
if getPlayerAccess(cid) 2 then
doSendMagicEffect(frompos,10)
doTeleportThing(cid,topos)
doSendMagicEffect(topos,10)
end
if getPlayerAccess(cid) 1 then
doSendMagicEffect(frompos,10)
doTeleportThing(cid,topos)
doSendMagicEffect(topos,10)
end
if getPlayerAccess(cid) 0 then
doSendMagicEffect(frompos,10)
doTeleportThing(cid,topos)
doSendMagicEffect(topos,10)
end
return 1
end

This one means only people with access 3 can use it
This one means only people with access 2 can use it
This one means only people with access 1 can use it
This one means only people with access 0 can use it

This rune makes the player teleport by clicking on a square on the ground and he teleports to that square.

P.S ID code is 3097. Unless you have changed it

P.S I will see if I can make one that teleports you to a certain position.

Related Articles
Action scripts tutorial
Open Tibia Server - creation
Open Tibia Server for absolute beginners
Ots map quests - otserv
Otserver - ot server general
Basic Tibia ots tutorials
Simple tutorials for Tibia 7.6
Making items on GM
Easy way to make a restarter
Raids


Previous article: How to make a simple quest
Next article: Level door