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

Pull lever and make a bridge

Addie

New Member
Joined
Oct 29, 2007
Messages
111
Reaction score
0
Hi! need some help... (easy)
I think this image explains everything but I want a script so when you use/pull the lever the tile drawbridge apperars over the water, acting as a bridge. (ITEM ID: 1284)
10fcbd3.png


And ofcoourse there wil be another lever on the other side :p

thanks!:wub:
 
actions/scripts/script.lua
Lua:
local tile = { x=100, y=100, z=7, stackpos=1 }
local lever_id = 1945
local newId = 0
function onUse(cid, item, fromPosition, itemEx, toPosition) 
   if (item.itemid == lever_id) then 
      newId = XXXX -- Bridge ID
      doTransformItem(item.uid, item.itemid + 1) 
   else 
      newId = XXXX -- Water/Ground ID
      doTransformItem(item.uid, item.itemid - 1) 
   end 
   for i = 1, 3 do 
      tile.y = tile.y - 1 
      doCreateItem(newId, 1, tile) 
      doRemoveItem(getThingfromPos(tile).uid, 1) 
   end
   return true 
end
 
Back
Top