View difference between Paste ID: g99XRKXE and q1k7czix
SHOW: | | - or go back to the newest paste.
1-
1+
local r = require("robot")
2-
local r = require("robot")
2+
local inv = require("component").inventory_controller
3-
local inv = require("component").inventory_controller
3+
4-
4+
local function check()
5-
local function check()
5+
  inv.equip()
6-
  inv.equip()
6+
  if (inv.getStackInInternalSlot().damage >= (tostring(inv.getStackInInternalSlot().maxDamage) - 2)) then
7-
  if (inv.getStackInInternalSlot().damage >= (tostring(inv.getStackInInternalSlot().maxDamage) - 2)) then
7+
    r.dropUp()
8-
    okey = false
8+
    repeat
9-
    r.dropUp()
9+
      os.sleep(20)
10-
    repeat
10+
      if r.suckUp() == true then
11-
      os.sleep(20)
11+
        if inv.getStackInInternalSlot().damage <= inv.getStackInInternalSlot().maxDamage - 2 then 
12-
      if r.suckUp() == true then
12+
          break
13-
        if inv.getStackInInternalSlot().damage <= inv.getStackInInternalSlot().maxDamage - 2 then 
13+
        else 
14-
          okey = true 
14+
          r.dropUp()
15-
        else 
15+
        end
16-
          r.dropUp()
16+
      end
17-
        end
17+
    until false
18-
      end
18+
  end
19-
    until okey == true
19+
end
20-
  end
20+
21
local function lava()
22-
22+
  r.useDown()
23-
local function lava()
23+
  r.use()
24-
  r.useDown()
24+
    inv.equip()
25-
  r.use()
25+
    r.swing()
26-
    inv.equip()
26+
end
27-
    r.swing()
27+
28
r.select(1)
29-
29+
30-
r.select(1)
30+
while true do
31-
31+
  for i = 1, 64 do
32-
while true do
32+
    check()
33-
  for i = 1, 64 do
33+
    lava()
34-
    check()
34+
  end
35-
    lava()
35+
  r.turnAround()
36-
  end
36+
  r.select(2)
37-
  r.turnAround()
37+
  r.drop(64)
38-
  r.select(2)
38+
  r.select(1)
39-
  r.drop(64)
39+
  r.turnAround()
40-
  r.select(1)
40+