knugi

Kik - Kolko i krzyzyk

Mar 2nd, 2018
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.58 KB | None | 0 0
  1. command /kik [<text>]:
  2. trigger:
  3. if arg 1 is not set:
  4. send "&aKik &cby &fKnugi"
  5. send "&6Kik to gra w Kolko i Krzyzyk."
  6. send "&a/kik <gracz> &8- &7proponujesz gre dla gracza"
  7. stop
  8. set {_player} to "%arg 1%" parsed as offlineplayer
  9. if {_player} is player:
  10. send "&c* &7Nie mozesz grac z samym soba."
  11. stop
  12. if {_player} is online:
  13. if distance between player and {_player} is smaller than 5.1:
  14. if {kik::%{_player}%.status} is not set:
  15. set {kik::%{_player}%.status} to "oczekiwanie"
  16. set {kik::%player%.status} to "gotowy"
  17. set {kik::%{_player}%.with} to player
  18. set {kik::%player%.with} to {_player}
  19. set {kik::%{_player}%.trial} to 15
  20. set {kik::%player%.trial} to 15
  21. send "&c* &7Zaprosiles gracza &6%{_player}% &7do gry w kolko i krzyzyk." to player
  22. send "&c* &7Gracz &6%player% &7zaprasza Cie do gry w kolko i krzyzyk&7.%nl%&7Aby akceptowac: &6/kik %player%" to {_player}
  23. stop
  24. if {kik::%{_player}%.status} is "gotowy":
  25. if {kik::%{_player}%.with} is player:
  26. close {_player}'s inventory
  27. clear {kik::%player%.trial}
  28. clear {kik::%{_player}%.trial}
  29. set {kik::%player%.points} to 0
  30. set {kik::%{_player}%.points} to 0
  31. wait 2 tick
  32. open chest with 5 rows named "&9&lKolko i krzyzyk" to player
  33. open chest with 5 rows named "&9&lKolko i krzyzyk" to {_player}
  34. set {kik::%player%.status} to "gra"
  35. set {kik::%{_player}%.status} to "gra"
  36. loop 9 times:
  37. set {_} to loop-number
  38. if loop-number is 2 or 6:
  39. loop 5 times:
  40. set player's current inventory's slot {_} to blue glass named "&6Przedzialka"
  41. set {_player}'s current inventory's slot {_} to blue glass named "&6Przedzialka"
  42. add 9 to {_}
  43. else if loop-number is between 3 and 5:
  44. set player's current inventory's slot {_} to blue glass named "&6Przedzialka"
  45. set {_player}'s current inventory's slot {_} to blue glass named "&6Przedzialka"
  46. set player's current inventory's slot {_} + 4*9 to blue glass named "&6Przedzialka"
  47. set {_player}'s current inventory's slot {_} + 4*9 to blue glass named "&6Przedzialka"
  48. set player's current inventory's slot 40 to paper named "&9&lWyniki" with lore "&6Twoje punkty: &c0||&6Punkty &3%{_player}%: &c0"
  49. set {_player}'s current inventory's slot 40 to paper named "&9&lWyniki" with lore "&6Twoje punkty: &c0||&6Punkty &3%player%: &c0"
  50. set player's current inventory's slot 44 to iron door named "&c&lWyjscie" with lore "&6Kliknij aby zakonczyc gre"
  51. set {_player}'s current inventory's slot 44 to iron door named "&c&lWyjscie" with lore "&6Kliknij aby zakonczyc gre"
  52. set player's current inventory's slot 8 to player head named "&3%{_player}%"
  53. set {_player}'s current inventory's slot 8 to player head named "&3%player%"
  54.  
  55. set {kik::%player%.item} to random integer between 0 and 1
  56. if {kik::%player%.item} is 0:
  57. set {kik::%player%.item} to snowball named "&9&lO"
  58. set {kik::%{_player}%.item} to cobweb named "&9&lX"
  59. else:
  60. set {kik::%player%.item} to cobweb named "&9&lX"
  61. set {kik::%{_player}%.item} to snowball named "&9&lO"
  62. set {_} to 0
  63. set {_1} to 1
  64. loop 5 times:
  65. if {kik::%player%.item} is snowball:
  66. set player's current inventory's slot {_} to light green wool named "&6Twoj ruch"
  67. set {_player}'s current inventory's slot {_} to red wool named "&6Ruch &3%player%"
  68. set player's current inventory's slot {_1} to snowball named "&9&lO"
  69. set player's current inventory's slot {_1}+6 to cobweb named "&9&lX"
  70. set {_player}'s current inventory's slot {_1}+6 to snowball named "&9&lO"
  71. set {_player}'s current inventory's slot {_1} to cobweb named "&9&lX"
  72. add 9 to {_1}
  73. add 9 to {_}
  74. else:
  75. set player's current inventory's slot {_} to red wool named "&6Ruch &3%player%"
  76. set {_player}'s current inventory's slot {_} to light green wool named "&6Twoj ruch"
  77. set player's current inventory's slot {_1}+6 to snowball named "&9&lO"
  78. set player's current inventory's slot {_1} to cobweb named "&9&lX"
  79. set {_player}'s current inventory's slot {_1} to snowball named "&9&lO"
  80. set {_player}'s current inventory's slot {_1}+6 to cobweb named "&9&lX"
  81. add 9 to {_1}
  82. add 9 to {_}
  83. set {_i} to 0
  84. loop 45 times:
  85. set {kik::%player%.items::%{_i}%} to player's current inventory's slot {_i}
  86. set {kik::%{_player}%.items::%{_i}%} to {_player}'s current inventory's slot {_i}
  87. add 1 to {_i}
  88. stop
  89. send "&7Jestes za daleko od tego gracza."
  90. stop
  91. on quit:
  92. if {kik::%player%.status} is "gra":
  93. set {_player} to {kik::%player%.with}
  94. send "&7Twoj towarzysz opuscil gre. Ukonczyles z wynikiem &f%{kik::%player%.points}%&c:&f%{kik::%{_player}%.points}%" to {kik::%player%.with}
  95. close {_player}'s inventory
  96. clear {kik::%player%.status}
  97. clear {kik::%player%.with}
  98. clear {kik::%player%.points}
  99. clear {kik::%player%.item}
  100. clear {kik::%player%.items::*}
  101. clear {kik::%{_player}%.status}
  102. clear {kik::%{_player}%.with}
  103. clear {kik::%{_player}%.points}
  104. clear {kik::%{_player}%.item}
  105. clear {kik::%{_player}%.items}
  106. stop
  107. if {kik::%player%.status} is "oczekiwanie" or "gotowy":
  108. clear {kik::%{kik::%player%.with}%.status}
  109. clear {kik::%{kik::%player%.with}%.with}
  110. clear {kik::%{kik::%player%.with}%.trial}
  111. clear {kik::%player%.status}
  112. clear {kik::%player%.with}
  113. clear {kik::%player%.trial}
  114. every 1 second:
  115. loop all players:
  116. if {kik::%loop-player%.trial} is larger than 0:
  117. remove 1 from {kik::%loop-player%.trial}
  118. else if {kik::%loop-player%.trial} is 0:
  119. send "&7Czas zaproszenia do kolka i krzyzyk wygasl." to loop-player and {kik::%loop-player%.with}
  120. clear {kik::%{kik::%loop-player%.with}%.status}
  121. clear {kik::%{kik::%loop-player%.with}%.with}
  122. clear {kik::%{kik::%loop-player%.with}%.trial}
  123. clear {kik::%loop-player%.status}
  124. clear {kik::%loop-player%.with}
  125. clear {kik::%loop-player%.trial}
  126. on inventory click:
  127. if "%inventory name of player's current inventory%" contains "Kolko i krzyzyk":
  128. set {_slot} to clicked slot
  129. if {_slot} is smaller than 0:
  130. stop
  131. cancel event
  132. set {_player} to {kik::%player%.with}
  133. if player's current inventory's slot {_slot} is iron door:
  134. send "&7Twoj towarzysz opuscil gre. Ukonczyles z wynikiem &f%{kik::%{_player}%.points}%&c:&f%{kik::%player%.points}%" to {_player}
  135. send "&7Wyszedles z gry. Ukonczyles z wynikiem &f%{kik::%player%.points}%&c:&f%{kik::%{_player}%.points}%"
  136. clear {kik::%player%.status}
  137. clear {kik::%player%.with}
  138. clear {kik::%player%.points}
  139. clear {kik::%player%.item}
  140. clear {kik::%player%.items::*}
  141. clear {kik::%{_player}%.status}
  142. clear {kik::%{_player}%.with}
  143. clear {kik::%{_player}%.points}
  144. clear {kik::%{_player}%.item}
  145. clear {kik::%{_player}%.items}
  146. close player's inventory
  147. close {_player}'s inventory
  148. stop
  149. if player's current inventory's slot 0 is light green wool:
  150. loop 14 times:
  151. set {_} to loop-number
  152. if loop-number is between 12 and 14:
  153. loop 3 times:
  154. if {_} is {_slot}:
  155. if player's current inventory's slot {_slot} is air:
  156. set player's current inventory's slot {_} to {kik::%player%.item}
  157. set {_player}'s current inventory's slot {_} to {kik::%player%.item}
  158. set {kik::%player%.items::%{_slot}%} to player's current inventory's slot {_slot}
  159. set {kik::%{_player}%.items::%{_slot}%} to {_player}'s current inventory's slot {_slot}
  160. set {_j} to 12
  161. loop 3 times:
  162. if player's current inventory's slot {_j} is not air:
  163. if "%player's current inventory's slot {_j}%" and "%player's current inventory's slot {_j}+1%" is "%player's current inventory's slot {_j}+2%":
  164. set {_win} to true
  165. add 9 to {_j}
  166. set {_j} to 12
  167. loop 3 times:
  168. if player's current inventory's slot {_j} is not air:
  169. if "%player's current inventory's slot {_j}%" and "%player's current inventory's slot {_j}+9%" is "%player's current inventory's slot {_j}+18%":
  170. set {_win} to true
  171. add 1 to {_j}
  172. set {_j} to 12
  173. if player's current inventory's slot {_j} is not air:
  174. if "%player's current inventory's slot {_j}%" and "%player's current inventory's slot {_j}+10%" is "%player's current inventory's slot {_j}+20%":
  175. set {_win} to true
  176. set {_j} to 14
  177. if player's current inventory's slot {_j} is not air:
  178. if "%player's current inventory's slot {_j}%" and "%player's current inventory's slot {_j}+8%" is "%player's current inventory's slot {_j}+16%":
  179. set {_win} to true
  180. if {_win} is set:
  181. send "&3Wygrales!"
  182. send "&7Przegrales :(" to {_player}
  183. loop 14 times:
  184. set {_c} to loop-number-3
  185. if loop-number-3 is between 12 and 14:
  186. loop 3 times:
  187. clear {kik::%player%.items::%{_c}%}
  188. clear {kik::%{_player}%.items::%{_c}%}
  189. clear player's current inventory's slot {_c}
  190. clear {_player}'s current inventory's slot {_c}
  191. add 9 to {_c}
  192. set {kik::%player%.item} to random integer between 0 and 1
  193. if {kik::%player%.item} is 0:
  194. set {kik::%player%.item} to snowball named "&9&lO"
  195. set {kik::%{_player}%.item} to cobweb named "&9&lX"
  196. else:
  197. set {kik::%player%.item} to cobweb named "&9&lX"
  198. set {kik::%{_player}%.item} to snowball named "&9&lO"
  199. set {_} to 0
  200. set {_1} to 1
  201. loop 5 times:
  202. if {kik::%player%.item} is snowball:
  203. set player's current inventory's slot {_} to light green wool named "&6Twoj ruch"
  204. set {_player}'s current inventory's slot {_} to red wool named "&6Ruch &3%player%"
  205.  
  206. set player's current inventory's slot {_1} to snowball named "&9&lO"
  207. set player's current inventory's slot {_1}+6 to cobweb named "&9&lX"
  208. set {_player}'s current inventory's slot {_1}+6 to snowball named "&9&lO"
  209. set {_player}'s current inventory's slot {_1} to cobweb named "&9&lX"
  210. add 9 to {_1}
  211. add 9 to {_}
  212. else:
  213. set player's current inventory's slot {_} to red wool named "&6Ruch &3%player%"
  214. set {_player}'s current inventory's slot {_} to light green wool named "&6Twoj ruch"
  215.  
  216. set player's current inventory's slot {_1}+6 to snowball named "&9&lO"
  217. set player's current inventory's slot {_1} to cobweb named "&9&lX"
  218. set {_player}'s current inventory's slot {_1} to snowball named "&9&lO"
  219. set {_player}'s current inventory's slot {_1}+6 to cobweb named "&9&lX"
  220. add 9 to {_1}
  221. add 9 to {_}
  222. add 1 to {kik::%player%.points}
  223. set player's current inventory's slot 40 to paper named "&9&lWyniki" with lore "&6Twoje punkty: &c%{kik::%player%.points}%||&6Punkty &3%{_player}%: &c%{kik::%{_player}%.points}%"
  224. set {_player}'s current inventory's slot 40 to paper named "&9&lWyniki" with lore "&6Twoje punkty: &c%{kik::%{_player}%.points}%||&6Punkty &3%player%: &c%{kik::%player%.points}%"
  225. set {kik::%player%.items::40} to player's current inventory's slot 40
  226. set {kik::%{_player}%.items::40} to {_player}'s current inventory's slot 40
  227. stop
  228. set {_0} to 0
  229. loop 5 times:
  230. set player's current inventory's slot {_0} to red wool named "&6Ruch &3%{kik::%player%.with}%"
  231. set {_player}'s current inventory's slot {_0} to light green wool named "&6Twoj ruch"
  232. add 9 to {_0}
  233. add player's current inventory's slot {_} to {_temp::*}
  234. add 9 to {_}
  235. if "%{_temp::*}%" doesn't contain "air":
  236. send "&7Remis" to player and {_player}
  237. loop 14 times:
  238. set {_c} to loop-number
  239. if loop-number is between 12 and 14:
  240. loop 3 times:
  241. clear {kik::%player%.items::%{_c}%}
  242. clear {kik::%{_player}%.items::%{_c}%}
  243. clear player's current inventory's slot {_c}
  244. clear {_player}'s current inventory's slot {_c}
  245. add 9 to {_c}
  246. stop
  247. on inventory close:
  248. if "%uncoloured inventory name of player's current inventory%" contains "Kolko i krzyzyk":
  249. if {kik::%player%.status} is not set:
  250. stop
  251. wait 2 tick
  252. open chest with 5 rows named "&9&lKolko i krzyzyk" to player
  253. wait 2 tick
  254. loop {kik::%player%.items::*}:
  255. set player's current inventory's slot loop-index parsed as integer to loop-value
Advertisement
Add Comment
Please, Sign In to add comment