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

Monster Barrier

valivan601

New Member
Joined
Apr 13, 2011
Messages
365
Reaction score
1
I want monsters that are in water cannot pass the beach but i dont know if i can use doTeleportThing(cid, fromPosition, true) for monsters can anyone help me with this? :)

PHP:
local beach = {4633, 4634, 4635, 4636, 4637, 4638, 4639, 4640, 4641}
 
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)

if(isInArray(beach, item.itemid)) then
	if ((isMonster(cid)) == TRUE) then
		doTeleportThing(cid, fromPosition, true)
	end
end
	return true
end
 
That should work, if isInArray is defined somewhere. And of course if the movements.xml is correct.
Errors in console could point to the first, while you should check the second one yourself.
 
Back
Top