Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #
- # © Parrot 2014
- # Downald by PluszaczeGG.
- #
- options:
- czas: 180 # tu ustaw czas po jakim konkurs ma sie rozpoczac
- ilosc: 1 # ilosc itemu po wpisaniu wlasciwego kodu
- item: Kox # jaki item ma dostawac osoba bo wpisaniu kodu
- gracze: 2 # ile graczy potrzeba do rozpoczencia konkursu
- l: &8[&6&lLOSOWANIE&8] # prefix
- variables:
- {konkurs} = 0
- every {@czas} seconds:
- if {@gracze} is smaller than number of players:
- execute console command "konkurs"
- command /konkurs:
- trigger:
- if sender has permission "sk.konkurs":
- loop 6 times:
- 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"
- set {konkurs.kod} to "%{konkurs.znak1}%%{konkurs.znak2}%%{konkurs.znak3}%%{konkurs.znak4}%%{konkurs.znak5}%%{konkurs.znak6}%"
- broadcast "{@l} &3Przepisz kod na czacie aby wygrac {@ilosc} {@item}"
- set {konkurs} to 1
- loop all players:
- broadcast "{@l} &3Kod &c%{konkurs.kod}%&7"
- else:
- message "&cNie masz uprawnien do tego!"
- on chat:
- if {konkurs} is 1:
- if message contains "%{konkurs.kod}%":
- cancel event
- set {konkurs} to 0
- broadcast "{@l} &7%player% &aPrzepisal kod jako pierwszy!"
- add 1 to {wygrane::%player%}
- give 1 322:1 to player
- loop all players:
- command /topw [<integer=1>]:
- trigger:
- set {_strony} to rounded up (size of {wygrane::*} / 5)
- arg is between 1 and {_strony}:
- send "&6&m---&r &e&lTopka wygranych &6&m---"
- loop {wygrane::*}:
- set {_lista::%loop-index%} to loop-value
- set {_num} to size of {_lista::*}
- set {_max} to arg * 5
- set {_min} to {_max} - 4
- loop {_max} times:
- loop {_lista::*}:
- {_wartosc.%loop-number%} is not set:
- set {_wartosc.%loop-number%} to loop-value
- set {_nazwa.%loop-number%} to loop-index
- loop-value is more than {_wartosc.%loop-number%}:
- set {_wartosc.%loop-number%} to loop-value
- set {_nazwa.%loop-number%} to loop-index
- remove {_wartosc.%loop-number%} from {_lista::*}
- loop {_max} times:
- loop-number is between {_min} and {_max}
- loop-number <= {_num}:
- send "&6%loop-number%. %{nick::%{_nazwa.%loop-number%}%}% &7(&c%{_wartosc.%loop-number%}%&7)"
- {_max} is more than {_num}:
- set {_r} to {_num}
- loop {_max} - {_num} times:
- add 1 to {_r}
- send "&6%{_r}%. Brak"
- send "&6&lStrona: &c%arg% &6z &c%{_strony}%"
- stop
- {_strony} is 1:
- send "&6&lWyniki mieszcza sie na &c1 &6&lstronie."
- stop
- send "&6&lWyniki mieszcza sie na &c%{_strony}% 6&lstronach."
- on join:
- {wygrane::%player%} is not set:
- set {wygrane::%player%} to 0
- {nick::%player%} is not set:
- set {nick::%player%} to uncolored display name of player
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement