Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("predictPath.lua")
- os.loadAPI("turtleToCords.lua")
- os.loadAPI("userInput.lua")
- os.loadAPI("getTurtleFuel.lua")
- --must be started with pick equipped and modem in first slot
- turtle.equipLeft()
- cx, cy, cz = gps.locate()
- turtle.equipLeft()
- x = tonumber(userInput.getUserInput("X Cord: "))
- y = tonumber(userInput.getUserInput("Y Cord: "))
- z = tonumber(userInput.getUserInput("Z Cord: "))
- path = {1}
- predictPath.predictTwo(x, y, z, cx, cy, cz, path)
- predictPath.finalWrite(predictPath.getPath())
- fuelcost = predictPath.getFuelCost()
- if fuelcost > turtle.getFuelLevel() then
- getTurtleFuel.displayFuelInfo()
- print("Fuel Needed: " .. fuelcost)
- print("Fuel too Low to Start, Please Insert Buckets")
- userInput.getUserInput("Type Anything to Refuel")
- shell.run("turtleRefuel.lua")
- end
- if fuelcost > turtle.getFuelLevel() then
- print("Fuel Still too Low to Start, Terminating Program")
- else
- predictPath.predict(x, y, z)
- turtleToCords.toCords(predictPath.getDiffX(), predictPath.getDiffY(), predictPath.getDiffZ(), predictPath.getNegX(), predictPath.getNegY(), predictPath.getNegZ())
- predictPath.predict(cx, cy, cz)
- turtleToCords.toCords(predictPath.getDiffX(), predictPath.getDiffY(), predictPath.getDiffZ(), predictPath.getNegX(), predictPath.getNegY(), predictPath.getNegZ())
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement