dodoz012609

Hazard

Feb 4th, 2015
295
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.81 KB | None | 0 0
  1. options:
  2. t: &4[&aHZ&4]&f
  3. #Tutaj jest szans na potrójny drop.
  4. sz: 5%
  5. command /hazard [<text>] [<number>]:
  6. aliases: hz
  7. permission: hazard.daj
  8. trigger:
  9. if arg 1 is "daj":
  10. add 3 wool:1 named "&5Hazard" to the player's inventory
  11. send "{@t} Dostales itemy do stworzenia maszyny"
  12. stop
  13. if arg 1 is "usun":
  14. delete {haz1}
  15. delete {haz2}
  16. delete {haz3}
  17. send "{@t} Maszyna zostala usunieta!"
  18. set {haz.utw} to 0
  19. stop
  20. if arg 1 is "losowanie":
  21. if targeted block is sign:
  22. if arg 2 is set:
  23. if {haz3} is set:
  24. set line 1 of targeted block to "{@t}"
  25. set line 2 of targeted block to "&eLosuj"
  26. set line 3 of targeted block to "&2Koszt:"
  27. set line 4 of targeted block to "%arg 2%"
  28. set {haz.koszt} to arg 2
  29. set {haz.utw} to 1
  30. set {haz.mt} to location of targeted block
  31. stop
  32. send "{@t} Podaj jeszcze cene!"
  33. if arg 1 is not set:
  34. send " {@t} Komendy "
  35. send "{@t} hazard/hz daj - Daje bloki do stworzenia"
  36. send "{@t} hazard/hz usun - Usuwa caly hazard (bloki, cene itp)"
  37. send "{@t} hazard/hz losowanie |cena bez $| - Ustawia tabliczke i cene"
  38. stop
  39. on place wool:1:
  40. if name of player's tool is "&5Hazard":
  41. if {haz1} is not set:
  42. set {haz1} to location of event-block
  43. remove 1 wool named "&5Hazard" from player's inventory
  44. stop
  45. if {haz2} is not set:
  46. set {haz2} to event-block
  47. remove 1 wool named "&5Hazard" from player's inventory
  48. stop
  49. if {haz3} is not set:
  50. set {haz3} to event-block
  51. remove 1 wool named "&5Hazard" from player's inventory
  52. stop
  53. send "{@t} Maszyna jest juz ustawiona (%{haz1}%)"
  54. stop
  55. on rightclick on sign:
  56. if player's balance is bigger than {haz.koszt}:
  57. if {haz.utw} is 1:
  58. if location of clicked block is {haz.mt}:
  59. remove {hazard.koszt} from player's balance
  60. set {_b1} to random integer between 0 and 5
  61. set {_b2} to random integer between 0 and 5
  62. set {_b3} to random integer between 0 and 5
  63. send "{@t} Zaczynam Losowanie:"
  64. if {_b1} is 1:
  65. set block at {haz1} to diamond block
  66. if {_b1} is 2:
  67. set block at {haz1} to emerald block
  68. if {_b1} is 3:
  69. set block at {haz1} to iron block
  70. if {_b1} is 4:
  71. set block at {haz1} to gold block
  72. if {_b1} is 5:
  73. set block at {haz1} to wool:5
  74. if {_b2} is 1:
  75. set block at {haz2} to diamond block
  76. if {_b2} is 2:
  77. set block at {haz2} to emerald block
  78. if {_b2} is 3:
  79. set block at {haz2} to iron block
  80. if {_b2} is 4:
  81. set block at {haz2} to gold block
  82. if {_b2} is 5:
  83. set block at {haz2} to wool:5
  84. if {_b3} is 1:
  85. set block at {haz3} to diamond block
  86. if {_b3} is 2:
  87. set block at {haz3} to emerald block
  88. if {_b3} is 3:
  89. set block at {haz3} to iron block
  90. if {_b3} is 4:
  91. set block at {haz3} to gold block
  92. if {_b3} is 5:
  93. set block at {haz3} to wool:5
  94. if block at {haz1} and {haz2} and {haz3} is diamond block:
  95. chance of {@sz}:
  96. set {_blabla} to random integer between 25 and 70
  97. set {_blabla} to ({_blabla}*3)
  98. wait 1 tick
  99. give {_blabla} of diamond to the player's inventory
  100. send "&bBrawo! Wygrales %{_blabla}% diamentow! Jest to 3* wiekszy drop."
  101. stop
  102. set {_blabla} to random integer between 25 and 70
  103. wait 1 tick
  104. give {_blabla} of diamond to the player's inventory
  105. send "&bBrawo! Wygrales %{_blabla}% diamentow!"
  106. stop
  107. if block at {haz1} and {haz2} and {haz3} is emerald block:
  108. chance of {@sz}:
  109. set {_blabla} to random integer between 25 and 100
  110. set {_blabla} to ({_blabla}*3)
  111. wait 1 tick
  112. give {_blabla} of emerald to the player's inventory
  113. send "&bBrawo! Wygrales %{_blabla}% emeraldow! Jest to 3* wiekszy drop."
  114. stop
  115. set {_blabla} to random integer between 25 and 100
  116. wait 1 tick
  117. give {_blabla} of emerald to the player's inventory
  118. send "&bBrawo! Wygrales %{_blabla}% emeraldow!"
  119. stop
  120. if block at {haz1} and {haz2} and {haz3} is iron block:
  121. chance of {@sz}:
  122. set {_blabla} to random integer between 25 and 100
  123. set {_blabla} to ({_blabla}*3)
  124. wait 1 tick
  125. give {_blabla} of iron ingot to the player's inventory
  126. send "&bBrawo! Wygrales %{_blabla}% Zelaza! Jest to 3* wiekszy drop."
  127. stop
  128. set {_blabla} to random integer between 48 and 100
  129. wait 1 tick
  130. give {_blabla} of iron ingot to the player's inventory
  131. send "&bBrawo! Wygrales %{_blabla}% zelaza!"
  132. stop
  133. if block at {haz1} and {haz2} and {haz3} is gold block:
  134. chance of {@sz}:
  135. set {_blabla} to random integer between 25 and 100
  136. set {_blabla} to ({_blabla}*3)
  137. wait 1 tick
  138. give {_blabla} of gold ingot to the player's inventory
  139. send "&bBrawo! Wygrales %{_blabla}% Zlota! Jest to 3* wiekszy drop."
  140. stop
  141. set {_blabla} to random integer between 30 and 100
  142. wait 1 tick
  143. give {_blabla} of gold ingot to the player's inventory
  144. send "&bBrawo! Wygrales %{_blabla}% zlota!"
  145. stop
  146. if block at {haz1} and {haz2} and {haz3} is wool:5:
  147. chance of {@sz}:
  148. set {_blabla} to random integer between 2400 and 5500
  149. set {_blabla} to ({_blabla}*3)
  150. wait 1 tick
  151. add {_blabla} to the player's balance
  152. send "&bBrawo! Wygrales %{_blabla}% Monet! Jest to 3* wiekszy drop."
  153. stop
  154. set {_blabla} to random integer between 2400 and 5500
  155. wait 1 tick
  156. add {_blabla} to the player's balance
  157. send "&bBrawo! Wygrales %{_blabla}% Monet!"
  158. stop
  159. send "{@t} Zakonczylem losowanie. Brak wygranej."
  160. stop
  161. else:
  162. send "{@t} Maszyna nie jest poprawnie skonfigurowana!"
  163. send "Skontaktuj sie z administratorem."
  164. stop
  165. else:
  166. send "{@t} Nie masz pieniedzy aby losowac! (%{haz.koszt}%)"
Advertisement
Add Comment
Please, Sign In to add comment