Advertisement
Doob

cb_starter

Dec 3rd, 2014
383
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.97 KB | None | 0 0
  1. write('give me command block [y]/[n]: ')
  2. local command = read()
  3.  
  4. if command == 'n' then
  5.   os.reboot()
  6. end
  7.  
  8. shell.run('go up 4')
  9. turtle.placeUp()
  10. commandBlock = peripheral.wrap('top')
  11. commandBlock.setCommand('setblock ~-1 ~-1 ~ glass')
  12. commandBlock.runCommand()
  13. while not turtle.detect() do
  14.   turtle.turnLeft()
  15. end
  16. turtle.dig()
  17.  
  18. local function drawAngles()
  19.   tbl = {
  20.     tPlace1 = {
  21.       ['x1'] = {'~2 ', '~2 ', '~2 ', '~2 ', '~2 ', '~2 ', '~1 ', '~ ', '~-1 '},
  22.       ['y1'] = {'~1 ', '~ ', '~-1 ', '~2 ', '~2 ', '~2 ', '~2 ', '~2 ', '~2 '},
  23.       ['z1'] = {'~2 ', '~2 ', '~2 ', '~-1 ', '~ ', '~1 ', '~2 ', '~2 ', '~2 '},
  24.  
  25.       ['x2'] = {'~-2 ', '~-2 ', '~-2 ', '~-2 ', '~-2 ', '~-2 ', '~1 ', '~ ', '~-1 '},
  26.       ['y2'] = {'~1 ', '~ ', '~-1 ', '~-2 ', '~-2 ', '~-2 ', '~-2 ', '~-2 ', '~-2 '},
  27.       ['z2'] = {'~-2 ', '~-2 ', '~-2 ', '~-1 ', '~ ', '~1 ', '~-2 ', '~-2 ', '~-2 '},
  28.  
  29.       ['x3'] = {'~2 ', '~2 ', '~2 ', '~-2 ', '~-2 ', '~-2 ', '~1 ', '~ ', '~-1 '},
  30.       ['y3'] = {'~1 ', '~ ', '~-1 ', '~2 ', '~2 ', '~2 ', '~2 ', '~2 ', '~2 '},
  31.       ['z3'] = {'~-2 ', '~-2 ', '~-2 ', '~-1 ', '~ ', '~1 ', '~-2 ', '~-2 ', '~-2 '},
  32.  
  33.       ['x4'] = {'~-2 ', '~-2 ', '~-2 ', '~2 ', '~2 ', '~2 ', '~1 ', '~ ', '~-1 '},
  34.       ['y4'] = {'~1 ', '~ ', '~-1 ', '~-2 ', '~-2 ', '~-2 ', '~-2 ', '~-2 ', '~-2 '},
  35.       ['z4'] = {'~2 ', '~2 ', '~2 ', '~-1 ', '~ ', '~1 ', '~2 ', '~2 ', '~2 '}
  36.     },
  37.  
  38.     tPlace2 = {
  39.       ['x1'] = {'~-3 ', '~-3 ', '~-3 ', '~-3 ', '~-3 ', '~-3 ', '~-2 ', '~-1 ', '~ '},
  40.       ['y1'] = {'~-2 ', '~-1 ', '~ ', '~-3 ', '~-3 ', '~-3 ', '~-3 ', '~-3 ', '~-3 '},
  41.       ['z1'] = {'~-2 ', '~-2 ', '~-2 ', '~1 ', '~ ', '~-1 ', '~-2 ', '~-2 ', '~-2 '},
  42.  
  43.       ['x2'] = {'~1 ', '~1 ', '~1 ', '~1 ', '~1 ', '~1 ', '~-2 ', '~-1 ', '~ '},
  44.       ['y2'] = {'~-2 ', '~-1 ', '~ ', '~1 ', '~1 ', '~1 ', '~1 ', '~1 ', '~1 '},
  45.       ['z2'] = {'~2 ', '~2 ', '~2 ', '~1 ', '~ ', '~-1 ', '~2 ', '~2 ', '~2 '},
  46.      
  47.       ['x3'] = {'~-3 ', '~-3 ', '~-3 ', '~1 ', '~1 ', '~1 ', '~-2 ', '~-1 ', '~ '},
  48.       ['y3'] = {'~-2 ', '~-1 ', '~ ', '~-3 ', '~-3 ', '~-3 ', '~-3 ', '~-3 ', '~-3 '},
  49.       ['z3'] = {'~2 ', '~2 ', '~2 ', '~1 ', '~ ', '~-1 ', '~2 ', '~2 ', '~2 '},
  50.  
  51.       ['x4'] = {'~1 ', '~1 ', '~1 ', '~-3 ', '~-3 ', '~-3 ', '~-2 ', '~-1 ', '~ '},
  52.       ['y4'] = {'~-2 ', '~-1 ', '~ ', '~1 ', '~1 ', '~1 ', '~1 ', '~1 ', '~1 '},
  53.       ['z4'] = {'~-2 ', '~-2 ', '~-2 ', '~1 ', '~ ', '~-1 ', '~-2 ', '~-2 ', '~-2 '}
  54.     },
  55.    
  56.     tPlace3 = {
  57.       ['x1'] = {'~2 ', '~2 ', '~2 ', '~3 ', '~3 ', '~3 ', '~1 ', '~ ', '~-1 '},
  58.       ['y1'] = {'~1 ', '~ ', '~-1 ', '~2 ', '~2 ', '~2 ', '~2 ', '~2 ', '~2 '},
  59.       ['z1'] = {'~3 ', '~3 ', '~3 ', '~-1 ', '~ ', '~1 ', '~3 ', '~3 ', '~3 '},
  60.  
  61.       ['x2'] = {'~-2 ', '~-2 ', '~-2 ', '~-3 ', '~-3 ', '~-3 ', '~1 ', '~ ', '~-1 '},
  62.       ['y2'] = {'~1 ', '~ ', '~-1 ', '~-2 ', '~-2 ', '~-2 ', '~-2 ', '~-2 ', '~-2 '},
  63.       ['z2'] = {'~-3 ', '~-3 ', '~-3 ', '~1 ', '~ ', '~-1 ', '~-3 ', '~-3 ', '~-3 '},
  64.  
  65.       ['x3'] = {'~2 ', '~2 ', '~2 ', '~-3 ', '~-3 ', '~-3 ', '~1 ', '~ ', '~-1 '},
  66.       ['y3'] = {'~1 ', '~ ', '~-1 ', '~2 ', '~2 ', '~2 ', '~2 ', '~2 ', '~2 '},
  67.       ['z3'] = {'~-3 ', '~-3 ', '~-3 ', '~-1 ', '~ ', '~1 ', '~-3 ', '~-3 ', '~-3 '},
  68.  
  69.       ['x4'] = {'~-2 ', '~-2 ', '~-2 ', '~3 ', '~3 ', '~3 ', '~1 ', '~ ', '~-1 '},
  70.       ['y4'] = {'~1 ', '~ ', '~-1 ', '~-2 ', '~-2 ', '~-2 ', '~-2 ', '~-2 ', '~-2 '},
  71.       ['z4'] = {'~3 ', '~3 ', '~3 ', '~-1 ', '~ ', '~1 ', '~3 ', '~3 ', '~3 '}
  72.     }
  73.   }
  74.   for i = 1, 4 do
  75.     for rl = 1, 9 do
  76.       if i >= 3 then
  77.         vrs = 'stained_glass_pane '
  78.       else
  79.         vrs = 'stained_glass '
  80.       end
  81.       commandBlock.setCommand(tostring('setblock '..
  82.       tbl.tPlace1['x'..i][rl]..tbl.tPlace1['y'..i][rl]..tbl.tPlace1['z'..i][rl]..
  83.       'command_block 0 replace {Command:/setblock '..
  84.       tbl.tPlace2['x'..i][rl]..tbl.tPlace2['y'..i][rl]..tbl.tPlace2['z'..i][rl]..
  85.       vrs..rl..'}'))
  86.       commandBlock.runCommand()
  87.     end
  88.   end
  89.   for i = 1, 4 do
  90.     for rl = 1, 9 do
  91.       commandBlock.setCommand(tostring('setblock '..
  92.       tbl.tPlace3['x'..i][rl]..tbl.tPlace3['y'..i][rl]..tbl.tPlace3['z'..i][rl]..'stone_button'))
  93.       commandBlock.runCommand()
  94.     end
  95.   end
  96. end
  97.  
  98. local tCell = {' ~2 ', ' ~-2 '}
  99.  
  100. for y = 1, 2 do
  101.   for x = -5, 5 do
  102.     for z = -5, 5 do
  103.       commandBlock.setCommand('setblock ~'..x..tCell[y]..'~'..z..' glass 0 replace')
  104.       commandBlock.runCommand()
  105.     end
  106.   end
  107. end
  108.  
  109. for x = -5, 5 do
  110.   for z = -5, 5 do
  111.     commandBlock.setCommand('setblock ~'..x..' ~-6 ~'..z..' quartz_block 0 replace')
  112.     commandBlock.runCommand()
  113.   end
  114. end
  115.  
  116. commandBlock.setCommand('setblock ~-5 ~2 ~-5 command_block 0 replace {Command:/tp @p ~ ~-3 ~}')
  117. commandBlock.runCommand()
  118. commandBlock.setCommand('setblock ~-5 ~3 ~-5 stone_pressure_plate 0 replace')
  119. commandBlock.runCommand()
  120.  
  121. commandBlock.setCommand('setblock ~5 ~2 ~5 command_block 0 replace {Command:/tp @p ~ ~-3 ~}')
  122. commandBlock.runCommand()
  123. commandBlock.setCommand('setblock ~5 ~3 ~5 stone_pressure_plate 0 replace')
  124. commandBlock.runCommand()
  125.  
  126. commandBlock.setCommand('setblock ~5 ~-2 ~-5 command_block 0 replace {Command:/tp @p ~ ~5 ~}')
  127. commandBlock.runCommand()
  128. commandBlock.setCommand('setblock ~5 ~-1 ~-5 stone_pressure_plate 0 replace')
  129. commandBlock.runCommand()
  130.  
  131. commandBlock.setCommand('setblock ~-5 ~-2 ~5 command_block 0 replace {Command:/tp @p ~ ~5 ~}')
  132. commandBlock.runCommand()
  133. commandBlock.setCommand('setblock ~-5 ~-1 ~5 stone_pressure_plate 0 replace')
  134. commandBlock.runCommand()
  135.  
  136. commandBlock.setCommand('setblock ~5 ~-6 ~5 command_block 0 replace {Command:/tp @p ~ ~5 ~}')
  137. commandBlock.runCommand()
  138. commandBlock.setCommand('setblock ~5 ~-5 ~5 stone_pressure_plate 0 replace')
  139. commandBlock.runCommand()
  140.  
  141. commandBlock.setCommand('setblock ~-5 ~-6 ~-5 command_block 0 replace {Command:/tp @p ~ ~5 ~}')
  142. commandBlock.runCommand()
  143. commandBlock.setCommand('setblock ~-5 ~-5 ~-5 stone_pressure_plate 0 replace')
  144. commandBlock.runCommand()
  145.  
  146. drawAngles()
  147. shell.run('pastebin get PRMbnCLe startup')
  148. os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement