Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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 farm()
- turtle.select(1)
- turtle.forward()
- turtle.digDown()
- turtle.placeDown()
- end
- function right()
- turtle.turnRight()
- farm()
- turtle.turnRight()
- end
- function left()
- turtle.turnLeft()
- farm()
- turtle.turnLeft()
- end
- function home()
- turtle.turnLeft()
- turtle.forward()
- turtle.forward()
- turtle.turnLeft()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- end
- function refuel()
- if turtle.getFuelLevel() < 100 then
- turtle.select(16)
- turtle.suck()
- turtle.refuel()
- end
- end
- function stock()
- for i = 2,15 do
- turtle.select(i)
- turtle.dropDown()
- end
- turtle.turnLeft()
- refuel()
- turtle.turnLeft()
- end
- function farming()
- farm()
- farm()
- farm()
- right()
- farm()
- farm()
- left()
- farm()
- farm()
- home()
- stock()
- end
- function border()
- term.setCursorPos(1,1)
- print "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-"
- term.setCursorPos(1,12)
- print "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-"
- end
- term.clear()
- term.setCursorPos(18,9)
- textOutput("Press enter to start", 1, 9, 0)
- z = 0
- while z < 1 do
- press, key = os.pullEvent()
- if press == "key" and key == 28 then
- break
- end
- end
- term.clear()
- while true do
- farming()
- sleep(60)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement