G2A Many GEOs
SHARE
TWEET

tunnel2

kssr3951 May 2nd, 2018 (edited) 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- ========================
  2. -- == tunnel2
  3. -- ========================
  4. dofile("turtleMoveApi")
  5. DEFAULT_HEIGHT = 4
  6. DEFAULT_WIDTH = 4
  7. args = { ... }
  8. if 0 == #args then
  9.     print("usage")
  10.     print("  tunnel2 depth <height> <width>")
  11.     print("arguments")
  12.     print("  depth  : forward direction")
  13.     print("  height : upward direction. default is " .. tostring(DEFAULT_HEIGHT))
  14.     print("  width  : right direction. default is " .. tostring(DEFAULT_WIDTH))
  15.     return
  16. end
  17. depth = tonumber(args[1])
  18. if 2 <= #args then height = tonumber(args[2]) else height = DEFAULT_HEIGHT end
  19. if 3 <= #args then width  = tonumber(args[3]) else width  = DEFAULT_WIDTH  end
  20. registScript(
  21.     rep(depth,
  22.         rep(width,
  23.             rep(height-1,e0,u),
  24.             rep(height-1,d),
  25.             anotherLast({r,e1,f,l}, {})
  26.         ),
  27.         l,
  28.         rep(width-1,f),
  29.         r,e1,f
  30.     )
  31. )
  32. executeScript()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top