Advertisement
Guest User

Untitled

a guest
Sep 21st, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 110.30 KB | None | 0 0
  1. #點數變數 {玩家資料.%id%::商城點數}
  2. Options:
  3. tag: &6副本 >> #TAG名
  4. 怪物上限: 100 #一個副本內的怪物上限
  5. signname: &d副本 #告示牌名
  6. signquit: &c離開副本
  7. world: dungeon #地圖名
  8. error0: &c錯誤代碼0:副本創建過程錯誤
  9. error1: &c錯誤代碼1:指令錯誤
  10. error2: &c錯誤代碼2:此副本名已被設置過
  11. error3: &c錯誤代碼3:錯誤副本名
  12. error4: &c錯誤代碼4:無此副本
  13. error5: &c錯誤代碼5:副本時間必須大於零且不為小數
  14. #------------------------------------------------------------------------------------
  15. on any movement:
  16. if {方塊處罰.%player%} is set:
  17. cancel event
  18. #------------------------------------------------------------------------------------
  19. on rightclick:
  20. if player's tool is boat or spruce boat or birch boat or jungle boat or acacia boat:
  21. set {_dgfilejoin2::*} to files in "plugins/mythicdg"
  22. loop {_dgfilejoin2::*}:
  23. set {_mydgquit1} to skutil yaml value "副本名" from file "plugins/mythicdg/%loop-value%"
  24. if event-player is within {副本名::%{_mydgquit1}%::mydg_area_x} to {副本名::%{_mydgquit1}%::mydg_area_y}:
  25. if event-player's gamemode isn't creative:
  26. send "&c副本中禁止放船"
  27. cancel event
  28. #------------------------------------------------------------------------------------
  29. on command:
  30. set {_dgfilejoin2::*} to files in "plugins/mythicdg"
  31. loop {_dgfilejoin2::*}:
  32. set {_mydgquit1} to skutil yaml value "副本名" from file "plugins/mythicdg/%loop-value%"
  33. if event-player is within {副本名::%{_mydgquit1}%::mydg_area_x} to {副本名::%{_mydgquit1}%::mydg_area_y}:
  34. if event-player's gamemode isn't creative:
  35. if "%command%" is "spawn" or "g":
  36. send "{@tag} &c無法在副本使用此指令"
  37. cancel event
  38. #------------------------------------------------------------------------------------
  39. on damage:
  40. if attacker is a player:
  41. if metadata value "怪物特性" of victim is "保護中":
  42. cancel event
  43. #on command "/mpt leave":
  44. # set {_dgfilejoin2::*} to files in "plugins/mythicdg"
  45. # if {_dgfilejoin2::*} is set:
  46. # loop {_dgfilejoin2::*}:
  47. # clear {_mydgquit1}
  48. # set {_mydgquit1} to skutil yaml value "副本名" from file "plugins/mythicdg/%loop-value%"
  49. # set {_mydgline1.%loop-value%.list::*} to skutil yaml list "排隊中" from file "plugins/mythicdg/%loop-value%"
  50. # if {_mydgline1.%loop-value%.list::1} is name of player:
  51. # set {_no} to 1
  52. # if {_no} is set:
  53. # set {_teamleave.%player%::*} to skutil yaml list "隊員" from file "plugins/MithicParty/%player%.yml"
  54. # loop {_teamleave.%player%::*}:
  55. # set {_teamleave} to loop-value
  56. # set {_teamleave} to {_teamleave} parsed as player
  57. # execute {_teamleave} command "/mydg quit"
  58. # send "{@tag} &c隊長離開隊伍,全員將退出副本" to {_teamleave}
  59. on join:
  60. if {方塊處罰.%player%} is set:
  61. delete {方塊處罰.%player%}
  62. on rightclick holding hoe:
  63. set {_dgfilejoin2::*} to files in "plugins/mythicdg"
  64. loop {_dgfilejoin2::*}:
  65. set {_mydgquit1} to skutil yaml value "副本名" from file "plugins/mythicdg/%loop-value%"
  66. if event-player is within {副本名::%{_mydgquit1}%::mydg_area_x} to {副本名::%{_mydgquit1}%::mydg_area_y}:
  67. if event-player's gamemode isn't creative:
  68. cancel event
  69. on place:
  70. set {_dgfilejoin2::*} to files in "plugins/mythicdg"
  71. loop {_dgfilejoin2::*}:
  72. set {_mydgquit1} to skutil yaml value "副本名" from file "plugins/mythicdg/%loop-value%"
  73. if event-player is within {副本名::%{_mydgquit1}%::mydg_area_x} to {副本名::%{_mydgquit1}%::mydg_area_y}:
  74. if event-player's gamemode isn't creative:
  75. cancel event
  76. set {_lore} to lore of player's tool
  77. if {_lore} contains "補品":
  78. set {_o} to 1
  79. if {_o} isn't set:
  80. set {方塊處罰.%player%} to 1
  81. send "{@tag} 由於放置方塊因此處罰2秒不能移動"
  82. wait 2 second
  83. delete {方塊處罰.%player%}
  84. every 3 second:
  85. loop all players:
  86. add loop-player to {_check.player::*}
  87. if {_check.player::*} isn't set:
  88. set {_dgfilejoin2.1::*} to files in "plugins/mythicdg"
  89. if {_dgfilejoin2.1::*} is set:
  90. loop {_dgfilejoin2.1::*}:
  91. set {_mydgquit1.1} to skutil yaml value "副本名" from file "plugins/mythicdg/%loop-value%"
  92. set {_mydgsecond.%loop-value%.list::*} to skutil yaml list "排隊中" from file "plugins/mythicdg/%loop-value%"
  93. if {_mydgsecond.%loop-value%.list::*} is set:
  94. loop {_mydgsecond.%loop-value%.list::*}:
  95. remove loop-value-2 from skutil yaml list "排隊中" from file "plugins/mythicdg/%loop-value-1%"
  96. set {_dgfilejoin2::*} to files in "plugins/mythicdg"
  97. if {_dgfilejoin2::*} is set:
  98. loop {_dgfilejoin2::*}:
  99. set {_mydgquit1} to skutil yaml value "副本名" from file "plugins/mythicdg/%loop-value%"
  100. set {_mydgprotect} to skutil yaml value "副本保護對象" from file "plugins/mythicdg/%loop-value%"
  101. if {_mydgprotect} isn't "無":
  102. set {_mydgline1.%loop-value%.list::*} to skutil yaml list "排隊中" from file "plugins/mythicdg/%loop-value%"
  103. loop all entities:
  104. if loop-entity isn't dropped item or player or armor stand:
  105. if loop-entity is within {副本名::%{_mydgquit1}%::mydg_area_x} to {副本名::%{_mydgquit1}%::mydg_area_y}:
  106. set {_0} to 1
  107. if {_mydgline1.%loop-value%.list::*} is set:
  108. if {_0} is set:
  109. set {_bossbar} to name of bossbar "%{_mydgquit1}%"
  110. if "%uncolored {_bossbar}%" isn't "開始副本":
  111. loop all entities:
  112. if loop-entity isn't dropped item or player or armor stand:
  113. if loop-entity is within {副本名::%{_mydgquit1}%::mydg_area_x} to {副本名::%{_mydgquit1}%::mydg_area_y}:
  114. if "%uncolored name of loop-entity%" is "%{_mydgprotect}%":
  115. set {_o} to loop-entity
  116. set metadata value "怪物特性" of loop-entity to "保護中"
  117. stop loop
  118. if {_o} isn't set:
  119. loop all players:
  120. if loop-player is within {副本名::%{_mydgquit1}%::mydg_area_x} to {副本名::%{_mydgquit1}%::mydg_area_y}:
  121. execute loop-player command "/mydg quit"
  122. send "{@tag} &c保護對象已死亡..." to loop-player
  123. else:
  124. loop all entities:
  125. if loop-entity isn't dropped item or player:
  126. if loop-entity is within {副本名::%{_mydgquit1}%::mydg_area_x} to {副本名::%{_mydgquit1}%::mydg_area_y}:
  127. set loop-entity's target to {_o}
  128. set {_oo} to location of {_o}
  129. set {_speed} to walk speed of the loop-entity
  130. make loop-entity pathfind to {_oo} with speed {_speed}
  131. if {_dgfilejoin2::*} is set:
  132. loop {_dgfilejoin2::*}:
  133. clear {_mydgquit1}
  134. set {_mydgquit1} to skutil yaml value "副本名" from file "plugins/mythicdg/%loop-value%"
  135. set {_mydgline1.%loop-value%.list::*} to skutil yaml list "排隊中" from file "plugins/mythicdg/%loop-value%"
  136. if {_mydgline1.%loop-value%.list::*} is set:
  137. if file existance of "plugins/MithicParty/%{_mydgline1.%loop-value%.list::1}%.yml" is true:
  138. set {_teamcheak.%loop-value%::*} to skutil yaml list "隊員" from file "plugins/MithicParty/%{_mydgline1.%loop-value%.list::1}%.yml"
  139. loop {_teamcheak.%loop-value%::*}:
  140. clear {_playercheak.%loop-value-2%}
  141. set {_playercheak.%loop-value-2%} to loop-value-2 parsed as player
  142. if {_playercheak.%loop-value-2%} is within {副本名::%{_mydgquit1}%::mydg_area_x} to {副本名::%{_mydgquit1}%::mydg_area_y}:
  143. set {_ok.%loop-value-2%} to 1
  144. else:
  145. set {_mydgteam1.%{_playercheak.%loop-value-2%}%} to skutil yaml value "進行中副本" from file "plugins/MithicParty/%{_playercheak.%loop-value-2%}%.yml"
  146. if {_mydgteam1.%{_playercheak.%loop-value-2%}%} isn't "無":
  147. execute {_playercheak.%loop-value-2%} command "/mydg quit"
  148. set skutil yaml value "進行中副本" from file "plugins/MithicParty/%{_playercheak.%loop-value-2%}%.yml" to "無"
  149. if {_mydgline1.%loop-value%.list::*} is set:
  150. clear {_ok.%{_mydgquit1}%}
  151. clear {_no.%{_mydgquit1}%}
  152. loop all players:
  153. if loop-player is within {副本名::%{_mydgquit1}%::mydg_area_x} to {副本名::%{_mydgquit1}%::mydg_area_y}:
  154. set {_ok.%{_mydgquit1}%} to 1
  155. if {_ok.%{_mydgquit1}%} isn't set:
  156. set {_checkleader} to {_mydgline1.%loop-value%.list::1} parsed as offlineplayer
  157. if file existance of "plugins/MithicParty/%{_checkleader}%.yml" is true:
  158. set {_myparty.%{_checkleader}%.list1::*} to skutil yaml list "隊員" from file "plugins/MithicParty/%{_checkleader}%.yml"
  159. if {_myparty.%{_checkleader}%.list1::*} is set:
  160. loop {_myparty.%{_checkleader}%.list1::*}:
  161. set {_team} to loop-value-2
  162. set {_team} to {_team} parsed as player
  163. execute {_team} command "/mydg quit"
  164. else:
  165. execute {_checkleader} command "/mydg quit"
  166. if {_mydgline1.%loop-value%.list::2} is set:
  167. execute console command "/mydg go %{_mydgquit1}% %{_mydgline1.%loop-value%.list::2}%"
  168. else:
  169. remove bossbar "%{_mydgquit1}%"
  170. remove {_mydgline1.%loop-value%.list::1} from skutil yaml list "排隊中" from file "plugins/mythicdg/%{_mydgquit1}%.yml"
  171. if {_mydgline1.%loop-value%.list::2} is set:
  172. execute console command "/mydg go %{_mydgquit1}% %{_mydgline1.%loop-value%.list::2}%"
  173. on damage of entity:
  174. if entity isn't a player:
  175. set {_y.1} to Y-coordinate of location of victim
  176. set {_y.1} to {_y.1} parsed as number
  177. if {_y.1} < 0:
  178. if "%damage cause%" is "void":
  179. set damage to 999999999999
  180. on damage of player:
  181. set {_y.1} to Y-coordinate of location of victim
  182. set {_y.1} to {_y.1} parsed as number
  183. if {_y.1} < 0:
  184. if file existance of "plugins/MithicParty/%victim%.yml" is false:
  185. if "%damage cause%" is "void":
  186. execute victim command "/mydg quit"
  187. execute victim command "/spawn"
  188. on join:
  189. if {mydg.CD.%event-player%} is set:
  190. delete {mydg.CD.%event-player%}
  191. set {_dgfilejoin.%event-player%::*} to files in "plugins/mythicdg"
  192. loop {_dgfilejoin.%event-player%::*}:
  193. set {_mydgquit.%event-player%} to skutil yaml value "副本名" from file "plugins/mythicdg/%loop-value%"
  194. loop all players:
  195. if loop-player is within {副本名::%{_mydgquit.%event-player%}%::mydg_area_x} to {副本名::%{_mydgquit.%event-player%}%::mydg_area_y}:
  196. if loop-player is event-player:
  197. teleport loop-player to {副本名::%{_mydgquit.%event-player%}%::respawn}
  198. stop loop
  199. on quit:
  200. make player execute command "/mydg quit"
  201. set {_dgfilejoin.%event-player%::*} to files in "plugins/mythicdg"
  202. loop {_dgfilejoin.%event-player%::*}:
  203. set {_mydgquit.%event-player%} to skutil yaml value "副本名" from file "plugins/mythicdg/%loop-value%"
  204. clear {_stop.%event-player%}
  205. loop all players:
  206. if loop-player is within {副本名::%{_mydgquit.%event-player%}%::mydg_area_x} to {副本名::%{_mydgquit.%event-player%}%::mydg_area_y}:
  207. if loop-player is event-player:
  208. execute loop-player command "/mydg quit"
  209. set {_stop.%event-player%} to 1
  210. stop loop
  211. if {_stop.%event-player%} is set:
  212. set {_onquit%event-player%.list::*} to skutil yaml list "排隊中" from file "plugins/mythicdg/%loop-value%"
  213. loop {_onquit%event-player%.list::*}:
  214. if loop-value-2 is event-player:
  215. remove loop-value-2 from skutil yaml list "排隊中" from file "plugins/mythicdg/%{_mydgquit}%.yml"
  216. #on mor.inventory click:
  217. # if inventory name of player's current inventory contains "復活介面":
  218. # if name of event-item contains "回城":
  219. # set {_dgfilejoin.%event-player%::*} to files in "plugins/mythicdg"
  220. # loop {_dgfilejoin.%event-player%::*}:
  221. # set {_mydgquit.%event-player%} to skutil yaml value "副本名" from file "plugins/mythicdg/%loop-value%"
  222. # loop all players:
  223. # if loop-player is within {副本名::%{_mydgquit.%event-player%}%::mydg_area_x} to {副本名::%{_mydgquit.%event-player%}%::mydg_area_y}:
  224. # if loop-player is event-player:
  225. # set {_no3.%event-player%} to 1
  226. # stop loop
  227. # delete holo object "%player%.death"
  228. # set player's health to 0.5
  229. # set {冷卻.%player%::強制阻斷} to now
  230. # delete skutil yaml nodes "死亡座標" from file "plugins/players/%player%.yml"
  231. # remove {玩家魔力值.%player%} from {玩家魔力值.%player%}
  232. # if {玩家魔力值.%player%} is larger than {玩家資料.%player%::魔力值}:
  233. # set {玩家魔力值.%player%} to {玩家資料.%player%::魔力值}
  234. # set {_math} to 0.99 * {玩家魔力值.%player%} / {玩家資料.%player%::魔力值}
  235. # set player's level to {玩家魔力值.%player%}
  236. # if {_math} is more than or equal to 1:
  237. # set {_math} to 0.99
  238. # set {玩家魔力值.%player%} to {玩家資料.%player%::魔力值}
  239. # set level progress of the player to {_math}
  240. # remove invisibility from player
  241. # remove absorption from player
  242. # remove regeneration from player
  243. # remove fire resistance from player
  244. # if slot 38 of player isn't empty:
  245. # set player's tool to slot 38 of player
  246. # set slot 38 of player to air
  247. # if slot 37 of player isn't empty:
  248. # set slot 40 of player to slot 37 of player
  249. # set slot 37 of player to air
  250. # teleport player to spawn of "%player's world%"
  251. # set player's gamemode to survival
  252. # apply saturation 5 to player for 2 seconds
  253. # delete {玩家資料.%player%::死亡座標}
  254. # set {玩家資料.%player%::原地復活} to 0
  255. # send action bar from "&b&l已回城復活!" to player
  256. # if {_no.%event-player%} is set:
  257. # execute event-player command "/mydg quit"
  258. #------------------------------------------------------------------------------------
  259. on leftclick on sign:
  260. line 1 of the clicked block is "{@signname}":
  261. line 2 of the clicked block is set:
  262. stop
  263. if player isn't sneaking:
  264. if {副本名::%line 2 of the clicked block%::mydg_name} is set:
  265. execute player command "/mydg info %line 2 of the clicked block%"
  266. else:
  267. send "{@tag} &c無此副本"
  268. else:
  269. execute player command "/mydg list"
  270. on rightclick on sign:
  271. line 1 of the clicked block is "{@signquit}":
  272. execute player command "/mydg quit"
  273. line 1 of the clicked block is "{@signname}":
  274. line 2 of the clicked block is set:
  275. # send "&c出現BUG 暫停開放"
  276. # stop
  277. if file existance of "plugins/MithicParty/%player%.yml" is true:
  278. set {_mypartydg1.%event-player%} to skutil yaml value "進行中副本" from file "plugins/MithicParty/%event-player%.yml"
  279. if {_mypartydg1.%event-player%} is set:
  280. if {副本名::%line 2 of the clicked block%::mydg_name} is set:
  281. if file existance of "plugins/MithicParty/%event-player%.yml" is true:
  282. set {_mypartycreate.%event-player%} to skutil yaml value "隊長" from file "plugins/MithicParty/%event-player%.yml"
  283. if {_mypartycreate.%event-player%} is event-player:
  284. set {_myparty.%event-player%.list1::*} to skutil yaml list "隊員" from file "plugins/MithicParty/%event-player%.yml"
  285. set {_myparty.%event-player%.number} to 0
  286. loop {_myparty.%event-player%.list1::*}:
  287. increase {_myparty.%event-player%.number} by 1
  288. set {_mydgparty.%event-player%} to skutil yaml value "隊伍人數下限" from file "plugins/mythicdg/%line 2 of the clicked block%.yml"
  289. set {_mydgparty.%event-player%} to {_mydgparty.%event-player%} parsed as number
  290. if {_myparty.%event-player%.number} >= {_mydgparty.%event-player%}:
  291. set {_mydgline.%event-player%.list::*} to skutil yaml list "排隊中" from file "plugins/mythicdg/%line 2 of the clicked block%.yml"
  292. set {_mydglinenumber.%event-player%} to 0
  293. loop {_mydgline.%event-player%.list::*}:
  294. increase {_mydglinenumber.%event-player%} by 1
  295. if {_mydglinenumber.%event-player%} = 45:
  296. send "{@tag} &c排隊已滿,請稍候"
  297. cancel event
  298. if {_mydgcheck.%event-player%} isn't set:
  299. open chest with 6 row named "&d副本介面" to player
  300. set {_mydgline.%event-player%.list::*} to skutil yaml list "排隊中" from file "plugins/mythicdg/%line 2 of the clicked block%.yml"
  301. set {_mydglinenumber.%event-player%} to 0 #排隊人數
  302. set {_mydglinenumber1.%event-player%} to 8 #隊長頭顱放置slot點
  303. loop {_mydgline.%event-player%.list::*}:
  304. increase {_mydglinenumber.%event-player%} by 1
  305. increase {_mydglinenumber1.%event-player%} by 1
  306. set {_mydglineguiname.%event-player%.%{_mydglinenumber.%event-player%}%} to loop-value parsed as offlineplayer #隊長名
  307. if {_mydglinenumber1.%event-player%} = 9:
  308. set {_mydglinegui.%event-player%.%{_mydglinenumber.%event-player%}%} to skull of {_mydglineguiname.%event-player%.%{_mydglinenumber.%event-player%}%} named "&b攻略中&e%loop-value%"
  309. else:
  310. set {_mydglinegui.%event-player%.%{_mydglinenumber.%event-player%}%} to skull of {_mydglineguiname.%event-player%.%{_mydglinenumber.%event-player%}%} named "&b排隊中&e%loop-value%"
  311. make gui slot {_mydglinenumber1.%event-player%} of player with {_mydglinegui.%event-player%.%{_mydglinenumber.%event-player%}%}
  312. set {_mydglinenumber1.%event-player%} to 0
  313. loop 7 times:
  314. increase {_mydglinenumber1.%event-player%} by 1
  315. set {_mydglineguipane.%event-player%.%{_mypartycreatenumber1.%event-player%}%} to green stained glass pane named ""
  316. make gui slot {_mydglinenumber1.%event-player%} of player with {_mydglineguipane.%event-player%.%{_mypartycreatenumber1.%event-player%}%}
  317. set {_mydgtime.%event-player%} to skutil yaml value "副本時間" from file "plugins/mythicdg/%line 2 of the clicked block%.yml"
  318. set {_mydglv.%event-player%} to skutil yaml value "副本需求等級" from file "plugins/mythicdg/%line 2 of the clicked block%.yml"
  319. set {_mydglvh.%event-player%} to skutil yaml value "副本最高需求等級" from file "plugins/mythicdg/%line 2 of the clicked block%.yml"
  320. set {_mydgpartyh.%event-player%} to skutil yaml value "隊伍人數上限" from file "plugins/mythicdg/%line 2 of the clicked block%.yml"
  321. set {_mydgparty.%event-player%} to skutil yaml value "隊伍人數下限" from file "plugins/mythicdg/%line 2 of the clicked block%.yml"
  322. set {_mydglineguitime.%event-player%} to painting named "&a副本名: &f%line 2 of the clicked block%" with lore "&a限制時間: &f%{_mydgtime.%event-player%}%||&a等級最低需求: &f%{_mydglv.%event-player%}% ||&a等級最高需求: &f%{_mydglvh.%event-player%}% ||&a隊伍下限: &f%{_mydgparty.%event-player%}%||&a隊伍上限: &f%{_mydgpartyh.%event-player%}%||&a物品需求: %{副本名::%line 2 of the clicked block%::item}%||&b點選加入排隊"
  323. make gui slot 0 of player with {_mydglineguitime.%event-player%} to close then execute console command "/mydg join %line 2 of the clicked block% %event-player%" with permission "" #加入排隊指令
  324. set {_mydglineguileave.%event-player%} to barrier named "&c離開排隊" with lore "&b點選離開排隊"
  325. make gui slot 8 of player with {_mydglineguileave.%event-player%} to close then execute console command "/mydg leave %line 2 of the clicked block% %event-player%" with permission "" #加入排隊指令
  326. if {副本名::%line 2 of the clicked block%::rank} is "開啟":
  327. set {_mydg.rank1::*} to skutil yaml list "總排名.1.隊伍" from file "plugins/mythicdg/%line 2 of the clicked block%.yml"
  328. set {_mydg.rank2::*} to skutil yaml list "總排名.2.隊伍" from file "plugins/mythicdg/%line 2 of the clicked block%.yml"
  329. set {_mydg.rank3::*} to skutil yaml list "總排名.3.隊伍" from file "plugins/mythicdg/%line 2 of the clicked block%.yml"
  330. set {_mydg.rank4::*} to skutil yaml list "總排名.4.隊伍" from file "plugins/mythicdg/%line 2 of the clicked block%.yml"
  331. set {_mydg.rank5::*} to skutil yaml list "總排名.5.隊伍" from file "plugins/mythicdg/%line 2 of the clicked block%.yml"
  332. set {_mydg.rank1fact} to skutil yaml value "總排名.1.真實排名" from file "plugins/mythicdg/%line 2 of the clicked block%.yml"
  333. set {_mydg.rank2fact} to skutil yaml value "總排名.2.真實排名" from file "plugins/mythicdg/%line 2 of the clicked block%.yml"
  334. set {_mydg.rank3fact} to skutil yaml value "總排名.3.真實排名" from file "plugins/mythicdg/%line 2 of the clicked block%.yml"
  335. set {_mydg.rank4fact} to skutil yaml value "總排名.4.真實排名" from file "plugins/mythicdg/%line 2 of the clicked block%.yml"
  336. set {_mydg.rank5fact} to skutil yaml value "總排名.5.真實排名" from file "plugins/mythicdg/%line 2 of the clicked block%.yml"
  337. set {_mydg.rank1time} to skutil yaml value "總排名.1.時間" from file "plugins/mythicdg/%line 2 of the clicked block%.yml"
  338. set {_mydg.rank2time} to skutil yaml value "總排名.2.時間" from file "plugins/mythicdg/%line 2 of the clicked block%.yml"
  339. set {_mydg.rank3time} to skutil yaml value "總排名.3.時間" from file "plugins/mythicdg/%line 2 of the clicked block%.yml"
  340. set {_mydg.rank4time} to skutil yaml value "總排名.4.時間" from file "plugins/mythicdg/%line 2 of the clicked block%.yml"
  341. set {_mydg.rank5time} to skutil yaml value "總排名.5.時間" from file "plugins/mythicdg/%line 2 of the clicked block%.yml"
  342. set {_mydg.rank1time} to {_mydg.rank1time} parsed as number
  343. set {_mydg.rank2time} to {_mydg.rank2time} parsed as number
  344. set {_mydg.rank3time} to {_mydg.rank3time} parsed as number
  345. set {_mydg.rank4time} to {_mydg.rank4time} parsed as number
  346. set {_mydg.rank5time} to {_mydg.rank5time} parsed as number
  347. set {_mydg.ranktext} to gold block named "&e最快攻略副本排名"
  348. make gui slot 1 of player with {_mydg.ranktext}
  349. make gui slot 7 of player with {_mydg.ranktext}
  350. set {_mydg.rank1.leader} to {_mydg.rank1::1} parsed as offlineplayer
  351. set {_mydg.rank1.slot} to skull of {_mydg.rank1.leader} named "&6第%{_mydg.rank1fact}%名 &b%{_mydg.rank1time}% &a秒"
  352. set {_counter} to 0
  353. loop {_mydg.rank1::*}:
  354. increase {_counter} by 1
  355. set line {_counter} of lore of {_mydg.rank1.slot} to "&b%loop-value%"
  356. make gui slot 2 of player with {_mydg.rank1.slot}
  357. set {_mydg.rank2.leader} to {_mydg.rank2::1} parsed as offlineplayer
  358. set {_mydg.rank2.slot} to skull of {_mydg.rank2.leader} named "&6第%{_mydg.rank2fact}%名 &b%{_mydg.rank2time}% &a秒"
  359. set {_counter} to 0
  360. loop {_mydg.rank2::*}:
  361. increase {_counter} by 1
  362. set line {_counter} of lore of {_mydg.rank2.slot} to "&b%loop-value%"
  363. make gui slot 3 of player with {_mydg.rank2.slot}
  364. set {_mydg.rank3.leader} to {_mydg.rank3::1} parsed as offlineplayer
  365. set {_mydg.rank3.slot} to skull of {_mydg.rank3.leader} named "&6第%{_mydg.rank3fact}%名 &b%{_mydg.rank3time}% &a秒"
  366. set {_counter} to 0
  367. loop {_mydg.rank3::*}:
  368. increase {_counter} by 1
  369. set line {_counter} of lore of {_mydg.rank3.slot} to "&b%loop-value%"
  370. make gui slot 4 of player with {_mydg.rank3.slot}
  371. set {_mydg.rank4.leader} to {_mydg.rank4::1} parsed as offlineplayer
  372. set {_mydg.rank4.slot} to skull of {_mydg.rank4.leader} named "&6第%{_mydg.rank4fact}%名 &b%{_mydg.rank4time}% &a秒"
  373. set {_counter} to 0
  374. loop {_mydg.rank4::*}:
  375. increase {_counter} by 1
  376. set line {_counter} of lore of {_mydg.rank4.slot} to "&b%loop-value%"
  377. make gui slot 5 of player with {_mydg.rank4.slot}
  378. set {_mydg.rank5.leader} to {_mydg.rank5::1} parsed as offlineplayer
  379. set {_mydg.rank5.slot} to skull of {_mydg.rank5.leader} named "&6第%{_mydg.rank5fact}%名 &b%{_mydg.rank5time}% &a秒"
  380. set {_counter} to 0
  381. loop {_mydg.rank5::*}:
  382. increase {_counter} by 1
  383. set line {_counter} of lore of {_mydg.rank5.slot} to "&b%loop-value%"
  384. make gui slot 6 of player with {_mydg.rank5.slot}
  385. else:
  386. send "{@tag} &c隊伍人數不足,無法進入"
  387. else:
  388. send "{@tag} &c你不是隊長,無法加入副本"
  389. else:
  390. send "{@tag} &c無此副本"
  391. else:
  392. send "{@tag} &c你尚未創建/加入隊伍,無法進入"
  393. #------------------------------------------------------------------------------------
  394. on command "/mpt leave":
  395. if file existance of "plugins/MithicParty/%event-player%.yml" is true:
  396. set {_mypartycreate.%event-player%} to skutil yaml value "隊長" from file "plugins/MithicParty/%event-player%.yml"
  397. set {_mypartycreate.%event-player%} to {_mypartycreate.%event-player%} parsed as player
  398. if {_mypartycreate.%event-player%} isn't event-player:
  399. set {_mypartydg1.%event-player%} to skutil yaml value "進行中副本" from file "plugins/MithicParty/%{_mypartycreate.%event-player%}%.yml"
  400. set {_mydg.mydg_area_x} to {副本名::%{_mypartydg1.%event-player%}%::mydg_area_x}
  401. set {_mydg.mydg_area_y} to {副本名::%{_mypartydg1.%event-player%}%::mydg_area_y}
  402. if {_mypartydg1.%event-player%} isn't "無":
  403. loop all players:
  404. if loop-player is within {_mydg.mydg_area_x} to {_mydg.mydg_area_y}:
  405. if loop-player is event-player:
  406. execute loop-player command "/mydg quit"
  407. set {_check} to 1
  408. stop loop
  409. if {_check} isn't set:
  410. execute console command "/mydg leave %{_mypartydg1.%event-player%}% %event-player%"
  411. else:
  412. set {_mypartydg1.%event-player%} to skutil yaml value "進行中副本" from file "plugins/MithicParty/%{_mypartycreate.%event-player%}%.yml"
  413. if {_mypartydg1.%event-player%} isn't "無":
  414. execute player command "/mydg quit"
  415. set {_myparty.%event-player%.list1::*} to skutil yaml list "隊員" from file "plugins/MithicParty/%event-player%.yml"
  416. set {_mydg.%event-player%.list::*} to skutil yaml list "排隊中" from file "plugins/mythicdg/%{_mypartydg1.%event-player%}%.yml"
  417. loop {_mydg.%event-player%.list::*}:
  418. if loop-value is name of player:
  419. set {_line.number} to loop-index
  420. set {_select} to 1
  421. set {_mydg.%event-player%.list::%{_line.number}%} to {_myparty.%event-player%.list1::2}
  422. stop loop
  423. if {_select} is set:
  424. delete skutil yaml list "排隊中" from file "plugins/mythicdg/%{_mypartydg1.%event-player%}%.yml"
  425. loop {_mydg.%event-player%.list::*}:
  426. add loop-value to skutil yaml list "排隊中" from file "plugins/mythicdg/%{_mypartydg1.%event-player%}%.yml"
  427. set {_mydg.mydg_area_x} to {副本名::%{_mypartydg1.%event-player%}%::mydg_area_x}
  428. set {_mydg.mydg_area_y} to {副本名::%{_mypartydg1.%event-player%}%::mydg_area_y}
  429. if player is within {_mydg.mydg_area_x} to {_mydg.mydg_area_y}:
  430. execute player command "/mydg quit"
  431. # if {_mydgnumber} < 3:
  432. # if {_check} isn't set:
  433. # execute console command "/mydg leave %{_mypartydg1.%event-player%}% %{_mypartycreate.%event-player%}%"
  434. #------------------------------------------------------------------------------------
  435. #轉換成位置
  436. function mydgLoc(location: text, world: world) :: location:
  437. set {_loc::*} to {_location} parsed as "x: %num%, y: %num%, z: %num%"
  438. set {_dd} to "{@world}" parsed as world
  439. return location({_loc::1}, {_loc::2}, {_loc::3}, {_dd})
  440. function mydgrank(隊伍: text, 時間: text, 真實: text, 排名: text, 副本名: text) :: text:
  441. set skutil yaml value "總排名.%{_排名}%.真實排名" from file "plugins/mythicdg/%{_副本名}%.yml" to "%{_真實}%"
  442. set skutil yaml value "總排名.%{_排名}%.時間" from file "plugins/mythicdg/%{_副本名}%.yml" to "%{_時間}%"
  443. loop {%{_隊伍}%::*}:
  444. add loop-value to skutil yaml list "總排名.%{_排名}%.隊伍" from file "plugins/mythicdg/%{_副本名}%.yml"
  445. #------------------------------------------------------------------------------------
  446. command /remydg [<text>] [<text>] [<text>] [<text>]:
  447. trigger:
  448. if arg-1 is "error":
  449. if player have permission "mydg":
  450. set {_加載副本名} to "苦力帕神殿遺跡"
  451. set {副本名::%{_加載副本名}%::mydg_area_y} to location of player
  452. set "副本頂點y" to "%{副本名::%{_加載副本名}%::mydg_area_y}%" in yaml file "plugins/mythicdg/%{_加載副本名}%.yml"
  453. send "修復完成"
  454. if arg-1 is "del":
  455. if arg-2 is set:
  456. if player have permission "mydg":
  457. delete file "plugins/mythicdg/%arg-2%.yml"
  458. send "已刪除%arg-2%檔案"
  459. if arg-1 is "cd":
  460. if arg-2 is set:
  461. if player have permission "mydg":
  462. delete {mydg.CD.%arg-2%}
  463. if arg-1 is "new":
  464. if player have permission "mydg":
  465. set {_dgfilejoin2::*} to files in "plugins/mythicdg"
  466. if {_dgfilejoin2::*} is set:
  467. loop {_dgfilejoin2::*}:
  468. clear {_mydgquit1}
  469. set {_mydgquit1} to skutil yaml value "副本名" from file "plugins/mythicdg/%loop-value%"
  470. set {_mydg.mode} to skutil yaml value "模式" from file "plugins/mythicdg/%loop-value%"
  471. if {_mydg.mode} isn't set:
  472. set skutil yaml value "模式" from file "plugins/mythicdg/%loop-value%" to "一般放怪"
  473. set {副本名::%{_mydgquit1}%::mode} to "一般放怪"
  474. send "&e已更改 %{_mydgquit1}%"
  475. if arg-1 is "new1":
  476. if player have permission "mydg":
  477. set {_dgfilejoin2::*} to files in "plugins/mythicdg"
  478. if {_dgfilejoin2::*} is set:
  479. loop {_dgfilejoin2::*}:
  480. clear {_mydgquit1}
  481. set {_mydgquit1} to skutil yaml value "副本名" from file "plugins/mythicdg/%loop-value%"
  482. set skutil yaml value "副本保護對象" from file "plugins/mythicdg/%loop-value%" to "無"
  483. send "&e已更改 %{_mydgquit1}%"
  484. command /mydg [<text>] [<text>] [<text>] [<text>] [<text>] :
  485. #------------------------------------------------------------------------------------
  486. trigger:
  487. if arg-1 isn't set:
  488. send "&b----------&6副本指令&b----------"
  489. send "&a/mydg <areax,areay> <副本名> &d設置副本區域"
  490. send "&a/mydg spawn <副本名> &d設置副本玩家出生點"
  491. send "&a/mydg lv <副本名> &d設定副本最低需求等級"
  492. send "&a/mydg lvh <副本名> &d設定副本最高需求等級"
  493. send "&a/mydg party <副本名> <數字> &d設定副本最低需求"
  494. send "&a/mydg partyh <副本名> <數字> &d設定副本最高需求"
  495. send "&a/mydg respawn <副本名> &d設定副本離開重生點"
  496. send "&a/mydg item <副本名> &d設置副本需求物品"
  497. send "&a/mydg time <副本名> <整數> &d設置副本時間"
  498. send "&a/mydg protest <副本名> ~ ~ <怪物顯示名> &d設置副本保護對象"
  499. send "&a/mydg tp <副本名> <areax,areay> &d傳送至副本區域兩個對角線"
  500. send "&b/mydg tp <副本名> <mob> <怪物編號> &d傳送至副本怪物出生點 (限定一般放怪模式)"
  501. send "&b/mydg tp <副本名> <mob2> <怪物編號> <波數> &d傳送至副本怪物出生點 (限定波數放怪模式)"
  502. send "&a/mydg delete <dg> <副本名> &d刪除副本"
  503. send "&a/mydg kill <副本名> &d刪除副本怪物"
  504. send "&a/mydg quit &d離開副本"
  505. send "&a/mydg reload &d重載副本(尚未製好)"
  506. send "&a/mydg info <副本名> &d查詢副本排隊狀況"
  507. send "&a/mydg rank <副本名> <true,false,boom> &d開/關/重置副本排名"
  508. send "&a/mydg mode <副本名> <1,2> &d1是將怪物一次放出,2是將怪物以波數放出"
  509. send "&b/mydg mob <副本名> <怪物名> &d設置副本怪物 (限定一般放怪模式)"
  510. send "&b/mydg start <副本名> &d出生副本怪物 (限定一般放怪模式)"
  511. send "&b/mydg mob2 <副本名> <怪物名> <波數> &d設置副本怪物 (限定波數放怪模式)"
  512. send "&b/mydg cmd text <副本名> <指令名> <波數> &d下一波開始時對副本中玩家使用指令 使用 <player> 會替換為玩家ID (限定波數放怪模式)"
  513. send "&b/mydg start2 <副本名> &d出生副本怪物 (限定波數放怪模式)"
  514. send "&b/mydg delete mob <副本名> <怪物編號>> &d刪除副本怪物 (限定一般放怪模式)"
  515. send "&b/mydg delete mob2 <副本名> <怪物編號> <波數> &d刪除副本怪物 (限定波數放怪模式)"
  516. send "&b/mydg delete cmd <副本名> <波數> <指令> &d刪除副本指令 (限定波數放怪模式)"
  517. send "&b----------&6副本指令&b----------"
  518. if arg-1 is "mode":
  519. if arg-2 is set:
  520. if arg-3 is "1" or "2":
  521. if arg-3 is "1":
  522. if player doesn't have permission "mydg":
  523. send "{@tag} &c無法使用此指令"
  524. stop trigger
  525. if {副本名::%arg-2%::mydg_name} = arg-2:
  526. set skutil yaml value "模式" from file "plugins/mythicdg/%arg-2%.yml" to "一般放怪"
  527. send "{@tag} &f更改副本模式為一般放怪"
  528. send "{@tag} &f更改副本模式將刪掉副本怪物"
  529. delete skutil yaml nodes "副本怪物" from file "plugins/mythicdg/%arg-2%.yml"
  530. set {副本名::%arg-2%::mode} to "一般放怪"
  531. else:
  532. send "{@tag} &c無此副本"
  533. if arg-3 is "2":
  534. if player doesn't have permission "mydg":
  535. send "{@tag} &c無法使用此指令"
  536. stop trigger
  537. if {副本名::%arg-2%::mydg_name} = arg-2:
  538. set skutil yaml value "模式" from file "plugins/mythicdg/%arg-2%.yml" to "波數放怪"
  539. delete skutil yaml nodes "副本怪物" from file "plugins/mythicdg/%arg-2%.yml"
  540. send "{@tag} &f更改副本模式為波數放怪"
  541. send "{@tag} &f更改副本模式將刪掉副本怪物"
  542. set {副本名::%arg-2%::mode} to "波數放怪"
  543. else:
  544. send "{@tag} &c無此副本"
  545. else:
  546. send "{@tag} &c指令錯誤 請更正為 /mydg mode <副本名> <1,2> "
  547. if arg-1 is "list":
  548. set {_dgfilejoin::*} to files in "plugins/mythicdg"
  549. set {_num} to -1
  550. open chest with 6 row named "&6副本介面" to player
  551. set {_managedg} to "{SkullOwner:{Id:""39afdd42-8238-4b6e-bce3-f9a54a08e0ae"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMzFmNDIwODM2ZDUwODE3YTlmZTRlYTE3ZTA5NjE2NzQ4ODgxMTVkMWY2MjcxNzU5MzVmMjFjNjhiNzc3M2QzYyJ9fX0=""}]}}}"
  552. loop {_dgfilejoin::*}:
  553. increase {_num} by 1
  554. set {_mydgmanage} to skutil yaml value "副本名" from file "plugins/mythicdg/%loop-value%"
  555. set {_numdg} to {副本名::%{_mydgmanage}%::player_time}
  556. set {_numdg1} to {副本名::%{_mydgmanage}%::lv}
  557. set {_numdg2} to {副本名::%{_mydgmanage}%::lvh}
  558. set {_numdg3} to {副本名::%{_mydgmanage}%::party}
  559. set {_numdg4} to {副本名::%{_mydgmanage}%::partyh}
  560. set {_numdg5} to {副本名::%{_mydgmanage}%::item}
  561. set {_managedg.%player%.dg} to player head with custom nbt "%{_managedg}%" named "&f副本名: &b%{_mydgmanage}%" with lore "&a限制時間: &f%{_numdg}%||&a等級最低需求: &f%{_numdg1}%||&a等級最高需求: &f%{_numdg2}%||&a隊伍下限: &f%{_numdg3}%||&a隊伍上限: &f%{_numdg4}%||&a物品需求: %{_numdg5}%||&b點選查詢排隊狀況"
  562. make gui slot {_num} of player with {_managedg.%player%.dg} to run player command "/mydg info %{_mydgmanage}%" with permission ""
  563. if {_num} > 52:
  564. set {_next} to "{SkullOwner:{Id:""1f961930-4e97-47b7-a5a1-2cc5150f3764"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZTNmYzUyMjY0ZDhhZDllNjU0ZjQxNWJlZjAxYTIzOTQ3ZWRiY2NjY2Y2NDkzNzMyODliZWE0ZDE0OTU0MWY3MCJ9fX0=""}]}}}"
  565. set {_next1} to player head with custom nbt "%{_next}%" named "&f下一頁"
  566. make gui slot 53 of player with {_next1} to run player command "/48484" with permission ""
  567. if arg-1 is "party":
  568. if arg-2 is set:
  569. if arg-3 is set:
  570. if player doesn't have permission "mydg":
  571. send "{@tag} &c無法使用此指令"
  572. stop trigger
  573. if {副本名::%arg-2%::mydg_name} = arg-2:
  574. set {副本名::%arg-2%::party} to arg-3
  575. set "隊伍人數下限" to "%{副本名::%arg-2%::party}%" in yaml file "plugins/mythicdg/%arg-2%.yml"
  576. send "{@tag} &f已設置 副本: %arg-2% 隊伍人數下限為 %arg-3%"
  577. else:
  578. send "{@tag} {@error3}"
  579. send "{@tag} &c請確認副本名是否有打錯"
  580. if arg-1 is "partyh":
  581. if arg-2 is set:
  582. if arg-3 is set:
  583. if player doesn't have permission "mydg":
  584. send "{@tag} &c無法使用此指令"
  585. stop trigger
  586. if {副本名::%arg-2%::mydg_name} = arg-2:
  587. set {副本名::%arg-2%::partyh} to arg-3
  588. set "隊伍人數上限" to "%{副本名::%arg-2%::partyh}%" in yaml file "plugins/mythicdg/%arg-2%.yml"
  589. send "{@tag} &f已設置 副本: %arg-2% 隊伍人數上限為 %arg-3%"
  590. else:
  591. send "{@tag} {@error3}"
  592. send "{@tag} &c請確認副本名是否有打錯"
  593. if arg-1 is "respawn":
  594. if arg-2 is set:
  595. if player doesn't have permission "mydg":
  596. send "{@tag} &c無法使用此指令"
  597. stop trigger
  598. if {副本名::%arg-2%::mydg_name} = arg-2:
  599. set {副本名::%arg-2%::respawn} to location of player
  600. set "重生地點" to "%{副本名::%arg-2%::respawn}%" in yaml file "plugins/mythicdg/%arg-2%.yml"
  601. send "{@tag} &f已設置 副本: %arg-2% 重生地點為腳下"
  602. else:
  603. send "{@tag} {@error3}"
  604. send "{@tag} &c請確認副本名是否有打錯"
  605. if arg-1 is "reload":
  606. stop trigger
  607. if player doesn't have permission "mydg":
  608. send "{@tag} &c無法使用此指令"
  609. stop trigger
  610. send "{@tag} &f重新加載副本"
  611. set {_加載::*} to files in "plugins/mythicdg"
  612. loop {_加載::*}:
  613. set {_加載副本名} to skutil yaml value "副本名" from file "plugins/mythicdg/%loop-value%"
  614. set {_reloadareax} to skutil yaml value "副本頂點x" from file "plugins/mythicdg/%loop-value%"
  615. set {副本名::%{_加載副本名}%::mydg_area_x} to mydgLoc("%{_reloadareax}%", player's world)
  616. set {_reloadareay} to skutil yaml value "副本頂點y" from file "plugins/mythicdg/%loop-value%"
  617. set {副本名::%{_加載副本名}%::mydg_area_x} to mydgLoc("%{_reloadareay}%", player's world)
  618. set {_reloadspawn} to skutil yaml value "副本重生點" from file "plugins/mythicdg/%loop-value%"
  619. set {副本名::%{_加載副本名}%::player_spawn} to mydgLoc("%{_reloadspawn}%", player's world)
  620. set {副本名::%{_加載副本名}%::player_time} to skutil yaml value "副本時間" from file "plugins/mythicdg/%loop-value%"
  621. set {副本名::%{_加載副本名}%::lv} to skutil yaml value "副本需求等級" from file "plugins/mythicdg/%loop-value%"
  622. set {副本名::%{_加載副本名}%::lvh} to skutil yaml value "副本需求等級" from file "plugins/mythicdg/%loop-value%"
  623. if arg-1 is "item":
  624. if arg-2 is set:
  625. if player doesn't have permission "mydg":
  626. send "{@tag} &c無法使用此指令"
  627. stop trigger
  628. if {副本名::%arg-2%::mydg_name} = arg-2:
  629. send "{@tag} &f已設定手中物品為副本進入條件"
  630. if name of player's tool isn't "none":
  631. set {副本名::%arg-2%::item} to name of player's tool
  632. set "副本需求物品" to "%{副本名::%arg-2%::item}%" in yaml file "plugins/mythicdg/%arg-2%.yml"
  633. else:
  634. send "{@tag} &c由於手中物品不是自定物品因此設定成無"
  635. set {副本名::%arg-2%::item} to "無"
  636. set "副本需求物品" to "%{副本名::%arg-2%::item}%" in yaml file "plugins/mythicdg/%arg-2%.yml"
  637. else:
  638. send "{@tag} {@error3}"
  639. send "{@tag} &c請確認副本名是否有打錯"
  640. else:
  641. send "{@tag} {@error1}"
  642. send "{@tag} &c請使用/mydg itme <副本名>"
  643. if arg-1 is "lvh":
  644. if arg-2 is set:
  645. if arg-3 is set:
  646. if player doesn't have permission "mydg":
  647. send "{@tag} &c無法使用此指令"
  648. stop trigger
  649. if {副本名::%arg-2%::mydg_name} = arg-2:
  650. set {副本名::%arg-2%::lvh} to arg-3
  651. set "副本最高需求等級" to "%arg-3%" in yaml file "plugins/mythicdg/%arg-2%.yml"
  652. send "{@tag} &f已設置 副本: %arg-2% 最高等級需求: %arg-3%"
  653. else:
  654. send "{@tag} {@error3}"
  655. send "{@tag} &c請確認副本名是否有打錯"
  656. stop trigger
  657. else:
  658. send "{@tag} {@error1}"
  659. send "{@tag} &c請使用/mydg lvh <副本名> <需求等級>"
  660. stop trigger
  661. else:
  662. send "{@tag} {@error1}"
  663. send "{@tag} &c請使用/mydg lvh <副本名> <需求等級>"
  664. stop trigger
  665. if arg-1 is "lv":
  666. if arg-2 is set:
  667. if arg-3 is set:
  668. if player doesn't have permission "mydg":
  669. send "{@tag} &c無法使用此指令"
  670. stop trigger
  671. if {副本名::%arg-2%::mydg_name} = arg-2:
  672. set {副本名::%arg-2%::lv} to arg-3
  673. set "副本需求等級" to "%arg-3%" in yaml file "plugins/mythicdg/%arg-2%.yml"
  674. send "{@tag} &f已設置 副本: %arg-2% 最低等級需求: %arg-3%"
  675. else:
  676. send "{@tag} {@error3}"
  677. send "{@tag} &c請確認副本名是否有打錯"
  678. stop trigger
  679. else:
  680. send "{@tag} {@error1}"
  681. send "{@tag} &c請使用/mydg lv <副本名> <需求等級>"
  682. stop trigger
  683. else:
  684. send "{@tag} {@error1}"
  685. send "{@tag} &c請使用/mydg lv <副本名> <需求等級>"
  686. stop trigger
  687. if arg-1 is "protect":
  688. if arg-2 is set:
  689. if arg-3 is "~":
  690. if arg-4 is "~":
  691. if arg-5 is set:
  692. if player doesn't have permission "mydg":
  693. send "{@tag} &c無法使用此指令"
  694. stop trigger
  695. if {副本名::%arg-2%::mydg_name} = arg-2:
  696. set {副本名::%arg-2%::protect} to arg-5
  697. set "副本保護對象" to "%arg-5%" in yaml file "plugins/mythicdg/%arg-2%.yml"
  698. send "{@tag} &f已設置 副本: %arg-2% 保護對象: %arg-5%"
  699.  
  700. else:
  701. send "{@tag} {@error3}"
  702. send "{@tag} &c請使用/mydg protect <副本名> ~ ~ <怪物顯示名> "
  703. stop trigger
  704. else:
  705. send "{@tag} {@error3}"
  706. send "{@tag} &c請使用/mydg protect <副本名> ~ ~ <怪物顯示名> "
  707. stop trigger
  708. else:
  709. send "{@tag} {@error1}"
  710. send "{@tag} &c請使用/mydg protect <副本名> ~ ~ <怪物顯示名>"
  711. stop trigger
  712. else:
  713. send "{@tag} {@error1}"
  714. send "{@tag} &c請使用/mydg protect <副本名> ~ ~ <怪物顯示名>"
  715. stop trigger
  716. if arg-1 is "join":
  717. if arg-2 is set:
  718. if arg-3 is set:
  719. if player doesn't have permission "mydg":
  720. send "{@tag} &c無法使用此指令"
  721. stop trigger
  722. loop all players:
  723. if loop-player is arg-3:
  724. set {_mydg.check} to 1
  725. stop loop
  726. if {_mydg.check} is set:
  727. if {mydg.CD.%arg-3%} is set:
  728. set {_mydgjoin.%arg-3%} to arg-3 parsed as player
  729. send "{@tag} &c副本冷卻時間10秒,請等等再試" to {_mydgjoin.%arg-3%}
  730. stop trigger
  731. set {mydg.CD.%arg-3%} to 1
  732. set {_mydgjoin.%arg-3%} to arg-3 parsed as player
  733. if {副本名::%arg-2%::mydg_name} = arg-2:
  734. set {_mydg.checkdg.%arg-3%} to skutil yaml value "進行中副本" from file "plugins/MithicParty/%arg-3%.yml"
  735. set {_myparty.%arg-3%.list::*} to skutil yaml list "隊員" from file "plugins/MithicParty/%arg-3%.yml"
  736. loop {_myparty.%arg-3%.list::*}:
  737. if loop-value isn't arg-3:
  738. set {_mydgteam.%arg-3%} to skutil yaml value "進行中副本" from file "plugins/MithicParty/%loop-value%.yml"
  739. if {_mydgteam.%arg-3%} isn't "無":
  740. send "{@tag} &c你隊友正在攻略其它副本,請稍候" to {_mydgjoin.%arg-3%}
  741. wait 10 second
  742. delete {mydg.CD.%arg-3%}
  743. stop trigger
  744. if {_mydg.checkdg.%arg-3%} is "無":
  745. loop {_myparty.%arg-3%.list::*}:
  746. set {_mypartylevel.%loop-value%} to skutil yaml value "玩家等級" from file "plugins/players/%loop-value%.yml"
  747. set {_mypartylevel.%loop-value%} to {_mypartylevel.%loop-value%} parsed as number
  748. set {副本名::%arg-2%::lv} to {副本名::%arg-2%::lv} parsed as number
  749. set {副本名::%arg-2%::lvh} to {副本名::%arg-2%::lvh} parsed as number
  750. if {_mypartylevel.%loop-value%} >= {副本名::%arg-2%::lv}:
  751. if {副本名::%arg-2%::lvh} < {_mypartylevel.%loop-value%}:
  752. send "{@tag} &f%loop-value%&c等級不到&f%{副本名::%arg-2%::lvh}%&c以下" to {_mydgjoin.%arg-3%}
  753. set {_stop} to 1
  754. else:
  755. send "{@tag} &f%loop-value%&c等級不到&f%{副本名::%arg-2%::lv}%&c以上" to {_mydgjoin.%arg-3%}
  756. set {_stop} to 1
  757. if {_stop} isn't set:
  758. set {_check::*} to skutil yaml list "排隊中" from file "plugins/mythicdg/%arg-2%.yml"
  759. if "%{_check::*}%" contains "%arg-3%":
  760. send "&c你有在排隊此副本"
  761. stop trigger
  762. add arg-3 to skutil yaml list "排隊中" from file "plugins/mythicdg/%arg-2%.yml"
  763. set skutil yaml value "進行中副本" from file "plugins/MithicParty/%arg-3%.yml" to "%arg-2%"
  764. send "{@tag} &e你加入 副本:%arg-2% 排隊了" to {_mydgjoin.%arg-3%}
  765. set {_dgfile::*} to files in "plugins/mythicdg"
  766. loop {_dgfile::*}:
  767. set {_mydgline} to skutil yaml value "副本名" from file "plugins/mythicdg/%loop-value%"
  768. delete {_mydgline.%{_mydgline}%list::*}
  769. clear {_mydgstop.%{_mydgline}%}
  770. set {_mydgline.%{_mydgline}%list::*} to skutil yaml list "排隊中" from file "plugins/mythicdg/%loop-value%"
  771. if {_mydgline.%{_mydgline}%list::1} is set:
  772. set {_mydg_areax_x%{_mydgline}%} to {副本名::%{_mydgline}%::mydg_area_x}
  773. set {_mydg_areax_y%{_mydgline}%} to {副本名::%{_mydgline}%::mydg_area_y}
  774. loop all players:
  775. if loop-player is within {_mydg_areax_x%{_mydgline}%} to {_mydg_areax_y%{_mydgline}%}:
  776. set {_mydgstop.%{_mydgline}%} to 1
  777. else:
  778. set {_mydgstop.%{_mydgline}%} to 1
  779. if {_mydgstop.%{_mydgline}%} isn't set:
  780. set {_副本.%{_mydgline}%} to skutil yaml value "副本名" from file "plugins/mythicdg/%loop-value%"
  781. execute console command "/mydg go %{_副本.%{_mydgline}%}% %{_mydgline.%{_mydgline}%list::1}%"
  782. else:
  783. send "{@tag} &c你已排隊其它副本了" to {_mydgjoin.%arg-3%}
  784. else:
  785. send "{@tag} {@error3}"
  786. send "{@tag} &c請確認副本名是否有打錯"
  787. wait 10 second
  788. delete {mydg.CD.%arg-3%}
  789. if arg-1 is "go":
  790. if arg-2 is set:
  791. if arg-3 is set:
  792. if player doesn't have permission "mydg":
  793. send "{@tag} &c無法使用此指令"
  794. stop trigger
  795. loop all players:
  796. if loop-player is within {副本名::%arg-2%::mydg_area_x} to {副本名::%arg-2%::mydg_area_y}:
  797. set {_people.%arg-2%} to 1
  798. send "&c%loop-player%"
  799. if {_people.%arg-2%} is set:
  800. send "{@tag} 有玩家正在進行副本"
  801. stop trigger
  802. set {_arg-3} to arg-3 parsed as player
  803. set {_mydgline.list::*} to skutil yaml list "隊員" from file "plugins/MithicParty/%arg-3%.yml"
  804. loop {_mydgline.list::*}:
  805. set {_lvcheck} to single value "玩家等級" get of "plugins/players/%loop-value%.yml"
  806. set {_lvcheck} to {_lvcheck} parsed as number
  807. set {副本名::%arg-2%::lv} to {副本名::%arg-2%::lv} parsed as number
  808. set {副本名::%arg-2%::lvh} to {副本名::%arg-2%::lvh} parsed as number
  809. if {_lvcheck} < {副本名::%arg-2%::lv}:
  810. send "{@tag} &f%loop-value%&c等級不到&f%{副本名::%arg-2%::lv}%&c以上" to {_arg-3}
  811. set {_nocheck} to 1
  812. if {_lvcheck} > {副本名::%arg-2%::lvh}:
  813. send "{@tag} &f%loop-value%&c等級超過&f%{副本名::%arg-2%::lvh}%&c" to {_arg-3}
  814. set {_nocheck} to 1
  815. if {_nocheck} is set:
  816. execute console command "/mydg leave %arg-2% %arg-3%"
  817. stop trigger
  818. set {_linecheck} to 0
  819. loop {_mydgline.list::*}:
  820. increase {_linecheck} by 1
  821. set {_linecheck} to {_linecheck} parsed as number
  822. set {副本名::%arg-2%::party} to {副本名::%arg-2%::party} parsed as number
  823. set {副本名::%arg-2%::partyh} to {副本名::%arg-2%::partyh} parsed as number
  824. if {_linecheck} < {副本名::%arg-2%::party}:
  825. send "{@tag} &c隊伍低於%{副本名::%arg-2%::party}%人" to {_arg-3}
  826. set {_nocheck1} to 1
  827. if {_linecheck} > {副本名::%arg-2%::partyh}:
  828. send "{@tag} &c隊伍高於%{副本名::%arg-2%::partyh}%人" to {_arg-3}
  829. set {_nocheck1} to 1
  830. if {_nocheck1} is set:
  831. execute console command "/mydg leave %arg-2% %arg-3%"
  832. stop trigger
  833. set {_itemcheck} to arg-3 parsed as player
  834. loop items in {_itemcheck}'s inventory:
  835. if name of loop-item contains "%{副本名::%arg-2%::item}%":
  836. set {_yes} to 1
  837. set {_mydgitem} to loop-item
  838. remove 1 of {_mydgitem} from {_itemcheck}'s inventory
  839. stop loop
  840. if {副本名::%arg-2%::item} is "無":
  841. set {_yes} to 1
  842. if {_yes} is 1:
  843. set {_mydgtime} to arg-3 parsed as player
  844. remove bossbar "%arg-2%"
  845. create bossbar title "&b開始副本!!!" and id "%arg-2%" for {_mydgtime}
  846. loop all players:
  847. send "&a[&c公告&a] &f%arg-3% &b隊伍開始攻略了 &f%arg-2% 副本 &b我們祝福他們吧!" to loop-player
  848. loop {_mydgline.list::*}:
  849. set {_loopvalue} to loop-value parsed as player
  850. add bossbar "%arg-2%" for {_loopvalue}
  851. loop {_mydgline.list::*}:
  852. set {_tp} to loop-value parsed as player
  853. teleport {_tp} to {副本名::%arg-2%::player_spawn}
  854. set "進行中副本" to "%arg-2%" in yaml file "plugins/MithicParty/%{_tp}%.yml"
  855. run {_tp} command "/mydg kill %arg-2%" as op
  856. loop {_mydgline.list::*}:
  857. set {_mydgtp} to loop-value parsed as player
  858. send {_mydgtp} title "&a&l進入副本 %arg-2% " with subtitle "&7請在 &b%{副本名::%arg-2%::player_time}% &7秒內破關" for 8 seconds
  859. wait 8 second
  860. loop {_mydgline.list::*}:
  861. set {_mydgtp} to loop-value parsed as player
  862. send {_mydgtp} title "&a&l五秒後開始放怪(≧▽≦) " with subtitle "&7小心別死喔づ(・ω・)づ" for 1 seconds
  863. wait 1 second
  864. loop {_mydgline.list::*}:
  865. set {_mydgtp} to loop-value parsed as player
  866. send {_mydgtp} title "&a&l4" with subtitle "" for 1 seconds
  867. play sound "BLOCK_NOTE_PLING" to {_mydgtp} with volume 10 and pitch 3
  868. wait 1 second
  869. loop {_mydgline.list::*}:
  870. set {_mydgtp} to loop-value parsed as player
  871. send {_mydgtp} title "&a&l3" with subtitle "" for 1 seconds
  872. play sound "BLOCK_NOTE_PLING" to {_mydgtp} with volume 10 and pitch 4
  873. wait 1 second
  874. loop {_mydgline.list::*}:
  875. set {_mydgtp} to loop-value parsed as player
  876. send {_mydgtp} title "&a&l2" with subtitle "" for 1 seconds
  877. play sound "BLOCK_NOTE_PLING" to {_mydgtp} with volume 10 and pitch 5
  878. wait 1 second
  879. loop {_mydgline.list::*}:
  880. set {_mydgtp} to loop-value parsed as player
  881. send {_mydgtp} title "&a&l1" with subtitle "" for 1 seconds
  882. play sound "BLOCK_NOTE_PLING" to {_mydgtp} with volume 10 and pitch 6
  883. wait 1 second
  884. loop {_mydgline.list::*}:
  885. set {_mydgtp} to loop-value parsed as player
  886. send {_mydgtp} title "&e&l副本開始!!" with subtitle "" for 1 seconds
  887. play sound "ENTITY_FIREWORK_LAUNCH" to {_mydgtp} with volume 20 and pitch 1
  888. play sound "ENTITY_ENDERDRAGON_FIREBALL_EXPLODE" to {_mydgtp} with volume 20 and pitch 1
  889. if {副本名::%arg-2%::mode} is "一般放怪":
  890. run {_mydgtp} command "/mydg start %arg-2%" as op
  891. set bossbar "%arg-2%" color to blue
  892. edit bossbar "%arg-2%" style to segmented 12
  893. set {_剩餘時間} to {副本名::%arg-2%::player_time}
  894. set bossbar "%arg-2%" progress to {_剩餘時間} / {副本名::%arg-2%::player_time}
  895. set {_總訊息::*} to "&a離開請使用&d/mydg quit"
  896. add "&7如果中途離開隊伍或離開伺服將會踢出副本" to {_總訊息::*}
  897. add "&e時效到期將踢出副本" to {_總訊息::*}
  898. set {_時間} to 5
  899. set {_時間.1} to 0
  900. loop {副本名::%arg-2%::player_time} times:
  901. clear {_time::*}
  902. set {_time::*} to skutil yaml list "排隊中" from file "plugins/mythicdg/%arg-2%.yml"
  903. if {_time::1} isn't set:
  904. set {_剩餘時間} to 0
  905. wait 1 second
  906. clear {_yes}
  907. loop all players:
  908. if loop-player is within {副本名::%arg-2%::mydg_area_x} to {副本名::%arg-2%::mydg_area_y}:
  909. set {_yes} to 1
  910. if {_yes} isn't set:
  911. set {_剩餘時間} to 0
  912. increase {_時間} by 1
  913. reduce {_剩餘時間} by 1
  914. set bossbar "%arg-2%" progress to {_剩餘時間} / {副本名::%arg-2%::player_time} * 100
  915. if {_時間} > 5:
  916. increase {_時間.1} by 1
  917. if {_時間.1} > 3:
  918. set {_時間.1} to 1
  919. set {_訊息} to {_總訊息::%{_時間.1}%}
  920. set {_時間} to 0
  921. set bossbar "%arg-2%" title to "&c剩餘時間: &b%{_剩餘時間}% %{_訊息}%"
  922. if {_剩餘時間} < {副本名::%arg-2%::player_time} * 6 / 10 :
  923. set bossbar "%arg-2%" color to yellow
  924. if {_剩餘時間} < {副本名::%arg-2%::player_time} * 3 / 10:
  925. set bossbar "%arg-2%" color to red
  926. if {_剩餘時間} <= 0:
  927. remove bossbar "%arg-2%"
  928. loop all players:
  929. if loop-player is within {副本名::%arg-2%::mydg_area_x} to {副本名::%arg-2%::mydg_area_y}:
  930. execute loop-player command "/mydg quit"
  931. stop loop
  932. if {副本名::%arg-2%::mode} is "波數放怪":
  933. set bossbar "%arg-2%" color to blue
  934. edit bossbar "%arg-2%" style to segmented 12
  935. set {_player} to "%arg-3%" parsed as number
  936. send "%{_剩餘時間}% / %{副本名::%arg-2%::player_time}%" to {_player}
  937. set {_剩餘時間} to {副本名::%arg-2%::player_time}
  938. set bossbar "%arg-2%" progress to {_剩餘時間} / {副本名::%arg-2%::player_time}
  939. set {_總訊息::*} to "&a離開請使用&d/mydg quit"
  940. add "&7如果中途離開隊伍或離開伺服將會踢出副本" to {_總訊息::*}
  941. add "&e時效到期將踢出副本" to {_總訊息::*}
  942. set {_時間} to 5
  943. set {_時間.1} to 0
  944. set {_波數} to 1
  945. run {_mydgtp} command "/mydg start2 %arg-2% %{_波數}%" as op
  946. loop {副本名::%arg-2%::player_time} times:
  947. clear {_time::*}
  948. set {_time::*} to skutil yaml list "排隊中" from file "plugins/mythicdg/%arg-2%.yml"
  949. if {_time::1} isn't set:
  950. set {_剩餘時間} to 0
  951. remove bossbar "%arg-2%"
  952. stop loop
  953. clear {_checkplayer::*}
  954. loop all players:
  955. if loop-player is within {副本名::%arg-2%::mydg_area_x} to {副本名::%arg-2%::mydg_area_y}:
  956. send loop-player title "&e10秒後將有下一波" with subtitle "" for 1 seconds
  957. add loop-player to {_checkplayer::*}
  958. wait 1 second
  959. loop all players:
  960. if loop-player is within {副本名::%arg-2%::mydg_area_x} to {副本名::%arg-2%::mydg_area_y}:
  961. set {_yes} to 1
  962. if {_yes} isn't set:
  963. set {_剩餘時間} to 0
  964. remove bossbar "%arg-2%"
  965. stop loop
  966. clear {_no}
  967. if {_yes.ok} isn't set:
  968. loop all entities:
  969. if loop-entity isn't a player or a dropped item:
  970. if loop-entities is within {副本名::%arg-2%::mydg_area_x} to {副本名::%arg-2%::mydg_area_y}:
  971. increase {_no} by 1
  972. if metadata value "怪物特性" of loop-entity is "保護中":
  973. increase {_no} by -1
  974. else:
  975. set {_no} to 1
  976. if {_no} <= 0:
  977. loop all players:
  978. if loop-player is within {副本名::%arg-2%::mydg_area_x} to {副本名::%arg-2%::mydg_area_y}:
  979. send loop-player title "&7[&e成功清空怪物&7]" with subtitle "" for 1 seconds
  980. increase {_波數} by 1
  981. clear {_怪物::*}
  982. reduce {_剩餘時間} by 1
  983. set {_怪物::*} to skutil yaml nodes "副本怪物.%{_波數}%" from file "plugins/mythicdg/%arg-2%.yml"
  984. if {_怪物::*} is set:
  985. clear {_checkplayer::*}
  986. loop all players:
  987. if loop-player is within {副本名::%arg-2%::mydg_area_x} to {副本名::%arg-2%::mydg_area_y}:
  988. send loop-player title "&e10秒後將有下一波" with subtitle "" for 1 seconds
  989. add loop-player to {_checkplayer::*}
  990. wait 5 second
  991. loop all players:
  992. if loop-player is within {副本名::%arg-2%::mydg_area_x} to {副本名::%arg-2%::mydg_area_y}:
  993. send loop-player title "&a&l5" with subtitle "" for 1 seconds
  994. play sound "BLOCK_NOTE_PLING" to loop-player with volume 10 and pitch 3
  995. wait 1 second
  996. loop all players:
  997. if loop-player is within {副本名::%arg-2%::mydg_area_x} to {副本名::%arg-2%::mydg_area_y}:
  998. send loop-player title "&a&l4" with subtitle "" for 1 seconds
  999. play sound "BLOCK_NOTE_PLING" to loop-player with volume 10 and pitch 4
  1000. wait 1 second
  1001. loop all players:
  1002. if loop-player is within {副本名::%arg-2%::mydg_area_x} to {副本名::%arg-2%::mydg_area_y}:
  1003. send loop-player title "&a&l3" with subtitle "" for 1 seconds
  1004. play sound "BLOCK_NOTE_PLING" to loop-player with volume 10 and pitch 5
  1005. wait 1 second
  1006. loop all players:
  1007. if loop-player is within {副本名::%arg-2%::mydg_area_x} to {副本名::%arg-2%::mydg_area_y}:
  1008. send loop-player title "&a&l2" with subtitle "" for 1 seconds
  1009. play sound "BLOCK_NOTE_PLING" to loop-player with volume 10 and pitch 6
  1010. wait 1 second
  1011. loop all players:
  1012. if loop-player is within {副本名::%arg-2%::mydg_area_x} to {副本名::%arg-2%::mydg_area_y}:
  1013. send loop-player title "&a&l1" with subtitle "" for 1 seconds
  1014. play sound "BLOCK_NOTE_PLING" to loop-player with volume 10 and pitch 7
  1015. wait 1 second
  1016. loop all players:
  1017. if loop-player is within {副本名::%arg-2%::mydg_area_x} to {副本名::%arg-2%::mydg_area_y}:
  1018. send loop-player title "&e下一波攻擊開始" with subtitle "" for 1 seconds
  1019. play sound "ENTITY_ENDERDRAGON_FIREBALL_EXPLODE" to loop-player with volume 20 and pitch 1
  1020. clear {_checkok}
  1021. loop all players:
  1022. if loop-player is within {副本名::%arg-2%::mydg_area_x} to {副本名::%arg-2%::mydg_area_y}:
  1023. if "%{_checkplayer::*}%" contains "%loop-player%":
  1024. set {_checkok} to 1
  1025. if {_checkok} isn't set:
  1026. stop loop
  1027. run {_mydgtp} command "/mydg start2 %arg-2% %{_波數}%" as op
  1028. clear {_cmd::*}
  1029. set {_cmd::*} to skutil yaml list "副本怪物.波數.%{_波數} - 1%" from file "plugins/mythicdg/%arg-2%.yml"
  1030. if {_cmd::*} is set:
  1031. loop {_cmd::*}:
  1032. loop all players:
  1033. if loop-player is within {副本名::%arg-2%::mydg_area_x} to {副本名::%arg-2%::mydg_area_y}:
  1034. set {_cmd.%loop-player%} to "%loop-value-2%"
  1035. replace all "<player>" with "%loop-player%" in {_cmd.%loop-player%}
  1036. execute console command "%{_cmd.%loop-player%}%"
  1037. clear {_no}
  1038. else:
  1039. clear {_no}
  1040. set {_yes.ok} to 1
  1041. set {_cmd::*} to skutil yaml list "副本怪物.波數.%{_波數} - 1%" from file "plugins/mythicdg/%arg-2%.yml"
  1042. if {_cmd::*} is set:
  1043. loop {_cmd::*}:
  1044. loop all players:
  1045. if loop-player is within {副本名::%arg-2%::mydg_area_x} to {副本名::%arg-2%::mydg_area_y}:
  1046. set {_cmd.%loop-player%} to "%loop-value-2%"
  1047. replace all "<player>" with "%loop-player%" in {_cmd.%loop-player%}
  1048. execute console command "%{_cmd.%loop-player%}%"
  1049. else:
  1050. clear {_checkok}
  1051. loop all players:
  1052. if loop-player is within {副本名::%arg-2%::mydg_area_x} to {副本名::%arg-2%::mydg_area_y}:
  1053. if "%{_checkplayer::*}%" contains "%loop-player%":
  1054. set {_checkok} to 1
  1055. if {_checkok} isn't set:
  1056. stop loop
  1057. increase {_時間} by 1
  1058. reduce {_剩餘時間} by 1
  1059. set bossbar "%arg-2%" progress to {_剩餘時間} / {副本名::%arg-2%::player_time} * 100
  1060. if {_時間} > 5:
  1061. increase {_時間.1} by 1
  1062. if {_時間.1} > 3:
  1063. set {_時間.1} to 1
  1064. set {_訊息} to {_總訊息::%{_時間.1}%}
  1065. set {_時間} to 0
  1066. set bossbar "%arg-2%" title to "&c剩餘時間: &b%{_剩餘時間}% %{_訊息}%"
  1067. if {_剩餘時間} < {副本名::%arg-2%::player_time} * 6 / 10 :
  1068. set bossbar "%arg-2%" color to yellow
  1069. if {_剩餘時間} < {副本名::%arg-2%::player_time} * 3 / 10:
  1070. set bossbar "%arg-2%" color to red
  1071. if {_剩餘時間} is 0:
  1072. remove bossbar "%arg-2%"
  1073. loop all players:
  1074. if loop-player is within {副本名::%arg-2%::mydg_area_x} to {副本名::%arg-2%::mydg_area_y}:
  1075. execute loop-player command "/mydg quit"
  1076. stop loop
  1077. else:
  1078. send "{@tag} &c你身上無指定物品" to {_itemcheck}
  1079. execute console command "/mydg leave %arg-2% %{_itemcheck}%"
  1080. if arg-1 is "quit":
  1081. if file existance of "plugins/MithicParty/%player%.yml" is true:
  1082. set {_mydgquit} to skutil yaml value "進行中副本" from file "plugins/MithicParty/%name of player%.yml"
  1083. if {副本名::%{_mydgquit}%::rank} is "開啟":
  1084. if {_mydgquit} isn't "無":
  1085. loop all entities:
  1086. if loop-entities is within {副本名::%{_mydgquit}%::mydg_area_x} to {副本名::%{_mydgquit}%::mydg_area_y}:
  1087. if loop-entities isn't name of player or item:
  1088. set {_noclear} to 1
  1089. if {_noclear} isn't set:
  1090. set {_teamleader} to skutil yaml value "隊長" from file "plugins/MithicParty/%name of player%.yml"
  1091. set {_清除時間.check} to name of bossbar "%{_mydgquit}%"
  1092. set {_清除時間.list::*} to uncolored split "%{_清除時間.check}%" at " "
  1093. set {_時間.true} to {_清除時間.list::2} parsed as number
  1094. set {副本名::%{_mydgquit}%::player_time} to {副本名::%{_mydgquit}%::player_time} parsed as number
  1095. set {_通關時間} to {副本名::%{_mydgquit}%::player_time} - {_時間.true}
  1096. set {mydgparty.list1::*} to skutil yaml list "隊員" from file "plugins/MithicParty/%name of player%.yml"
  1097. if {_時間.true} is set:
  1098. loop {mydgparty.list1::*}:
  1099. set {_mydgplayer} to loop-value parsed as player
  1100. send "{@tag} &b成功攻略完副本,攻略時間 &a%{_通關時間}% &b秒" to {_mydgplayer}
  1101. else:
  1102. set {_ok} to 1
  1103. set {_mydgquit.rank1} to skutil yaml value "總排名.1.時間" from file "plugins/mythicdg/%{_mydgquit}%.yml"
  1104. set {_mydgquit.rank2} to skutil yaml value "總排名.2.時間" from file "plugins/mythicdg/%{_mydgquit}%.yml"
  1105. set {_mydgquit.rank3} to skutil yaml value "總排名.3.時間" from file "plugins/mythicdg/%{_mydgquit}%.yml"
  1106. set {_mydgquit.rank4} to skutil yaml value "總排名.4.時間" from file "plugins/mythicdg/%{_mydgquit}%.yml"
  1107. set {_mydgquit.rank5} to skutil yaml value "總排名.5.時間" from file "plugins/mythicdg/%{_mydgquit}%.yml"
  1108. set {_mydgquit.rank1} to {_mydgquit.rank1} parsed as number
  1109. set {_mydgquit.rank2} to {_mydgquit.rank2} parsed as number
  1110. set {_mydgquit.rank3} to {_mydgquit.rank3} parsed as number
  1111. set {_mydgquit.rank4} to {_mydgquit.rank4} parsed as number
  1112. set {_mydgquit.rank5} to {_mydgquit.rank5} parsed as number
  1113. set {mydgquit.rank1.party::*} to skutil yaml list "總排名.1.隊伍" from file "plugins/mythicdg/%{_mydgquit}%.yml"
  1114. set {mydgquit.rank2.party::*} to skutil yaml list "總排名.2.隊伍" from file "plugins/mythicdg/%{_mydgquit}%.yml"
  1115. set {mydgquit.rank3.party::*} to skutil yaml list "總排名.3.隊伍" from file "plugins/mythicdg/%{_mydgquit}%.yml"
  1116. set {mydgquit.rank4.party::*} to skutil yaml list "總排名.4.隊伍" from file "plugins/mythicdg/%{_mydgquit}%.yml"
  1117. set {mydgquit.rank5.party::*} to skutil yaml list "總排名.5.隊伍" from file "plugins/mythicdg/%{_mydgquit}%.yml"
  1118. if {_ok} isn't set:
  1119. if {_通關時間} > {_mydgquit.rank1}:
  1120. if {_通關時間} > {_mydgquit.rank2}:
  1121. if {_通關時間} > {_mydgquit.rank3}:
  1122. if {_通關時間} > {_mydgquit.rank4}:
  1123. if {_通關時間} > {_mydgquit.rank5}:
  1124. set {_ok} to 1
  1125. else:
  1126. loop all players:
  1127. play sound "ENTITY_ENDERDRAGON_GROWL" to loop-player with volume 1 and pitch 1
  1128. send "&a[&c公告&a] &f%{_teamleader}%隊伍 &a以 &b%{_通關時間}% &a秒攻略完 &f%{_mydgquit}% &a副本 &l&a是全服&1第五名&l&a最快攻略隊伍!!" to loop-player
  1129. delete skutil yaml nodes "總排名.5" from file "plugins/mythicdg/%{_mydgquit}%.yml"
  1130. mydgrank("mydgparty.list1", "%{_通關時間}%", "五", "5", "%{_mydgquit}%")
  1131. else:
  1132. loop all players:
  1133. play sound "ENTITY_ENDERDRAGON_GROWL" to loop-player with volume 1 and pitch 1
  1134. send "&a[&c公告&a] &f%{_teamleader}%隊伍 &a以 &b%{_通關時間}% &a秒攻略完 &f%{_mydgquit}% &a副本 &l&a是全服&9第四名&l&a最快攻略隊伍!!" to loop-player
  1135. delete skutil yaml nodes "總排名.4" from file "plugins/mythicdg/%{_mydgquit}%.yml"
  1136. delete skutil yaml nodes "總排名.5" from file "plugins/mythicdg/%{_mydgquit}%.yml"
  1137. mydgrank("mydgparty.list1", "%{_通關時間}%", "四", "4", "%{_mydgquit}%")
  1138. mydgrank("mydgquit.rank4.party", "%{_mydgquit.rank4}%", "五", "5", "%{_mydgquit}%")
  1139. else:
  1140. loop all players:
  1141. play sound "ENTITY_ENDERDRAGON_GROWL" to loop-player with volume 1 and pitch 1
  1142. send "&a[&c公告&a] &f%{_teamleader}%隊伍 &a以 &b%{_通關時間}% &a秒攻略完 &f%{_mydgquit}% &a副本 &l&a是全服&l&3第三名&l&a最快攻略隊伍!!" to loop-player
  1143. delete skutil yaml nodes "總排名.3" from file "plugins/mythicdg/%{_mydgquit}%.yml"
  1144. delete skutil yaml nodes "總排名.4" from file "plugins/mythicdg/%{_mydgquit}%.yml"
  1145. delete skutil yaml nodes "總排名.5" from file "plugins/mythicdg/%{_mydgquit}%.yml"
  1146. mydgrank("mydgparty.list1", "%{_通關時間}%", "三", "3", "%{_mydgquit}%")
  1147. mydgrank("mydgquit.rank3.party", "%{_mydgquit.rank3}%", "四", "4", "%{_mydgquit}%")
  1148. mydgrank("mydgquit.rank4.party", "%{_mydgquit.rank4}%", "五", "5", "%{_mydgquit}%")
  1149. else:
  1150. loop all players:
  1151. play sound "ENTITY_ENDERDRAGON_GROWL" to loop-player with volume 1 and pitch 1
  1152. send "&a[&c公告&a] &f%{_teamleader}%隊伍 &a以 &b%{_通關時間}% &a秒攻略完 &f%{_mydgquit}% &a副本 &l&e是全服&l&9第二名&l&a最快攻略隊伍!!" to loop-player
  1153. delete skutil yaml nodes "總排名.2" from file "plugins/mythicdg/%{_mydgquit}%.yml"
  1154. delete skutil yaml nodes "總排名.3" from file "plugins/mythicdg/%{_mydgquit}%.yml"
  1155. delete skutil yaml nodes "總排名.4" from file "plugins/mythicdg/%{_mydgquit}%.yml"
  1156. delete skutil yaml nodes "總排名.5" from file "plugins/mythicdg/%{_mydgquit}%.yml"
  1157. mydgrank("mydgparty.list1", "%{_通關時間}%", "二", "2", "%{_mydgquit}%")
  1158. mydgrank("mydgquit.rank2.party", "%{_mydgquit.rank2}%", "三", "3", "%{_mydgquit}%")
  1159. mydgrank("mydgquit.rank3.party", "%{_mydgquit.rank3}%", "四", "4", "%{_mydgquit}%")
  1160. mydgrank("mydgquit.rank4.party", "%{_mydgquit.rank4}%", "五", "5", "%{_mydgquit}%")
  1161. else:
  1162. loop all players:
  1163. play sound "ENTITY_ENDERDRAGON_GROWL" to loop-player with volume 1 and pitch 1
  1164. send "&a[&c公告&a] &f%{_teamleader}%隊伍 &a以 &b%{_通關時間}% &a秒攻略完 &f%{_mydgquit}% &a副本 &l&a是全服&l&6第一名&l&a最快攻略隊伍!!" to loop-player
  1165. delete skutil yaml nodes "總排名.1" from file "plugins/mythicdg/%{_mydgquit}%.yml"
  1166. delete skutil yaml nodes "總排名.2" from file "plugins/mythicdg/%{_mydgquit}%.yml"
  1167. delete skutil yaml nodes "總排名.3" from file "plugins/mythicdg/%{_mydgquit}%.yml"
  1168. delete skutil yaml nodes "總排名.4" from file "plugins/mythicdg/%{_mydgquit}%.yml"
  1169. delete skutil yaml nodes "總排名.5" from file "plugins/mythicdg/%{_mydgquit}%.yml"
  1170. mydgrank("mydgparty.list1", "%{_通關時間}%", "一", "1", "%{_mydgquit}%")
  1171. mydgrank("mydgquit.rank1.party", "%{_mydgquit.rank1}%", "二", "2", "%{_mydgquit}%")
  1172. mydgrank("mydgquit.rank2.party", "%{_mydgquit.rank2}%", "三", "3", "%{_mydgquit}%")
  1173. mydgrank("mydgquit.rank3.party", "%{_mydgquit.rank3}%", "四", "4", "%{_mydgquit}%")
  1174. mydgrank("mydgquit.rank4.party", "%{_mydgquit.rank4}%", "五", "5", "%{_mydgquit}%")
  1175. if file existance of "plugins/MithicParty/%player%.yml" is false:
  1176. set {_dgfilejoin::*} to files in "plugins/mythicdg"
  1177. loop {_dgfilejoin::*}:
  1178. set {_mydgquit} to skutil yaml value "副本名" from file "plugins/mythicdg/%loop-value%"
  1179. loop all players:
  1180. if loop-player is within {副本名::%{_mydgquit}%::mydg_area_x} to {副本名::%{_mydgquit}%::mydg_area_y}:
  1181. if loop-player is player:
  1182. add 1 to {_quit.1}
  1183. if {_quit.1} < 2:
  1184. set {_quitlist.1%{_mydgquit}%::*} to skutil yaml list "排隊中" from file "plugins/mythicdg/%{_mydgquit}%.yml"
  1185. if {_quitlist.1%{_mydgquit}%::*} is set:
  1186. remove {_quitlist.1%{_mydgquit}%::1} from skutil yaml list "排隊中" from file "plugins/mythicdg/%{_mydgquit}%.yml"
  1187. remove bossbar "%{_mydgquit}%"
  1188. teleport player to {副本名::%{_mydgquit}%::respawn}
  1189. stop loop
  1190. else:
  1191. teleport player to {副本名::%{_mydgquit}%::respawn}
  1192. stop loop
  1193. stop trigger
  1194. set {_mydgquit} to skutil yaml value "進行中副本" from file "plugins/MithicParty/%name of player%.yml"
  1195. if {_mydgquit} isn't "無":
  1196. set {_mydgline.list::*} to skutil yaml list "排隊中" from file "plugins/mythicdg/%{_mydgquit}%.yml"
  1197. set {_mydgleader} to skutil yaml value "隊長" from file "plugins/MithicParty/%name of player%.yml"
  1198. set {_mydgparty.list1::*} to skutil yaml list "隊員" from file "plugins/MithicParty/%name of player%.yml"
  1199. if {_mydgline.list::1} is {_mydgleader}:
  1200. send "{@tag} &f你離開副本了"
  1201. loop all players:
  1202. if loop-player is within {副本名::%{_mydgquit}%::mydg_area_x} to {副本名::%{_mydgquit}%::mydg_area_y}:
  1203. set {_kill} to 1
  1204. if {_kill} isn't set:
  1205. run player command "/mydg kill %{_mydgquit}%" as op
  1206. teleport player to {副本名::%{_mydgquit}%::respawn}
  1207. if {_mydgleader} is name of player:
  1208. loop all players:
  1209. if loop-player is within {副本名::%{_mydgquit}%::mydg_area_x} to {副本名::%{_mydgquit}%::mydg_area_y}:
  1210. set {_no1} to 1
  1211. if {_no1} isn't set:
  1212. remove bossbar "%{_mydgquit}%"
  1213. else:
  1214. remove player bossbar "%{_mydgquit}%"
  1215. set skutil yaml value "進行中副本" from file "plugins/MithicParty/%player%.yml" to "無"
  1216. loop {_mydgparty.list1::*}:
  1217. set {_mydgcheckplayer} to loop-value parsed as player
  1218. if {_mydgcheckplayer} is within {副本名::%{_mydgquit}%::mydg_area_x} to {副本名::%{_mydgquit}%::mydg_area_y}:
  1219. if {_mydgcheckplayer} isn't name of player:
  1220. set {_no} to 1
  1221. if {_no} isn't set:
  1222. remove name of player from skutil yaml list "排隊中" from file "plugins/mythicdg/%{_mydgquit}%.yml"
  1223. set {_quit} to 1
  1224. if {_quit} is set:
  1225. set {_dgfile::*} to files in "plugins/mythicdg"
  1226. loop {_dgfile::*}:
  1227. set {_ssss} to skutil yaml value "副本名" from file "plugins/mythicdg/%loop-value%"
  1228. set {_mydgline1.%{_ssss}%list::*} to skutil yaml list "排隊中" from file "plugins/mythicdg/%{_ssss}%.yml"
  1229. clear {_mydgstop%{_ssss}%}
  1230. if {_mydgline1.%{_ssss}%list::1} is set:
  1231. loop all players:
  1232. if loop-player is within {副本名::%{_ssss}%::mydg_area_x} to {副本名::%{_ssss}%::mydg_area_y}:
  1233. set {_mydgstop%{_ssss}%} to 1
  1234. stop loop
  1235. else:
  1236. set {_mydgstop%{_ssss}%} to 1
  1237. if {_mydgstop%{_ssss}%} isn't set:
  1238. set {_副本.%{_ssss}%} to skutil yaml value "副本名" from file "plugins/mythicdg/%loop-value%"
  1239. remove bossbar "%{_副本.%{_ssss2}%}%"
  1240. execute console command "/mydg go %{_副本.%{_ssss}%}% %{_mydgline1.%{_ssss}%list::1}%"
  1241. else:
  1242. set skutil yaml value "進行中副本" from file "plugins/MithicParty/%player%.yml" to "無"
  1243. loop all players:
  1244. if loop-player is within {副本名::%{_mydgquit}%::mydg_area_x} to {副本名::%{_mydgquit}%::mydg_area_y}:
  1245. set {_no1} to 1
  1246. if {_no1} isn't set:
  1247. remove bossbar "%{_mydgquit}%"
  1248. else:
  1249. remove player bossbar "%{_mydgquit}%"
  1250. loop {_mydgparty.list1::*}:
  1251. set {_mydgcheckplayer} to loop-value parsed as player
  1252. if {_mydgcheckplayer} is within {副本名::%{_mydgquit}%::mydg_area_x} to {副本名::%{_mydgquit}%::mydg_area_y}:
  1253. set {_no3} to 1
  1254. if {_no3} isn't set:
  1255. remove {_mydgleader} from skutil yaml list "排隊中" from file "plugins/mythicdg/%{_mydgquit}%.yml"
  1256. set {_quit1} to 1
  1257. if {_quit1} is set:
  1258. set {_dgfile::*} to files in "plugins/mythicdg"
  1259. loop {_dgfile::*}:
  1260. set {_ssss2} to skutil yaml value "副本名" from file "plugins/mythicdg/%loop-value%"
  1261. set {_mydgline1.%{_ssss2}%list::*} to skutil yaml list "排隊中" from file "plugins/mythicdg/%loop-value%"
  1262. clear {_mydgstop.%{_ssss2}%}
  1263. if {_mydgline1.%{_ssss2}%list::1} is set:
  1264. loop all players:
  1265. if loop-player is within {副本名::%{_ssss2}%::mydg_area_x} to {副本名::%{_ssss2}%::mydg_area_y}:
  1266. set {_mydgstop.%{_ssss2}%} to 1
  1267. stop loop
  1268. else:
  1269. set {_mydgstop.%{_ssss2}%} to 1
  1270. if {_mydgstop.%{_ssss2}%} isn't set:
  1271. set {_副本.%{_ssss2}%} to skutil yaml value "副本名" from file "plugins/mythicdg/%loop-value%"
  1272. remove bossbar "%{_副本.%{_ssss2}%}%"
  1273. execute console command "/mydg go %{_副本.%{_ssss2}%}% %{_mydgline1.%{_ssss2}%list::1}%"
  1274. else:
  1275. send "{@tag} &c你尚未進入副本"
  1276. else:
  1277. send "{@tag} &c你尚未進入副本"
  1278. if arg-1 is "leave":
  1279. if arg-2 is set:
  1280. if arg-3 is set:
  1281. if player doesn't have permission "mydg":
  1282. send "{@tag} &c無法使用此指令"
  1283. stop trigger
  1284. loop all players:
  1285. if loop-player is arg-3:
  1286. set {_mydg.check} to 1
  1287. stop loop
  1288. if {_mydg.check} is set:
  1289. if {副本名::%arg-2%::mydg_name} = arg-2:
  1290. set {_mydg.checkdg.%arg-3%} to skutil yaml value "進行中副本" from file "plugins/MithicParty/%arg-3%.yml"
  1291. set {_mydgjoin.%arg-3%} to arg-3 parsed as player
  1292. if {_mydg.checkdg.%arg-3%} isn't "無":
  1293. remove arg-3 from skutil yaml list "排隊中" from file "plugins/mythicdg/%arg-2%.yml"
  1294. send "{@tag} &c你離開 副本:%{_mydg.checkdg.%arg-3%}% 排隊了" to {_mydgjoin.%arg-3%}
  1295. set skutil yaml value "進行中副本" from file "plugins/MithicParty/%arg-3%.yml" to "無"
  1296. set {_dgfile::*} to files in "plugins/mythicdg"
  1297. loop {_dgfile::*}:
  1298. set {_ssss1} to skutil yaml value "副本名" from file "plugins/mythicdg/%loop-value%"
  1299. set {_mydgline.%{_ssss1}%list::*} to skutil yaml list "排隊中" from file "plugins/mythicdg/%loop-value%"
  1300. if {_mydgline.%{_ssss1}%list::1} is set:
  1301. clear {_mydgstop.%{_ssss1}%}
  1302. loop all players:
  1303. if loop-player is within {副本名::%{_ssss1}%::mydg_area_x} to {副本名::%{_ssss1}%::mydg_area_y}:
  1304. set {_mydgstop.%{_ssss1}%} to 1
  1305. stop loop
  1306. else:
  1307. set {_mydgstop.%{_ssss1}%} to 1
  1308. if {_mydgstop.%{_ssss1}%} isn't set:
  1309. set {_副本.%{_ssss1}%} to skutil yaml value "副本名" from file "plugins/mythicdg/%loop-value%"
  1310. execute console command "/mydg go %{_副本.%{_ssss1}%}% %{_mydgline.%{_ssss1}%list::1}%"
  1311. else:
  1312. send "{@tag} &c你尚未排隊其它副本了" to {_mydgjoin.%arg-3%}
  1313. else:
  1314. send "{@tag} {@error3}"
  1315. send "{@tag} &c請確認副本名是否有打錯"
  1316. else:
  1317. send "{@tag} &c此人尚未在線上"
  1318. if arg-1 is "info":
  1319. if arg-2 is set:
  1320. if {副本名::%arg-2%::mydg_name} = arg-2:
  1321. open chest with 6 row named "&d副本介面" to player
  1322. set {_mydgline.%name of player%.list::*} to skutil yaml list "排隊中" from file "plugins/mythicdg/%arg-2%.yml"
  1323. set {_mydglinenumber.%name of player%} to 0 #排隊人數
  1324. set {_mydglinenumber1.%name of player%} to 8 #隊長頭顱放置slot點
  1325. loop {_mydgline.%name of player%.list::*}:
  1326. increase {_mydglinenumber.%name of player%} by 1
  1327. increase {_mydglinenumber1.%name of player%} by 1
  1328. set {_mydglineguiname.%name of player%.%{_mydglinenumber.%name of player%}%} to loop-value parsed as offlineplayer #隊長名
  1329. set {_mydglinegui.%name of player%.%{_mydglinenumber.%name of player%}%} to skull of {_mydglineguiname.%name of player%.%{_mydglinenumber.%name of player%}%} named "&b排隊中&e%loop-value%"
  1330. if {_mydglinenumber1.%name of player%} = 9:
  1331. set {_mydglinegui.%name of player%.%{_mydglinenumber.%name of player%}%} to skull of {_mydglineguiname.%name of player%.%{_mydglinenumber.%name of player%}%} named "&b攻略中&e%loop-value%"
  1332. make gui slot {_mydglinenumber1.%name of player%} of player with {_mydglinegui.%name of player%.%{_mydglinenumber.%name of player%}%}
  1333. set {_mydglinenumber1.%name of player%} to -1
  1334. loop 9 times:
  1335. increase {_mydglinenumber1.%name of player%} by 1
  1336. set {_mydglineguipane.%name of player%.%{_mypartycreatenumber1.%name of player%}%} to green stained glass pane named ""
  1337. make gui slot {_mydglinenumber1.%name of player%} of player with {_mydglineguipane.%name of player%.%{_mypartycreatenumber1.%name of player%}%}
  1338. if {副本名::%arg-2%::rank} is "開啟":
  1339. set {_mydg.rank1::*} to skutil yaml list "總排名.1.隊伍" from file "plugins/mythicdg/%arg-2%.yml"
  1340. set {_mydg.rank2::*} to skutil yaml list "總排名.2.隊伍" from file "plugins/mythicdg/%arg-2%.yml"
  1341. set {_mydg.rank3::*} to skutil yaml list "總排名.3.隊伍" from file "plugins/mythicdg/%arg-2%.yml"
  1342. set {_mydg.rank4::*} to skutil yaml list "總排名.4.隊伍" from file "plugins/mythicdg/%arg-2%.yml"
  1343. set {_mydg.rank5::*} to skutil yaml list "總排名.5.隊伍" from file "plugins/mythicdg/%arg-2%.yml"
  1344. set {_mydg.rank1fact} to skutil yaml value "總排名.1.真實排名" from file "plugins/mythicdg/%arg-2%.yml"
  1345. set {_mydg.rank2fact} to skutil yaml value "總排名.2.真實排名" from file "plugins/mythicdg/%arg-2%.yml"
  1346. set {_mydg.rank3fact} to skutil yaml value "總排名.3.真實排名" from file "plugins/mythicdg/%arg-2%.yml"
  1347. set {_mydg.rank4fact} to skutil yaml value "總排名.4.真實排名" from file "plugins/mythicdg/%arg-2%.yml"
  1348. set {_mydg.rank5fact} to skutil yaml value "總排名.5.真實排名" from file "plugins/mythicdg/%arg-2%.yml"
  1349. set {_mydg.rank1time} to skutil yaml value "總排名.1.時間" from file "plugins/mythicdg/%arg-2%.yml"
  1350. set {_mydg.rank2time} to skutil yaml value "總排名.2.時間" from file "plugins/mythicdg/%arg-2%.yml"
  1351. set {_mydg.rank3time} to skutil yaml value "總排名.3.時間" from file "plugins/mythicdg/%arg-2%.yml"
  1352. set {_mydg.rank4time} to skutil yaml value "總排名.4.時間" from file "plugins/mythicdg/%arg-2%.yml"
  1353. set {_mydg.rank5time} to skutil yaml value "總排名.5.時間" from file "plugins/mythicdg/%arg-2%.yml"
  1354. set {_mydg.rank1time} to {_mydg.rank1time} parsed as number
  1355. set {_mydg.rank2time} to {_mydg.rank2time} parsed as number
  1356. set {_mydg.rank3time} to {_mydg.rank3time} parsed as number
  1357. set {_mydg.rank4time} to {_mydg.rank4time} parsed as number
  1358. set {_mydg.rank5time} to {_mydg.rank5time} parsed as number
  1359. set {_mydg.ranktext} to gold block named "&e最快攻略副本排名"
  1360. make gui slot 1 of player with {_mydg.ranktext}
  1361. make gui slot 7 of player with {_mydg.ranktext}
  1362. set {_mydg.rank1.leader} to {_mydg.rank1::1} parsed as offlineplayer
  1363. set {_mydg.rank1.slot} to skull of {_mydg.rank1.leader} named "&6第%{_mydg.rank1fact}%名 &b%{_mydg.rank1time}% &a秒"
  1364. set {_counter} to 0
  1365. loop {_mydg.rank1::*}:
  1366. increase {_counter} by 1
  1367. set line {_counter} of lore of {_mydg.rank1.slot} to "&b%loop-value%"
  1368. make gui slot 2 of player with {_mydg.rank1.slot}
  1369. set {_mydg.rank2.leader} to {_mydg.rank2::1} parsed as offlineplayer
  1370. set {_mydg.rank2.slot} to skull of {_mydg.rank2.leader} named "&6第%{_mydg.rank2fact}%名 &b%{_mydg.rank2time}% &a秒"
  1371. set {_counter} to 0
  1372. loop {_mydg.rank2::*}:
  1373. increase {_counter} by 1
  1374. set line {_counter} of lore of {_mydg.rank2.slot} to "&b%loop-value%"
  1375. make gui slot 3 of player with {_mydg.rank2.slot}
  1376. set {_mydg.rank3.leader} to {_mydg.rank3::1} parsed as offlineplayer
  1377. set {_mydg.rank3.slot} to skull of {_mydg.rank3.leader} named "&6第%{_mydg.rank3fact}%名 &b%{_mydg.rank3time}% &a秒"
  1378. set {_counter} to 0
  1379. loop {_mydg.rank3::*}:
  1380. increase {_counter} by 1
  1381. set line {_counter} of lore of {_mydg.rank3.slot} to "&b%loop-value%"
  1382. make gui slot 4 of player with {_mydg.rank3.slot}
  1383. set {_mydg.rank4.leader} to {_mydg.rank4::1} parsed as offlineplayer
  1384. set {_mydg.rank4.slot} to skull of {_mydg.rank4.leader} named "&6第%{_mydg.rank4fact}%名 &b%{_mydg.rank4time}% &a秒"
  1385. set {_counter} to 0
  1386. loop {_mydg.rank4::*}:
  1387. increase {_counter} by 1
  1388. set line {_counter} of lore of {_mydg.rank4.slot} to "&b%loop-value%"
  1389. make gui slot 5 of player with {_mydg.rank4.slot}
  1390. set {_mydg.rank5.leader} to {_mydg.rank5::1} parsed as offlineplayer
  1391. set {_mydg.rank5.slot} to skull of {_mydg.rank5.leader} named "&6第%{_mydg.rank5fact}%名 &b%{_mydg.rank5time}% &a秒"
  1392. set {_counter} to 0
  1393. loop {_mydg.rank5::*}:
  1394. increase {_counter} by 1
  1395. set line {_counter} of lore of {_mydg.rank5.slot} to "&b%loop-value%"
  1396. make gui slot 6 of player with {_mydg.rank5.slot}
  1397. else:
  1398. send "{@tag} {@error3}"
  1399. send "{@tag} &c請確認副本名是否有打錯"
  1400. else:
  1401. send "{@tag} {@error1}"
  1402. send "{@tag} &c/mydg info <副本名>"
  1403. if arg-1 is "areax":
  1404. if arg-2 is set:
  1405. if player doesn't have permission "mydg":
  1406. send "{@tag} &c無法使用此指令"
  1407. stop trigger
  1408. if {副本名::%arg-2%::mydg_name} = arg-2:
  1409. send "{@tag} {@error2}"
  1410. send "{@tag} &c請確認副本名是否有打錯"
  1411. stop trigger
  1412. else if {mydg_stage} is 0:
  1413. send "{@tag} {@error0}"
  1414. send "{@tag} &c請繼續使用/mydg areay <副本名>"
  1415. stop trigger
  1416. else if {mydg_stage} isn't set:
  1417. set {副本名::%arg-2%::mydg_area_x} to location of location of player
  1418. send "{@tag} &f已設置此區域頂點"
  1419. send "{@tag} &c請在120秒內使用/mydg areay <副本名>設置區域的對角線"
  1420. set {mydg_stage} to 0
  1421. wait 120 second
  1422. if {mydg_stage} = 0:
  1423. clear {mydg_stage}
  1424. clear {副本名::%arg-2%::mydg_area_x}
  1425. send "{@tag} &c已取消區域設置"
  1426. else:
  1427. send "{@tag} {@error1}"
  1428. send "{@tag} &c請使用/mydg areax <副本名>"
  1429. stop trigger
  1430. if arg-1 is "areay":
  1431. if arg-2 is set:
  1432. if player doesn't have permission "mydg":
  1433. send "{@tag} &c無法使用此指令"
  1434. stop trigger
  1435. if {mydg_stage} = 0:
  1436. if {副本名::%arg-2%::mydg_area_x} isn't set:
  1437. send "{@tag} {@error3}"
  1438. send "{@tag} &c請確認副本名是否有打錯"
  1439. stop trigger
  1440. if {副本名::%arg-2%::mydg_area_y} is set:
  1441. send "{@tag} {@error2}"
  1442. send "{@tag} &c請確認副本名是否有打錯"
  1443. stop trigger
  1444. set {副本名::%arg-2%::mydg_area_y} to location of player
  1445. set {副本名::%arg-2%::player_spawn} to location of player
  1446. set {副本名::%arg-2%::player_time} to 600
  1447. set {副本名::%arg-2%::mydg_name} to arg-2
  1448. set {副本名::%arg-2%::lv} to 0
  1449. set {副本名::%arg-2%::lvh} to 100
  1450. set {副本名::%arg-2%::item} to "無"
  1451. set {副本名::%arg-2%::respawn} to location of player
  1452. set {副本名::%arg-2%::party} to 2
  1453. set {副本名::%arg-2%::partyh} to 6
  1454. set {副本名::%arg-2%::mode} to "一般放怪"
  1455. set {副本名::%arg-2%::rank} to "關閉"
  1456. clear {mydg_stage}
  1457. send "{@tag} &f已設置此區域頂點"
  1458. send "{@tag} &f預設此地為玩家重生點"
  1459. send "{@tag} &f預設時間為600秒"
  1460. send "{@tag} &f預設副本需求等級為0"
  1461. send "{@tag} &f預設副本最高需求等級為100"
  1462. send "{@tag} &f預設副本物品需求為無"
  1463. send "{@tag} &f預設此地為玩家離開重生點"
  1464. send "{@tag} &f預設副本隊伍人數上限為6"
  1465. send "{@tag} &f預設副本隊伍人數下限為2"
  1466. send "{@tag} &f預設排名為關閉"
  1467. send "{@tag} &f預設模式為1"
  1468. if file existance of "plugins/mythicdg/%arg-2%.yml" is false:
  1469. create file "plugins/mythicdg/%arg-2%.yml"
  1470. set "副本名" to "%{副本名::%arg-2%::mydg_name}%" in yaml file "plugins/mythicdg/%arg-2%.yml"
  1471. set "副本頂點x" to "%{副本名::%arg-2%::mydg_area_x}%" in yaml file "plugins/mythicdg/%arg-2%.yml"
  1472. set "副本頂點y" to "%{副本名::%arg-2%::mydg_area_y}%" in yaml file "plugins/mythicdg/%arg-2%.yml"
  1473. set "副本重生點" to "%{副本名::%arg-2%::player_spawn}%" in yaml file "plugins/mythicdg/%arg-2%.yml"
  1474. set "副本時間" to "%{副本名::%arg-2%::player_time}%" in yaml file "plugins/mythicdg/%arg-2%.yml"
  1475. set "副本需求等級" to "%{副本名::%arg-2%::lv}%" in yaml file "plugins/mythicdg/%arg-2%.yml"
  1476. set "副本最高需求等級" to "%{副本名::%arg-2%::lvh}%" in yaml file "plugins/mythicdg/%arg-2%.yml"
  1477. set "副本需求物品" to "%{副本名::%arg-2%::item}%" in yaml file "plugins/mythicdg/%arg-2%.yml"
  1478. set "重生地點" to "%{副本名::%arg-2%::respawn}%" in yaml file "plugins/mythicdg/%arg-2%.yml"
  1479. set "隊伍人數下限" to "%{副本名::%arg-2%::party}%" in yaml file "plugins/mythicdg/%arg-2%.yml"
  1480. set "隊伍人數上限" to "%{副本名::%arg-2%::partyh}%" in yaml file "plugins/mythicdg/%arg-2%.yml"
  1481. set "排名" to "%{副本名::%arg-2%::rank}%" in yaml file "plugins/mythicdg/%arg-2%.yml"
  1482. set "模式" to "%{副本名::%arg-2%::mode}%" in yaml file "plugins/mythicdg/%arg-2%.yml"
  1483. set "副本保護對象" to "無" in yaml file "plugins/mythicdg/%arg-2%.yml"
  1484. else:
  1485. send "{@tag} {@error0}"
  1486. send "請先設定/mydg areax <副本名>"
  1487. stop trigger
  1488. else:
  1489. send "{@tag} {@error1}"
  1490. send "{@tag} &c請使用/mydg areay <副本名>"
  1491. stop trigger
  1492. if arg-1 is "spawn":
  1493. if arg-2 is set:
  1494. if player doesn't have permission "mydg":
  1495. send "{@tag} &c無法使用此指令"
  1496. stop trigger
  1497. if {副本名::%arg-2%::mydg_name} isn't set:
  1498. send "{@tag} {@error4}"
  1499. send "{@tag} &c請確認副本名是否有打錯"
  1500. else:
  1501. set {副本名::%arg-2%::player_spawn} to location of location of player
  1502. set "副本重生點" to "%{副本名::%arg-2%::player_spawn}%" in yaml file "plugins/mythicdg/%arg-2%.yml"
  1503. send "{@tag} &f已設定%arg-2%出生點"
  1504. else:
  1505. send "{@tag} {@error1}"
  1506. send "{@tag} &c請使用/mydg spawn <副本名> <時間(整數)>"
  1507. stop trigger
  1508. if arg-1 is "time":
  1509. if arg-2 is set:
  1510. if arg-3 is set:
  1511. if player doesn't have permission "mydg":
  1512. send "{@tag} &c無法使用此指令"
  1513. stop trigger
  1514. if {副本名::%arg-2%::mydg_name} isn't set:
  1515. send "{@tag} {@error4}"
  1516. send "{@tag} &c請確認副本名是否有打錯"
  1517. stop trigger
  1518. else:
  1519. if arg-3 parsed as integer > 0:
  1520. set {副本名::%arg-2%::player_time} to arg-3 parsed as integer
  1521. set "副本時間" to "%{副本名::%arg-2%::player_time}%" in yaml file "plugins/mythicdg/%arg-2%.yml"
  1522. send "{@tag} &f已設定%{副本名::%arg-2%::player_time}%秒為副本攻略時間"
  1523. else:
  1524. send "{@tag} {@error5}"
  1525. send "{@tag} 時間不可為負數或小數喔"
  1526. stop trigger
  1527. else:
  1528. send "{@tag} {@error1}"
  1529. send "{@tag} &c請使用/mydg time <副本名> <時間(整數)>"
  1530. stop trigger
  1531. else:
  1532. send "{@tag} {@error1}"
  1533. send "{@tag} &c請使用/mydg time <副本名> <時間(整數)>"
  1534. stop trigger
  1535. if arg-1 is "delete":
  1536. if arg-2 is "dg":
  1537. if arg-3 is set:
  1538. if player doesn't have permission "mydg":
  1539. send "{@tag} &c無法使用此指令"
  1540. stop trigger
  1541. if {副本名::%arg-3%::mydg_name} isn't set:
  1542. send "{@tag} {@error4}"
  1543. send "{@tag} &c請確認副本名是否有打錯"
  1544. stop trigger
  1545. else:
  1546. send "{@tag} &f已刪除此副本"
  1547. delete file "plugins/mythicdg/%arg-3%.yml"
  1548. clear {副本名::%arg-3%::*}
  1549. else:
  1550. send "{@tag} {@error1}"
  1551. send "{@tag} &c請使用/mydg delete <dg> <副本名>"
  1552. stop trigger
  1553. if arg-2 is "mob":
  1554. if arg-3 is set:
  1555. if arg-4 is set:
  1556. if player doesn't have permission "mydg":
  1557. send "{@tag} &c無法使用此指令"
  1558. stop trigger
  1559. if {副本名::%arg-3%::mydg_name} isn't set:
  1560. send "{@tag} {@error4}"
  1561. send "{@tag} &c請確認副本名是否有打錯"
  1562. stop trigger
  1563. if {副本名::%arg-3%::mode} isn't "一般放怪":
  1564. send "{@tag} &c此指令只限制一般放怪"
  1565. stop trigger
  1566. else:
  1567. set {_mydg.mode} to skutil yaml value "模式" from file "plugins/mythicdg/%arg-3%.yml"
  1568. if {_mydg.mode} isn't "一般放怪":
  1569. send "{@tag} &c此指令是給一般模式下使用"
  1570. send "{@tag} &c此副本模式為 %{_mydg.mode}%"
  1571. stop trigger
  1572. if {副本名::%arg-3%::mydg_name} is set:
  1573. set {_nodesmob.delete::*} to skutil yaml nodes with keys "副本怪物" from file "plugins/mythicdg/%arg-3%.yml"
  1574. loop {_nodesmob.delete::*}:
  1575. if loop-value is arg-4:
  1576. set {_mydg.check} to 1
  1577. delete skutil yaml nodes "副本怪物.%arg-4%" from file "plugins/mythicdg/%arg-3%.yml"
  1578. if {_mydg.check} is set:
  1579. send "{@tag} &f已刪除 副本:%arg-3% 怪物編號:%arg-4%"
  1580. else:
  1581. send "{@tag} &c請確認怪物編號是否有打錯"
  1582. stop trigger
  1583. else:
  1584. send "{@tag} {@error1}"
  1585. send "{@tag} &c請使用/mydg delete <mob> <副本名> <怪物編號>"
  1586. stop trigger
  1587. else:
  1588. send "{@tag} {@error1}"
  1589. send "{@tag} &c請使用/mydg delete <mob> <副本名> <怪物編號>"
  1590. stop trigger
  1591. if arg-2 is "mob2":
  1592. if arg-3 is set:
  1593. if arg-4 is set:
  1594. if arg-5 is set:
  1595. if player doesn't have permission "mydg":
  1596. send "{@tag} &c無法使用此指令"
  1597. stop trigger
  1598. if {副本名::%arg-3%::mydg_name} isn't set:
  1599. send "{@tag} {@error4}"
  1600. send "{@tag} &c請確認副本名是否有打錯"
  1601. stop trigger
  1602. if {副本名::%arg-3%::mode} isn't "波數放怪":
  1603. send "{@tag} &c此指令只限制波數放怪"
  1604. stop trigger
  1605. set {_nodesmob.delete::*} to skutil yaml nodes "副本怪物.%arg-5%.%arg-4%" from file "plugins/mythicdg/%arg-3%.yml"
  1606. if {_nodesmob.delete::1} is set:
  1607. delete skutil yaml nodes "副本怪物.%arg-5%.%arg-4%" from file "plugins/mythicdg/%arg-3%.yml"
  1608. send "{@tag} &f已刪除 副本:%arg-3% 怪物編號:%arg-4% 波數:%arg-5% 怪物名: %{_nodesmob.delete::1}%"
  1609. else:
  1610. send "{@tag} &c無此怪物"
  1611. else:
  1612. send "{@tag} {@error1}"
  1613. send "{@tag} &c請使用/mydg delete <mob2> <副本名> <怪物編號> <波數>"
  1614. else:
  1615. send "{@tag} {@error1}"
  1616. send "{@tag} &c請使用/mydg delete <mob2> <副本名> <怪物編號> <波數>"
  1617. else:
  1618. send "{@tag} {@error1}"
  1619. send "{@tag} &c請使用/mydg delete <mob2> <副本名> <怪物編號> <波數>"
  1620. if arg-2 is "cmd":
  1621. if arg-3 is set:
  1622. if arg-4 is set:
  1623. if arg-5 is set:
  1624. if player doesn't have permission "mydg":
  1625. send "{@tag} &c無法使用此指令"
  1626. stop trigger
  1627. if {副本名::%arg-3%::mydg_name} isn't set:
  1628. send "{@tag} {@error4}"
  1629. send "{@tag} &c請確認副本名是否有打錯"
  1630. stop trigger
  1631. if {副本名::%arg-3%::mode} isn't "波數放怪":
  1632. send "{@tag} &c此指令只限制波數放怪"
  1633. stop trigger
  1634. set {_nodesmob.delete::*} to skutil yaml list "副本怪物.波數.%arg-4%" from file "plugins/mythicdg/%arg-3%.yml"
  1635. if {_nodesmob.delete::1} is set:
  1636. remove arg-5 from skutil yaml list "副本怪物.波數.%arg-4%" from file "plugins/mythicdg/%arg-3%.yml"
  1637. send "{@tag} &f已刪除 副本:%arg-3% 指令名:%arg-5% 波數:%arg-4%"
  1638. else:
  1639. send "{@tag} {@error1}"
  1640. send "{@tag} &c請使用/mydg delete <cmd> <副本名> <波數> <指令>"
  1641. else:
  1642. send "{@tag} {@error1}"
  1643. send "{@tag} &c請使用/mydg delete <cmd> <副本名> <波數> <指令>"
  1644. else:
  1645. send "{@tag} {@error1}"
  1646. send "{@tag} &c請使用/mydg delete <cmd> <副本名> <波數> <指令>"
  1647. else:
  1648. if arg-2 isn't set:
  1649. send "{@tag} {@error1}"
  1650. send "{@tag} &c請使用/mydg delete <dg> <副本名>"
  1651. send "{@tag} &c請使用/mydg delete <mob> <副本名> <怪物編號>"
  1652. send "{@tag} &c請使用/mydg delete <mob2> <副本名> <怪物編號> <波數>"
  1653. send "{@tag} &c請使用/mydg delete <cmd> <副本名> <波數> <指令>"
  1654. stop trigger
  1655. if arg-1 is "tp":
  1656. if arg-2 is set:
  1657. if player doesn't have permission "mydg":
  1658. send "{@tag} &c無法使用此指令"
  1659. stop trigger
  1660. if {副本名::%arg-2%::mydg_name} isn't set:
  1661. send "{@tag} {@error4}"
  1662. send "{@tag} &c請確認副本名是否有打錯"
  1663. stop trigger
  1664. else:
  1665. if arg-3 is "areax":
  1666. send "{@tag} &f正在傳送中"
  1667. teleport player to {副本名::%arg-2%::mydg_area_x}
  1668. else if arg-3 is "areay":
  1669. send "{@tag} &f正在傳送中"
  1670. teleport player to {副本名::%arg-2%::mydg_area_y}
  1671. else if arg-3 is "spawn":
  1672. send "{@tag} &f正在傳送中"
  1673. teleport player to {副本名::%arg-2%::player_spawn}
  1674. else if arg-3 is "mob":
  1675. if arg-4 is set:
  1676. if {副本名::%arg-2%::mode} isn't "一般放怪":
  1677. send "{@tag} &c此指令限制一般放怪"
  1678. stop trigger
  1679. set {_mobtp::*} to skutil yaml nodes "副本怪物.%arg-4%" from file "plugins/mythicdg/%arg-2%.yml"
  1680. if {_mobtp::*} is set:
  1681. set {_mobtploc} to skutil yaml value "副本怪物.%arg-4%.%{_mobtp::1}%" from file "plugins/mythicdg/%arg-2%.yml"
  1682. set {_mobtploc} to location of mydgLoc("%{_mobtploc}%", player's world)
  1683. teleport player to {_mobtploc}
  1684. send "{@tag} &f正在傳送中"
  1685. send "{@tag} &f怪物編號: %arg-4% 怪物名: %{_mobtp::1}%"
  1686. else:
  1687. send "{@tag} &c查無此怪物編號"
  1688. else:
  1689. send "{@tag} {@error1}"
  1690. send "{@tag} &c請使用/mydg mob <副本名> mob <編號>"
  1691. else if arg-3 is "mob2":
  1692. if arg-4 is set:
  1693. if arg-5 is set:
  1694. if {副本名::%arg-2%::mode} isn't "波數放怪":
  1695. send "{@tag} &c此指令限制波數放怪"
  1696. stop trigger
  1697. set {_mobtp::*} to skutil yaml nodes "副本怪物.%arg-5%.%arg-4%" from file "plugins/mythicdg/%arg-2%.yml"
  1698. if {_mobtp::*} is set:
  1699. set {_mobloc} to skutil yaml value "副本怪物.%arg-5%.%arg-4%.%{_mobtp::1}%" from file "plugins/mythicdg/%arg-2%.yml"
  1700. set {_mobtploc} to location of mydgLoc("%{_mobloc}%", player's world)
  1701. teleport player to {_mobtploc}
  1702. send "{@tag} &f正在傳送中"
  1703. send "{@tag} &f波數: %arg-5% 怪物編號: %arg-4% 怪物名: %{_mobtp::1}%"
  1704. else:
  1705. send "{@tag} &c查無此怪物編號"
  1706. else:
  1707. send "{@tag} {@error1}"
  1708. send "{@tag} &c請使用/mydg tp <副本名> mob2 <編號> <波數>"
  1709. else:
  1710. send "{@tag} {@error1}"
  1711. send "{@tag} &c請使用/mydg tp <副本名> mob2 <編號> <波數>"
  1712. else:
  1713. send "{@tag} {@error1}"
  1714. send "{@tag} &c請使用/mydg tp <副本名> <areax/areay/spawn/mob/mob2>"
  1715. else:
  1716. send "{@tag} {@error1}"
  1717. send "{@tag} &c請使用/mydg tp <副本名> <areax/areay/spawn/mob>"
  1718. if arg-1 is "mob":
  1719. if arg-2 is set:
  1720. if arg-3 is set:
  1721. if player doesn't have permission "mydg":
  1722. send "{@tag} &c無法使用此指令"
  1723. stop trigger
  1724. if {副本名::%arg-2%::mydg_name} isn't set:
  1725. send "{@tag} {@error4}"
  1726. send "{@tag} &c請確認副本名是否有打錯"
  1727. stop trigger
  1728. if {副本名::%arg-2%::mode} isn't "一般放怪":
  1729. send "{@tag} &c此指令限制一般放怪模式"
  1730. stop trigger
  1731. else:
  1732. if {副本名::%arg-2%::mydg_mob_number} isn't set:
  1733. set {副本名::%arg-2%::mydg_mob_number} to 0
  1734. increase {副本名::%arg-2%::mydg_mob_number} by 1
  1735. set {_副本名怪物地點} to location of player
  1736. set skutil yaml value "副本怪物.%{副本名::%arg-2%::mydg_mob_number}%.%arg-3%" from file "plugins/mythicdg/%arg-2%.yml" to "%{_副本名怪物地點}%"
  1737. send "{@tag} &f已設置 副本名: %arg-2% 怪物名: %arg-3% 怪物編號: %{副本名::%arg-2%::mydg_mob_number}%"
  1738. else:
  1739. send "{@tag} {@error1}"
  1740. send "{@tag} &c請使用/mydg mob <副本名> <怪物名>"
  1741. else:
  1742. send "{@tag} {@error1}"
  1743. send "{@tag} &c請使用/mydg mob <副本名> <怪物名>"
  1744. if arg-1 is "cmd":
  1745. if arg-2 is "text":
  1746. if arg-3 is set:
  1747. if arg-4 is set:
  1748. if arg-5 is set:
  1749. if player doesn't have permission "mydg":
  1750. send "{@tag} &c無法使用此指令"
  1751. stop trigger
  1752. if {副本名::%arg-3%::mydg_name} isn't set:
  1753. send "{@tag} {@error4}"
  1754. send "{@tag} &c請確認副本名是否有打錯"
  1755. stop trigger
  1756. if {副本名::%arg-3%::mode} isn't "波數放怪":
  1757. send "{@tag} &c此指令限制波數放怪"
  1758. stop trigger
  1759. else:
  1760. add "%arg-5%" to {副本名::%arg-3%::%arg-4%::cmd::*}
  1761. send "{@tag} &f已添加 副本名: %arg-3% 指令: %arg-5% 波數: %arg-4%"
  1762. add "%arg-5%" to skutil yaml list "副本怪物.波數.%arg-4%" from file "plugins/mythicdg/%arg-3%.yml"
  1763. else:
  1764. send "{@tag} {@error1}"
  1765. send "{@tag} &c請使用/mydg cmd text <副本名> <波數> <指令>"
  1766. else:
  1767. send "{@tag} {@error1}"
  1768. send "{@tag} &c請使用/mydg cmd text <副本名> <波數> <指令>"
  1769. else:
  1770. send "{@tag} {@error1}"
  1771. send "{@tag} &c請使用/mydg cmd text <副本名> <波數> <指令>"
  1772. else:
  1773. send "{@tag} {@error1}"
  1774. send "{@tag} &c請使用/mydg cmd text <副本名> <波數> <指令>"
  1775. if arg-1 is "mob2":
  1776. if arg-2 is set:
  1777. if arg-3 is set:
  1778. if arg-4 is set:
  1779. if player doesn't have permission "mydg":
  1780. send "{@tag} &c無法使用此指令"
  1781. stop trigger
  1782. if {副本名::%arg-2%::mydg_name} isn't set:
  1783. send "{@tag} {@error4}"
  1784. send "{@tag} &c請確認副本名是否有打錯"
  1785. stop trigger
  1786. if {副本名::%arg-2%::mode} isn't "波數放怪":
  1787. send "{@tag} &c此指令限制一般波數放怪"
  1788. stop trigger
  1789. else:
  1790. if {副本名::%arg-2%::%arg-4%::mydg_mob_number} isn't set:
  1791. set {副本名::%arg-2%::%arg-4%::mydg_mob_number} to 0
  1792. increase {副本名::%arg-2%::%arg-4%::mydg_mob_number} by 1
  1793. set {_副本名怪物地點} to location of player
  1794. set skutil yaml value "副本怪物.%arg-4%.%{副本名::%arg-2%::%arg-4%::mydg_mob_number}%.%arg-3%" from file "plugins/mythicdg/%arg-2%.yml" to "%{_副本名怪物地點}%"
  1795. send "{@tag} &f已設置 副本名: %arg-2% 怪物名: %arg-3% 怪物編號: %{副本名::%arg-2%::%arg-4%::mydg_mob_number} % 波數: %arg-4%"
  1796. else:
  1797. send "{@tag} {@error1}"
  1798. send "{@tag} &c請使用/mydg mob2 <副本名> <怪物名> <波數>"
  1799. else:
  1800. send "{@tag} {@error1}"
  1801. send "{@tag} &c請使用/mydg mob2 <副本名> <怪物名> <波數>"
  1802. if arg-1 is "start":
  1803. if arg-2 is set:
  1804. if player doesn't have permission "mydg":
  1805. send "{@tag} &c無法使用此指令"
  1806. stop trigger
  1807. if {副本名::%arg-2%::mydg_name} isn't set:
  1808. send "{@tag} {@error4}"
  1809. send "{@tag} &c請確認副本名是否有打錯"
  1810. stop trigger
  1811. if {副本名::%arg-2%::mode} isn't "一般放怪":
  1812. send "{@tag} &c此指令限制一般放怪模式"
  1813. stop trigger
  1814. else:
  1815. execute console command "/mydg kill %arg-2%"
  1816. wait 1 tick
  1817. set {_nodes::*} to skutil yaml nodes "副本怪物" from file "plugins/mythicdg/%arg-2%.yml"
  1818. loop {_nodes::*}:
  1819. set {_nodesmob::*} to skutil yaml nodes "副本怪物.%loop-value%" from file "plugins/mythicdg/%arg-2%.yml"
  1820. loop {_nodesmob::*}:
  1821. set {_nodesmob.spawn} to skutil yaml value "副本怪物.%loop-value-1%.%loop-value-2%" from file "plugins/mythicdg/%arg-2%.yml"
  1822. set {_nodesmob.spawn} to location of mydgLoc("%{_nodesmob.spawn}%", player's world)
  1823. spawn mythicmob "%loop-value-2%" at the mydgLoc("%{_nodesmob.spawn}%", player's world) with level 1
  1824. else:
  1825. send "{@tag} {@error1}"
  1826. send "{@tag} &c請使用/mydg start <副本名>"
  1827. if arg-1 is "start2":
  1828. if arg-2 is set:
  1829. if arg-3 is set:
  1830. if player doesn't have permission "mydg":
  1831. send "{@tag} &c無法使用此指令"
  1832. stop trigger
  1833. if {副本名::%arg-2%::mydg_name} isn't set:
  1834. send "{@tag} {@error4}"
  1835. send "{@tag} &c請確認副本名是否有打錯"
  1836. stop trigger
  1837. if {副本名::%arg-2%::mode} isn't "波數放怪":
  1838. send "{@tag} &c此指令限制一般波數放怪"
  1839. stop trigger
  1840. else:
  1841. #execute console command "/mydg kill %arg-2%"
  1842. wait 1 tick
  1843. set {_nodes::*} to skutil yaml nodes "副本怪物.%arg-3%" from file "plugins/mythicdg/%arg-2%.yml"
  1844. loop {_nodes::*}:
  1845. set {_nodesmob::*} to skutil yaml nodes "副本怪物.%arg-3%.%loop-value%" from file "plugins/mythicdg/%arg-2%.yml"
  1846. loop {_nodesmob::*}:
  1847. set {_nodesmob.spawn} to skutil yaml value "副本怪物.%arg-3%.%loop-value-1%.%loop-value-2%" from file "plugins/mythicdg/%arg-2%.yml"
  1848. set {_nodesmob.spawn} to location of mydgLoc("%{_nodesmob.spawn}%", player's world)
  1849. spawn mythicmob "%loop-value-2%" at the mydgLoc("%{_nodesmob.spawn}%", player's world) with level 1
  1850. if arg-1 is "kill":
  1851. if arg-2 is set:
  1852. if player doesn't have permission "mydg":
  1853. send "{@tag} &c無法使用此指令"
  1854. stop trigger
  1855. if {副本名::%arg-2%::mydg_name} isn't set:
  1856. send "{@tag} {@error4}"
  1857. send "{@tag} &c請確認副本名是否有打錯"
  1858. stop trigger
  1859. else:
  1860. loop all players:
  1861. set {_player.kill} to loop-player
  1862. stop loop
  1863. if {副本名::%arg-2%::mode} is "一般放怪":
  1864. set {_nodes::*} to skutil yaml nodes "副本怪物" from file "plugins/mythicdg/%arg-2%.yml"
  1865. loop {_nodes::*}:
  1866. set {_nodesmob::*} to skutil yaml nodes "副本怪物.%loop-value%" from file "plugins/mythicdg/%arg-2%.yml"
  1867. loop {_nodesmob::*}:
  1868. set {_nodesmob.spawn} to skutil yaml value "副本怪物.%loop-value-1%.%loop-value-2%" from file "plugins/mythicdg/%arg-2%.yml"
  1869. set {_nodesmob.spawn} to location of mydgLoc("%{_nodesmob.spawn}%", {_player.kill}'s world)
  1870. spawn a armor stand at mydgLoc("%{_nodesmob.spawn}%", {_player.kill}'s world)
  1871. apply invisibility 1 to the last spawned entity for 9999 minutes
  1872. if {副本名::%arg-2%::mode} is "波數放怪":
  1873. set {_nodes::*} to skutil yaml nodes "副本怪物" from file "plugins/mythicdg/%arg-2%.yml"
  1874. loop {_nodes::*}:
  1875. if loop-value-1 isn't "波數":
  1876. set {_nodes.mob::*} to skutil yaml nodes "副本怪物.%loop-value-1%" from file "plugins/mythicdg/%arg-2%.yml"
  1877. loop {_nodes.mob::*}:
  1878. set {_nodesmob.1::*} to skutil yaml nodes "副本怪物.%loop-value-1%.%loop-value-2%" from file "plugins/mythicdg/%arg-2%.yml"
  1879. loop {_nodesmob.1::*}:
  1880. set {_nodesmob.2} to skutil yaml value "副本怪物.%loop-value-1%.%loop-value-2%.%loop-value-3%" from file "plugins/mythicdg/%arg-2%.yml"
  1881. set {_nodesmob.spawn} to location of mydgLoc("%{_nodesmob.2}%", {_player.kill}'s world)
  1882. spawn a armor stand at mydgLoc("%{_nodesmob.spawn}%", {_player.kill}'s world)
  1883. apply invisibility 1 to the last spawned entity for 9999 minutes
  1884. wait 1 tick
  1885. loop 3 times:
  1886. loop all entities:
  1887. if loop-entities is within {副本名::%arg-2%::mydg_area_x} to {副本名::%arg-2%::mydg_area_y}:
  1888. if loop-entities isn't a player:
  1889. teleport loop-entities to {_mymobkill}
  1890. kill loop-entity
  1891. if loop-entities is a dropped item:
  1892. delete loop-entity
  1893. else:
  1894. send "{@tag} {@error1}"
  1895. send "{@tag} &c請使用/mydg kill <副本名>"
  1896. if arg-1 is "rank":
  1897. if arg-2 is set:
  1898. if arg-3 is "true":
  1899. if player doesn't have permission "mydg":
  1900. send "{@tag} &c無法使用此指令"
  1901. stop trigger
  1902. if {副本名::%arg-2%::mydg_name} isn't set:
  1903. send "{@tag} {@error4}"
  1904. send "{@tag} &c請確認副本名是否有打錯"
  1905. stop trigger
  1906. set skutil yaml value "排名" from file "plugins/mythicdg/%arg-2%.yml" to "開啟"
  1907. set {_noderank::*} to skutil yaml list "總排名.1.隊伍" from file "plugins/mythicdg/%arg-2%.yml"
  1908. if {_noderank::*} isn't set:
  1909. add "none" to skutil yaml list "總排名.1.隊伍" from file "plugins/mythicdg/%arg-2%.yml"
  1910. add "none" to skutil yaml list "總排名.2.隊伍" from file "plugins/mythicdg/%arg-2%.yml"
  1911. add "none" to skutil yaml list "總排名.3.隊伍" from file "plugins/mythicdg/%arg-2%.yml"
  1912. add "none" to skutil yaml list "總排名.4.隊伍" from file "plugins/mythicdg/%arg-2%.yml"
  1913. add "none" to skutil yaml list "總排名.5.隊伍" from file "plugins/mythicdg/%arg-2%.yml"
  1914. set skutil yaml value "總排名.1.真實排名" from file "plugins/mythicdg/%arg-2%.yml" to "一"
  1915. set skutil yaml value "總排名.2.真實排名" from file "plugins/mythicdg/%arg-2%.yml" to "二"
  1916. set skutil yaml value "總排名.3.真實排名" from file "plugins/mythicdg/%arg-2%.yml" to "三"
  1917. set skutil yaml value "總排名.4.真實排名" from file "plugins/mythicdg/%arg-2%.yml" to "四"
  1918. set skutil yaml value "總排名.5.真實排名" from file "plugins/mythicdg/%arg-2%.yml" to "五"
  1919. set skutil yaml value "總排名.1.時間" from file "plugins/mythicdg/%arg-2%.yml" to "999999"
  1920. set skutil yaml value "總排名.2.時間" from file "plugins/mythicdg/%arg-2%.yml" to "999999"
  1921. set skutil yaml value "總排名.3.時間" from file "plugins/mythicdg/%arg-2%.yml" to "999999"
  1922. set skutil yaml value "總排名.4.時間" from file "plugins/mythicdg/%arg-2%.yml" to "999999"
  1923. set skutil yaml value "總排名.5.時間" from file "plugins/mythicdg/%arg-2%.yml" to "999999"
  1924. set {副本名::%arg-2%::rank} to "開啟"
  1925. send "{@tag} &f已更改 %arg-2% 排名開啟"
  1926. if arg-3 is "false":
  1927. if player doesn't have permission "mydg":
  1928. send "{@tag} &c無法使用此指令"
  1929. stop trigger
  1930. if {副本名::%arg-2%::mydg_name} isn't set:
  1931. send "{@tag} {@error4}"
  1932. send "{@tag} &c請確認副本名是否有打錯"
  1933. stop trigger
  1934. set skutil yaml value "排名" from file "plugins/mythicdg/%arg-2%.yml" to "關閉"
  1935. set {副本名::%arg-2%::rank} to "關閉"
  1936. send "{@tag} &f已更改 %arg-2% 排名關閉"
  1937. if arg-3 is "boom":
  1938. if player doesn't have permission "mydg":
  1939. send "{@tag} &c無法使用此指令"
  1940. stop trigger
  1941. if {副本名::%arg-2%::mydg_name} isn't set:
  1942. send "{@tag} {@error4}"
  1943. send "{@tag} &c請確認副本名是否有打錯"
  1944. stop trigger
  1945. set {_check} to skutil yaml value "排名" from file "plugins/mythicdg/%arg-2%.yml"
  1946. if {_check} is "開啟":
  1947. delete skutil yaml nodes "總排名" from file "plugins/mythicdg/%arg-2%.yml"
  1948. add "none" to skutil yaml list "總排名.1.隊伍" from file "plugins/mythicdg/%arg-2%.yml"
  1949. add "none" to skutil yaml list "總排名.2.隊伍" from file "plugins/mythicdg/%arg-2%.yml"
  1950. add "none" to skutil yaml list "總排名.3.隊伍" from file "plugins/mythicdg/%arg-2%.yml"
  1951. add "none" to skutil yaml list "總排名.4.隊伍" from file "plugins/mythicdg/%arg-2%.yml"
  1952. add "none" to skutil yaml list "總排名.5.隊伍" from file "plugins/mythicdg/%arg-2%.yml"
  1953. set skutil yaml value "總排名.1.真實排名" from file "plugins/mythicdg/%arg-2%.yml" to "一"
  1954. set skutil yaml value "總排名.2.真實排名" from file "plugins/mythicdg/%arg-2%.yml" to "二"
  1955. set skutil yaml value "總排名.3.真實排名" from file "plugins/mythicdg/%arg-2%.yml" to "三"
  1956. set skutil yaml value "總排名.4.真實排名" from file "plugins/mythicdg/%arg-2%.yml" to "四"
  1957. set skutil yaml value "總排名.5.真實排名" from file "plugins/mythicdg/%arg-2%.yml" to "五"
  1958. set skutil yaml value "總排名.1.時間" from file "plugins/mythicdg/%arg-2%.yml" to "999999"
  1959. set skutil yaml value "總排名.2.時間" from file "plugins/mythicdg/%arg-2%.yml" to "999999"
  1960. set skutil yaml value "總排名.3.時間" from file "plugins/mythicdg/%arg-2%.yml" to "999999"
  1961. set skutil yaml value "總排名.4.時間" from file "plugins/mythicdg/%arg-2%.yml" to "999999"
  1962. set skutil yaml value "總排名.5.時間" from file "plugins/mythicdg/%arg-2%.yml" to "999999"
  1963. send "{@tag} &f以重置 %arg-2% 排名"
  1964. else:
  1965. send "{@tag} &c請先將排名設為開啟"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement