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

A Movement script help

Untested:
Lua:
local pos = {x = 1000, y = 1000, z = 1000} --position to make the door
local doorID = 1209 --ID of the door you want to make

onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
   if not(getThingFromPos(pos).itemid == doorID) then
      doCreateItem(doorID, 1, pos)
      return true
   end
   return true
end
 
Untested:
Lua:
local pos = {x = 1000, y = 1000, z = 1000} --position to make the door
local doorID = 1209 --ID of the door you want to make

onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)

   if not(getThingFromPos(pos).itemid == doorID) then
      doCreateItem(doorID, 1, pos)
      return true
   end
   return true
end
if u look at it u would know that its untested coz there is no z=1000 :D
 
Lua:
local UID = XXX -- Unique ID of The Tile
local create = XXX -- ID of the Item To Be Created
local pos = {x = XXX, y = XXX, z = XXX} -- pos Of The Item To Be Created

function onStepIn(cid, item, position, fromposition)
if item.uid == UID then
doCreateItem(create, 1, pos)
end
return 1
end

this is also not tested but it should work

EDIT : Dont Forget To Add In Movements.xml

XML:
<movevent type="StepIn" uniqueid="XXXX" event="script" value="CreateItem.lua"/>
 
Back
Top