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

Tile Anti Mob

donacool

Mapper Scripter Ot Owner
Joined
Jan 15, 2010
Messages
97
Reaction score
0
well i just made a script that if a monster step in a tile it teleports it to the last position (thats why i called it tile anti mob) but it seems to dont be teleporting the mobs to their last pos can someone tell me how to fix it?
heres the script:
tileantimob.lua
Lua:
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
	if isMonster(uid) then
		if item.itemid == 405 and item.uid == 10001 then
			doTeleportThing(cid, fromPosition, TRUE)
		elseif item.itemid == 405 and item.uid == 10002 then
			doTeleportThing(cid, fromPosition, TRUE)
		end return true
	end return true
end return true
movements.xml
XML:
<movement type="StepIn" uniqueid="10001" event="script" value="trainingmonks.lua"/>
<movement type="StepIn" uniqueid="10001" event="script" value="trainingmonks.lua"/>
server info:
the server is the forgotten server 0.3.6pl1.r83 8.54
 
Lua:
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
    return isMonster(cid) and item.itemid == 405 and isInArray({10001,10002},item.uniqueid) and doTeleportThing(cid, fromPosition, true)
end
 
Code:
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
	return (isMonster(cid) and item.itemid == 405 and isInArray({10001, 10002}, item.uid})) and doTeleportThing(cid, fromPosition, true) or true
end

y so mad ;p
 
XML:
<movement type="StepIn" uniqueid="10001" event="script" value="trainingmonks.lua"/>
<movement type="StepIn" uniqueid="10001" event="script" value="trainingmonks.lua"/>
Why duplicate? :p:p
trollin.png

Stop calling onStepIn with so many params, nubs. :p
 
Back
Top