Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Si papi")
- local args = {...}
- count = 0
- direction = 1
- length = tonumber(args[1])
- width = tonumber(args[2])
- height = tonumber(args[3])
- function dig()
- while turtle.detect() do
- turtle.refuel()
- turtle.dig()
- sleep(1)
- end
- turtle.forward()
- end
- function digUp()
- for i=1, height, 1 do
- while turtle.detectUp() do
- turtle.refuel()
- turtle.digUp()
- sleep(1)
- end
- turtle.up()
- end
- end
- function goDown()
- for i=1, height, 1 do
- turtle.down()
- end
- end
- function digColumn()
- dig()
- digUp()
- goDown()
- end
- function digRow()
- for x=1, length, 1 do
- digColumn()
- end
- end
- for i=1, width, 1 do
- digRow()
- if direction == 1 then
- turtle.turnRight()
- end
- if direction == -1 then
- turtle.turnLeft()
- end
- if i < width then
- dig()
- digUp()
- goDown()
- end
- if direction == 1 then
- turtle.turnRight()
- end
- if direction == -1 then
- turtle.turnLeft()
- end
- direction = direction * -1
- function digRow()
- for x=1, length - 1, 1 do
- digColumn()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement