Advertisement
Hsuwan

Untitled

Oct 9th, 2017
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.77 KB | None | 0 0
  1. Options:
  2. Title: &6&l公會 &c&l>> &e
  3. on chat:
  4. loop {公會系統::*}:
  5. if {公會系統::%loop-index%::%player%} is set:
  6. set {_mess.1} to message
  7. set {_first.1} to "$"
  8. set {_rest.1} to subtext of {_mess.1} from characters 2 to length of {_mess.1}
  9. set {_done.1} to "%{_first.1}%%{_rest.1}%"
  10. replace every "<none>" with "" in {_done.1}
  11. if message is "%{_done.1}%":
  12. cancel event
  13. set {_done.1} to subtext of {_done.1} from characters 2 to length of {_done.1}
  14. set {_done.1} to uncolored {_done.1}
  15. set {_done.1} to "<gray><bold>%{_done.1}%"
  16. loop {公會系統::%loop-index%::*}:
  17. set {_87} to loop-index-2 parsed as player
  18. send "{@Title} &f%player%&e&l: %{_done.1}%" to {_87}
  19. stop
  20. command /guild [<player>] [<text>] [<player>]:
  21. trigger:
  22. if arg-2 is "QPteleport":
  23. if arg-3 isn't set:
  24. send "{@Title} &6&l/guild QPteleport &e&l<玩家名> &c&l傳送到該玩家身旁。"
  25. stop
  26. if {玩家資料.%player%::VIP} is set:
  27. loop {公會系統::*}:
  28. if {公會系統::%loop-index%::%player%} is set:
  29. if {公會系統::%loop-index%::%arg-3%} is set:
  30. send "{@Title}%player% 傳送到你的身邊。" to arg-3
  31. send "{@Title} 正在傳送. . ."
  32. teleport player to arg-3
  33. stop
  34. send "{@Title}傳送失敗,請確認是否加入公會。"
  35. stop
  36. else:
  37. send "{@Title} 傳送失敗,本指令為VIP專屬。"
  38. stop
  39. send "{@Title} &6&l/guild QPteleport &e&l<玩家名> &c&l傳送到該玩家身旁。"
  40. stop
  41. if arg-2 is "QPremove":
  42. if arg-3 isn't set:
  43. send "{@Title} &6&l/party QPremove &e&l<玩家名> &c&l踢掉該玩家。"
  44. stop
  45. if {公會系統::%player%} is set:
  46. if {公會系統::%player%::%arg-3%} is set:
  47. send "{@Title}你被%player% 踢出了公會。" to arg-3
  48. delete {公會系統::%player%::%arg-3%}
  49. loop {公會系統::%loop-index%::*}:
  50. set {_87} to loop-index
  51. loop all players:
  52. if {公會系統::%player%::%loop-player%} is set:
  53. send "{@Title}%arg-3%被踢出了公會。" to loop-player
  54. stop
  55. else:
  56. send "{@Title}你必須是一個隊長。"
  57. stop
  58. if arg-2 is "QPlist":
  59. loop {公會系統::*}:
  60. if {公會系統::%loop-index%::%player%} is set:
  61. send "{@Title}%{公會系統::%loop-index%::*}%"
  62. stop
  63. send "{@Title}你沒有加入任何公會。" to player
  64. stop
  65. if arg-2 is "QPcreate":
  66. set {_公會會員量} to 0
  67. loop {公會系統::*}:
  68. if {公會系統::%loop-index%::%player%} is set:
  69. message "{@Title}你已經在一個公會裏面" to player
  70. set {_公會會員量} to 1
  71. if {_公會會員量} is 0:
  72. set {公會系統::%player%} to player
  73. set {公會系統::%player%::%player%} to player
  74. message "{@Title}創建公會成功。" to player
  75. set {公會名稱::%player%} to arg-3
  76. stop
  77. if arg-2 is "QPleave":
  78. if {公會系統::%player%} is set:
  79. loop all players:
  80. if {公會系統::%player%::%loop-player%} is set:
  81. send "{@Title}會長%player%宣布公會解散。" to loop-player
  82. delete {公會系統::%player%::*}
  83. delete {公會系統::%player%}
  84. stop
  85. else:
  86. set {_公會會員量} to 0
  87. loop {公會系統::*}:
  88. if {公會系統::%loop-index%::%player%} is set:
  89. delete {公會系統::%loop-index%::%player%}
  90. set {_li} to loop-index
  91. set {_公會會員量} to 1
  92. if {_公會會員量} is 1:
  93. send "{@Title}%player%離開了公會."
  94. if {公會系統::%player%} is set:
  95. loop all players:
  96. if {公會系統::%player%::%loop-player%} is set:
  97. send "{@Title}%player%離開了公會。" to loop-player
  98. stop
  99. send "{@Title}你沒有加入任何公會。" to player
  100. stop
  101. if arg-2 is "QPinvite" or "QPaccept":
  102. if arg-3 is "%player%":
  103. stop
  104. if {公會邀請::%player%} contains "%arg-3%":
  105. delete {公會倒計時::%player%}
  106. set {公會系統::%arg-3%::%player%} to player
  107. set {_sss} to arg-3
  108. delete {公會邀請::%player%}
  109. loop {公會系統::%{_sss}%::*}:
  110. set {_87} to loop-index parsed as player
  111. send "{@Title}%player%加入了公會" to {_87}
  112. stop
  113. if {公會倒計時::%arg-3%} is set:
  114. if {公會邀請::%arg-3%} is "%player%":
  115. send "{@Title}已發公會邀請給玩家%arg-3%,請等候回應"
  116. else:
  117. send "{@Title}玩家%arg-3%收過別人的公會邀請,請等三秒後再試"
  118. if {公會倒計時::%arg-3%} is more than or equal to 3:
  119. set {公會倒計時::%arg-3%} to 3
  120. stop
  121. if {公會系統::%player%} is set:
  122. loop {公會系統::*}:
  123. if {公會系統::%loop-index%::%arg-3%} is set:
  124. send "{@Title}他已經有公會了。"
  125. stop
  126. set {_number} to 0
  127. loop {公會系統::%arg-3%::*}:
  128. add 1 to {_number}
  129. set {公會邀請::%arg-3%} to "%player%"
  130. set {公會倒計時::%arg-3%} to 20
  131. send "{@Title}已發邀請給玩家%arg-3%"
  132. send "{@Title}會長%player%邀請你加入他的公會 輸入/guild QPaccept %player% 加入公會" to arg-3
  133. send json of "{@Title}或 &a[點此接受]" run "/guild QPaccept %player%" to arg-3
  134. else:
  135. set {_公會會員量} to 0
  136. loop {公會系統::*}:
  137. if {公會系統::%loop-index%::%player%} is set:
  138. send "{@Title}只有會長可以邀請其他人加入公會"
  139. set {_公會會員量} to 1
  140. if {_公會會員量} is 0:
  141. loop {公會系統::*}:
  142. if {公會系統::%loop-index%::%arg-3%} is set:
  143. send "{@Title}他已經有公會了。"
  144. stop
  145. display board named "" to player
  146. set {公會系統::%player%} to player
  147. set {公會系統::%player%::%player%} to player
  148. message "{@Title}創建公會成功。" to player
  149. if {公會倒計時::%arg-3%} is set:
  150. if {公會邀請::%arg-3%} is "%player%":
  151. send "{@Title}已發公會邀請給玩家%arg-3%,請等候回應"
  152. else:
  153. send "{@Title}玩家%arg-3%收過別人的公會邀請,請等三秒後再試"
  154. if {公會倒計時::%arg-3%} is more than or equal to 3:
  155. set {公會倒計時::%arg-3%} to 3
  156. stop
  157. if {公會系統::%player%} is set:
  158. loop {公會系統::*}:
  159. if {公會系統::%loop-index%::%arg-3%} is set:
  160. send "{@Title}他已經有公會了。"
  161. stop
  162. set {_number} to 0
  163. loop {公會系統::%arg-3%::*}:
  164. add 1 to {_number}
  165. set {公會邀請::%arg-3%} to "%player%"
  166. set {公會倒計時::%arg-3%} to 20
  167. send "{@Title}已發邀請給玩家%arg-3%"
  168. send "{@Title}會長%player%邀請你加入他的公會 輸入/guild QPaccept %player% 加入公會" to arg-3
  169. send json of "{@Title}或 &a[點此接受]" run "/guild QPaccept %player%" to arg-3
  170. stop
  171. send "{@Title} &e&l/guild QPcreate &8&l創建公會。"
  172. send "{@Title} &e&l/guild QPinvite <玩家名> &8&l創建公會 / 公會邀請 或 接受公會邀請。(邀請為會長限定)"
  173. send "{@Title} &e&l/guild QPremove <玩家名> &8&l踢掉該玩家。(會長限定)"
  174. send "{@Title} &e&l/guild QPteleport <玩家名> &8&l傳送到該玩家身旁。(VIP限定)"
  175. send "{@Title} &e&l/guild QPleave &8&l離開或解散公會。"
  176. every 1 seconds:
  177. loop all players:
  178. if {公會倒計時::%loop-player%} is set:
  179. remove 1 from {公會倒計時::%loop-player%}
  180. if {公會倒計時::%loop-player%} is smaller than or equal to 0:
  181. set {_ok} to 0
  182. loop {公會系統::%{公會邀請::%loop-player%}%::*}:
  183. add 1 to {_ok}
  184. send "{@Title} 公會邀請已過時" to {公會邀請::%loop-player%}
  185. if {_ok} is 1:
  186. send "{@Title} 公會自動解散" to {公會邀請::%loop-player%}
  187. execute {公會邀請::%loop-player%} command "/guild QPleave"
  188. delete {公會倒計時::%loop-player%}
  189. delete {公會邀請::%loop-player%}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement