Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function initiate()
- term.clear()
- turtle.select(1)
- turtle.refuel(3)
- textOutput("Slot 1: Coal", 1, 4, 0)
- textOutput("Slot 2: Cobblestone", 1, 5, 0)
- textOutput("Slot 3: Torches", 1, 6, 0)
- textOutput("Slot 4: Chests", 1, 7, 0)
- textOutput("Enjoy!", 1, 10, 0)
- end
- function textOutput(output_message, x_screen_pos, z_screen_pos, clear_area)
- term.setCursorPos(x_screen_pos, z_screen_pos)
- if clear_area == 0 then
- clear_area = string.len(output_message)
- end
- write(output_message .. string.rep(" ", (clear_area - string.len(output_message))))
- end
- function CheckFuel()
- if turtle.getFuelLevel() < 500 then
- turtle.refuel(5)
- end
- end
- function customMiningScheme()
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- turtle.up()
- turtle.digUp()
- turtle.down()
- end
- function Hammer()
- if turtle.detectDown() == false then
- turtle.select(2)
- turtle.placeDown()
- end
- customMiningScheme()
- end
- function placeTorch()
- turtle.turnRight()
- turtle.turnRight()
- turtle.select(4)
- turtle.place()
- turtle.turnRight()
- turtle.turnRight()
- end
- function excavation()
- placeTorch()
- i = 1
- while (i < 10) do
- Hammer()
- i = i + 1
- end
- end
- function start()
- initiate()
- while true do
- CheckFuel()
- excavation()
- end
- end
- start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement