szumielxd

Untitled

Dec 14th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.92 KB | None | 0 0
  1. options:
  2. b1: block at location(9938, 30, 9916, world "budowa")
  3. b2: block at location(9935, 30, 9916, world "budowa")
  4. b3: block at location(9928, 30, 9916, world "budowa")
  5. b4: block at location(9925, 30, 9916, world "budowa")
  6. b5: block at location(9938, 30, 9908, world "budowa")
  7. b6: block at location(9935, 30, 9908, world "budowa")
  8. b7: block at location(9928, 30, 9908, world "budowa")
  9. b8: block at location(9925, 30, 9908, world "budowa")
  10.  
  11. bt1: block at location(9923, 34, 9913, world "budowa")
  12. bt2: block at location(9923, 34, 9911, world "budowa")
  13. bt3: block at location(9940, 34, 9911, world "budowa")
  14. bt4: block at location(9940, 34, 9913, world "budowa")
  15. bt5: block at location(9921, 34, 9907, world "budowa")
  16. bt6: block at location(9921, 34, 9917, world "budowa")
  17. bt7: block at location(9942, 34, 9907, world "budowa")
  18. bt8: block at location(9942, 34, 9917, world "budowa")
  19.  
  20. endb: block at location(9917, 33, 9919, world "budowa")
  21.  
  22. on load:
  23. loop 8 times:
  24. delete {rpg.endquest.bramy.%loop-number%::*}
  25. set {_i} to random integer between 1 and 4
  26. loop {_i} times:
  27. add random integer between 1 and 8 to {rpg.endquest.bramy.%loop-number-1%::*}
  28.  
  29. loop 8 times:
  30. if "%{rpg.endquest.bramy.%loop-number%::*}%" contains "1":
  31. set {_1} to true
  32. if "%{rpg.endquest.bramy.%loop-number%::*}%" contains "2":
  33. set {_2} to true
  34. if "%{rpg.endquest.bramy.%loop-number%::*}%" contains "3":
  35. set {_3} to true
  36. if "%{rpg.endquest.bramy.%loop-number%::*}%" contains "4":
  37. set {_4} to true
  38. if "%{rpg.endquest.bramy.%loop-number%::*}%" contains "5":
  39. set {_5} to true
  40. if "%{rpg.endquest.bramy.%loop-number%::*}%" contains "6":
  41. set {_6} to true
  42. if "%{rpg.endquest.bramy.%loop-number%::*}%" contains "7":
  43. set {_7} to true
  44. if "%{rpg.endquest.bramy.%loop-number%::*}%" contains "8":
  45. set {_8} to true
  46. loop 8 times:
  47. if {_%loop-number%} is not set:
  48. set {_i} to random integer between 1 and 8
  49. add loop-number to {rpg.endquest.bramy.%{_i}%::*}
  50. set {@b1} to redstone block
  51. set {@b2} to redstone block
  52. set {@b3} to redstone block
  53. set {@b4} to redstone block
  54. set {@b5} to redstone block
  55. set {@b6} to redstone block
  56. set {@b7} to redstone block
  57. set {@b8} to redstone block
  58. set {@endb} to air
  59.  
  60.  
  61. function getBlock(l: location) :: integer:
  62. if block at {_l} is {@b1}:
  63. return 1
  64. if block at {_l} is {@b2}:
  65. return 2
  66. if block at {_l} is {@b3}:
  67. return 3
  68. if block at {_l} is {@b4}:
  69. return 4
  70. if block at {_l} is {@b5}:
  71. return 5
  72. if block at {_l} is {@b6}:
  73. return 6
  74. if block at {_l} is {@b7}:
  75. return 7
  76. if block at {_l} is {@b8}:
  77. return 8
  78. return 0
  79.  
  80. function getButton(l: location) :: integer:
  81. if block at {_l} is {@bt1}:
  82. return 1
  83. if block at {_l} is {@bt2}:
  84. return 2
  85. if block at {_l} is {@bt3}:
  86. return 3
  87. if block at {_l} is {@bt4}:
  88. return 4
  89. if block at {_l} is {@bt5}:
  90. return 5
  91. if block at {_l} is {@bt6}:
  92. return 6
  93. if block at {_l} is {@bt7}:
  94. return 7
  95. if block at {_l} is {@bt8}:
  96. return 8
  97. return 0
  98.  
  99.  
  100. on rightclick on stone button:
  101. if player is not sneaking:
  102. set {_a} to true
  103. if player's tool is air:
  104. set {_a} to true
  105. if {_a} is true:
  106. player is in region "rpg_enderbrama":
  107. set {_b} to getButton(event-block's location)
  108. if {_b} != 0:
  109. loop {rpg.endquest.bramy.%{_b}%::*}:
  110. send "%loop-value%" to "szumielxd_" parsed as player
  111. if loop-value = 1:
  112. if {@b1} is redstone block:
  113. set {@b1} to air
  114. else:
  115. set {@b1} to redstone block
  116. else if loop-value = 2:
  117. if {@b2} is redstone block:
  118. set {@b2} to air
  119. else:
  120. set {@b2} to redstone block
  121. else if loop-value = 3:
  122. if {@b3} is redstone block:
  123. set {@b3} to air
  124. else:
  125. set {@b3} to redstone block
  126. else if loop-value = 4:
  127. if {@b4} is redstone block:
  128. set {@b4} to air
  129. else:
  130. set {@b4} to redstone block
  131. else if loop-value = 5:
  132. if {@b5} is redstone block:
  133. set {@b5} to air
  134. else:
  135. set {@b5} to redstone block
  136. else if loop-value = 6:
  137. if {@b6} is redstone block:
  138. set {@b6} to air
  139. else:
  140. set {@b6} to redstone block
  141. else if loop-value = 7:
  142. if {@b7} is redstone block:
  143. set {@b7} to air
  144. else:
  145. set {@b7} to redstone block
  146. else if loop-value = 8:
  147. if {@b8} is redstone block:
  148. set {@b8} to air
  149. else:
  150. set {@b8} to redstone block
  151. {@b1} is redstone block:
  152. stop
  153. {@b2} is redstone block:
  154. stop
  155. {@b3} is redstone block:
  156. stop
  157. {@b4} is redstone block:
  158. stop
  159. {@b5} is redstone block:
  160. stop
  161. {@b6} is redstone block:
  162. stop
  163. {@b7} is redstone block:
  164. stop
  165. {@b8} is redstone block:
  166. stop
  167. if type of {@endb} is redstone block:
  168. stop
  169. send "&aDone!"
  170. wait 1 second
  171. set {@endb} to redstone block
  172. wait 30 seconds
  173. set {@endb} to air
Add Comment
Please, Sign In to add comment