Advertisement
theTANCO

buildMine-v1.0.lua

Dec 9th, 2019
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.86 KB | None | 0 0
  1. -- If your computer does not have my API, this program will automatically download it.
  2. if not fs.exists("raiu") then
  3.     shell.run("pastebin","get","pgHT115i","raiu")
  4. end
  5.    
  6. os.loadAPI("raiu")
  7. local args = {...}
  8.  
  9. if #args < 1 then args[1] = 1 end
  10.  
  11. for c = 1, args[1] do
  12.     for a = 1, 1+2*c do
  13.         for b = 1, 16 do
  14.             raiu.hallway(0)
  15.             if a == 1 then
  16.                 raiu.left()
  17.                 raiu.hallway(-1)
  18.                 raiu.back()
  19.                 raiu.right()
  20.             elseif a == 1+2*c then
  21.                 raiu.right()
  22.                 raiu.hallway(-1)
  23.                 raiu.back()
  24.                 raiu.left()
  25.             end
  26.             raiu.hallway(0, 3)
  27.         end
  28.  
  29.         if a < 1+2*c then
  30.             if a%2 == 1 then
  31.                 raiu.right()
  32.                 raiu.hallway(0)
  33.                 raiu.right()
  34.             elseif a%2 == 0 then
  35.                 raiu.left()
  36.                 raiu.hallway(0)
  37.                 raiu.left()
  38.             end
  39.         end
  40.     end
  41.  
  42.     if c < tonumber(args[1]) then
  43.         raiu.up(2)
  44.         raiu.right()
  45.         raiu.hallway(0)
  46.         raiu.right()
  47.     end
  48.  
  49. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement