Guest User

Untitled

a guest
Feb 11th, 2014
793
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.35 KB | None | 0 0
  1. variables:
  2. {warn.%player%} = 0
  3. options:
  4. permission: &4Nie masz uprawnien by uzywac tej komendy!
  5. tag: &8[&cWarn&8]
  6. maxwarn: 20
  7. tempban: 30
  8. command /warn [<text>] [<player>] [<integer>] [<text>]:
  9. trigger:
  10. if arg 1 is not set:
  11. send "{@tag} &7Warny: &c%{warn.%player%}%" to player
  12. if player has permission "warn.admin":
  13. if arg 1 is "list":
  14. if arg 2 is set:
  15. send "{@tag} &c%arg 2% &7ma: &c%{warn.%arg 2%}% &7warnow" to player
  16. else:
  17. send "{@tag} &7Podaj nick"
  18. stop
  19. if arg 1 is "add":
  20. if arg 2 is set:
  21. if arg 3 is set:
  22. add arg 3 to {warn.%arg 2%}
  23. broadcast "{@tag} &c%player% &7dal &c%arg 2% &c%arg 3% &7punktow ostrzezenia."
  24. log "%player% dal %arg 2% %arg 3% punktow ostrzezenia." to "warny.dane"
  25. else:
  26. send "{@tag} &7Podaj ilosc"
  27. stop
  28. else:
  29. send "{@tag} &7Podaj nick gracza"
  30. stop
  31. if arg 1 is "del":
  32. if arg 2 is set:
  33. if arg 3 is set:
  34. remove arg 3 from {warns.%arg 2%}
  35. send "{@tag} &7Odjeles &c%arg 3% &7punkt/ty/ow."
  36. else:
  37. send "{@tag} &7Podaj ilosc"
  38. stop
  39. else:
  40. send "{@tag} &7Podaj nick gracza"
  41. stop
  42. if arg 1 is "reset":
  43. if arg 2 is not set:
  44. set {warn.%player%} to 0
  45. send "{@tag} &7Zresetowales punkty" to player
  46. if arg 2 is set:
  47. set {warn.%arg 2%} to 0
  48. send "{@tag} &7Zresetowales &7punkty graczu &c%arg 2%" to player
  49. else:
  50. send "{@tag} &7Podaj nick gracza"
  51. stop
  52. if arg 1 is "help":
  53. send "&7----------------- {@tag} &7-----------------------"
  54. send "&c/warn &f- &7Pokazuje ilosc warnow"
  55. send "&c/warn list &f- &7Pokazuje ilosc warnow danego gracza"
  56. send "&c/warn del <ilosc> &f- &7usuwa warny"
  57. send "&c/warn reset <nick> &f- &7resetuje warny"
  58. send "&c/warn add <nick> <ilosc> &f- &7Daje punkty"
  59. send "&c/warn chat add <wulgaryzm> &f- &7Daje wulgaryzm"
  60. send "&c/warn chat list &f- &7Lista wulgaryzmow"
  61. send "&c/warn chat delete <wulgaryzm> &f- &7Usuwa wulgaryzm"
  62. send "&7----------------- {@tag} &7-----------------------"
  63. stop
  64. command /warn-chat [<text>] [<text>]:
  65. trigger:
  66. if arg 1 is "list":
  67. send "{@tag} &7Lista swow cenzurowanych na serwerze:"
  68. send "&a%{zablokowaneslowa::*}%"
  69. stop
  70. if arg 1 is "add":
  71. if arg 2 is set:
  72. add arg 2 to {zablokowaneslowa::*}
  73. send "{@tag} &7Dodano &f(%arg 2%&f)&7 do listy wylgaryzmow"
  74. stop
  75. else:
  76. send "{@tag} Podaj wulgaryzm"
  77. stop
  78. if arg 1 is "delete":
  79. if arg 2 is set:
  80. remove arg 2 from {zablokowaneslowa::*}
  81. send "{@tag} &7Usunieto &f(%arg 2%&f)&7 do listy wylgaryzmow"
  82. stop
  83. else:
  84. send "{@tag} Podaj wulgaryzm"
  85. stop
  86. else:
  87. send "&cUzyj: &7/warn chat &7<&cadd&7/&clist&7/&cdelete&7>"
  88. stop
  89.  
  90. on chat:
  91. loop {zablokowaneslowa::*}:
  92. if message contains "%loop-value%":
  93. add 1 to {warn.%player%}
  94. cancel event
  95. send "{@tag} &4Na serwerze nie mozna przeklinac. Dostajesz 1 warna"
  96. stop
  97.  
  98. on kick:
  99. add 1 to {warn.%player%}
  100.  
  101.  
  102.  
  103. every 1 ticks:
  104. loop all players:
  105. if {warn.%loop-player%} is larger than {@maxwarn}:
  106. log "%loop-player% | Warny: %{warn.%loop-player%}%" to "warny"
  107. broadcast "&c%loop-player% &7Zebral {@maxwarn} warnow. Dostal bana na {@tempban} dni"
  108. execute console command "/tempban %loop-player% {@tempban}d"
  109. set {warn.%loop-player%} to 0
Advertisement
Add Comment
Please, Sign In to add comment