Advertisement
Guest User

Untitled

a guest
May 21st, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.02 KB | None | 0 0
  1. #
  2. # © Parrot 2014
  3. # Downald by PluszaczeGG.
  4. #
  5.  
  6. options:
  7. czas: 180 # tu ustaw czas po jakim konkurs ma sie rozpoczac
  8. ilosc: 1 # ilosc itemu po wpisaniu wlasciwego kodu
  9. item: Kox # jaki item ma dostawac osoba bo wpisaniu kodu
  10. gracze: 2 # ile graczy potrzeba do rozpoczencia konkursu
  11. l: &8[&6&lLOSOWANIE&8] # prefix
  12.  
  13. variables:
  14. {konkurs} = 0
  15.  
  16. every {@czas} seconds:
  17. if {@gracze} is smaller than number of players:
  18. execute console command "konkurs"
  19.  
  20. command /konkurs:
  21. trigger:
  22. if sender has permission "sk.konkurs":
  23. loop 6 times:
  24. set {konkurs.znak%loop-number%} to 0 or 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9 or "a" or "A" or "b" or "B" or "c" or "C" or "d" or "D" or "e" or "E" or "f" or "F" or "g" or "G" or "h" or "H" or "k" or "K" or "l" or "L" or "m" or "M" or "n" or "N" or "o" or "O" or "p" or "P" or "q" or "Q" or "r" or "R" or "s" or "S" or "t" or "T" or "u" or "U" or "v" or "V" or "w" or "W" or "x" or "X" or "y" or "Y" or "z" or "Z"
  25. set {konkurs.kod} to "%{konkurs.znak1}%%{konkurs.znak2}%%{konkurs.znak3}%%{konkurs.znak4}%%{konkurs.znak5}%%{konkurs.znak6}%"
  26. broadcast "{@l} &3Przepisz kod na czacie aby wygrac {@ilosc} {@item}"
  27. set {konkurs} to 1
  28. loop all players:
  29. broadcast "{@l} &3Kod &c%{konkurs.kod}%&7"
  30. else:
  31. message "&cNie masz uprawnien do tego!"
  32. on chat:
  33. if {konkurs} is 1:
  34. if message contains "%{konkurs.kod}%":
  35. cancel event
  36. set {konkurs} to 0
  37. broadcast "{@l} &7%player% &aPrzepisal kod jako pierwszy!"
  38. add 1 to {wygrane::%player%}
  39. give 1 322:1 to player
  40. loop all players:
  41. command /topw [<integer=1>]:
  42. trigger:
  43. set {_strony} to rounded up (size of {wygrane::*} / 5)
  44. arg is between 1 and {_strony}:
  45. send "&6&m---&r &e&lTopka wygranych &6&m---"
  46. loop {wygrane::*}:
  47. set {_lista::%loop-index%} to loop-value
  48. set {_num} to size of {_lista::*}
  49. set {_max} to arg * 5
  50. set {_min} to {_max} - 4
  51. loop {_max} times:
  52. loop {_lista::*}:
  53. {_wartosc.%loop-number%} is not set:
  54. set {_wartosc.%loop-number%} to loop-value
  55. set {_nazwa.%loop-number%} to loop-index
  56. loop-value is more than {_wartosc.%loop-number%}:
  57. set {_wartosc.%loop-number%} to loop-value
  58. set {_nazwa.%loop-number%} to loop-index
  59. remove {_wartosc.%loop-number%} from {_lista::*}
  60. loop {_max} times:
  61. loop-number is between {_min} and {_max}
  62. loop-number <= {_num}:
  63. send "&6%loop-number%. %{nick::%{_nazwa.%loop-number%}%}% &7(&c%{_wartosc.%loop-number%}%&7)"
  64. {_max} is more than {_num}:
  65. set {_r} to {_num}
  66. loop {_max} - {_num} times:
  67. add 1 to {_r}
  68. send "&6%{_r}%. Brak"
  69. send "&6&lStrona: &c%arg% &6z &c%{_strony}%"
  70. stop
  71. {_strony} is 1:
  72. send "&6&lWyniki mieszcza sie na &c1 &6&lstronie."
  73. stop
  74. send "&6&lWyniki mieszcza sie na &c%{_strony}% 6&lstronach."
  75. on join:
  76. {wygrane::%player%} is not set:
  77. set {wygrane::%player%} to 0
  78. {nick::%player%} is not set:
  79. set {nick::%player%} to uncolored display name of player
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement