Advertisement
Guest User

Action

a guest
Sep 20th, 2014
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.54 KB | None | 0 0
  1. local itemToUse = 65487 -- ItemID or "Item Name" of the item you want to use on the ground
  2. local idToUseOn = {13866, 13865} -- ID Array of corpses or tiles you want to use items on, can be 1, doesnt matter.
  3. local checkrange = 5 -- Range to check
  4.  
  5. for i = -checkrange,checkrange do
  6.     for j = -checkrange,checkrange do
  7.         for k = 1,#idToUseOn do
  8.             if toptileitem(posx+i, posy+j, posz) == idToUseOn[k] then
  9.                 pausewalking(10000)
  10.                 useitemon(itemToUse, posx+i, posy+j, posz)
  11.                 wait(500,800)
  12.                 pausewalking(10)
  13.             end
  14.         end
  15.     end
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement