Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x = 0
- y = 9
- c = 0
- z = 1 ---Futura contagem de vezes---
- function refuel()
- if turtle.getFuelLevel() < 500 then
- turtle.select(16)
- turtle.placeUp()
- turtle.suckUp()
- turtle.refuel()
- turtle.dropUp()
- turtle.digUp()
- turtle.select(1)
- end
- end
- function Deploying()
- term.setTextColor(colors.purple)
- print("Deploying Items...")
- turtle.select(15)
- turtle.placeUp()
- for drop=1,14 do
- turtle.select(drop)
- turtle.dropUp()
- end
- turtle.select(15)
- turtle.digUp()
- turtle.select(1)
- term.setTextColor(colors.green)
- print("Items Deployed")
- term.setTextColor(colors.blue)
- print("Entering StandBy Mode")
- sleep(180)
- end
- function base(c)
- refuel()
- for frente=1,10 do
- turtle.forward()
- end
- turtle.turnLeft()
- for frente2=1,11 do
- turtle.forward()
- end
- turtle.turnLeft()
- c = 0
- term.setTextColor(colors.lime)
- print("Base Reached...")
- z = z+1
- if turtle.getItemCount(1) ~=0 then
- print("Deploying")
- Deploying()
- else
- print("No Items Acquired Restarting Cycle")
- cycle()
- end
- end
- function turnAround(colunas)
- if (colunas%2) == 0 then
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- else
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- end
- end
- function cycle()
- term.clear()
- term.setCursorPos(1,1)
- term.setTextColor(colors.orange)
- print("Starting Work Number:",z)
- for colunas=1,11 do
- refuel()
- c= c+1
- for frente=x+1,10 do
- x= x+1
- turtle.forward()
- local harvest, data = turtle.inspectDown()
- if harvest == true then
- if data.state.age == 7 then
- turtle.select(1)
- turtle.digDown()
- turtle.placeDown()
- end
- end
- end
- if x == 10 then
- x = 0
- end
- turnAround(colunas)
- print (c)
- if c == 11 then
- term.setTextColor(colors.green)
- print("Work Done...")
- print("Going Home...")
- base(c)
- end
- end
- end
- while true do
- print("oi")
- cycle()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement