Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- ========================
- -- == tunnel2
- -- ========================
- dofile("turtleMoveApi")
- DEFAULT_HEIGHT = 4
- DEFAULT_WIDTH = 4
- args = { ... }
- if 0 == #args then
- print("usage")
- print(" tunnel2 depth <height> <width>")
- print("arguments")
- print(" depth : forward direction")
- print(" height : upward direction. default is " .. tostring(DEFAULT_HEIGHT))
- print(" width : right direction. default is " .. tostring(DEFAULT_WIDTH))
- return
- end
- depth = tonumber(args[1])
- if 2 <= #args then height = tonumber(args[2]) else height = DEFAULT_HEIGHT end
- if 3 <= #args then width = tonumber(args[3]) else width = DEFAULT_WIDTH end
- registScript(
- rep(depth,
- rep(width,
- rep(height-1,e0,u),
- rep(height-1,d),
- anotherLast({r,e1,f,l}, {})
- ),
- l,
- rep(width-1,f),
- r,e1,f
- )
- )
- executeScript()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement