Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --@Author: Zach Combs aka TehNoiseBomb
- --@Version: 1.2
- local inputs = {...}
- local fuel = ... --variable passed in (inputs)
- --If the turtle has less than 150 fuel:
- -- Turn left, move forward
- -- Select the second slot
- -- Suck up one item from the block below the turtle
- -- If the turtle has less than 80 fuel:
- -- Suck up one item from the block below the turtle
- -- Refuel the turtle
- -- Select the first slot in the turtle's inventory
- -- Turn right (twice)
- -- Move forward one block
- -- Turn right
- -- Move forward three blocks
- -- Turn left
- --Otherwise turn right
- --Turtle will now be facing east in the starting position
- if fuel < 150 then
- turtle.turnLeft()
- turtle.forward()
- turtle.select(2)
- turtle.suckDown(1)
- if fuel < 80 then
- turtle.suckDown(1)
- end
- turtle.refuel()
- turtle.select(1)
- turtle.turnRight()
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- for i = 0, 2 do
- turtle.forward()
- end
- turtle.turnLeft()
- else turtle.turnRight()
- end
- --Return the new fuel level of the turtle
- return turtle.getFuelLevel()
Add Comment
Please, Sign In to add comment