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

Lua Monk:(

vBzone

Banned User
Joined
Mar 1, 2009
Messages
119
Reaction score
0
[1:46:41.232] [Error - MoveEvents Interface]
[1:46:41.232] data/movements/scripts/trainingmonk.lua: onStepIn
[1:46:41.232] Description:
[1:46:41.232] (luaGetThingPosition) Thing not found
[1:46:50.248] Master Fusion has logged in.

help

file
function onStepIn(cid, item, position, fromPosition)
for i = 17000, 17122 do
local pos = getThingPos(i)
if not isPlayer(getTopCreature(pos).uid) then
doTeleportThing(cid, pos)
doCreatureSay(cid, 'Do not use any tool to skill.', 19, false, cid)
doSendMagicEffect(position, CONST_ME_TELEPORT)
doSendMagicEffect(pos, CONST_ME_TELEPORT)
return
end
end
doTeleportThing(cid, fromPosition, true)
doCreatureSay(cid, 'All training slots are taken', 19, false, cid)
doSendMagicEffect(fromPosition, CONST_ME_TELEPORT)
end
 
Last edited:
well, since its a MoveEvent:
LUA:
function onStepIn(cid, item, position, fromPosition)
	for i = 17000, 17122 do
		local pos = getThingPos(item.uid)
		if not isPlayer(getTopCreature(pos).uid) then
			doTeleportThing(cid, pos)
			doCreatureSay(cid, 'Do not use any tool to skill.', 19, false, cid)
			doSendMagicEffect(position, CONST_ME_TELEPORT)
			doSendMagicEffect(pos, CONST_ME_TELEPORT)
			return false
		end
	end
	doTeleportThing(cid, fromPosition, true)
	doCreatureSay(cid, 'All training slots are taken', 19, false, cid)
	doSendMagicEffect(fromPosition, CONST_ME_TELEPORT)
end

XML:
	   <movevent type="StepIn" uniqueid="17000-17122" event="script" value="scriptname.lua"/>

it should work
 
wrong. this should be a single teleport and the destinations should be tiles with uids ranging from 17000 to 17122

OP got the error because he doesn't have the tiles
 
Back
Top