Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ```lua
- local core = peripheral.find("warpdriveShipCore")
- core.enable(true)
- core.command("IDLE", false)
- -- Make sure the temp file exists --
- if fs.exists("temp") then
- else
- fs.open("temp", "w")
- local h = fs.open("temp", "w")
- h.close()
- end
- ------------------------------------
- local h = fs.open("temp", "r")
- if h.readAll() == "t" then
- h.close()
- print("Continually jumping...")
- --local core = peripheral.find("warpdriveShipCore")
- --local h = fs.open("temp", "r")
- --if h.readAll() == "t" then
- --h.close()
- core.enable(true)
- core.command("IDLE", false)
- sleep(1)
- core.command("MANUAL", true)
- --end
- print("Press `space` to stop jumping")
- local event, key = os.pullEvent("key")
- if key == keys.space then
- local h = fs.open("temp", "w")
- h.writeLine("f")
- h.close()
- print("Movement stopped for next jump")
- end
- else
- h.close()
- print("Please input forward movement: ")
- ForMove = tonumber(read())
- print("Please input lateral movement: ")
- LatMove = tonumber(read())
- print("Please input vertical movement: ")
- VerMove = tonumber(read())
- core.movement(ForMove, VerMove, LatMove)
- print("Starting continual jumping")
- print("Press `Space` after a jump to stop jumping")
- core.command("MANUAL", true)
- print("Starting Auto-pilot")
- local h = fs.open("temp", "w")
- h.write("t")
- h.close()
- end
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement