Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /voucher [<text>]:
- trigger:
- if player does not have the permissions "voucher.use":
- send "&cOdmowa dostepu!"
- stop
- if arg 1 is not set:
- send "&f[&6Voucher&f] &cPodaj kod aby otrzymac range!"
- stop
- if length of arg is greater than 8:
- send "&f[&6Voucher&f] &cPodales za dlugi kod!"
- stop
- if length of arg is smaller than 8:
- send "&f[&6Voucher&f] &cPodales za krotki kod!"
- stop
- if {voucher::%arg%} is not set:
- send "&f[&6Voucher&f] &cPodany kod jest nieprawidlowy lub wykorzystany!"
- stop
- execute console command "setrank %player% %{voucher::%arg%::ranga}% 7d"
- send "&f[&6Voucher&f] &aPodany kod jest prawidlowy! Otrzymales range &e%{voucher::%arg%::ranga}% &ana 7 dni!"
- broadcast "&f[&6Voucher&f] &e%Player% &aWpisal poprawny kod i otrzymal &e%{voucher::%arg%::ranga}% &ana &e7 &adni!"
- clear {voucher::%arg%}
- clear {voucher::%arg%::ranga}
- clear {voucher::%arg%::*}
- stop
- command /vouchergeneruj [<text>]:
- trigger:
- if player does not have the permissions "voucher.generate":
- send "&f[&6Voucher&f] &cNie masz wymaganych uprawnien."
- stop
- if arg is not set:
- send "&f[&6Voucher&f] &cPodaj nazwe rangi, ktora otrzyma uzytkownik po wpisaniu"
- stop
- set {_kod} to ""
- loop 10 times:
- set {_int} to 0 or 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9 or "A" or "B" or "C" or "E" or "F" or "G" or "H" or "I" or "J" or "K" or "L" or "M" or "N" or "O" or "P" or "S" or "T" or "U" or "W" or "X" or "Y" or "Z"
- set {_kod} to "%{_kod}%%{_int}%"
- set {voucher::%{_kod}%} to {_kod}
- set {voucher::%{_kod}%::ranga} to arg
- send "&f[&6Voucher&f] &aWygenerowano kod o randze &e%arg% &ato: &e%{_kod}%"
- stop
- command /voucherlista:
- trigger:
- if player does not have the permissions "voucher.list":
- send "&cOdmowa dostepu!"
- stop
- loop {voucher::*}:
- set {_kod} to "&c%{voucher::%loop-value%}% &7[&a%{voucher::%loop-value%::ranga}%&7]"
- add {_kod} to {_list::*}
- set {_vlist} to "%{_list::*}%"
- replace all "<none>" with "" in {_vlist}
- replace all "," with "&e,&7" in {_vlist}
- replace all " and" with "&e,&7" in {_vlist}
- send "&f[&6Voucher&f] &aDostepne kody: &e%{_vlist}%"
- stop
Advertisement
Add Comment
Please, Sign In to add comment