henry900326

Untitled

Sep 20th, 2018
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 40.45 KB | None | 0 0
  1. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  2. # [ Options 選項 ]
  3. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  4. Options:
  5. Tag: &6技能 &c&l>>
  6.  
  7. #[ 鬥靈迴砍 ]
  8. 鬥靈迴砍.CD: 4
  9. 鬥靈迴砍.MP: 60
  10. 鬥靈迴砍.Max: 5
  11.  
  12. #[ 鬥破山河 ]
  13. 鬥破山河.CD: 7
  14. 鬥破山河.MP: 85
  15. 鬥破山河.Max: 5
  16.  
  17. #[ 鬥神傳說 ]
  18. 鬥神傳說.CD: 7
  19. 鬥神傳說.MP: 95
  20. 鬥神傳說.Max: 5
  21.  
  22. #[ 鬥環之劍 ]
  23. 鬥環之劍.CD: 5
  24. 鬥環之劍.MP: 60
  25. 鬥環之劍.Max: 5
  26.  
  27. #[ 鬥魂纏身 ]
  28. 鬥魂纏身.Max: 10
  29.  
  30. #[ 鬥氣爆發 ]
  31. 鬥氣爆發.CD: 60
  32. 鬥氣爆發.受益時間: 50
  33. 鬥氣爆發.MP: 0
  34. 鬥氣爆發.Max: 10
  35.  
  36.  
  37.  
  38. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  39. # [ Function 函式 ]
  40. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  41. Function 劍鬥士skill(P:player):
  42. set slot 4 of {_P}'s current inventory to 1 of glowing gold sword with no nbt named "&e劍鬥士" with lore "&f《&e剩餘技能點&f: &6%{玩家資料.%{_P}%::剩餘技能點}% &f》"
  43. set slot 19 of {_P}'s current inventory to 3 of golden sword with no nbt named "&c鬥靈迴砍" with lore "&e技能介紹:||&f將鬥靈激發||&f對前方範圍敵人造成隨機3~6次物理傷害||&f每命中一下恢復4點魔力||&f最多恢復60點魔力||&c使用劍進行普通攻擊將重置該技能冷卻||&e單下傷害量: &f(物理攻擊力)*%(150+30*{技能.%{_P}%::鬥靈迴砍})%%%||&e有效範圍: &f5格||&e冷卻時間: &f4秒||&e魔力消耗量: &b60MP||||&c使用技能後獲得1層鬥氣||||&e技能類型: &c主動技能"
  44. if {技能.%{_P}%::鬥靈迴砍} >= 5:
  45. set slot 28 of {_P}'s current inventory to blue stained glass pane named "&6技能等級&7: &f%{技能.%{_P}%::鬥靈迴砍}%/5" with lore "&c等級已滿 無法升級"
  46. else if {技能.%{_P}%::鬥靈迴砍} >= 0:
  47. set slot 28 of {_P}'s current inventory to white stained glass pane named "&6技能等級&7: &f%{技能.%{_P}%::鬥靈迴砍}%/5" with lore "&a點此升級鬥靈迴砍"
  48. set slot 20 of {_P}'s current inventory to glowing gold sword with no nbt named "&c鬥破山河" with lore "&e技能介紹:||&f揮舞手中的劍擊向地面||&f造成強大的震盪波衝擊周圍敵人||&f並給予敵人持續傷害與緩速效果5秒||&e傷害量: &f(物理攻擊力)*( %(700+100*{技能.%{_P}%::鬥破山河})% + (鬥氣值)*%(35+10*{技能.%{_P}%::鬥破山河})% )%%||&e持續傷害量: &f(物理攻擊力)*%(100+10*{技能.%{_P}%::鬥破山河})%%%||&e有效範圍: &f8格||&e冷卻時間: &f7秒||&e魔力消耗量: &b85MP||&c消耗所有鬥氣||&e技能類型: &c主動技能"
  49. if {技能.%{_P}%::鬥破山河} >= 5:
  50. set slot 29 of {_P}'s current inventory to blue stained glass pane named "&6技能等級&7: &f%{技能.%{_P}%::鬥破山河}%/5" with lore "&c等級已滿 無法升級"
  51. else if {技能.%{_P}%::鬥破山河} >= 0:
  52. set slot 29 of {_P}'s current inventory to white stained glass pane named "&6技能等級&7: &f%{技能.%{_P}%::鬥破山河}%/5" with lore "&a點此升級鬥破山河"
  53. set slot 21 of {_P}'s current inventory to glowing gold chestplate with no nbt named "&c鬥神傳說" with lore "&e技能介紹:||&f激發強大的鬥志||&f在周圍數個敵人間來回移動並精準的攻擊||&f最多可攻擊10次||&f每命中一次恢復自身4%%HP||&e單次傷害量: &f(物理攻擊力)*( %(450+100*{技能.%{_P}%::鬥神傳說})% + (鬥氣值)*%(25+10*{技能.%{_P}%::鬥神傳說})% )%%||&e有效範圍: &f8格||&e冷卻時間: &f7秒||&e魔力消耗量: &b95MP||&c消耗所有鬥氣||&e技能類型: &c主動技能"
  54. if {技能.%{_P}%::鬥神傳說} >= 5:
  55. set slot 30 of {_P}'s current inventory to blue stained glass pane named "&6技能等級&7: &f%{技能.%{_P}%::鬥神傳說}%/5" with lore "&c等級已滿 無法升級"
  56. else if {技能.%{_P}%::鬥神傳說} >= 0:
  57. set slot 30 of {_P}'s current inventory to white stained glass pane named "&6技能等級&7: &f%{技能.%{_P}%::鬥神傳說}%/5" with lore "&a點此升級鬥神傳說"
  58. set slot 23 of {_P}'s current inventory to glowing iron sword with no nbt named "&c鬥環之劍" with lore "&e技能介紹:||&f將鬥氣注入武器內向前劈砍||&f對前方單體敵人造成物理傷害||&f並恢復自身10%%HP||&e傷害量: &f(物理攻擊力)*( %(900+120*{技能.%{_P}%::鬥環之劍})% + (鬥氣值)*%(50+10*{技能.%{_P}%::鬥環之劍})% )%%||&e有效範圍: &f7格||&e冷卻時間: &f5秒||&e魔力消耗量: &b60MP||&c消耗所有鬥氣||&e技能類型: &c主動技能"
  59. if {技能.%{_P}%::鬥環之劍} >= 5:
  60. set slot 32 of {_P}'s current inventory to blue stained glass pane named "&6技能等級&7: &f%{技能.%{_P}%::鬥環之劍}%/5" with lore "&c等級已滿 無法升級"
  61. else if {技能.%{_P}%::鬥環之劍} >= 0:
  62. set slot 32 of {_P}'s current inventory to white stained glass pane named "&6技能等級&7: &f%{技能.%{_P}%::鬥環之劍}%/5" with lore "&a點此升級鬥環之劍"
  63. set slot 24 of {_P}'s current inventory to glowing blaze powder named "&a鬥魂纏身" with lore "&e技能介紹:||&f鍛鍊自身讓鬥者的氣息更為強大||&f每級提升150點最大HP,15點最大MP,20點物理攻擊力,90點血量恢復量||&e最大HP提升量: &f%150*{技能.%{_P}%::鬥魂纏身}%||&e最大MP提升量: &f%12*{技能.%{_P}%::鬥魂纏身}%||&e物理攻擊力提升量: &f%20*{技能.%{_P}%::鬥魂纏身}%||&e血量恢復量提升量: &f%90*{技能.%{_P}%::鬥魂纏身}%||||&a>> &e附加額外技能 &7- &4鬥者意志||&e 技能介紹:||&f &a鬥魂纏身&f滿級時||&f 生命力越低時造成的傷害越高||&f 生命於&c10%%&f時 達最高&c3倍&f傷害||||&e技能類型: &a被動技能"
  64. if {技能.%{_P}%::鬥魂纏身} >= 10:
  65. set slot 33 of {_P}'s current inventory to blue stained glass pane named "&6技能等級&7: &f%{技能.%{_P}%::鬥魂纏身}%/10" with lore "&c等級已滿 無法升級"
  66. else if {技能.%{_P}%::鬥魂纏身} >= 0:
  67. set slot 33 of {_P}'s current inventory to white stained glass pane named "&6技能等級&7: &f%{技能.%{_P}%::鬥魂纏身}%/10" with lore "&a點此升級鬥魂纏身"
  68. set slot 25 of {_P}'s current inventory to nether star named "&4鬥氣爆發" with lore "&e技能介紹:||&f將體內&c『鬥氣』&f瞬間爆發||&f時間內攻擊與防禦能力大幅提升||&f時間內每級提升50點物理攻擊力與10點防禦力||&f使用後自身防禦力與物理攻擊力總合加入武器傷害中||&f使用條件: &c鬥氣量必須為10||&e物理攻擊力提升量: &f%50*{技能.%{_P}%::鬥氣爆發}%||&e防禦力提升量: &f%10*{技能.%{_P}%::鬥氣爆發}%||&e持續時間: &f30秒||&e冷卻時間: &f60秒||&e魔力消耗量: &b0MP||&c消耗所有鬥氣||&e技能類型: &c主動技能"
  69. if {技能.%{_P}%::鬥氣爆發} >= 10:
  70. set slot 34 of {_P}'s current inventory to blue stained glass pane named "&6技能等級&7: &f%{技能.%{_P}%::鬥氣爆發}%/10" with lore "&c等級已滿 無法升級"
  71. else if {技能.%{_P}%::鬥氣爆發} >= 0:
  72. set slot 34 of {_P}'s current inventory to white stained glass pane named "&6技能等級&7: &f%{技能.%{_P}%::鬥氣爆發}%/10" with lore "&a點此升級鬥氣爆發"
  73.  
  74.  
  75.  
  76. Function SkillLevelUp(P:player, S:text, M:number):
  77. if {玩家資料.%{_P}%::剩餘技能點} is larger than 0:
  78. {技能.%{_P}%::%{_S}%} < {_M}
  79. {技能.%{_P}%::%{_S}%} >= 0
  80. remove 1 from {玩家資料.%{_P}%::剩餘技能點}
  81. add 1 to {技能.%{_P}%::%{_S}%}
  82. else:
  83. send "&6技能 >> &c您的技能點數不足 無法升級該技能" to {_P}
  84.  
  85. Function Skill(P:player, S:text, Max:number, CD:number, MP:number) :: boolean:
  86. set {_Skill} to uncolored {_S}
  87. if {技能.%{_P}%::%{_Skill}%} <= 0:
  88. send "{@Tag} &c尚未學習 &f<%{_S}%&f>" to {_P}
  89. return false
  90. stop
  91. if {技能.%{_P}%::%{_Skill}%} > {_Max}:
  92. send "{@Tag} &c&l注意! 你的技能等級出現錯誤! 請盡速尋求管理員協助!" to {_P}
  93. return false
  94. stop
  95. set {_冷卻} to "%difference between {冷卻.%{_P}%::%{_Skill}%} and now%"
  96. replace "seconds" and "second" and " " with "" in {_冷卻}
  97. set {_冷卻} to {_冷卻} parsed as number
  98. set {_CD} to {_CD} parsed as number
  99. if {_冷卻} is less than {_CD}:
  100. set {_冷卻} to "%difference between {_CD} and {_冷卻}%"
  101. replace "seconds" and "second" and " " with "" in {_冷卻}
  102. send "{@Tag} &f技能冷卻中 &f<%{_S}%&f> &f還有 &e%{_冷卻}% &f秒" to {_P}
  103. return false
  104. stop
  105. if {玩家魔力值.%{_P}%} is larger or equal to {_MP}:
  106. remove {_MP} from {玩家魔力值.%{_P}%}
  107. set {_math} to 0.99 * {玩家魔力值.%{_P}%} / {玩家資料.%{_P}%::魔力值}
  108. if {_math} is more than or equal to 1:
  109. set {_math} to 0.99
  110. set level progress of {_P} to {_math}
  111. set {_P}'s level to {玩家魔力值.%{_P}%}
  112. send "{@Tag} &f施放技能 &f<%{_S}%&f> &f消耗了 &9%{_MP}% &f魔力值" to {_P}
  113. else:
  114. send "{@Tag} &c魔力不足 無法施放 &f<%{_S}%&f>" to {_P}
  115. return false
  116. stop
  117. return true
  118.  
  119.  
  120.  
  121. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  122. # [ Fix 重置修復 ]
  123. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  124. on join:
  125. wait 1 second
  126. if {玩家資料.%player%::玩家職業} is "劍鬥士":
  127. if {技能.%player%::鬥志} is set:
  128. remove {技能.%player%::鬥志}*100 from {玩家資料.%player%::最大血量}
  129. remove {技能.%player%::鬥志}*12 from {玩家資料.%player%::魔力值}
  130. remove {技能.%player%::劍士自尊}*80 from {玩家資料.%player%::血量恢復量}
  131. remove {技能.%player%::劍士自尊}*2 from {玩家資料.%player%::魔量恢復量}
  132. add {技能.%player%::虎咆哮} to {玩家資料.%player%::剩餘技能點}
  133. add {技能.%player%::鬥氣擊} to {玩家資料.%player%::剩餘技能點}
  134. add {技能.%player%::鬥志} to {玩家資料.%player%::剩餘技能點}
  135. add {技能.%player%::劍士自尊} to {玩家資料.%player%::剩餘技能點}
  136. delete {技能.%player%::虎咆哮}
  137. delete {技能.%player%::鬥氣擊}
  138. delete {技能.%player%::鬥志}
  139. delete {技能.%player%::劍士自尊}
  140. set {技能.%player%::鬥破山河} to 0
  141. set {技能.%player%::鬥神傳說} to 0
  142. set {技能.%player%::鬥環之劍} to 0
  143. set {技能.%player%::鬥魂纏身} to 0
  144. delete yaml value "技能.虎咆哮" from file "plugins/players/%player%.yml"
  145. delete yaml value "技能.鬥氣擊" from file "plugins/players/%player%.yml"
  146. delete yaml value "技能.鬥志" from file "plugins/players/%player%.yml"
  147. delete yaml value "技能.劍士自尊" from file "plugins/players/%player%.yml"
  148.  
  149. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  150. # [ 鬥氣機制 ]
  151. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  152. on join:
  153. if {玩家資料.%player%::玩家職業} is "劍鬥士":
  154. set {鬥氣.%player%} to 0
  155. while {鬥氣.%player%} is set:
  156. set {_鬥氣1} to {鬥氣.%player%}
  157. set {_鬥氣2} to 20-{鬥氣.%player%}
  158. add "&c鬥氣值:&f[" to {_鬥氣::*}
  159. loop {_鬥氣1} times:
  160. add "&c▇" to {_鬥氣::*}
  161. loop {_鬥氣2} times:
  162. add "&7▇" to {_鬥氣::*}
  163. add "&f]" to {_鬥氣::*}
  164. set {_鬥氣} to "%{_鬥氣::*}%"
  165. replace all " " , "," and "and" with "" in {_鬥氣}
  166. show action bar from "%{_鬥氣}%" to player
  167. clear {_鬥氣::*}
  168. clear {_鬥氣}
  169. wait 10 second
  170. on quit:
  171. if {玩家資料.%player%::玩家職業} is "劍鬥士":
  172. delete {鬥氣.%player%}
  173. command /test:
  174. trigger:
  175. player is op
  176. set {鬥氣.%player%} to 20
  177. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  178. # [ SkillGui 技能介面 ]
  179. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  180. command /skill3A3:
  181. trigger:
  182. if {玩家資料.%player%::玩家職業} is "劍鬥士":
  183. set {技能.%player%::鬥靈迴砍} to {技能.%player%::鬥靈迴砍} parsed as number
  184. set {技能.%player%::鬥破山河} to {技能.%player%::鬥破山河} parsed as number
  185. set {技能.%player%::鬥神傳說} to {技能.%player%::鬥神傳說} parsed as number
  186. set {技能.%player%::鬥環之劍} to {技能.%player%::鬥環之劍} parsed as number
  187. set {技能.%player%::鬥魂纏身} to {技能.%player%::鬥魂纏身} parsed as number
  188. set {技能.%player%::鬥氣爆發} to {技能.%player%::鬥氣爆發} parsed as number
  189. open chest with 5 rows named "&c&l劍鬥士[3轉] &6&l技能介面" to player
  190. wait 1 ticks
  191. loop 2 times:
  192. set slot (loop-number) of player's current inventory to 1 of gray stained glass pane named "&7"
  193. set slot (loop-number + 5) of player's current inventory to 1 of gray stained glass pane named "&7"
  194. set slot (1 + (loop-number * 2)) of player's current inventory to 1 of orange stained glass pane named "&7"
  195. loop 6 times:
  196. set slot ((loop-number - 1) * 9) of player's current inventory to 1 of gray stained glass pane named "&7"
  197. set slot (8 + (loop-number - 1) * 9) of player's current inventory to 1 of gray stained glass pane named "&7"
  198. loop 7 times:
  199. set slot (9 + loop-number) of player's current inventory to 1 of orange stained glass pane named "&7"
  200. set slot (36 + loop-number) of player's current inventory to 1 of gray stained glass pane named "&7"
  201. 劍鬥士skill(player)
  202.  
  203. on inventory click:
  204. name of player's current inventory contains "劍鬥士[3轉]":
  205. cancel event
  206. if lore of item contains "&a點此升級鬥靈迴砍":
  207. SkillLevelUp(player,"鬥靈迴砍",{@鬥靈迴砍.Max})
  208. if lore of item contains "&a點此升級鬥破山河":
  209. SkillLevelUp(player,"鬥破山河",{@鬥破山河.Max})
  210. if lore of item contains "&a點此升級鬥神傳說":
  211. SkillLevelUp(player,"鬥神傳說",{@鬥神傳說.Max})
  212. if lore of item contains "&a點此升級鬥環之劍":
  213. SkillLevelUp(player,"鬥環之劍",{@鬥環之劍.Max})
  214. if lore of item contains "&a點此升級鬥魂纏身":
  215. if {玩家資料.%player%::剩餘技能點} is larger than 0:
  216. SkillLevelUp(player,"鬥魂纏身",{@鬥魂纏身.Max})
  217. add 150 to {玩家資料.%player%::最大血量}
  218. add 15 to {玩家資料.%player%::魔力值}
  219. add 20 to {玩家資料.%player%::物理攻擊力}
  220. add 90 to {玩家資料.%player%::血量恢復量}
  221. if lore of item contains "&a點此升級鬥氣爆發":
  222. SkillLevelUp(player,"鬥氣爆發",{@鬥氣爆發.Max})
  223. 劍鬥士skill(player)
  224.  
  225. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  226. # [ Skill 技能 ]
  227. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  228. on right click:
  229. {玩家資料.%player%::玩家職業} is "劍鬥士"
  230. set {_STRATK} to {玩家資料.%player%::力量} * 0.5
  231. set {_DEXATK} to {玩家資料.%player%::敏捷} * 0.7
  232. set {_INTATK} to {玩家資料.%player%::智慧} * 0.6
  233. set {_LUKATK} to {玩家資料.%player%::幸運} * 0.4
  234. set {_PHYSICDMG} to {玩家資料.%player%::物理攻擊力}
  235. set {_MAGICDMG} to {玩家資料.%player%::物理攻擊力}
  236. if {幾轉職業::%{玩家資料.%player%::玩家職業}%} is 0:
  237. add ({_STRATK} + {_DEXATK} + {_LUKATK}) to {_PHYSICDMG}
  238. add ({_INTATK} + {_LUKATK}) to {_MAGICDMG}
  239. if {幾轉職業::%{玩家資料.%player%::玩家職業}%} is 1:
  240. add ({_STRATK} + {_DEXATK} + {_LUKATK})*1.2 to {_PHYSICDMG}
  241. add ({_INTATK} + {_LUKATK})*1.2 to {_MAGICDMG}
  242. if {幾轉職業::%{玩家資料.%player%::玩家職業}%} is 2:
  243. add ({_STRATK} + {_DEXATK} + {_LUKATK})*1.4 to {_PHYSICDMG}
  244. add ({_INTATK} + {_LUKATK})*1.4 to {_MAGICDMG}
  245. if {幾轉職業::%{玩家資料.%player%::玩家職業}%} is 3:
  246. add ({_STRATK} + {_DEXATK} + {_LUKATK})*1.8 to {_PHYSICDMG}
  247. add ({_INTATK} + {_LUKATK})*1.8 to {_MAGICDMG}
  248. set {_check} to {玩家資料.%player%::最大血量}
  249. if {幾轉職業::%{玩家資料.%player%::玩家職業}%} is 0:
  250. add ({玩家資料.%player%::力量} * 5) to {_check}
  251. add ({玩家資料.%player%::智慧} * 4) to {_check}
  252. add ({玩家資料.%player%::敏捷} * 3) to {_check}
  253. add ({玩家資料.%player%::幸運} * 2) to {_check}
  254. if {幾轉職業::%{玩家資料.%player%::玩家職業}%} is 1:
  255. add ({玩家資料.%player%::力量} * 5)*1.25 to {_check}
  256. add ({玩家資料.%player%::智慧} * 4)*1.25 to {_check}
  257. add ({玩家資料.%player%::敏捷} * 3)*1.25 to {_check}
  258. add ({玩家資料.%player%::幸運} * 2)*1.25 to {_check}
  259. if {幾轉職業::%{玩家資料.%player%::玩家職業}%} is 2:
  260. add ({玩家資料.%player%::力量} * 5)*1.5 to {_check}
  261. add ({玩家資料.%player%::智慧} * 4)*1.5 to {_check}
  262. add ({玩家資料.%player%::敏捷} * 3)*1.5 to {_check}
  263. add ({玩家資料.%player%::幸運} * 2)*1.5 to {_check}
  264. if {幾轉職業::%{玩家資料.%player%::玩家職業}%} is 3:
  265. add ({玩家資料.%player%::力量} * 5)*2 to {_check}
  266. add ({玩家資料.%player%::智慧} * 4)*2 to {_check}
  267. add ({玩家資料.%player%::敏捷} * 3)*2 to {_check}
  268. add ({玩家資料.%player%::幸運} * 2)*2 to {_check}
  269. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  270. #[ 鬥靈迴砍 ]
  271. if uncolored name of player's tool contains "鬥靈迴砍":
  272. if Skill(player, "&c鬥靈迴砍", {@鬥靈迴砍.Max}, {@鬥靈迴砍.CD}, {@鬥靈迴砍.MP}) is true:
  273. set {冷卻.%player%::鬥靈迴砍} to now
  274. add 1 to {鬥氣.%player%}
  275. if {玩家資料.%player%::玩家等級} >= 110:
  276. add 1 to {鬥氣.%player%}
  277. if {鬥氣.%player%} >= 20:
  278. set {鬥氣.%player%} to 20
  279. set {_鬥氣1} to {鬥氣.%player%}
  280. set {_鬥氣2} to 20-{鬥氣.%player%}
  281. add "&c鬥氣值:&f[" to {_鬥氣::*}
  282. loop {_鬥氣1} times:
  283. add "&c▇" to {_鬥氣::*}
  284. loop {_鬥氣2} times:
  285. add "&7▇" to {_鬥氣::*}
  286. add "&f]" to {_鬥氣::*}
  287. set {_鬥氣} to "%{_鬥氣::*}%"
  288. replace all " " , "," and "and" with "" in {_鬥氣}
  289. show action bar from "%{_鬥氣}%" to player
  290. set {_鬥者意志傷害倍率} to 1
  291. if {技能.%player%::鬥魂纏身} is 10:
  292. set {_損失生命} to (player's max health - player's health)*10
  293. set {_鬥者意志傷害倍率} to (1/45*{_損失生命})+1
  294. set {_攻擊範圍} to block 3 infront player
  295. set {_攻擊範圍} to location of {_攻擊範圍}
  296. if {玩家資料.%player%::玩家等級} >= 100:
  297. set {_120鬥靈追打} to 6
  298. else:
  299. set {_120鬥靈追打} to random integer between 3 and 6
  300. if {玩家資料.%player%::玩家等級} >= 105:
  301. set {_120鬥靈傷害} to 1.5
  302. else:
  303. set {_120鬥靈傷害} to 1
  304. loop {_120鬥靈追打} times:
  305. play "ENTITY_PLAYER_ATTACK_CRIT" to player with volume 1 and pitch 1
  306. loop entities in radius 5 of {_攻擊範圍}:
  307. if loop-entity isn't a player or a dropped item:
  308. make player damage loop-entity by ({_PHYSICDMG})*(1.5+0.3*{技能.%player%::鬥靈迴砍})*{_120鬥靈傷害}*{_鬥者意志傷害倍率}
  309. drawDot count 6, particle "blockdust", material redstone block, XYZ 0.5, 1, 0.5, center loop-entity, visibleRange 32, pulseDelay 2, keepFor 0.1 seconds
  310. drawDot count 2, particle sweep, XYZ 0.5, 1, 0.5, center loop-entity, visibleRange 32, pulseDelay 2, keepFor 0.1 seconds
  311. drawDot count 10, particle crit, XYZ 0.5, 1, 0.5, center loop-entity, visibleRange 32, pulseDelay 2, keepFor 0.1 seconds
  312. drawDot count 5, particle witchspell, XYZ 0.5, 1, 0.5, center player, visibleRange 32, pulseDelay 2, keepFor 0.2 seconds
  313. add 1 to {_命中}
  314. wait 1.5 tick
  315. set {_恢復量} to round({_命中}*4)
  316. if {_恢復量} > 60:
  317. set {_恢復量} to 60
  318. if ({_恢復量} + {玩家魔力值.%player%}) is more than {玩家資料.%player%::魔力值}:
  319. set {玩家魔力值.%player%} to {玩家資料.%player%::魔力值}
  320. else:
  321. add {_恢復量} to {玩家魔力值.%player%}
  322. set {_math} to 0.99 * {玩家魔力值.%player%} / {玩家資料.%player%::魔力值}
  323. if {_math} is more than or equal to 1:
  324. set {_math} to 0.99
  325. set level progress of the player to {_math}
  326. set player's level to {玩家魔力值.%player%}
  327. send "{@Tag} &f施放技能 &f<&c鬥靈迴砍&f> &f恢復了 &6%{_恢復量}% &f魔力"
  328. stop
  329. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  330. #[ 鬥破山河 ]
  331. if uncolored name of player's tool contains "鬥破山河":
  332. if Skill(player, "&c鬥破山河", {@鬥破山河.Max}, {@鬥破山河.CD}, {@鬥破山河.MP}) is true:
  333. set {冷卻.%player%::鬥破山河} to now
  334. set {_鬥者意志傷害倍率} to 1
  335. if {技能.%player%::鬥魂纏身} is 10:
  336. set {_損失生命} to (player's max health - player's health)*10
  337. set {_鬥者意志傷害倍率} to (1/45*{_損失生命})+1
  338. set {_鬥氣} to {鬥氣.%player%}
  339. set {鬥氣.%player%} to 0
  340. show action bar from "&c鬥氣值:&f[&7▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇&f]" to player
  341. if {玩家資料.%player%::玩家等級} is more than or equal to 110:
  342. remove 2 seconds from {冷卻.%player%::鬥破山河}
  343. play "ENTITY_PLAYER_ATTACK_WEAK" to player with volume 1000 and pitch 2
  344. wait 0.5 second
  345. drawWarpRings style 6, particle "blockdust", material dirt, center player, id "鬥破山河%player%", rainbowMode false, scan true, height 4, radius 8, ringCount 5, ringDensity 32, visibleRange 32, pulseDelay 1
  346. drawDot count 30, particle "blockdust", material dirt, XYZ 4, 2, 4, center player, visibleRange 32, pulseDelay 2, keepFor 1 seconds
  347. drawDot count 30, particle "blockdust", material stone, XYZ 4, 2, 4, center player, visibleRange 32, pulseDelay 2, keepFor 1 seconds
  348. play "BLOCK_GRASS_PLACE" to player with volume 1000 and pitch 0
  349. play "ENTITY_GENERIC_EXPLODE" to player with volume 1000 and pitch 0
  350. loop entities in radius 8 of player:
  351. if loop-entity isn't a player or a dropped item:
  352. make player damage loop-entity by ( {_PHYSICDMG}*(7+1*{技能.%player%::鬥破山河}) + {_PHYSICDMG}*{_鬥氣}*(0.35+0.1*{技能.%player%::鬥破山河}) )*{_鬥者意志傷害倍率}
  353. set loop-entity's target to player
  354. add loop-entity to {_list::*}
  355. apply slowness of tier 1 to loop-entity for 5 second
  356. wait 0.5 second
  357. stopeffect id "鬥破山河%player%"
  358. wait 0.5 second
  359. loop 6 times:
  360. loop {_list::*}:
  361. if loop-value-2's health > 0:
  362. make player damage loop-value-2 by ({_MAGICDMG})*(1+0.1*{技能.%player%::鬥破山河})
  363. drawDot count 10, particle "blockdust", material stone, XYZ 0.3, 1, 0.3, center loop-value-2, visibleRange 32, pulseDelay 2, keepFor 1 seconds
  364. wait 1 second
  365. stop
  366. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  367. #[ 鬥神傳說 ]
  368. if uncolored name of player's tool contains "鬥神傳說":
  369. if Skill(player, "&c鬥神傳說", {@鬥神傳說.Max}, {@鬥神傳說.CD}, {@鬥神傳說.MP}) is true:
  370. set {冷卻.%player%::鬥神傳說} to now
  371. set {鬥神傳說::%player%} to 1
  372. set {_鬥者意志傷害倍率} to 1
  373. if {技能.%player%::鬥魂纏身} is 10:
  374. set {_損失生命} to (player's max health - player's health)*10
  375. set {_鬥者意志傷害倍率} to (1/45*{_損失生命})+1
  376. set {_鬥氣} to {鬥氣.%player%}
  377. set {鬥氣.%player%} to 0
  378. show action bar from "&c鬥氣值:&f[&7▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇&f]" to player
  379. set {_原地} to location of player
  380. set {_目標} to player
  381. loop 10 times:
  382. loop entities in radius 8 around block at location of {_原地}:
  383. if loop-entity isn't a player or a dropped item:
  384. if loop-entity is not {_目標}:
  385. set {_目標} to loop-entity
  386. teleport player to loop-entity
  387. make player damage loop-entity by ( {_PHYSICDMG}*(4.5+1*{技能.%player%::鬥神傳說}) + {_PHYSICDMG}*{_鬥氣}*(0.25+0.1*{技能.%player%::鬥神傳說}) )*{_鬥者意志傷害倍率}
  388. play "BLOCK_ANVIL_LAND" to player with volume 1000 and pitch 2
  389. drawDot count 20, particle "crit", XYZ 0, 1, 0, center player, rainbowMode false, visibleRange 32, pulseDelay 2, keepFor 0.2 seconds
  390. drawDot count 20, particle "flame", XYZ 0, 1, 0, center player, rainbowMode false, visibleRange 32, pulseDelay 2, keepFor 0.2 seconds
  391. set {_命中} to 1
  392. heal player by ({_check}*0.04) / (player's max health + {_check}) * player's max health
  393. exit loop
  394. if {_命中} is 1:
  395. delete {_命中}
  396. exit loop
  397. wait 1 tick
  398. teleport player to {_原地}
  399. delete {鬥神傳說::%player%}
  400. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  401. #[ 鬥環之劍 ]
  402. if uncolored name of player's tool contains "鬥環之劍":
  403. if Skill(player, "&c鬥環之劍", {@鬥環之劍.Max}, {@鬥環之劍.CD}, {@鬥環之劍.MP}) is true:
  404. set {冷卻.%player%::鬥環之劍} to now
  405. if {玩家資料.%player%::玩家等級} is more than or equal to 100:
  406. set {_120鬥氣傷害} to 2
  407. else:
  408. set {_120鬥氣傷害} to 1
  409. if {玩家資料.%player%::玩家等級} is more than or equal to 115:
  410. set {_120鬥氣HP} to 2
  411. else:
  412. set {_120鬥氣HP} to 1
  413. set {_鬥者意志傷害倍率} to 1
  414. if {技能.%player%::鬥魂纏身} is 10:
  415. set {_損失生命} to (player's max health - player's health)*10
  416. set {_鬥者意志傷害倍率} to (1/45*{_損失生命})+1
  417. set {_鬥氣} to {鬥氣.%player%}
  418. set {鬥氣.%player%} to 0
  419. show action bar from "&c鬥氣值:&f[&7▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇&f]" to player
  420. play "ENTITY_IRONGOLEM_DEATH" to player with volume 1 and pitch 2
  421. set {_location.1} to block above player
  422. set {_location.2} to block 8 in front player
  423. set {_x.1} to x-coordinate of {_location.1}
  424. set {_x.2} to x-coordinate of {_location.2}
  425. set {_y.1} to y-coordinate of {_location.1}
  426. set {_y.2} to y-coordinate of {_location.2}
  427. set {_z.1} to z-coordinate of {_location.1}
  428. set {_z.2} to z-coordinate of {_location.2}
  429. set {_x.difference} to ({_x.2} - {_x.1}) / 10
  430. set {_y.difference} to ({_y.2} - {_y.1}) / 10
  431. set {_z.difference} to ({_z.2} - {_z.1}) / 10
  432. loop 10 times:
  433. set {_location.1} to location of {_location.1}
  434. increase x-coordinate of {_location.1} by {_x.difference}
  435. increase y-coordinate of {_location.1} by {_y.difference}
  436. increase z-coordinate of {_location.1} by {_z.difference}
  437. drawDot count 10, particle endrod, XYZ 0.1, 0.3, 0.1, center {_location.1}, visibleRange 32, pulseDelay 2, keepFor 0.3 seconds
  438. drawDot count 10, particle crit, XYZ 0.1, 0.3, 0.1, center {_location.1}, visibleRange 32, pulseDelay 2, keepFor 0.3 seconds
  439. loop entities in radius 1.1 around block at location of {_location.1}:
  440. if loop-entity isn't a player or a dropped item:
  441. if {_one} isn't set:
  442. set {_one} to 1
  443. drawDot count 10, particle endrod, XYZ 0.1, 2, -0.1, center loop-entity, visibleRange 32, pulseDelay 2, keepFor 0.3 seconds
  444. drawDot count 10, particle crit, XYZ -1, 2, 1, center loop-entity, visibleRange 32, pulseDelay 2, keepFor 0.5 seconds
  445. drawDot count 10, particle sweep, XYZ -0.5, 1, 0.5, center loop-entity, visibleRange 32, pulseDelay 2, keepFor 0.5 seconds
  446. make player damage loop-entity by ( {_PHYSICDMG}*(9+1.2*{技能.%player%::鬥破山河}) + {_PHYSICDMG}*{_鬥氣}*(0.5+0.1*{技能.%player%::鬥破山河}) )*{_120鬥氣傷害}*{_鬥者意志傷害倍率}
  447. heal player by ({_check}*0.10*{_120鬥氣HP}) / (player's max health + {_check}) * player's max health
  448. send "{@Tag} &f施放技能 &f<&c鬥環之劍&f> &f恢復了 &6%0.15*{_check}*{_120鬥氣HP}% &f生命"
  449. stop loop
  450. stop
  451. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  452. #[ 鬥氣爆發 ]
  453. if uncolored name of player's tool contains "鬥氣爆發":
  454. if {鬥氣.%player%} < 20:
  455. send "{@Tag} &c技能 &f<&c鬥氣爆發&f> &c發動失敗 鬥氣值不足"
  456. stop
  457. if Skill(player, "&5鬥氣爆發", {@鬥氣爆發.Max}, {@鬥氣爆發.CD}, {@鬥氣爆發.MP}) is true:
  458. set {冷卻.%player%::鬥氣爆發} to now
  459. set {鬥氣.%player%} to 0
  460. show action bar from "&c鬥氣值:&f[&7▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇&f]" to player
  461. drawWings style 8, particle1 "crit", speed 0, XYZ 0, 0, 0, particle2 "lava", particle3 "flame", center player, id "鬥氣爆發%player%", rainbowMode false, flapSpeed 1, flapRange 4, angle 120, height 0, space 0.1, visibleRange 30, tps 0, second 2
  462. play "ENTITY_ENDERDRAGON_AMBIENT" to player with volume 1 and pitch 2
  463. if {BUFF.鬥氣爆發time::%player%} isn't set:
  464. set {BUFF.鬥氣爆發time::%player%} to now
  465. set {BUFF.鬥氣爆發物攻::%player%} to {技能.%player%::鬥氣爆發}*50
  466. set {BUFF.鬥氣爆發防禦::%player%} to {技能.%player%::鬥氣爆發}*10
  467. add {BUFF.鬥氣爆發物攻::%player%} to {玩家資料.%player%::物理攻擊力}
  468. add {BUFF.鬥氣爆發防禦::%player%} to {玩家資料.%player%::防禦力}
  469. execute player command "鬥氣爆發效果持續檢測時間"
  470. wait 2 seconds
  471. stopeffect id "鬥氣爆發%player%"
  472. stop
  473.  
  474.  
  475. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  476. # [ Buff 增益效果 ]
  477. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  478. #[ 鬥氣爆發 ]
  479. on command:
  480. command is "鬥氣爆發效果持續檢測時間"
  481. cancel event
  482. if {BUFF.鬥氣爆發物攻::%player%} isn't set:
  483. stop
  484. set {_executename} to "%player%"
  485. set {_冷卻} to difference between {BUFF.鬥氣爆發time::%{_executename}%} and now
  486. while {_冷卻} is less than {@鬥氣爆發.受益時間} second:
  487. set {_冷卻} to difference between {BUFF.鬥氣爆發time::%{_executename}%} and now
  488. wait 5.1 seconds
  489. if player is online:
  490. remove {BUFF.鬥氣爆發物攻::%{_executename}%} from {玩家資料.%{_executename}%::物理攻擊力}
  491. remove {BUFF.鬥氣爆發防禦::%{_executename}%} from {玩家資料.%{_executename}%::防禦力}
  492. send "{@Tag} &c<&5鬥氣爆發&c> &c持續時間已到" to player
  493. delete {BUFF.鬥氣爆發物攻::%{_executename}%}
  494. delete {BUFF.鬥氣爆發防禦::%{_executename}%}
  495. delete {BUFF.鬥氣爆發time::%{_executename}%}
  496.  
  497. on join:
  498. if {BUFF.鬥氣爆發物攻::%player%} is set:
  499. remove {BUFF.鬥氣爆發物攻::%player%} from {玩家資料.%player%::物理攻擊力}
  500. remove {BUFF.鬥氣爆發防禦::%player%} from {玩家資料.%player%::防禦力}
  501. send "{@Tag} &c<&5鬥氣爆發&c> &c因離線而效果消失" to player
  502. delete {BUFF.鬥氣爆發物攻::%player%}
  503. delete {BUFF.鬥氣爆發防禦::%player%}
  504. delete {BUFF.鬥氣爆發time::%player%}
  505.  
  506.  
  507.  
  508. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  509. # [ ClearVariable 清除變數 ]
  510. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  511. on any movement:
  512. {冷卻.%player%::鬥靈迴砍} is set:
  513. set {_冷卻} to difference between {冷卻.%player%::鬥靈迴砍} and now
  514. if {_冷卻} >= {@鬥靈迴砍.CD} second:
  515. delete {冷卻.%player%::鬥靈迴砍}
  516.  
  517. {冷卻.%player%::鬥破山河} is set:
  518. set {_冷卻} to difference between {冷卻.%player%::鬥破山河} and now
  519. if {_冷卻} >= {@鬥破山河.CD} second:
  520. delete {冷卻.%player%::鬥破山河}
  521.  
  522. {冷卻.%player%::鬥神傳說} is set:
  523. set {_冷卻} to difference between {冷卻.%player%::鬥神傳說} and now
  524. if {_冷卻} >= {@鬥神傳說.CD} second:
  525. delete {冷卻.%player%::鬥神傳說}
  526.  
  527. {冷卻.%player%::鬥環之劍} is set:
  528. set {_冷卻} to difference between {冷卻.%player%::鬥環之劍} and now
  529. if {_冷卻} >= {@鬥環之劍.CD} second:
  530. delete {冷卻.%player%::鬥環之劍}
  531.  
  532. {冷卻.%player%::鬥氣爆發} is set:
  533. set {_冷卻} to difference between {冷卻.%player%::鬥氣爆發} and now
  534. if {_冷卻} >= {@鬥氣爆發.CD} second:
  535. delete {冷卻.%player%::鬥氣爆發}
Advertisement
Add Comment
Please, Sign In to add comment