Nizax

parrot skript edit 4 creeperworld

Dec 21st, 2014
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.57 KB | None | 0 0
  1. options:
  2. czas: 3600 # tu ustaw czas po jakim konkurs ma sie rozpoczac
  3. ilosc: 8 # ilosc itemu po wpisaniu wlasciwego kodu
  4. item: diamond # jaki item ma dostawac osoba bo wpisaniu kodu
  5. gracze: 5 # ile graczy potrzeba do rozpoczencia konkursu
  6. szansa: 50% # ile procent szans ma miec gracz na zobaczenie wiadomosci
  7. limit: 3 # limit wygranych na 1 dzien
  8. l: &r[&b&lKONKURS&r] # prefix
  9.  
  10. variables:
  11. {konkurs} = 0
  12.  
  13. every {@czas} seconds:
  14. if {@gracze} is smaller than number of players:
  15. execute console command "konkurs"
  16.  
  17. command /konkurs:
  18. trigger:
  19. if sender has permission "sk.konkurs":
  20. set {konkurs.dzisiaj} to "%day%"
  21. set {_wczoraj} to "%{konkurs.dzisiaj}%" parsed as integer
  22. set {_wczoraj} to {_wczoraj}-1
  23. {wygrane_dzien-%{_wczoraj}%::*} is set:
  24. clear {wygrane_dzien-%{_wczoraj}%::*}
  25. set {_brali_ostatnio_udzial::*} to {konkurs.brali_udzial::*}
  26. clear {konkurs.brali_udzial::*}
  27. loop all players:
  28. loop players in {_brali_ostatnio_udzial::*}:
  29. {wygrane_dzien-%{konkurs.dzisiaj}%::%loop-player-1%} < {@limit}
  30. loop-player-2 is loop-player-1:
  31. set {_lastchance} to {@szansa}/5
  32. chance of {_lastchance}
  33. add loop-player-1 to {konkurs.brali_udzial::*}
  34. loop-player-2 is not loop-player-1:
  35. chance of {@szansa}
  36. add loop-player-1 to {konkurs.brali_udzial::*}
  37. {_brali_ostatnio_udzial::*} is not set:
  38. chance of {@szansa}
  39. add loop-player-1 to {konkurs.brali_udzial::*}
  40. loop 6 times:
  41. 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"
  42. set {konkurs.kod} to "%{konkurs.znak1}%%{konkurs.znak2}%%{konkurs.znak3}%%{konkurs.znak4}%%{konkurs.znak5}%%{konkurs.znak6}%"
  43. send "{@l} &7Za 3 sekundy rozpocznie sie konkurs! Kto pierwszy wpisze znaki na ekranie wygrywa {@ilosc} {@item}" to {konkurs.brali_udzial::*}
  44. wait 1 second
  45. send "{@l} &73" to {konkurs.brali_udzial::*}
  46. wait 1 second
  47. send "{@l} &72" to {konkurs.brali_udzial::*}
  48. wait 1 second
  49. send "{@l} &71" to {konkurs.brali_udzial::*}
  50. wait 1 second
  51. set {konkurs} to 1
  52. loop players in {konkurs.brali_udzial::*}:
  53. execute console command "playsound random.levelup %loop-player%"
  54. send "{@l} &7Kod to &e%{konkurs.kod}%&7! Aby go wprowadzic wpisz kod na chacie!" to {konkurs.brali_udzial::*}
  55. else:
  56. message "&cNie masz uprawnien do tego!"
  57. on chat:
  58. if {konkurs} is 1:
  59. if message contains "%{konkurs.kod}%":
  60. cancel event
  61. set {konkurs} to 0
  62. send "{@l} &7Gracz %player% wpisal jako pierwszy kod &e%{konkurs.kod}% &7i wygral {@ilosc} {@item}!" to {konkurs.brali_udzial::*}
  63. add 1 to {wygrane::%player%}
  64. add 1 to {wygrane_dzien-%{konkurs.dzisiaj}%::%player%}
  65. give {@ilosc} {@item} to player
  66. loop players in {konkurs.brali_udzial::*}:
  67. execute console command "playsound mob.wither.spawn %loop-player%"
  68. command /topw [<integer=1>]:
  69. trigger:
  70. set {_strony} to rounded up (size of {wygrane::*} / 5)
  71. arg is between 1 and {_strony}:
  72. send "&6&m---&r &e&lTopka wygranych &6&m---"
  73. loop {wygrane::*}:
  74. set {_lista::%loop-index%} to loop-value
  75. set {_num} to size of {_lista::*}
  76. set {_max} to arg * 5
  77. set {_min} to {_max} - 4
  78. loop {_max} times:
  79. loop {_lista::*}:
  80. {_wartosc.%loop-number%} is not set:
  81. set {_wartosc.%loop-number%} to loop-value
  82. set {_nazwa.%loop-number%} to loop-index
  83. loop-value is more than {_wartosc.%loop-number%}:
  84. set {_wartosc.%loop-number%} to loop-value
  85. set {_nazwa.%loop-number%} to loop-index
  86. remove {_wartosc.%loop-number%} from {_lista::*}
  87. loop {_max} times:
  88. loop-number is between {_min} and {_max}
  89. loop-number <= {_num}:
  90. send "&6%loop-number%. %{nick::%{_nazwa.%loop-number%}%}% &7(&c%{_wartosc.%loop-number%}%&7)"
  91. {_max} is more than {_num}:
  92. set {_r} to {_num}
  93. loop {_max} - {_num} times:
  94. add 1 to {_r}
  95. send "&6%{_r}%. Brak"
  96. send "&6&lStrona: &c%arg% &6z &c%{_strony}%"
  97. stop
  98. {_strony} is 1:
  99. send "&6&lWyniki mieszcza sie na &c1 &6&lstronie."
  100. stop
  101. send "&6&lWyniki mieszcza sie na &c%{_strony}% 6&lstronach."
  102. on join:
  103. {wygrane::%player%} is not set:
  104. set {wygrane::%player%} to 0
  105. {nick::%player%} is not set:
  106. set {nick::%player%} to uncolored display name of player
Advertisement
Add Comment
Please, Sign In to add comment