Advertisement
Hsuwan

Untitled

Sep 2nd, 2017
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.08 KB | None | 0 0
  1. Options:
  2. Title: &f&lParty &3&l>> &f
  3. #&e⇨ &f%{組隊系統::%loop-player%}% &c血量:&f%round({_a}'s health / {_a}'s max health * ({_a}'s max health + {飾品狀態.%{_a}%::血量增加}))%/%round({_a}'s max health + {飾品狀態.%{_a}%::血量增加})%
  4. every 2 second:
  5. loop {組隊系統::*}:
  6. loop {組隊系統::%loop-index%::*}:
  7. set {_a} to loop-index-2 parsed as player
  8. display board named "" to {_a}
  9. display board named "&f&l%loop-index-1%的隊伍" to {_a}
  10. # set name of sidebar of {_a} to "&f&l%loop-index-1%的隊伍"
  11. make score of "*---隊員列表---*" in board of {_a} to 10
  12. # set score "*---隊員列表---*" in sidebar of {_a} to 10
  13. set {_1} to 10
  14. loop {組隊系統::%loop-index-1%::*}:
  15. remove 1 from {_1}
  16. set {_4} to loop-index-3
  17. set {_check} to 0
  18. loop all players:
  19. if "%loop-player%" contains "%{_4}%":
  20. set {_4} to loop-player
  21. set {_check} to 1
  22. if {_check} is 1:
  23. set {_範圍內玩家} to ""
  24. loop entities in radius 40 of {_a}:
  25. if loop-entity is "%{_4}%":
  26. set {_範圍內玩家} to "(附近)"
  27. if {_a} is {_4}:
  28. set {_範圍內玩家} to "(自己)"
  29. if {玩家資料.%{_4}%::VIP} is set:
  30. if {_範圍內玩家} is "(自己)" or "(附近)":
  31. set {_範圍內玩家} to "&9"
  32. else:
  33. set {_範圍內玩家} to "&3"
  34. make score of "%{_範圍內玩家}%%{_4}%" in board of {_a} to {_1}
  35. # set score "%{_4}% %{_4}'s level% &c血量:&f%round({_4}'s health / {_4}'s max health * ({_4}'s max health * 2 + {飾品狀態.%{_4}%::血量增加}))%/%round({_4}'s max health * 2 + {飾品狀態.%{_4}%::血量增加})%" in sidebar of {_a} to {_1}
  36. remove 1 from {_1}
  37. make score of "&e⇨ &c血量:&f%round({_4}'s health / {_4}'s max health * ({_4}'s max health * 2 + {飾品狀態.%{_4}%::血量增加}))%" in board of {_a} to {_1}
  38. remove 1 from {_1}
  39. make score of "&e⇨ &a等級 &l&n%{_4}'s level%" in board of {_a} to {_1}
  40. else:
  41. make score of "(離綫)%{_4}%" in board of {_a} to {_1}
  42. make score of "*----------*" in board of {_a} to -10
  43. # set score "*----------*" in sidebar of {_a} to -1
  44. move display of {_a} to sidebar
  45. on load:
  46. loop {組隊系統::*}:
  47. loop {組隊系統::%loop-index%::*}:
  48. set {_87} to loop-index-2 parsed as player
  49. send "{@Title}系統重啟刪除隊伍。" to {_87}
  50. display board named "" to {_87}
  51. delete {組隊系統::%loop-index%::*}
  52. delete {組隊系統::*}
  53. on chat:
  54. loop {組隊系統::*}:
  55. if {組隊系統::%loop-index%::%player%} is set:
  56. set {_mess.1} to message
  57. set {_first.1} to "@"
  58. set {_rest.1} to subtext of {_mess.1} from characters 2 to length of {_mess.1}
  59. set {_done.1} to "%{_first.1}%%{_rest.1}%"
  60. replace every "<none>" with "" in {_done.1}
  61. if message is "%{_done.1}%":
  62. cancel event
  63. set {_done.1} to subtext of {_done.1} from characters 2 to length of {_done.1}
  64. set {_done.1} to uncolored {_done.1}
  65. set {_done.1} to "<gray><bold>%{_done.1}%"
  66. loop {組隊系統::%loop-index%::*}:
  67. set {_87} to loop-index-2 parsed as player
  68. send "{@Title} &f%player%&8&l: %{_done.1}%" to {_87}
  69. stop
  70. if file "plugins/Skript/scripts/n_lv_sys.sk" exists:
  71. if {玩家資料.%player%::等級} isn't set:
  72. stop
  73. cancel event
  74. if {發言阻礙::%player%} is set:
  75. if difference between {發言阻礙::%player%} and now is smaller than 10 ticks:
  76. set {發言阻礙::%player%} to now
  77. send "您離上一句話的發出速度太快了...等一下再說吧"
  78. stop
  79. set {發言阻礙::%player%} to now
  80. set {_mess.1} to message
  81. set {_first.1} to "!"
  82. set {_rest.1} to subtext of {_mess.1} from characters 2 to length of {_mess.1}
  83. set {_done.1} to "%{_first.1}%%{_rest.1}%"
  84. replace every "<none>" with "" in {_done.1}
  85. if message is "%{_done.1}%":
  86. set {_loop} to 0
  87. loop all items in player's inventory:
  88. if name of loop-item contains "廣播":
  89. set {_save} to loop-item
  90. remove 1 of loop-item from player's inventory
  91. add 1 to {_loop}
  92. exit loop
  93. if {_loop} is 1:
  94. log "%player% 用 廣播 說話 。%now%" to "喇叭記錄.log"
  95. set {_done.1} to subtext of {_done.1} from characters 2 to length of {_done.1}
  96. set {_done.1} to uncolored {_done.1}
  97. broadcast "&6▶ %player's display name% &6大聲說▶ %{_done.1}%"
  98. stop
  99. wait 1 ticks
  100. if player is in "RPG":
  101. send "[RPG]%player's display name%&f: %{_done.1}%" to console
  102. loop all players:
  103. if loop-player is in "RPG":
  104. send "[RPG]%player's display name%&f: %{_done.1}%" to loop-player
  105. stop
  106. if player is in "RPG":
  107. wait 1 ticks
  108. send "[RPG]%player's display name%&f: %message%" to console
  109. loop all players:
  110. if loop-player is in "RPG":
  111. send "[RPG]%player's display name%&f: %message%" to loop-player
  112. command /party [<player>] [<text>] [<player>]:
  113. trigger:
  114. if arg-2 is "tp":
  115. if arg-3 isn't set:
  116. send "{@Title} &7&l/party tp &e&l<玩家名> &8&l傳送到該玩家身旁。"
  117. stop
  118. if {玩家資料.%player%::VIP} is set:
  119. loop {組隊系統::*}:
  120. if {組隊系統::%loop-index%::%player%} is set:
  121. if {組隊系統::%loop-index%::%arg-3%} is set:
  122. send "{@Title}%player% 傳送到你的身邊。" to arg-3
  123. send "{@Title} 正在傳送. . ."
  124. teleport player to arg-3
  125. stop
  126. send "{@Title}他不在隊伍或你不在隊伍。"
  127. stop
  128. else:
  129. send "{@Title} 指令不存在。"
  130. stop
  131. send "{@Title} &7&l/party tp &e&l<玩家名> &8&l傳送到該玩家身旁。"
  132. stop
  133. if arg-2 is "kick":
  134. if arg-3 isn't set:
  135. send "{@Title} &7&l/party kick &e&l<玩家名> &8&l踢掉該玩家。"
  136. stop
  137. if {組隊系統::%player%} is set:
  138. if {玩家資料.%player%::VIP} is set:
  139. if {組隊系統::%player%::%arg-3%} is set:
  140. send "{@Title}你被%player% 踢出了隊伍。" to arg-3
  141. display board named "" to arg-3
  142. delete {組隊系統::%player%::%arg-3%}
  143. loop {組隊系統::%loop-index%::*}:
  144. set {_87} to loop-index
  145. loop all players:
  146. if loop-player contains "%{_87}%":
  147. send "{@Title}%arg-3% 被隊長%player%(VIP) 踢掉了" to loop-player
  148. stop
  149. else:
  150. send "{@Title}你必須要有VIP才可以這樣做!!!"
  151. stop
  152. else:
  153. send "{@Title}你必須是一個隊長。"
  154. stop
  155. if arg-2 is "list":
  156. loop {組隊系統::*}:
  157. if {組隊系統::%loop-index%::%player%} is set:
  158. send "{@Title}%{組隊系統::%loop-index%::*}%"
  159. stop
  160. send "{@Title}你沒有加入任何隊伍。" to player
  161. stop
  162. if arg-2 is "create":
  163. display board named "" to player
  164. set {_a} to 0
  165. loop {組隊系統::*}:
  166. if {組隊系統::%loop-index%::%player%} is set:
  167. message "{@Title}你已經在一個隊伍裏面" to player
  168. set {_a} to 1
  169. if {_a} is 0:
  170. set {組隊系統::%player%} to player
  171. set {組隊系統::%player%::%player%} to player
  172. message "{@Title}創建隊伍成功。" to player
  173. stop
  174. if arg-2 is "leave" or "quit" or "exit":
  175. if {組隊系統::%player%} is set:
  176. loop all players:
  177. if {組隊系統::%player%::%loop-player%} is set:
  178. send "{@Title}隊長%player%離開並且解散了隊伍。" to loop-player
  179. display board named "" to loop-player
  180. delete {組隊系統::%player%::*}
  181. delete {組隊系統::%player%}
  182. stop
  183. else:
  184. set {_a} to 0
  185. loop {組隊系統::*}:
  186. if {組隊系統::%loop-index%::%player%} is set:
  187. delete {組隊系統::%loop-index%::%player%}
  188. display board named "" to player
  189. set {_li} to loop-index
  190. set {_a} to 1
  191. exit loop
  192. if {_a} is 1:
  193. loop {組隊系統::%{_li}%::*}:
  194. set {_87} to loop-index
  195. loop all players:
  196. if loop-player contains "%{_87}%":
  197. message "{@Title}%player%離開了隊伍." to loop-player
  198. send "{@Title}%player%離開了隊伍."
  199. stop
  200. send "{@Title}你沒有加入任何隊伍。" to player
  201. stop
  202. if arg-1 is set:
  203. if arg-1 is "%player%":
  204. stop
  205. if {組隊邀請::%player%} contains "%arg-1%":
  206. delete {組隊倒計時::%player%}
  207. set {組隊系統::%arg-1%::%player%} to player
  208. set {_sss} to arg-1
  209. delete {組隊邀請::%player%}
  210. loop {組隊系統::%{_sss}%::*}:
  211. set {_87} to loop-index parsed as player
  212. send "{@Title}%player%加入了隊伍" to {_87}
  213. stop
  214. if {組隊倒計時::%arg-1%} is set:
  215. if {組隊邀請::%arg-1%} is "%player%":
  216. send "{@Title}已發邀請給玩家%arg-1%,請等候回應"
  217. else:
  218. send "{@Title}玩家%arg-1%收過別人的組隊邀請,請等三秒後再試"
  219. if {組隊倒計時::%arg-1%} is more than or equal to 3:
  220. set {組隊倒計時::%arg-1%} to 3
  221. stop
  222. if {組隊系統::%player%} is set:
  223. loop {組隊系統::*}:
  224. if {組隊系統::%loop-index%::%arg-1%} is set:
  225. send "{@Title}他已經有隊伍了。"
  226. stop
  227. set {_number} to 0
  228. loop {組隊系統::%arg-1%::*}:
  229. add 1 to {_number}
  230. if {_number} is more than or equal to 4:
  231. send "{@Title}隊伍滿人了。"
  232. stop
  233. set {組隊邀請::%arg-1%} to "%player%"
  234. set {組隊倒計時::%arg-1%} to 20
  235. send "{@Title}已發邀請給玩家%arg-1%"
  236. send "{@Title}玩家%player%邀請你加入他的隊伍 輸入/party %player% 加入隊伍" to arg-1
  237. send json of "{@Title}或 &a[點此接受]" run "/party %player%" to arg-1
  238. else:
  239. set {_a} to 0
  240. loop {組隊系統::*}:
  241. if {組隊系統::%loop-index%::%player%} is set:
  242. send "{@Title}只有隊長可以送組隊邀請"
  243. set {_a} to 1
  244. if {_a} is 0:
  245. loop {組隊系統::*}:
  246. if {組隊系統::%loop-index%::%arg-1%} is set:
  247. send "{@Title}他已經有隊伍了。"
  248. stop
  249. display board named "" to player
  250. set {組隊系統::%player%} to player
  251. set {組隊系統::%player%::%player%} to player
  252. message "{@Title}創建隊伍成功。" to player
  253. if {組隊倒計時::%arg-1%} is set:
  254. if {組隊邀請::%arg-1%} is "%player%":
  255. send "{@Title}已發邀請給玩家%arg-1%,請等候回應"
  256. else:
  257. send "{@Title}玩家%arg-1%收過別人的組隊邀請,請等三秒後再試"
  258. if {組隊倒計時::%arg-1%} is more than or equal to 3:
  259. set {組隊倒計時::%arg-1%} to 3
  260. stop
  261. if {組隊系統::%player%} is set:
  262. loop {組隊系統::*}:
  263. if {組隊系統::%loop-index%::%arg-1%} is set:
  264. send "{@Title}他已經有隊伍了。"
  265. stop
  266. set {_number} to 0
  267. loop {組隊系統::%arg-1%::*}:
  268. add 1 to {_number}
  269. if {_number} is more than or equal to 4:
  270. send "{@Title}隊伍滿人了。"
  271. stop
  272. set {組隊邀請::%arg-1%} to "%player%"
  273. set {組隊倒計時::%arg-1%} to 20
  274. send "{@Title}已發邀請給玩家%arg-1%"
  275. send "{@Title}玩家%player%邀請你加入他的隊伍 輸入/party %player% 加入隊伍" to arg-1
  276. send json of "{@Title}或 &a[點此接受]" run "/party %player%" to arg-1
  277. stop
  278. # send "{@Title} &7&l/party &e&lcreate &8&l創建以自身為中心的隊伍。"
  279. send "{@Title} &7&l/party &e&l<玩家名> &8&l創建隊伍 / 隊伍邀請 或 接受隊伍邀請。"
  280. send "{@Title} &7&l/party kick &e&l<玩家名> &8&l踢掉該玩家。"
  281. send "{@Title} &7&l/party tp &e&l<玩家名> &8&l傳送到該玩家身旁。"
  282. send "{@Title} &7&l/party &e&lquit &8&l離開或解散隊伍。"
  283. every 1 seconds:
  284. loop all players:
  285. if {組隊倒計時::%loop-player%} is set:
  286. remove 1 from {組隊倒計時::%loop-player%}
  287. if {組隊倒計時::%loop-player%} is smaller than or equal to 0:
  288. set {_ok} to 0
  289. loop {組隊系統::%{組隊邀請::%loop-player%}%::*}:
  290. add 1 to {_ok}
  291. send "{@Title} 組隊邀請已過時" to {組隊邀請::%loop-player%}
  292. if {_ok} is 1:
  293. send "{@Title} 組隊自動解散" to {組隊邀請::%loop-player%}
  294. execute {組隊邀請::%loop-player%} command "/party quit"
  295. delete {組隊倒計時::%loop-player%}
  296. delete {組隊邀請::%loop-player%}
  297. on quit:
  298. if {組隊系統::%player%} is set:
  299. if {玩家資料.%player%::VIP} is set:
  300. loop {組隊系統::%player%::*}:
  301. set {_87} to loop-index parsed as player
  302. send "{@Title}VIP %player% 離開了遊戲,但保留了隊伍。" to {_87}
  303. stop
  304. delete {組隊系統::%player%::%player%}
  305. loop {組隊系統::%player%::*}:
  306. set {_87} to loop-index parsed as player
  307. send "{@Title}%player% 斷線, 導致隊伍解散了" to {_87}
  308. delete {組隊系統::%player%::*}
  309. delete {組隊系統::%player%}
  310. stop
  311. loop {組隊系統::*}:
  312. if {組隊系統::%loop-index%::%player%} is set:
  313. if {玩家資料.%player%::VIP} is set:
  314. loop {組隊系統::%loop-index%::*}:
  315. set {_87} to loop-index-2 parsed as player
  316. send "{@Title}VIP %player% 離開了遊戲,但保留了隊伍。" to {_87}
  317. stop
  318. delete {組隊系統::%loop-index%::%player%}
  319. loop {組隊系統::%loop-index%::*}:
  320. set {_87} to loop-index-2 parsed as player
  321. send "{@Title}%player% 斷線, 離開了隊伍" to {_87}
  322. stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement