MaXwEllDeN

Untitled

Jul 27th, 2013
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.51 KB | None | 0 0
  1. local positions = {
  2.     {x = 1012, y = 1036, z =7},
  3.     {x = 1013, y = 1036, z =7},
  4.     {x = 1014, y = 1036, z =7},
  5.     {x = 1015, y = 1036, z =7},
  6. }
  7.  
  8. function onUse(cid, item, fromPosition, itemEx, toPosition)
  9.     if item.itemid == 1945 then
  10.         doTransformItem(item.uid, 1946)
  11.     else
  12.         doTransformItem(item.uid, 1945)
  13.     end
  14.  
  15.     for _, pos in pairs(positions) do
  16.         local stone = getTileItemById(pos, 1304).uid
  17.         if stone >= 100 then
  18.             doRemoveItem(stone)
  19.         else
  20.             doCreateItem(1304, 1, pos)
  21.         end
  22.     end
  23.  
  24.     return true
  25. end
Advertisement
Add Comment
Please, Sign In to add comment