Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("kapi")
- function drink(n)
- turtle.select(1)
- kapi.place(n)
- turtle.refuel()
- end
- while true do
- kapi.menu("HyperRefuel\n\nPut bucket in slot 1.\nPut fuel in slot 2.\nPress V for Volcano Mode.\nPress N for Nether Mode.\nPress R to refuel.")
- kapi.printFuel()
- keypress = kapi.keyread()
- if keypress == keys.v then -- Volcano Mode
- kapi.clear()
- print("Make sure that I'm directly above the main lava tube.\nAND DONT FORGET BUCKET!\n\nPress Enter to execute program.")
- kapi.rawread(keys.enter)
- kapi.clear()
- print("Executing.")
- y = 0
- while not turtle.detectDown() do
- drink("d")
- kapi.down()
- y = y + 1
- end
- kapi.up(y-0)
- print("Done")
- kapi.printFuel()
- kapi.rawread(28)
- elseif keypress == keys.n then -- Nether Mode
- kapi.clear()
- print("Place me on the shore of a lava lake.\nAND DONT FORGET BUCKET!\n\nPress Enter to execute program.")
- kapi.rawread(keys.enter)
- kapi.forward()
- drink("d")
- kapi.down()
- x = 0
- while not turtle.detect() and (x-0) < 30 do
- kapi.turn("r")
- drink("f")
- kapi.turn("b")
- drink("f")
- kapi.turn("r")
- drink("f")
- drink("d")
- kapi.forward()
- x = x + 1
- end
- kapi.up(2)
- kapi.turn("b")
- kapi.forward(x+1)
- print("Done")
- kapi.printFuel()
- kapi.rawread(28)
- elseif keypress == keys.r then
- turtle.select(2)
- turtle.refuel()
- elseif keypress == 1 then
- 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