Advertisement
7mm

Skript: BasicPanisher

7mm
Mar 24th, 2019
348
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. command /*opt [<text>] [<text>]:
  2. permission: skript.basicpanisher.opt
  3. trigger:
  4. if arg 1 is "send":
  5. if arg 2 is not "all", "ops", or "none":
  6. message "&c/*opt send <all|ops|none> &7BANを伝えるプレイヤーの設定"
  7. stop
  8. set {bp::opt::send} to arg 1
  9. else:
  10. message "&c/*opt send <all|ops|none> &7BANを伝えるプレイヤーの設定"
  11.  
  12. command /*ban [<offline player>] [<text>] [<text>]:
  13. permission: skript.basicpanisher.ban
  14. trigger:
  15. if arg 3 is not set:
  16. message "&c/*ban <プレイヤー名> <理由> <期間>"
  17. message "&d<理由> にはテンプレートが使用可能"
  18. message "&d<期間> は""5 minutes""など"
  19. stop
  20. set {_reason} to arg 2
  21. if first character of {_reason} is "@":
  22. replace "@" in {_reason} with ""
  23. set {_reason} to {bp::temp::%{_reason}%}
  24. if {_reason} is not set:
  25. set {_reason} to "no reason"
  26. message "&5Banned %arg 1%: &c%colored {_reason}%"
  27. set {bp::bans::%arg 1%::time} to now
  28. set {bp::bans::%arg 1%::reason} to {_reason}
  29. set {bp::bans::%arg 1%::term} to arg 3 parsed as timespan
  30. kick arg 1 due to colored {_reason}
  31. if {bp::opt::send} is "ops":
  32. message "&5Banned %arg 1%: &c%colored {_reason}%" to ops
  33. if {bp::opt::send} is "all":
  34. broadcast "&5Banned %arg 1%: &c%colored {_reason}%"
  35.  
  36. command /*warn [<offline player>] [<text>] [<text>]:
  37. permission: skript.basicpanisher.warn
  38. trigger:
  39. if arg 3 is not set:
  40. message "&c/*warn <プレイヤー名> <文章> <期間>"
  41. message "&d<理由> にはテンプレートが使用可能"
  42. message "&d<期間> は""5 minutes""など"
  43. message "&6期間中はjoinするごとに警告が表示される"
  44. stop
  45. set {_reason} to arg 2
  46. if first character of {_reason} is "@":
  47. replace "@" in {_reason} with ""
  48. set {_reason} to {bp::temp::%{_reason}%}
  49. if {_reason} is not set:
  50. set {_reason} to "no reason"
  51. message "&cSend Warn to %arg 1%"
  52. add now to {bp::warns::%arg 1%::time::*}
  53. add {_reason} to {bp::warns::%arg 1%::reason::*}
  54. add arg 3 parsed as timespan to {bp::warns::%arg 1%::term::*}
  55. message "&4&lWarn: &c%colored {_reason}%" to arg 1
  56.  
  57. command /*rem [<offline player>]:
  58. permission: skript.basicpanisher.rem
  59. trigger:
  60. if arg 1 is not set:
  61. message "&c/*rem <プレイヤー名>"
  62. stop
  63. if {bp::bans::%arg 1%::time} is set:
  64. message "&3Unban %arg 1%"
  65. clear {bp::bans::%arg 1%::time}
  66. clear {bp::bans::%arg 1%::reason}
  67. clear {bp::bans::%arg 1%::term}
  68. if number of {bp::warns::%arg 1%::time::*} > 0:
  69. message "&3Clear Warn %arg 1%"
  70. loop {bp::warns::%arg 1%::time::*}:
  71. clear {bp::warns::%arg 1%::time::%loop-index%}
  72. clear {bp::warns::%arg 1%::reason::%loop-index%}
  73. clear {bp::warns::%arg 1%::term::%loop-index%}
  74.  
  75. command /*warns [<offline player>]:
  76. permission: skript.basicpanisher.warns
  77. trigger:
  78. if arg 1 is not set:
  79. message "&c/*warns <プレイヤー名>"
  80. stop
  81. loop {bp::warns::%arg 1%::time::*}:
  82. message "&6Recent Warn: &c%colored {bp::warns::%arg 1%::reason::%loop-index%}%"
  83. message "&aPanish: &c%{bp::warns::%arg 1%::time::%loop-index%}%"
  84. message "&aTerm: &c%{bp::warns::%arg 1%::term::%loop-index%}%"
  85.  
  86. command /warns:
  87. trigger:
  88. loop {bp::warns::%player%::time::*}:
  89. message "&6Recent Warn: &c%colored {bp::warns::%player%::reason::%loop-index%}%"
  90. message "&aPanish: &c%{bp::warns::%player%::time::%loop-index%}%"
  91. message "&aTerm: &c%{bp::warns::%player%::term::%loop-index%}%"
  92.  
  93. command /*temp [<text>] [<text>]:
  94. permission: skript.basicpanisher.temp
  95. trigger:
  96. if arg 2 is not set:
  97. message "&c/*temp <ID> <テンプレート化する文章>"
  98. message "&6テンプレートはBAN理由などで""@ID""で使用可能"
  99. stop
  100. set {bp::temp::%arg 1%} to arg 2
  101. message "&6Regist Temp ID %arg 1%: %colored arg 2%"
  102.  
  103. on connect:
  104. if {bp::bans::%player%::time} is set:
  105. if difference between now and {bp::bans::%player%::time} > {bp::bans::%player%::term}:
  106. clear {bp::bans::%player%::time}
  107. clear {bp::bans::%player%::reason}
  108. clear {bp::bans::%player%::term}
  109. else:
  110. kick the player due to colored {bp::bans::%player%::reason}
  111.  
  112. on join:
  113. loop {bp::warns::%player%::time::*}:
  114. if difference between now and {bp::warns::%player%::time::%loop-index%} > {bp::warns::%player%::term::%loop-index%}:
  115. clear {bp::warns::%player%::time::%loop-index%}
  116. clear {bp::warns::%player%::reason::%loop-index%}
  117. clear {bp::warns::%player%::term::%loop-index%}
  118. else:
  119. wait a second
  120. execute player command "warns"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement