Advertisement
Hsuwan

Untitled

Oct 9th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.79 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 {公會系統::%player%} is set:
  93. loop all players:
  94. if {公會系統::%player%::%loop-player%} is set:
  95. send "{@Title}%player%離開了公會。" to loop-player
  96. exit loop
  97. if {_公會會員量} is 1:
  98. send "{@Title}%player%離開了公會."
  99. stop
  100. send "{@Title}你沒有加入任何公會。" to player
  101. stop
  102. if arg-2 is "QPinvite" or "QPaccept":
  103. if arg-3 is "%player%":
  104. stop
  105. if {公會邀請::%player%} contains "%arg-3%":
  106. delete {公會倒計時::%player%}
  107. set {公會系統::%arg-3%::%player%} to player
  108. set {_sss} to arg-3
  109. delete {公會邀請::%player%}
  110. loop {公會系統::%{_sss}%::*}:
  111. set {_87} to loop-index parsed as player
  112. send "{@Title}%player%加入了公會" to {_87}
  113. stop
  114. if {公會倒計時::%arg-3%} is set:
  115. if {公會邀請::%arg-3%} is "%player%":
  116. send "{@Title}已發公會邀請給玩家%arg-3%,請等候回應"
  117. else:
  118. send "{@Title}玩家%arg-3%收過別人的公會邀請,請等三秒後再試"
  119. if {公會倒計時::%arg-3%} is more than or equal to 3:
  120. set {公會倒計時::%arg-3%} to 3
  121. stop
  122. if {公會系統::%player%} is set:
  123. loop {公會系統::*}:
  124. if {公會系統::%loop-index%::%arg-3%} is set:
  125. send "{@Title}他已經有公會了。"
  126. stop
  127. set {_number} to 0
  128. loop {公會系統::%arg-3%::*}:
  129. add 1 to {_number}
  130. set {公會邀請::%arg-3%} to "%player%"
  131. set {公會倒計時::%arg-3%} to 20
  132. send "{@Title}已發邀請給玩家%arg-3%"
  133. send "{@Title}會長%player%邀請你加入他的公會 輸入/guild QPaccept %player% 加入公會" to arg-3
  134. send json of "{@Title}或 &a[點此接受]" run "/guild QPaccept %player%" to arg-3
  135. else:
  136. set {_公會會員量} to 0
  137. loop {公會系統::*}:
  138. if {公會系統::%loop-index%::%player%} is set:
  139. send "{@Title}只有會長可以邀請其他人加入公會"
  140. set {_公會會員量} to 1
  141. if {_公會會員量} is 0:
  142. loop {公會系統::*}:
  143. if {公會系統::%loop-index%::%arg-3%} is set:
  144. send "{@Title}他已經有公會了。"
  145. stop
  146. display board named "" to player
  147. set {公會系統::%player%} to player
  148. set {公會系統::%player%::%player%} to player
  149. message "{@Title}創建公會成功。" to player
  150. if {公會倒計時::%arg-3%} is set:
  151. if {公會邀請::%arg-3%} is "%player%":
  152. send "{@Title}已發公會邀請給玩家%arg-3%,請等候回應"
  153. else:
  154. send "{@Title}玩家%arg-3%收過別人的公會邀請,請等三秒後再試"
  155. if {公會倒計時::%arg-3%} is more than or equal to 3:
  156. set {公會倒計時::%arg-3%} to 3
  157. stop
  158. if {公會系統::%player%} is set:
  159. loop {公會系統::*}:
  160. if {公會系統::%loop-index%::%arg-3%} is set:
  161. send "{@Title}他已經有公會了。"
  162. stop
  163. set {_number} to 0
  164. loop {公會系統::%arg-3%::*}:
  165. add 1 to {_number}
  166. set {公會邀請::%arg-3%} to "%player%"
  167. set {公會倒計時::%arg-3%} to 20
  168. send "{@Title}已發邀請給玩家%arg-3%"
  169. send "{@Title}會長%player%邀請你加入他的公會 輸入/guild QPaccept %player% 加入公會" to arg-3
  170. send json of "{@Title}或 &a[點此接受]" run "/guild QPaccept %player%" to arg-3
  171. stop
  172. send "{@Title} &e&l/guild QPcreate &8&l創建公會。"
  173. send "{@Title} &e&l/guild QPinvite <玩家名> &8&l創建公會 / 公會邀請 或 接受公會邀請。(邀請為會長限定)"
  174. send "{@Title} &e&l/guild QPremove <玩家名> &8&l踢掉該玩家。(會長限定)"
  175. send "{@Title} &e&l/guild QPteleport <玩家名> &8&l傳送到該玩家身旁。(VIP限定)"
  176. send "{@Title} &e&l/guild QPleave &8&l離開或解散公會。"
  177. every 1 seconds:
  178. loop all players:
  179. if {公會倒計時::%loop-player%} is set:
  180. remove 1 from {公會倒計時::%loop-player%}
  181. if {公會倒計時::%loop-player%} is smaller than or equal to 0:
  182. set {_ok} to 0
  183. loop {公會系統::%{公會邀請::%loop-player%}%::*}:
  184. add 1 to {_ok}
  185. send "{@Title} 公會邀請已過時" to {公會邀請::%loop-player%}
  186. if {_ok} is 1:
  187. send "{@Title} 公會自動解散" to {公會邀請::%loop-player%}
  188. execute {公會邀請::%loop-player%} command "/guild QPleave"
  189. delete {公會倒計時::%loop-player%}
  190. delete {公會邀請::%loop-player%}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement