Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local rotation = 0
- function Mine()
- turtle.select(1)
- while turtle.detect() do
- turtle.dig()
- end
- end
- function MineUp()
- turtle.select(1)
- while turtle.detectUp() do
- turtle.digUp()
- end
- end
- function MineDown()
- turtle.select(1)
- while turtle.detectDown() do
- turtle.digDown()
- end
- end
- function Forward()
- Refuel()
- Mine()
- while turtle.forward() == false do
- turtle.attack()
- end
- end
- function Up()
- Refuel()
- MineUp()
- while turtle.up() == false do
- turtle.attackUp()
- end
- end
- function Down()
- Refuel()
- MineDown()
- while turtle.down() == false do
- turtle.attackDown()
- end
- end
- function Left()
- turtle.turnLeft()
- rotation = rotation - 1
- if rotation == -1 then
- rotation = 3
- end
- end
- function Right()
- turtle.turnRight()
- rotation = rotation + 1
- if rotation == 4 then
- rotation = 0
- end
- end
- function RotateTo(rot)
- while rotation ~= rot do
- Right()
- end
- end
Add Comment
Please, Sign In to add comment