Guest User

Ruletka G1337 v. 1.1

a guest
May 12th, 2016
1,197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.59 KB | None | 0 0
  1. #---------------#
  2. # Autor: Gorlik1337
  3. # Link do Projektu na MPCForum.pl: http://www.mpcforum.pl/topic/1540068-ruletkag1337-ruletka-na-tw%C3%B3j-serwer-minecraft
  4. # Zakaz podszywania się
  5. # Wersja: 1.1
  6. #---------------#
  7.  
  8. options:
  9. red_icon: redstone
  10. red_name: &cCzerwony
  11.  
  12. green_icon: light green dye
  13. green_name: &2Zielony
  14.  
  15. black_icon: gunpowder
  16. black_name: &8Czarny
  17.  
  18. klucz: 1234
  19. czas: 30
  20. historia.losowan: &7Historia Losowań:&7
  21.  
  22. #Zezwalam na edycje tylko zakładki "options" - czyli to co jest wyżej
  23. #kod
  24.  
  25. variables:
  26. {ruletka.red.%player%} = 0
  27. {ruletka.green.%player%} = 0
  28. {ruletka.black.%player%} = 0
  29. {ruletka.pula} = 0
  30. {ruletka.slot.1} = green
  31. {ruletka.slot.2} = red
  32. {ruletka.slot.3} = black
  33. {ruletka.slot.4} = red
  34. {ruletka.slot.5} = black
  35. {ruletka.slot.6} = red
  36. {ruletka.slot.7} = black
  37. {ruletka.slot.8} = red
  38. {ruletka.slot.9} = black
  39.  
  40.  
  41. command /ruletka [<text>] [<player>] [<text>]:
  42. trigger:
  43. wait 2 tick
  44. if arg 1 is not set:
  45. open chest with 5 rows named "&1&lRuletka &7by Gorlik1337" to player
  46. set {ruletka.aktualizacja.%player%} to true
  47. loop 44 times:
  48. format slot loop-number of player with 1 of gray glass pane named "&0" to be unstealable
  49. loop 9 times:
  50. format slot loop-number+35 of player-arg with 1 of gray glass pane named "{@historia.losowan}" to be unstealable
  51. execute player command "ruletka {@klucz} %player% autoaktualizacja"
  52.  
  53. if arg 1 is "{@klucz}":
  54. if arg 3 is "autoaktualizacja":
  55. while {ruletka.aktualizacja.%player%} is true:
  56. set {_money} to player's balance
  57. format slot 0 of player-arg with {ruletka.czas} of clock named "&6Czas: &c%{ruletka.czas}%" to be unstealable
  58. format slot 2 of player-arg with {ruletka.red.%player-arg%} of {@red_icon} named "{@red_name} &7[&6%{ruletka.red.%player-arg%}%&7] &52x" with lore "&7Postaw na {@red_name}" to run [execute player command "ruletka {@klucz} %player-arg% addred"]
  59. format slot 4 of player-arg with {ruletka.green.%player-arg%} of {@green_icon} named "{@green_name} &7[&6%{ruletka.green.%player-arg%}%&7] &514x" with lore "&7Postaw na {@green_name}" to run [execute player command "ruletka {@klucz} %player-arg% addgreen"]
  60. format slot 6 of player-arg with {ruletka.black.%player-arg%} of {@black_icon} named "{@black_name} &7[&6%{ruletka.black.%player-arg%}%&7] &52x" with lore "&7Postaw na {@black_name}" to run [execute player command "ruletka {@klucz} %player-arg% addblack"]
  61. format slot 8 of player-arg with 1 of paper named "&6Stan konta" with lore "&7%{_money}%" to be unstealable
  62. format slot 9 of player-arg with {ruletka.pula} of gold ingot named "&6Pula &7%{ruletka.pula}% monet" to be unstealable
  63. if {ruletka.losuje} is false:
  64. if {ruletka.pula} is 0:
  65. format slot 13 of player-arg with 1 of hopper named "&7Oczekiwanie na graczy..." to be unstealable
  66. else:
  67. format slot 13 of player-arg with 1 of hopper named "&7Oczekiwanie na koniec czasu..." to be unstealable
  68. if {ruletka.losuje} is true:
  69. format slot 13 of player-arg with 1 of hopper named "&7Trwa Losowanie..." to be unstealable
  70. loop 9 times:
  71. if {ruletka.slot.%loop-number%} is "red":
  72. format slot loop-number+17 of player-arg with 1 of {@red_icon} named "{@red_name}" to be unstealable
  73. if {ruletka.slot.%loop-number%} is "green":
  74. format slot loop-number+17 of player-arg with 1 of {@green_icon} named "{@green_name}" to be unstealable
  75. if {ruletka.slot.%loop-number%} is "black":
  76. format slot loop-number+17 of player-arg with 1 of {@black_icon} named "{@black_name}" to be unstealable
  77. loop 9 times:
  78. if {ruletka.slothistoria.%loop-number%} is "red":
  79. format slot loop-number+35 of player-arg with 1 of {@red_icon} named "{@historia.losowan} {@red_name}" to be unstealable
  80. if {ruletka.slothistoria.%loop-number%} is "green":
  81. format slot loop-number+35 of player-arg with 1 of {@green_icon} named "{@historia.losowan} {@green_name}" to be unstealable
  82. if {ruletka.slothistoria.%loop-number%} is "black":
  83. format slot loop-number+35 of player-arg with 1 of {@black_icon} named "{@historia.losowan} {@black_name}" to be unstealable
  84. wait tick
  85.  
  86. if arg 3 is "addred":
  87. if {ruletka.losuje} is false:
  88. if player-arg's balance is greater than or equal to 1:
  89. remove 1 from player's balance
  90. add 1 to {ruletka.red.%player-arg%}
  91. play raw sound "random.pop" at player-arg with pitch 1 volume 1
  92. add 1 to {ruletka.pula}
  93. stop
  94. play raw sound "random.pop" at player-arg with pitch 0 volume 1
  95. stop
  96. if arg 3 is "addgreen":
  97. if {ruletka.losuje} is false:
  98. if player-arg's balance is greater than or equal to 1:
  99. remove 1 from player's balance
  100. add 1 to {ruletka.green.%player-arg%}
  101. play raw sound "random.pop" at player-arg with pitch 1 volume 1
  102. add 1 to {ruletka.pula}
  103. stop
  104. play raw sound "random.pop" at player-arg with pitch 0 volume 1
  105. stop
  106. if arg 3 is "addblack":
  107. if {ruletka.losuje} is false:
  108. if player-arg's balance is greater than or equal to 1:
  109. remove 1 from player's balance
  110. add 1 to {ruletka.black.%player-arg%}
  111. play raw sound "random.pop" at player-arg with pitch 1 volume 1
  112. add 1 to {ruletka.pula}
  113. stop
  114. play raw sound "random.pop" at player-arg with pitch 0 volume 1
  115. stop
  116.  
  117.  
  118. every 1 second:
  119. if {ruletka.czas} is greater than 0:
  120. remove 1 from {ruletka.czas}
  121. stop
  122. if {ruletka.czas} is 0:
  123. set {ruletka.losuje} to true
  124. if {ruletka.losuje} is true:
  125. if {ruletka.uruchom_losowanie} is false:
  126. if {ruletka.pula} is 0:
  127. set {ruletka.czas} to {@czas}
  128. set {ruletka.losuje} to false
  129. set {ruletka.uruchom_losowanie} to false
  130. stop
  131. set {ruletka.uruchom_losowanie} to true
  132. set {_random} to random integer between 20 and 30
  133. wait 1 seconds
  134. loop {_random} times:
  135. if loop-number > 15:
  136. loop loop-number - 12 times:
  137. wait 1 tick
  138. else:
  139. wait 3 tick
  140. set {_slot} to {ruletka.slot.1}
  141. loop 8 times:
  142. set {ruletka.slot.%loop-number-2%} to {ruletka.slot.%loop-number-2 + 1%}
  143. set {ruletka.slot.9} to {_slot}
  144. wait 1 seconds
  145. loop all players:
  146. if {ruletka.slot.5} is "green":
  147. set {ruletka.green.%loop-player%} to {ruletka.green.%loop-player%}*14
  148. add {ruletka.green.%loop-player%} to loop-player's balance
  149. if {ruletka.slot.5} is "red":
  150. set {ruletka.red.%loop-player%} to {ruletka.red.%loop-player%}*2
  151. add {ruletka.red.%loop-player%} to loop-player's balance
  152. if {ruletka.slot.5} is "black":
  153. set {ruletka.black.%loop-player%} to {ruletka.black.%loop-player%}*2
  154. add {ruletka.black.%loop-player%} to loop-player's balance
  155.  
  156. set {ruletka.green.%loop-player%} to 0
  157. set {ruletka.red.%loop-player%} to 0
  158. set {ruletka.black.%loop-player%} to 0
  159. loop 8 times:
  160. set {ruletka.slothistoria.%loop-number%} to {ruletka.slothistoria.%loop-number + 1%}
  161. set {ruletka.slothistoria.9} to {ruletka.slot.5}
  162. wait 3 seconds
  163. set {ruletka.czas} to {@czas}
  164. set {ruletka.losuje} to false
  165. set {ruletka.uruchom_losowanie} to false
  166. set {ruletka.pula} to 0
  167. stop
  168.  
  169.  
  170.  
  171. on inventory close:
  172. if {ruletka.aktualizacja.%player%} is true:
  173. set {ruletka.aktualizacja.%player%} to false
  174.  
  175. on script load:
  176. set {ruletka.czas} to {@czas}
  177. set {ruletka.losuje} to false
  178. set {ruletka.uruchom_losowanie} to false
  179. set {ruletka.pula} to "0"
  180. send "" to console
  181. send "&3Ruletka Załadowana!" to console
  182. send "&3Ruletka by &5Gorlik1337" to console
  183. send "" to console
Advertisement
Add Comment
Please, Sign In to add comment