Amiroslo
Excellent OT User
- Joined
- Jul 28, 2009
- Messages
- 6,767
- Solutions
- 5
- Reaction score
- 769
Here is a script I made, it teleports u to 2 diff places and u can chose wich vocs can go on it
in movements.xml
Not tested, Report bugs!
Lua:
--Made by Amiroslo
local areas = {
pos1 = {
fromPos = {x=1, y=1, z=1},
toPos = {x=1, y=1, z=1}
},
pos2 = {
fromPos = {x=2, y=2, z=2},
toPos = {x=2, y=2, z=2}
}
}
local voc = {1,2,3,4,5,6,7,8}
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
if isInArray(voc, getPlayerVocation(cid)) then
doTeleportThing(cid, {x=math.random(areas.pos1.fromPos, areas.pos1.toPos), y=math.random(areas.pos1.fromPos, areas.pos1.toPos), z=math.random(areas.pos1.fromPos, areas.pos1.toPos)})
doPlayerSendTextMessage(cid, 21, "You have been teleported to room1")
elseif isInArray(voc, getPlayerVocation(cid)) then
doTeleportThing(cid, {x=math.random(areas.pos2.fromPos, areas.pos2.toPos), y=math.random(areas.pos2.fromPos, areas.pos2.toPos), z=math.random(areas.pos2.fromPos, areas.pos2.toPos)})
doPlayerSendTextMessage(cid, 21, "You have been teleported to room2")
else
doPlayerSendCancel(cid, "Sorry you cant enter here!.")
end
return true
end
in movements.xml
XML:
<movevent type="stepIn" actionid="CHOSE AN ID" event="script" value="script.lua"/>
Not tested, Report bugs!
Last edited: