akon1248

AutoMuteSystem

Mar 22nd, 2019
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.80 KB | None | 0 0
  1. command /ngword [<text>] [<text>]:
  2. permission: ngword.admin
  3. permission message: &4このコマンドを実行する権限がありません!
  4. trigger:
  5. if arg-1 is not set:
  6. send "&cUsage: /ngword <add|remove> <text> OR /ngword list"
  7. else if arg-1 is not "add" or "remove" or "list":
  8. send "&cUsage: /ngword <add|remove> <text> OR /ngword list"
  9. else if arg-1 is "add" or "remove":
  10. if arg-2 is not set:
  11. send "&cUsage: /ngword %arg-1 in lower case% <text>"
  12. else if arg-1 is "add":
  13. if {ngword::*} contain arg-2:
  14. send "&c%arg-2 in lower case%は既にNGワードに登録されています!"
  15. else:
  16. set {ngword::%arg-2%} to arg-2
  17. send "&eNGワードを登録しました &6「%arg-2 in lower case%」"
  18. else if arg-1 is "remove":
  19. if {ngword::*} do not contain arg-2:
  20. send "&c%arg-2 in lower case%はNGワードに登録されていません!"
  21. else:
  22. delete {ngword::%arg-2%}
  23. send "&eNGワードを消去しました &6「%arg-2 in lower case%」"
  24. else if arg-1 is "list":
  25. if {ngword::*} is not set:
  26. send "&cNGワードはひとつも登録されていません!"
  27. else if {ngword::*} is set:
  28. set {_listtext} to join {ngword::*} by "&f, &e"
  29. send "&7NGWords (%size of {ngword::*}%): &e%{_listtext}%"
  30. on chat:
  31. set {_ngwordcount} to 0
  32. loop {ngword::*}:
  33. message contain loop-value
  34. add 1 to {_ngwordcount}
  35. {_ngwordcount} >= 1
  36. cancel event
  37. set {mute::%UUID of player%} to 1
  38. set {mutedplayername.%UUID of player%} to "%player%"
  39. set {unmutetime.%UUID of player%} to floor(unix timestamp of now/1000)+86400*{_ngwordcount}
  40. set {_muteperiod} to "%86400*{_ngwordcount}%" parsed as integer
  41. broadcast "&6AutoMuteSystem&eが&6%player%&eをミュートしました%nl%&e期限: &7%getPeriodFromSeconds({_muteperiod})%"
Advertisement
Add Comment
Please, Sign In to add comment