• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Teleport Script :D (I need)

Winnerandy

Experienced Web Design'er
Joined
Oct 23, 2008
Messages
2,251
Reaction score
50
Location
Tellus.
Okey I need the script as following:

What I want is that the teleport will be able to teleport people to places with different vocations.

What I mean is that the teleport automatically reads the voc and teleports to a speical POS...

For example a druid with id 2, teleport with the teleport and the teleport will teleport him to X=xxx, Y=x and Z=xxx
, While sorcerer teleports to other POS..

Got me? :O
Sounds little crazy, but I tried to explain as best as I can! :D
 
Lua:
local pos = {
	{x=1007,y=1077,z=6}, -- sorc
	{x=1007,y=1077,z=6}, -- druid
	{x=1007,y=1077,z=6}, -- pala
	{x=1007,y=1077,z=6}  -- knight
}

function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
	return isPlayer(cid) and doTeleportThing(cid, pos[getPlayerVocation(cid) % 4])
end
rep? xd
 
Last edited:
Here you are:
Code:
local destinations = {
	-- [Vocation ID] = {Destination}
	[1] = {x = , y = , z = },
	[2] = {x = , y = , z = },
	[3] = {x = , y = , z = },
	[4] = {x = , y = , z = },
	[5] = {x = , y = , z = },
	[6] = {x = , y = , z = },
	[7] = {x = , y = , z = },
	[8] = {x = , y = , z = }
}

function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
	if (not isPlayer(cid)) then
		return
	end

	doTeleportThing(cid, destinations[getPlayerVocation(cid)])
end
 
can ya tell me exactly what I shall put on movements.xml and where I should put it :D? It didn't worked for me..

Btw, if I have it on movements, then you will be teleport the same places with all other teleports..??
 
Code:
<movevent type="StepIn" uniqueid="xxxx" event="script" value="whateva.lua"/>
Then xxxx uid on teleport.

Not with all teleports, just this certain (Assigned by UniqueID)
 
It doesn't work, I choosed the item 9566, and I also wrote instand of xxxx.. and I located the lua file in movements.xml.. but ingame when i step in, nothing happens??
 
Back
Top