SHOW:
|
|
- or go back to the newest paste.
| 1 | os.loadAPI("predictPath.lua")
| |
| 2 | os.loadAPI("turtleToCords.lua")
| |
| 3 | os.loadAPI("userInput.lua")
| |
| 4 | os.loadAPI("getTurtleFuel.lua")
| |
| 5 | ||
| 6 | - | function getLocation() |
| 6 | + | |
| 7 | - | --must be started with pick equipped and modem in first slot |
| 7 | + | --must be started with pick equipped and modem in first slot |
| 8 | - | x = tonumber(userInput.getUserInput("X Cord: "))
|
| 8 | + | |
| 9 | - | y = tonumber(userInput.getUserInput("Y Cord: "))
|
| 9 | + | function oneTrip(x, y, z) |
| 10 | - | z = tonumber(userInput.getUserInput("Z Cord: "))
|
| 10 | + | |
| 11 | - | return x, y, z |
| 11 | + | predictPath.resetFuelCost() |
| 12 | - | end |
| 12 | + | |
| 13 | predictPath.finalWrite(predictPath.getPath()) | |
| 14 | - | function goToCords(x, y, z) |
| 14 | + | |
| 15 | if fuelcost > turtle.getFuelLevel() then | |
| 16 | getTurtleFuel.displayFuelInfo() | |
| 17 | print("Fuel Needed: " .. fuelcost)
| |
| 18 | print("Fuel too Low to Start, Please Insert Buckets")
| |
| 19 | return false | |
| 20 | - | getTurtleFuel.displayFuelInfo() |
| 20 | + | |
| 21 | turtleToCords.toCords(predictPath.getDiffX(), predictPath.getDiffY(), predictPath.getDiffZ(), predictPath.getNegX(), predictPath.getNegY(), predictPath.getNegZ()) | |
| 22 | - | print("Fuel too Low to Start, Please Insert Buckets")
|
| 22 | + | return true |
| 23 | - | userInput.getUserInput("Type Anything to Refuel")
|
| 23 | + |