7mm

Skript: BasicPanisher

7mm
Mar 24th, 2019
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.00 KB | None | 0 0
  1. on join:
  2. if {bp::bans::%player%::time} is set:
  3. if difference between now and {bp::bans::%player%::time} > {bp::bans::%player%::term}:
  4. clear {bp::bans::%player%::time}
  5. clear {bp::bans::%player%::reason}
  6. clear {bp::bans::%player%::term}
  7. else:
  8. kick the player due to {bp::bans::%player%::reason}
  9. loop {bp::warns::%player%::time::*}:
  10. if difference between now and loop-value > {bp::warns::%arg 1%::term::%loop-index%}:
  11. clear {bp::warns::%arg 1%::time::%loop-index%}
  12. clear {bp::warns::%arg 1%::reason::%loop-index%}
  13. clear {bp::warns::%arg 1%::term::%loop-index%}
  14. else:
  15. message "&6Recent Warn: &c%{bp::warns::%arg 1%::reason::%loop-index%}%"
  16.  
  17. command /bpopt [<text>] [<text>]:
  18. permission: skript.basicpanisher
  19. aliases: /bpo
  20. trigger:
  21. if arg 1 is "send":
  22. if arg 2 is not "all", "ops", or "none":
  23. message "&c/*opt send <all|ops|none> &7BANを伝えるプレイヤーの設定"
  24. stop
  25. set {bp::opt::send} to arg 1
  26. else:
  27. message "&c/*opt send <all|ops|none> &7BANを伝えるプレイヤーの設定"
  28.  
  29. command /bpban [<offline player>] [<text>] [<text>]:
  30. permission: skript.basicpanisher
  31. aliases: /bpb
  32. trigger:
  33. if arg 3 is not set:
  34. message "&c/*ban <プレイヤー名> <理由> <期間>"
  35. message "&d<理由> にはテンプレートが使用可能"
  36. message "&d<期間> は""5 minutes""など"
  37. stop
  38. set {_reason} to arg 2
  39. if first character of {_reason} is "@":
  40. replace "@" in {_reason} with ""
  41. set {_reason} to {bp::temp::%{_reason}%}
  42. if {_reason} is not set:
  43. set {_reason} to "no reason"
  44. set {bp::bans::%arg 1%::time} to now
  45. set {bp::bans::%arg 1%::reason} to {_reason}
  46. set {bp::bans::%arg 1%::term} to arg 3 parsed as timespan
  47. kick arg 1 due to {_reason}
  48. if {bp::opt::send} is "ops":
  49. message "&5Banned %arg 1%: &c%{_reason}%" to ops
  50. if {bp::opt::send} is "all":
  51. broadcast "&5Banned %arg 1%: &c%{_reason}%"
  52.  
  53. command /bpwarn [<offline player>] [<text>] [<text>]:
  54. permission: skript.basicpanisher
  55. aliases: /bpw
  56. trigger:
  57. if arg 3 is not set:
  58. message "&c/*warn <プレイヤー名> <文章> <期間>"
  59. message "&d<理由> にはテンプレートが使用可能"
  60. message "&d<期間> は""5 minutes""など"
  61. message "&6期間中はjoinするごとに警告が表示される"
  62. stop
  63. set {_reason} to arg 2
  64. if first character of {_reason} is "@":
  65. replace "@" in {_reason} with ""
  66. set {_reason} to {bp::temp::%{_reason}%}
  67. if {_reason} is not set:
  68. set {_reason} to "no reason"
  69. add now to {bp::warns::%arg 1%::time::*}
  70. add {_reason} to {bp::warns::%arg 1%::reason::*}
  71. add arg 3 parsed as timespan to {bp::warns::%arg 1%::term::*}
  72. message "&4&lWarn: &c%{_reason}%" to arg 1
  73.  
  74. command /bptemp [<text>] [<text>]:
  75. permission: skript.basicpanisher
  76. aliases: /bpt
  77. trigger:
  78. if arg 2 is not set:
  79. message "&c/*temp <ID> <テンプレート化する文章>"
  80. message "&6テンプレートはBAN理由などで""@ID""で使用可能"
  81. set {bp::temp::%arg 1%} to arg 2
Add Comment
Please, Sign In to add comment