Advertisement
CelticCoder

turtleOneTrip

Nov 13th, 2023 (edited)
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. os.loadAPI("predictPath.lua")
  2. os.loadAPI("turtleToCords.lua")
  3. os.loadAPI("userInput.lua")
  4. os.loadAPI("getTurtleFuel.lua")
  5.  
  6. cx, cy, cz = gps.locate()
  7. tx = tonumber(userInput.getUserInput("X Cord: "))
  8. ty = tonumber(userInput.getUserInput("Y Cord: "))
  9. tz = tonumber(userInput.getUserInput("Z Cord: "))
  10.  
  11.  
  12. predictPath.predictTwo(x, y, z, cx, cy, cz)
  13.  
  14. fuelcost = predictPath.getFuelCost()
  15. if fuelcost > turtle.getFuelLevel() then
  16.     getTurtleFuel.displayFuelInfo()
  17.     print("Fuel too Low to Start, Please Insert Buckets")
  18.     userInput.getUserInput("Type Anything to Refuel")
  19.     shell.run("turtleRefuel.lua")
  20. end
  21. if fuelcost > turtle.getFuelLevel() then
  22.     print("Fuel Still too Low to Start, Terminating Program")
  23. else
  24.     turtleToCords.toCords(x, y, z)
  25. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement