Barbyn
Founder of Granaria 09/10
- Joined
- Jun 13, 2007
- Messages
- 167
- Reaction score
- 1
Add this in /data/movements/movements.xml.
Add this in /data/movements/vocationteleport.lua.
This is a vocation teleport, meaning that only a certain vocation can teleport.
The teleport (Item ID: 1387) should have unique id XXXXX.
nvtp (not vocation teleport)= If player isn't vocation 7 then he will not be teleported to chosen area (vtp). Instead he will be teleported to another area (nvtp).
vtp (vocation teleport)= If player is vocation 7 he will be teleported to chosen area (vtp).
Kindest Regards,
Barbyn
Lua:
<movevent type="StepIn" uniqueid="XXXXX" event="script" value="vocationteleport.lua"/>
Lua:
function onStepIn(cid, item, frompos, item2, topos)
local vocation = getPlayerVocation(cid)
local nvtp = {x=1000, y=1000, z=7}
local vtp = {x=1001, y=1001, z=7}
if vocation == 7 then
doCreatureSay(cid, "TEXT GOES HERE. If player is vocation 7.", TALKTYPE_ORANGE_1)
doTeleportThing(cid, vtp, TRUE)
else
doCreatureSay(cid, "TEXT GOES HERE. If player is not vocation 7.", TALKTYPE_ORANGE_1)
doTeleportThing(cid, nvtp, FALSE)
end
end
The teleport (Item ID: 1387) should have unique id XXXXX.
nvtp (not vocation teleport)= If player isn't vocation 7 then he will not be teleported to chosen area (vtp). Instead he will be teleported to another area (nvtp).
vtp (vocation teleport)= If player is vocation 7 he will be teleported to chosen area (vtp).
Kindest Regards,
Barbyn