Guest User

Untitled

a guest
Oct 24th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.29 KB | None | 0 0
  1. init start
  2.     local SLIME_FUNGS_IDS = {--[[ PUT IDS HERE ]]--}
  3.    
  4.     table.newsort(SLIME_FUNGS_IDS)
  5. init end
  6.  
  7. auto(100)
  8. for X = -7, 7 do
  9.     for Y = -7, 7 do
  10.         local POSX, POSY, POSZ = $posx + X, $posy + Y, $posz
  11.  
  12.         if (tilereachable(POSX, POSY, POSZ) and table.binaryfind(SLIME_FUNGS_IDS, topitem(POSX, POSY, POSZ).id)) then
  13.             if (ground($posx, $posy, $posz) == ground(POSX, POSY, POSZ)) then
  14.                 return
  15.             end
  16.  
  17.             local TOP_ID = topitem(POSX, POSY, POSZ).id
  18.  
  19.             setcavebot('off')
  20.             pausewalking(10000)
  21.  
  22.             while (tilereachable(POSX, POSY, POSZ) and $posz == POSZ and (math.abs($posx - POSX) > 1 or math.abs($posy - POSY) > 1)) do
  23.                 if (ground($posx, $posy, $posz) == ground(POSX, POSY, POSZ)) then
  24.                     pausewalking(0)
  25.                     setcavebot('on')
  26.                     return
  27.                 end
  28.            
  29.                 reachlocation(POSX, POSY, POSZ)
  30.             end
  31.  
  32.             while (topitem(POSX, POSY, POSZ).id == TOP_ID and (math.abs($posx - POSX) <= 1 and math.abs($posy - POSY) <= 1) and $posz == POSZ) do
  33.                 if (ground($posx, $posy, $posz) == ground(POSX, POSY, POSZ)) then
  34.                     pausewalking(0)
  35.                     setcavebot('on')
  36.                     return
  37.                 end
  38.  
  39.                 useitemon(12077, topitem(POSX, POSY, POSZ).id, ground(POSX, POSY, POSZ))
  40.                 pausewalking(5000)
  41.                 wait(15500, 16200)
  42.             end
  43.  
  44.             pausewalking(0)
  45.             setcavebot('on')
  46.         end
  47.     end
  48. end
Add Comment
Please, Sign In to add comment