Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rm Infinity
- edit Infinity
- local robot = require("robot")
- local term = require("term")
- local computer = require("computer")
- local component = require("component")
- local sides = require("sides")
- local keyboard = require("keyboard")
- maxbatt = 120000;
- local function sucky()
- print("Activate vacuum cleaner");
- component.tractor_beam.suck()
- while (component.tractor_beam.suck()) do
- component.tractor_beam.suck();
- end
- end
- local function dumpme()
- print("Getting rid of shit")
- for i = 1, robot.inventorySize() do
- robot.select(i)
- robot.drop()
- end
- robot.select(1);
- while computer.energy() < maxbatt do
- os.sleep(1);
- end
- end
- local function burn()
- sucky()
- local vool, replaceable = robot.detect()
- if (replaceable == "replaceable") then
- print("Burn baby, burn");
- else
- roundfin = robot.use();
- if (roundfin == false) then
- finish = 1;
- end
- end
- end
- local function burnLeft()
- robot.turnLeft();
- burn();
- robot.turnRight();
- if (roundfin == 1) then
- goto continue;
- end
- end
- local function burnRight()
- robot.turnRight();
- burn();
- robot.turnLeft();
- if (roundfin == 1) then
- goto continue;
- end
- end
- while true do
- ::continue::
- while (robot.back())do end
- finish = 0;
- term.clear();
- robot.turnLeft();
- dumpme();
- robot.turnAround();
- robot.suck();
- component.inventory_controller.equip();
- robot.turnLeft()
- robot.forward();
- while (roundfin == 0) do
- for i=1,13 do
- burnLeft();
- burnRight();
- robot.forward();
- end
- for i=1,13 do
- burnLeft();
- burnRight();
- robot.back();
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement