local vocations = {9,10,11,12} --- allowed vocations.
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
local tpos,v = {x=1,y=1,z=1},getThingPos(cid) -- {x=1,y=1,z=1} is the position you teleport to, don't change getThingPos(cid).
if isInArray(vocations,getPlayerVocation(cid)) then
doTeleportThing(cid,tpos)
doSendMagicEffect(v,10)
else
doTeleportThing(cid,fromPosition)
doPlayerSendTextMessage(cid,27,'You aren\'t the right vocation.')
doSendMagicEffect(v,2)
end
return true
end