Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- args = {...}
- height = args[1]
- length = args[2]
- function checkfuel()
- if turtle.getFuelLevel() <= 4 then
- turtle.select(16)
- turtle.refuel(1)
- turtle.select(1)
- end
- end
- function dig()
- while turtle.detect() do
- turtle.dig()
- os.sleep(.5)
- end
- end
- function digUp()
- while turtle.detectUp() do
- turtle.digUp()
- os.sleep(.5)
- end
- end
- function digDown()
- while turtle.detectDown() do
- turtle.digDown()
- os.sleep(.5)
- end
- end
- function forward()
- checkfuel()
- while turtle.forward() == false do
- dig()
- turtle.attack()
- checkfuel()
- os.sleep(.5)
- end
- end
- function up()
- checkfuel()
- while turtle.up() == false do
- digUp()
- turtle.attackUp()
- checkfuel()
- os.sleep(.5)
- end
- end
- function down()
- checkfuel()
- while turtle.down() == false do
- digDown()
- turtle.attackDown()
- checkfuel()
- os.sleep(.5)
- end
- end
- function pillar(hi,le)
- for i=1,le do
- forward()
- for o=1,hi-1 do
- if i % 2 == 1 then
- up()
- else
- down()
- end
- end
- end
- if le % 2 == 1 then
- for i=1,hi do
- down()
- end
- end
- end
- pillar(height,length)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement