Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function goForward()
- while not(turtle.forward()) do
- turtle.attack()
- end
- end
- function goDown()
- while not(turtle.down()) do
- turtle.attackDown()
- end
- end
- function goUp()
- while not(turtle.up()) do
- turtle.attackUp()
- end
- end
- function checkMaterial()
- if turtle.getItemCount(curslot)>0 then
- return true
- end
- curslot=curslot+1
- turtle.select(curslot)
- if curslot>14 then
- curslot=1
- end
- return false
- end
- function wall()
- while cutY<height do
- turtle.digUp()
- goUp()
- cutY = cutY+1
- while not(checkMaterial()) do
- sleep(0.1)
- end
- turtle.placeDown()
- end
- end
- curslot=1
- turtle.select(curslot)
- cutY=0
- local arg = { ... }
- length = tonumber(arg[1])
- height = tonumber(arg[2])
- for curL=1,length,1 do
- turtle.dig()
- goForward()
- while cutY>0 do
- turtle.digDown()
- goDown()
- cutY = cutY-1
- end
- wall()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement