Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool=true
- while bool==true do
- if rs.getInput("back", true) then
- print ("Waiting")
- sleep (1)
- else
- print ("Let's Roll!")
- bool=false
- end
- end
- X=66
- print ("Startup Functions Activating")
- print ("Going to lowest point")
- turtle.select(1)
- turtle.dig()
- turtle.select(4)
- turtle.back()
- turtle.select(2)
- turtle.dig()
- turtle.select(4)
- turtle.back()
- while true do
- local mobsPresent = turtle.attackDown()
- local digSuccess = turtle.digDown()
- local movementSuccess = turtle.down()
- if not mobsPresent and not digSuccess and not movementSuccess then
- break
- end
- end
- for b = 1, X do
- turtle.digUp()
- while not turtle.up() do
- turtle.attackUp()
- end
- end
- while not turtle.forward() do
- turtle.dig()
- turtle.attack()
- end
- print ("---------------------------")
- print ("Starting ORE FINDING PROTOCOLS!")
- print ("---------------------------")
- while true do
- moves = 0
- ore = false
- turtle.select(3)
- ore = turtle.compareDown()
- turtle.select(4)
- while ore == false and moves < 66 do
- turtle.digDown()
- moves = moves + 1
- while not turtle.down() do
- turtle.attack()
- end
- sleep(.5)
- turtle.select(3)
- ore = turtle.compareDown()
- turtle.select(4)
- end
- for q=1, moves do
- turtle.digUp()
- while not turtle.up() do
- turtle.attack()
- turtle.digUp()
- end
- end
- turtle.dig()
- while not turtle.forward() do
- turtle.attack()
- turtle.dig()
- end
- print ("Dropping off items")
- turtle.dig()
- turtle.attack()
- turtle.select(1)
- while not turtle.place() do
- turtle.select(4)
- turtle.attack()
- turtle.dig()
- turtle.select(1)
- end
- for dropslot = 4, 16 do
- turtle.select(dropslot)
- turtle.drop()
- end
- turtle.select(1)
- turtle.dig()
- turtle.select(4)
- Fuel = turtle.getFuelLevel()
- print ("Fuel level is: "..Fuel)
- if Fuel >= 8192 then
- print ("Fuel level is above minimum safe limit.")
- else
- print ("Fuel is below safe limit! Refueling!")
- turtle.select(4)
- turtle.dig()
- turtle.select(2)
- while not turtle.place() do
- turtle.select(4)
- turtle.dig()
- turtle.attack()
- turtle.select(2)
- end
- turtle.suck()
- turtle.refuel()
- turtle.dig()
- print ("Refueled up! Continuing!")
- turtle.select(4)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement