Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --fuel chest in slot 14, chest to put items away in slot 15
- turtle.digUp()
- turtle.digDown()
- local Far, THICCnes = ...
- Far = tonumber(Far)
- THICCnes = tonumber(THICCnes)
- if not Far or not THICCnes then
- error("User did not give numbers as arguments to the program I am angy >:(")
- end
- local blocks = 0
- local turns = 0
- local ends = 0
- local endblock = 0
- local function Drops()
- for i = 1,14,1 do
- turtle.select(i)
- turtle.dropUp()
- end
- end
- local function Storage()
- turtle.select(16)
- turtle.placeUp()
- Drops()
- turtle.select(16)
- turtle.digUp()
- end
- local function Fuel()
- turtle.select(15)
- turtle.placeUp()
- turtle.select(1)
- turtle.suckUp(64)
- turtle.refuel()
- turtle.dropUp()
- turtle.select(15)
- turtle.digUp()
- turtle.select(1)
- end
- local function TurnLeft()
- turtle.turnLeft()
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- turtle.digDown()
- turtle.turnLeft()
- turns = 0
- ends = ends + 1
- end
- local function TurnRight()
- turtle.turnRight()
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- turtle.digDown()
- turtle.turnRight()
- Storage()
- Fuel()
- turns = 1
- ends = ends + 1
- end
- local function Mines()
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- turtle.digDown()
- blocks = blocks + 1
- end
- repeat
- Mines()
- if blocks == Far then
- if turns == 0 then
- TurnRight()
- elseif turns == 1 then
- TurnLeft()
- end
- blocks = 0
- end
- until ends == THICCnes
- Storage()
- if (THICCnes % 2 == 0) then
- turtle.turnLeft()
- repeat
- turtle.forward()
- endblock = endblock + 1
- until endblock == THICCnes
- else
- turtle.turnRight()
- repeat
- turtle.forward()
- endblock = endblock + 1
- until endblock == THICCnes
- endblock = 0
- turtle.turnLeft()
- repeat
- turtle.forward()
- endblock = endblock + 1
- until endblock == Far
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement