knugi

Untitled

Jan 12th, 2015
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. command /voucheradmin [<text>] [<text>] [<text>] [<text>] [<text>]:
  2. aliases: va
  3. trigger:
  4. if arg 1 is not set:
  5. send "&c/va create kod ranga czas ilosc_kodow"
  6. stop
  7. if arg 1 is "create":
  8. if arg 2 is not set:
  9. send "&cMusisz podac kod"
  10. stop
  11. if arg 3 is not set:
  12. send "&cMusisz podac range"
  13. stop
  14. if arg 4 is not set:
  15. send "&cMusisz podać czas"
  16. stop
  17. if arg 5 is not set:
  18. send "&cMusisz podac ilosc kodow"
  19. stop
  20. set {va.arg2} to arg 2
  21.  
  22. set {va.arg3} to arg 3
  23.  
  24. set {va.arg4} to arg 4
  25.  
  26. set {va.arg5} to arg 5
  27. set {va.arg5} to {va.arg5} parsed as integer
  28. loop 3 times:
  29. broadcast "&8[&cVoucher&8] &6Kod na &c%{va.arg3}%&6: &3%{va.arg2}%"
  30. stop
  31. on chat:
  32. if {va.arg5} is larger than 0:
  33. if "%message%" is "%{va.arg2}%":
  34. execute console command "setrank %player% %{va.arg3}% %{va.arg4}%"
  35. broadcast "&6Gracz &c%player% &6przepisal kod na voucher!"
  36. if (va.arg5} is 1:
  37. delete {va.arg2}
  38. delete {va.arg3}
  39. delete {va.arg4}
  40. delete {va.arg5}
  41. stop
  42. remove 1 from {va.arg5}
Advertisement
Add Comment
Please, Sign In to add comment