• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

[Request] Movement teleport+sorcerer

ond

Veteran OT User
Joined
Mar 24, 2008
Messages
2,782
Solutions
25
Reaction score
491
Location
Sweden
I'm requesting a movement script that is supposed to work like this:

When you StepIn, you will be teleported to a certain location UNLESS you are of vocation id 1 or 5 (Sorcerer)

I think the script is very simple but to me it's not very simple to write! Thanks for now!
 
Code:
function onStepIn(cid, item, position, fromPosition)
	if isPlayer(cid) and not isSorcerer(cid) then
		doTeleportThing(cid, {x=100, y=100, z=7})
	end
end
 
Last edited:
not working, btw, im using Avesta 0.6.3 [7.6]

Error:

Code:
:: Loading MoveEvents ...Warning: [Event::loadScript] Can not load script. data/
movements/scripts/thais/sorcerer_avenue.lua
data/movements/scripts/thais/sorcerer_avenue.lua:2: 'then' expected near 'not'
Warning: [Event::loadScript] Can not load script. data/movements/scripts/thais/s
orcerer_avenue.lua
data/movements/scripts/thais/sorcerer_avenue.lua:2: 'then' expected near 'not'
[done]
 
it doesn't have anything to do that when I walk on the tile, it changes into another id? (like in depot)
 
Code:
Lua Script Error: [MoveEvents Interface]
data/movements/scripts/thais/sorcerer_avenue.lua:onStepIn

data/movements/scripts/thais/sorcerer_avenue.lua:2: attempt to call global 'isSo
rcerer' (a nil value)
stack traceback:
        data/movements/scripts/thais/sorcerer_avenue.lua:2: in function <data/mo
vements/scripts/thais/sorcerer_avenue.lua:1>
 
u don't have the function ^^:p

add this in your global.lua:
Code:
function isSorcerer(cid)
	return (isInArray({1,5}, getPlayerVocation(cid)) == TRUE)
end

function isDruid(cid)
	return (isInArray({2,6}, getPlayerVocation(cid)) == TRUE)
end

function isPaladin(cid)
	return (isInArray({3,7}, getPlayerVocation(cid)) == TRUE)
end

function isKnight(cid)
	return (isInArray({4,8}, getPlayerVocation(cid)) == TRUE)
end
or just modify the script:
Code:
function onStepIn(cid, item, position, fromPosition)
	if isPlayer(cid) and isInArray({1,5}, getPlayerVocation(cid)) == FALSE then
		doTeleportThing(cid, {x=100, y=100, z=7})
	end
end
 
Back
Top