Eihrenjar

Untitled

Sep 5th, 2011
352
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 KB | None | 0 0
  1. local item = {2650, 2382, 2509, 2050, 2182, 8819, 8820}
  2. -- local itemPos = {x=32370, y=32245, z=7}
  3.  
  4. function Position(x, y, z, stackpos)
  5.     local position = {x = 0, y = 0, z = 0}
  6.     if(isNumeric(x .. y .. z)) then
  7.         position = {x = x, y = y, z = z}
  8.         if(isNumeric(stackpos)) then
  9.                 position.stackpos = stackpos
  10.         end
  11.     end
  12.  
  13.     return position
  14. end
  15.  
  16. function onThink(interval, lastExecution)
  17.        
  18.     for i = 1, 255 do
  19.         if getTileThingByPos(Position(32370, 32245, 7, i)) ~= nil then
  20.             addEvent(doRemoveItem, 500, getItem.uid, 1)
  21.             break
  22.         end
  23.     end
  24.    
  25.     addEvent(doCreateItem, 1000, item[math.random(3)], 1, itemPos)
  26.     return 1
  27. end
Advertisement
Add Comment
Please, Sign In to add comment