Advertisement
Asummonster

Ядерная бомба для Алекса

May 13th, 2015
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.05 KB | None | 0 0
  1. DEBUGVER=true
  2. local event = require('event')
  3. local fs = require("filesystem")
  4. local com = require('component')
  5. if com.isAvailable("command_block") then local cb = com.command_block
  6. else print("РЕКОМЕНДУЕТСЯ ПОДКЛЮЧИТЬ КОМАНДНЫЙ БЛОК!")
  7. end
  8. if com.isAvailable("debug") then --
  9. else error("ДЕБАГ КАРТА НЕ НАЙДЕНА!!!")
  10. end
  11. dc=com.debug
  12. local w = dc.getWorld(0)
  13. function oskolok()
  14. w.setBlock(x, y, z, 0, 0)
  15. w.setBlock(x+1, y, z, 0, 0)
  16. w.setBlock(x-1, y, z, 0, 0)
  17. w.setBlock(x, y, z+1, 0, 0)
  18. w.setBlock(x, y, z-1, 0, 0)
  19. w.setBlock(x+1, y, z+1, 0, 0)
  20. w.setBlock(x-1, y, z-1, 0, 0)
  21. w.setBlock(x+1, y, z-1, 0, 0)
  22. w.setBlock(x-1, y, z+1, 0, 0)
  23. --+1 уровень
  24. w.setBlock(x, y+1, z, 0, 0)
  25. w.setBlock(x+1, y+1, z, 0, 0)
  26. w.setBlock(x-1, y+1, z, 0, 0)
  27. w.setBlock(x, y+1, z+1, 0, 0)
  28. w.setBlock(x, y+1, z-1, 0, 0)
  29. w.setBlock(x+1, y+1, z+1, 0, 0)
  30. w.setBlock(x-1, y+1, z-1, 0, 0)
  31. w.setBlock(x+1, y+1, z-1, 0, 0)
  32. w.setBlock(x-1, y+1, z+1, 0, 0)
  33. ---1 level
  34. w.setBlock(x, y-1, z, 0, 0)
  35. w.setBlock(x+1, y-1, z, 0, 0)
  36. w.setBlock(x-1, y-1, z, 0, 0)
  37. w.setBlock(x, y-1, z+1, 0, 0)
  38. w.setBlock(x, y-1, z-1, 0, 0)
  39. w.setBlock(x+1, y-1, z+1, 0, 0)
  40. w.setBlock(x-1, y-1, z-1, 0, 0)
  41. w.setBlock(x+1, y-1, z-1, 0, 0)
  42. w.setBlock(x-1, y-1, z+1, 0, 0)
  43. end
  44. function BOMB()
  45. xOnStart=x
  46. yOnStart=y
  47. zOnStart=z
  48. oskolok()
  49. x=x+3
  50. oskolok()
  51. x=xOnStart
  52. x=x-3
  53. oskolok()
  54. x=xOnStart
  55. z=z+3
  56. oskolok()
  57. x=x+3
  58. oskolok()
  59. x=xOnStart
  60. x=x-3
  61. oskolok()
  62. x=xOnStart
  63. z=zOnStart
  64. z=z-3
  65. oskolok()
  66. x=x+3
  67. oskolok()
  68. x=xOnStart
  69. x=x-3
  70. oskolok()
  71. x=xOnStart
  72. z=zOnStart
  73. y=yOnStart
  74. y=y+3
  75. xOnStart=x
  76. yOnStart=y
  77. zOnStart=z
  78. oskolok()
  79. x=x+3
  80. oskolok()
  81. x=xOnStart
  82. x=x-3
  83. oskolok()
  84. x=xOnStart
  85. z=z+3
  86. oskolok()
  87. x=x+3
  88. oskolok()
  89. x=xOnStart
  90. x=x-3
  91. oskolok()
  92. x=xOnStart
  93. z=zOnStart
  94. z=z-3
  95. oskolok()
  96. x=x+3
  97. oskolok()
  98. x=xOnStart
  99. x=x-3
  100. oskolok()
  101. x=xOnStart
  102. z=zOnStart
  103. y=yOnStart
  104. y=y-3
  105. xOnStart=x
  106. zOnStart=z
  107. oskolok()
  108. x=x+3
  109. oskolok()
  110. x=xOnStart
  111. x=x-3
  112. oskolok()
  113. x=xOnStart
  114. z=z+3
  115. oskolok()
  116. x=x+3
  117. oskolok()
  118. x=xOnStart
  119. x=x-3
  120. oskolok()
  121. x=xOnStart
  122. z=zOnStart
  123. z=z-3
  124. oskolok()
  125. x=x+3
  126. oskolok()
  127. x=xOnStart
  128. x=x-3
  129. oskolok()
  130. x=xOnStart
  131. y=yOnStart
  132. z=zOnStart
  133. w.setBlock(x+math.random(-12, 12), y+math.random(-12, 12), z+math.random(-12, 12), 10, 0)
  134. w.setBlock(x+math.random(-12, 12), y+math.random(-12, 12), z+math.random(-12, 12), 10, 0)
  135. w.setBlock(x+math.random(-12, 12), y+math.random(-12, 12), z+math.random(-12, 12), 10, 0)
  136. w.setBlock(x+math.random(-12, 12), y+math.random(-12, 12), z+math.random(-12, 12), 10, 0)
  137. w.setBlock(x+math.random(-12, 12), y+math.random(-12, 12), z+math.random(-12, 12), 10, 0)
  138. w.setBlock(x+math.random(-12, 12), y+math.random(-12, 12), z+math.random(-12, 12), 10, 0)
  139. w.setBlock(x+math.random(-12, 12), y+math.random(-12, 12), z+math.random(-12, 12), 10, 0)
  140. w.setBlock(x+math.random(-12, 12), y+math.random(-12, 12), z+math.random(-12, 12), 10, 0)
  141. w.setBlock(x+math.random(-12, 12), y+math.random(-12, 12), z+math.random(-12, 12), 10, 0)
  142. w.setBlock(x+math.random(-12, 12), y+math.random(-12, 12), z+math.random(-12, 12), 10, 0)
  143. require("computer").removeUser(BOMBER)
  144. print("ДЕРНАЯ АТАКА ЗАВЕРШЕНА!")
  145. os.execute("sh")
  146. end
  147. y=150
  148. function FIND()
  149. while true do
  150. id=w.getBlockId(x, y, z)
  151. if id==0 then y=y-1; FIND()
  152. else y=y-3; print("Y НАЙДЕН!ЯДЕРНАЯ АТАКА НАЧИНАЕТСЯ!"); BOMB()
  153. end
  154. end
  155. end
  156. function START()
  157. require("computer").addUser(BOMBER)
  158. print("ВВЕДИТЕ X")
  159. x=tonumber(io.read())
  160. print("ВВЕДИТЕ Z")
  161. z=tonumber(io.read())
  162. print("ПОИСК Y НАЧАЛСЯ!")
  163. FIND()
  164. end
  165. if DEBUGVER==false then
  166. print("НАЖМИТЕ НА ЭКРАН")
  167. _, _, _, _, _, BOMBER = event.pull("touch")
  168. if BOMBER=="AlexCC" then START()
  169. elseif BOMBER=="1Ridav" then START()
  170. elseif BOMBER=="cyber01" then START()
  171. elseif BOMBER=="Offline" then START()
  172. elseif BOMBER=="Asummonster" then START() --На время тестирования
  173. else print("АВТОРИЗАЦИЯ НЕ УСПЕШНА!!!"); os.sleep(3); require("computer").shutdown()
  174. end
  175. else START()
  176. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement