Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("kapi")
- while true do
- kapi.menu("Manual Treefarm\n\nPut sapling in slot 1.\nPut fuel (if needed) in slot 2\nPress enter to chop.\nPress R to refuel.\nPress A to automate treefarm.\n\nCAUTION: This program doesn't have a sapling suck function, so hang around!")
- kapi.printFuel()
- keypress = kapi.keyread()
- if keypress == keys.enter then -- Chopping
- print("Executing target tree")
- kapi.chop()
- kapi.turn("b")
- kapi.dump(2)
- turtle.select(1)
- kapi.turn("b")
- kapi.place("f")
- elseif keypress == keys.r then -- Refuelling
- turtle.select(2)
- turtle.refuel()
- turtle.select(1)
- elseif keypress == keys.a then -- Automation
- kapi.clear()
- kapi.menu("Are you sure? \nThis is a pain to undo.\nPress Y to keep going\n")
- keypressA = kapi.keyread()
- if keypressA == keys.y then --
- shell.run("delete startup")
- shell.run("label set LukeBot3000")
- shell.run("pastebin get jVFKXAam startup")
- else
- print("Not valid input! Press Enter to return to main menu.")
- kapi.rawread(keys.enter)
- end
- else
- print("Not valid input! Press Enter to return to main menu.")
- kapi.rawread(keys.enter)
- end
- end
Add Comment
Please, Sign In to add comment