Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local cmp = require("component")
- local inv = cmp.inventory_controller
- local r = require("robot")
- local s = require("sides")
- function ch()
- d = r.durability()
- if d>=0.001 and d<0.03 then
- inv.equip()
- r.dropDown()
- os.sleep(15)
- r.turnLeft()
- r.suck()
- r.turnRight()
- inv.equip()
- end
- end
- function ch_inv()
- local slots = r.inventorySize()
- local slot = inv.getStackInInternalSlot(slots)
- if slot ~= nil then
- if slot["size"] >= 32 then
- for i=2, slots do
- r.select(i)
- r.dropUp()
- end
- end
- end
- r.select(1)
- end
- while true do
- ch()
- for i=1,32 do
- r.place()
- r.swing()
- end
- ch_inv()
- print(r.level())
- end
Add Comment
Please, Sign In to add comment