• 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!

Request Script

I created a movements script for your "vocation door"

Set action id "4005" on the vocation tile

then copy this

movements.xml at the end of the file

Code:
	<movevent event="StepIn" actionid="4005" script="vocation.lua"/>

vocation.lua in the "scripts" folder:

Code:
function onStepIn(cid, item, position, fromPosition)

local location = {x=1079, y=1045, z=7}

		if getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 5 then
			doTeleportThing(cid, location, TRUE)
			doSendMagicEffect(location, 10)
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You are a Sorcerer. You may proceed.")
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You are not a sorcerer.")
			doTeleportThing(cid, fromPosition, TRUE)
			doSendMagicEffect(fromPosition, 2)
		end
end


Just change the number 1 and 5 to the ids of the vocation you want too be able to pass
Code:
if getPlayerVocation(cid) == [COLOR=red]1[/COLOR] or getPlayerVocation(cid) == [COLOR=red]5[/COLOR] then

and change the text message for the vocation name

Code:
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "[COLOR=red]You are not a sorcerer.[/COLOR]")

you also change this coordinates to the ones you want the player to be teleported too

Code:
local location = {x=[COLOR=red]1079[/COLOR], y=[COLOR=red]1045[/COLOR], z=[COLOR=red]7[/COLOR]}

If the player has wrong vocation then he will be pushed back from where he walked from.

hope i helped you..

//Massen
 
Back
Top