Advertisement
Romanok2805

break.lua

May 26th, 2018
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local r = require("robot")
  2. local inv = require("component").inventory_controller
  3.  
  4. local function check()
  5.   inv.equip()
  6.   if (inv.getStackInInternalSlot().damage >= (tostring(inv.getStackInInternalSlot().maxDamage) - 2)) then
  7.     r.dropUp()
  8.     repeat
  9.       os.sleep(20)
  10.       if r.suckUp() == true then
  11.         if inv.getStackInInternalSlot().damage <= inv.getStackInInternalSlot().maxDamage - 2 then
  12.           break
  13.         else
  14.           r.dropUp()
  15.         end
  16.       end
  17.     until false
  18.   end
  19. end
  20.  
  21. local function lava()
  22.   r.useDown()
  23.   r.use()
  24.     inv.equip()
  25.     r.swing()
  26. end
  27.  
  28. r.select(1)
  29.  
  30. while true do
  31.   for i = 1, 64 do
  32.     check()
  33.     lava()
  34.   end
  35.   r.turnAround()
  36.   r.select(2)
  37.   r.drop(64)
  38.   r.select(1)
  39.   r.turnAround()
  40. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement