Advertisement
Guest User

[Action] Rookguard Bridge

a guest
Jan 3rd, 2013
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.46 KB | None | 0 0
  1. function onUse(cid, item)
  2.  
  3. local BRIDGE_POS, a = BRIDGE_POS, {
  4. {ID, {x = x, y = y, z = z}},
  5. {ID, {x = x, y = y, z = z}},
  6. {ID, {x = x, y = y, z = z}}
  7. }
  8.  
  9. for I = 1, #a do
  10.    if getTileItemById(a[I][2], a[I][1]).uid > 0 then
  11.       doRemoveItem(getTileItemById(a[I][2], a[I][1]).uid)
  12.         else
  13.             doCreateItem(a[I][1], 1,a[I][2])
  14.             end
  15.          end
  16. return doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) and true
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement