Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArgs = {...}
- function light()
- count = 1
- if count >= 10 then
- count = 0
- robot.select(14)
- robot.turnRight()
- robot.place()
- robot.turnLeft()
- else
- count = count+1
- print(count)
- end
- end
- function chkFull()
- end
- function chkFuel()
- print("Fuel: "..robot.getFuelLevel())
- if robot.getFuelLevel() < 100 then
- robot.select(16)
- robot.refuel(10)
- robot.select(1)
- end
- end
- function mainLoop()
- robot.swing()
- robot.forward()
- robot.turnLeft()
- robot.swing()
- robot.swingUp()
- robot.up()
- robot.swing()
- robot.swingUp()
- robot.up()
- robot.swing()
- robot.turnLeft()
- robot.turnLeft()
- robot.swing()
- robot.down()
- robot.swing()
- robot.down()
- robot.swing()
- robot.turnLeft()
- end
- turtle.select(16)
- if tArgs[1] == nil then tArgs[1] = 1 end
- for i = 1,tArgs[1] do
- print("Interation: "..tostring(i).." of "..tostring(tArgs[1]))
- chkFuel()
- mainLoop()
- light()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement