henry900326

Untitled

Sep 24th, 2018
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.02 KB | None | 0 0
  1. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  2. # [ Options 選項 ]
  3. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  4. Options:
  5. Tag: &6技能 &c&l>>
  6.  
  7. #[ 全職業 - 終極魔力爆擊 ]
  8. 終極魔力爆擊.CD: 4
  9. 終極魔力爆擊.Max: 1
  10.  
  11.  
  12.  
  13. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  14. # [ Function 函式 ]
  15. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  16. Function Skill(P:player, S:text, Max:number, CD:number, MP:number) :: boolean:
  17. set {_Skill} to uncolored {_S}
  18. if {技能.%{_P}%::%{_Skill}%} <= 0:
  19. send "{@Tag} &c尚未學習 &f<%{_S}%&f>" to {_P}
  20. return false
  21. stop
  22. if {技能.%{_P}%::%{_Skill}%} > {_Max}:
  23. send "{@Tag} &c&l注意! 你的技能等級出現錯誤! 請盡速尋求管理員協助!" to {_P}
  24. return false
  25. stop
  26. set {_冷卻} to "%difference between {冷卻.%{_P}%::%{_Skill}%} and now%"
  27. replace "seconds" and "second" and " " with "" in {_冷卻}
  28. set {_冷卻} to {_冷卻} parsed as number
  29. set {_CD} to {_CD} parsed as number
  30. if {_冷卻} is less than {_CD}:
  31. set {_冷卻} to "%difference between {_CD} and {_冷卻}%"
  32. replace "seconds" and "second" and " " with "" in {_冷卻}
  33. send "{@Tag} &f技能冷卻中 &f<%{_S}%&f> &f還有 &e%{_冷卻}% &f秒" to {_P}
  34. return false
  35. stop
  36. if {玩家魔力值.%{_P}%} is larger or equal to {_MP}:
  37. remove {_MP} from {玩家魔力值.%{_P}%}
  38. set {_math} to 0.99 * {玩家魔力值.%{_P}%} / {玩家資料.%{_P}%::魔力值}
  39. if {_math} is more than or equal to 1:
  40. set {_math} to 0.99
  41. set level progress of {_P} to {_math}
  42. set {_P}'s level to {玩家魔力值.%{_P}%}
  43. send "{@Tag} &f施放技能 &f<%{_S}%&f> &f消耗了 &9%{_MP}% &f魔力值" to {_P}
  44. else:
  45. send "{@Tag} &c魔力不足 無法施放 &f<%{_S}%&f>" to {_P}
  46. return false
  47. stop
  48. return true
  49.  
  50.  
  51.  
  52. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  53. # [ Skill 技能 ]
  54. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  55. on right click:
  56. {玩家資料.%player%::玩家職業} is set
  57. set {_STRATK} to {玩家資料.%player%::力量} * 0.5
  58. set {_DEXATK} to {玩家資料.%player%::敏捷} * 0.7
  59. set {_INTATK} to {玩家資料.%player%::智慧} * 0.6
  60. set {_LUKATK} to {玩家資料.%player%::幸運} * 0.4
  61. set {_PHYSICDMG} to {玩家資料.%player%::物理攻擊力}
  62. set {_MAGICDMG} to {玩家資料.%player%::魔法攻擊力}
  63. if {幾轉職業::%{玩家資料.%player%::玩家職業}%} is 0:
  64. add ({_STRATK} + {_DEXATK} + {_LUKATK}) to {_PHYSICDMG}
  65. add ({_INTATK} + {_LUKATK}) to {_MAGICDMG}
  66. if {幾轉職業::%{玩家資料.%player%::玩家職業}%} is 1:
  67. add ({_STRATK} + {_DEXATK} + {_LUKATK})*1.2 to {_PHYSICDMG}
  68. add ({_INTATK} + {_LUKATK})*1.2 to {_MAGICDMG}
  69. if {幾轉職業::%{玩家資料.%player%::玩家職業}%} is 2:
  70. add ({_STRATK} + {_DEXATK} + {_LUKATK})*1.4 to {_PHYSICDMG}
  71. add ({_INTATK} + {_LUKATK})*1.4 to {_MAGICDMG}
  72. if {幾轉職業::%{玩家資料.%player%::玩家職業}%} is 3:
  73. add ({_STRATK} + {_DEXATK} + {_LUKATK})*1.8 to {_PHYSICDMG}
  74. add ({_INTATK} + {_LUKATK})*1.8 to {_MAGICDMG}
  75. set {_check} to {玩家資料.%player%::最大血量}
  76. if {幾轉職業::%{玩家資料.%player%::玩家職業}%} is 0:
  77. add ({玩家資料.%player%::力量} * 5) to {_check}
  78. add ({玩家資料.%player%::智慧} * 4) to {_check}
  79. add ({玩家資料.%player%::敏捷} * 3) to {_check}
  80. add ({玩家資料.%player%::幸運} * 2) to {_check}
  81. if {幾轉職業::%{玩家資料.%player%::玩家職業}%} is 1:
  82. add ({玩家資料.%player%::力量} * 5)*1.25 to {_check}
  83. add ({玩家資料.%player%::智慧} * 4)*1.25 to {_check}
  84. add ({玩家資料.%player%::敏捷} * 3)*1.25 to {_check}
  85. add ({玩家資料.%player%::幸運} * 2)*1.25 to {_check}
  86. if {幾轉職業::%{玩家資料.%player%::玩家職業}%} is 2:
  87. add ({玩家資料.%player%::力量} * 5)*1.5 to {_check}
  88. add ({玩家資料.%player%::智慧} * 4)*1.5 to {_check}
  89. add ({玩家資料.%player%::敏捷} * 3)*1.5 to {_check}
  90. add ({玩家資料.%player%::幸運} * 2)*1.5 to {_check}
  91. if {幾轉職業::%{玩家資料.%player%::玩家職業}%} is 3:
  92. add ({玩家資料.%player%::力量} * 5)*2 to {_check}
  93. add ({玩家資料.%player%::智慧} * 4)*2 to {_check}
  94. add ({玩家資料.%player%::敏捷} * 3)*2 to {_check}
  95. add ({玩家資料.%player%::幸運} * 2)*2 to {_check}
  96. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  97. #[ 初心者 - 終極●魔力爆擊 ]
  98. if uncolored name of player's tool contains "終極魔力爆擊":
  99.  
  100. if {玩家資料.%player%::玩家等級} < 120:
  101. send "{@Tag} &c等級不足 無法使用該技能" to player
  102. stop
  103. if {玩家魔力值.%player%} < 20:
  104. send "{@Tag} &c魔力不足 無法施放 &f<&6終極魔力爆擊f>" to player
  105. stop
  106. set {_消耗mp} to round({玩家魔力值.%player%}*0.5)
  107. if Skill(player, "&c終極魔力爆擊", {@終極魔力爆擊.Max}, {@終極魔力爆擊.CD}, {_消耗mp}) is true:
  108. set {冷卻.%player%::終極魔力爆擊} to now
  109. play "ENTITY_ENDERDRAGON_HURT" to player with volume 1 and pitch 2
  110. play "ENTITY_ENDERDRAGON_HURT" to player with volume 1 and pitch 4
  111. set {_location.1} to block above player
  112. set {_location.2} to block 8 in front player
  113. add 2 to y-coordinate of {_location.2}
  114. set {_x.1} to x-coordinate of {_location.1}
  115. set {_x.2} to x-coordinate of {_location.2}
  116. set {_y.1} to y-coordinate of {_location.1}
  117. set {_y.2} to y-coordinate of {_location.2}
  118. set {_z.1} to z-coordinate of {_location.1}
  119. set {_z.2} to z-coordinate of {_location.2}
  120. set {_x.difference} to ({_x.2} - {_x.1}) / 10
  121. set {_y.difference} to ({_y.2} - {_y.1}) / 10
  122. set {_z.difference} to ({_z.2} - {_z.1}) / 10
  123. loop 10 times:
  124. set {_location.1} to location of {_location.1}
  125. increase x-coordinate of {_location.1} by {_x.difference}
  126. increase y-coordinate of {_location.1} by {_y.difference}
  127. increase z-coordinate of {_location.1} by {_z.difference}
  128. drawDot count 10, particle "blockdust", material portal, XYZ 0.1, 0.1, 0.1, center {_location.1}, visibleRange 32, pulseDelay 2, keepFor 0.2 seconds
  129. loop entities in radius 1.3 around block at location of {_location.1}:
  130. if loop-entity isn't a player or a dropped item:
  131. if {_命中} is not set:
  132. set {_命中} to 1
  133. make player damage loop-entity by ( ({_PHYSICDMG}*0.65) + ({_MAGICDMG}*0.8) ) * {_消耗mp}*3.5/200 * (20)
  134. drawDot count 25, particle "blockdust", material portal, XYZ 0.8, 1.2, 0.8, center loop-entity, visibleRange 32, pulseDelay 2, keepFor 0.3 seconds
  135. else if {_命中} is set:
  136. exit loop
  137. else if {_命中} is set:
  138. exit loop
  139. stop
  140. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  141. # [ ClearVariable 清除變數 ]
  142. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  143. on any movement:
  144. {冷卻.%player%::終極魔力爆擊} is set:
  145. set {_冷卻} to difference between {冷卻.%player%::終極魔力爆擊} and now
  146. if {_冷卻} >= {@終極魔力爆擊.CD} second:
  147. delete {冷卻.%player%::終極魔力爆擊}
Advertisement
Add Comment
Please, Sign In to add comment