henry900326

Untitled

Sep 25th, 2018
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.47 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. 終極疾風幻步.CD: 6
  13. 終極疾風幻步.MP: 60
  14. 終極疾風幻步.Max: 1
  15.  
  16. #[ 全職業 - 終極生命恢復 ]
  17. 終極生命恢復.CD: 6
  18. 終極生命恢復.MP: 70
  19. 終極生命恢復.Max: 1
  20.  
  21. #[ 全職業 - 冒險者的祝福 ]
  22. 冒險者的祝福.CD: 210
  23. 冒險者的祝福.受益時間: 180
  24. 冒險者的祝福.MP: 120
  25. 冒險者的祝福.Max: 1
  26.  
  27.  
  28. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  29. # [ Function 函式 ]
  30. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  31. Function Skill(P:player, S:text, Max:number, CD:number, MP:number) :: boolean:
  32. set {_Skill} to uncolored {_S}
  33. if {技能.%{_P}%::%{_Skill}%} <= 0:
  34. send "{@Tag} &c尚未學習 &f<%{_S}%&f>" to {_P}
  35. return false
  36. stop
  37. if {技能.%{_P}%::%{_Skill}%} > {_Max}:
  38. send "{@Tag} &c&l注意! 你的技能等級出現錯誤! 請盡速尋求管理員協助!" to {_P}
  39. return false
  40. stop
  41. set {_冷卻} to "%difference between {冷卻.%{_P}%::%{_Skill}%} and now%"
  42. replace "seconds" and "second" and " " with "" in {_冷卻}
  43. set {_冷卻} to {_冷卻} parsed as number
  44. set {_CD} to {_CD} parsed as number
  45. if {_冷卻} is less than {_CD}:
  46. set {_冷卻} to "%difference between {_CD} and {_冷卻}%"
  47. replace "seconds" and "second" and " " with "" in {_冷卻}
  48. send "{@Tag} &f技能冷卻中 &f<%{_S}%&f> &f還有 &e%{_冷卻}% &f秒" to {_P}
  49. return false
  50. stop
  51. if {玩家魔力值.%{_P}%} is larger or equal to {_MP}:
  52. remove {_MP} from {玩家魔力值.%{_P}%}
  53. set {_math} to 0.99 * {玩家魔力值.%{_P}%} / {玩家資料.%{_P}%::魔力值}
  54. if {_math} is more than or equal to 1:
  55. set {_math} to 0.99
  56. set level progress of {_P} to {_math}
  57. set {_P}'s level to {玩家魔力值.%{_P}%}
  58. send "{@Tag} &f施放技能 &f<%{_S}%&f> &f消耗了 &9%{_MP}% &f魔力值" to {_P}
  59. else:
  60. send "{@Tag} &c魔力不足 無法施放 &f<%{_S}%&f>" to {_P}
  61. return false
  62. stop
  63. return true
  64.  
  65.  
  66.  
  67. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  68. # [ Skill 技能 ]
  69. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  70. on right click:
  71. {玩家資料.%player%::玩家職業} is set
  72. set {_STRATK} to {玩家資料.%player%::力量} * 0.5
  73. set {_DEXATK} to {玩家資料.%player%::敏捷} * 0.7
  74. set {_INTATK} to {玩家資料.%player%::智慧} * 0.6
  75. set {_LUKATK} to {玩家資料.%player%::幸運} * 0.4
  76. set {_PHYSICDMG} to {玩家資料.%player%::物理攻擊力}
  77. set {_MAGICDMG} to {玩家資料.%player%::魔法攻擊力}
  78. if {幾轉職業::%{玩家資料.%player%::玩家職業}%} is 0:
  79. add ({_STRATK} + {_DEXATK} + {_LUKATK}) to {_PHYSICDMG}
  80. add ({_INTATK} + {_LUKATK}) to {_MAGICDMG}
  81. if {幾轉職業::%{玩家資料.%player%::玩家職業}%} is 1:
  82. add ({_STRATK} + {_DEXATK} + {_LUKATK})*1.2 to {_PHYSICDMG}
  83. add ({_INTATK} + {_LUKATK})*1.2 to {_MAGICDMG}
  84. if {幾轉職業::%{玩家資料.%player%::玩家職業}%} is 2:
  85. add ({_STRATK} + {_DEXATK} + {_LUKATK})*1.4 to {_PHYSICDMG}
  86. add ({_INTATK} + {_LUKATK})*1.4 to {_MAGICDMG}
  87. if {幾轉職業::%{玩家資料.%player%::玩家職業}%} is 3:
  88. add ({_STRATK} + {_DEXATK} + {_LUKATK})*1.8 to {_PHYSICDMG}
  89. add ({_INTATK} + {_LUKATK})*1.8 to {_MAGICDMG}
  90. set {_check} to {玩家資料.%player%::最大血量}
  91. if {幾轉職業::%{玩家資料.%player%::玩家職業}%} is 0:
  92. add ({玩家資料.%player%::力量} * 5) to {_check}
  93. add ({玩家資料.%player%::智慧} * 4) to {_check}
  94. add ({玩家資料.%player%::敏捷} * 3) to {_check}
  95. add ({玩家資料.%player%::幸運} * 2) to {_check}
  96. if {幾轉職業::%{玩家資料.%player%::玩家職業}%} is 1:
  97. add ({玩家資料.%player%::力量} * 5)*1.25 to {_check}
  98. add ({玩家資料.%player%::智慧} * 4)*1.25 to {_check}
  99. add ({玩家資料.%player%::敏捷} * 3)*1.25 to {_check}
  100. add ({玩家資料.%player%::幸運} * 2)*1.25 to {_check}
  101. if {幾轉職業::%{玩家資料.%player%::玩家職業}%} is 2:
  102. add ({玩家資料.%player%::力量} * 5)*1.5 to {_check}
  103. add ({玩家資料.%player%::智慧} * 4)*1.5 to {_check}
  104. add ({玩家資料.%player%::敏捷} * 3)*1.5 to {_check}
  105. add ({玩家資料.%player%::幸運} * 2)*1.5 to {_check}
  106. if {幾轉職業::%{玩家資料.%player%::玩家職業}%} is 3:
  107. add ({玩家資料.%player%::力量} * 5)*2 to {_check}
  108. add ({玩家資料.%player%::智慧} * 4)*2 to {_check}
  109. add ({玩家資料.%player%::敏捷} * 3)*2 to {_check}
  110. add ({玩家資料.%player%::幸運} * 2)*2 to {_check}
  111. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  112. #[ 初心者 - 終極魔力爆擊 ]
  113. if uncolored name of player's tool contains "終極魔力爆擊":
  114. if {玩家資料.%player%::玩家等級} < 120:
  115. send "{@Tag} &c等級不足 無法使用該技能" to player
  116. stop
  117. if {玩家魔力值.%player%} < 20:
  118. send "{@Tag} &c魔力不足 無法施放 &f<&6終極魔力爆擊f>" to player
  119. stop
  120. set {_消耗mp} to round({玩家魔力值.%player%}*0.5)
  121. if Skill(player, "&c終極魔力爆擊", {@終極魔力爆擊.Max}, {@終極魔力爆擊.CD}, {_消耗mp}) is true:
  122. set {冷卻.%player%::終極魔力爆擊} to now
  123. play "ENTITY_ENDERDRAGON_HURT" to player with volume 1 and pitch 2
  124. play "ENTITY_ENDERDRAGON_HURT" to player with volume 1 and pitch 4
  125. set {_location.1} to block above player
  126. set {_location.2} to block 8 in front player
  127. add 2 to y-coordinate of {_location.2}
  128. set {_x.1} to x-coordinate of {_location.1}
  129. set {_x.2} to x-coordinate of {_location.2}
  130. set {_y.1} to y-coordinate of {_location.1}
  131. set {_y.2} to y-coordinate of {_location.2}
  132. set {_z.1} to z-coordinate of {_location.1}
  133. set {_z.2} to z-coordinate of {_location.2}
  134. set {_x.difference} to ({_x.2} - {_x.1}) / 10
  135. set {_y.difference} to ({_y.2} - {_y.1}) / 10
  136. set {_z.difference} to ({_z.2} - {_z.1}) / 10
  137. set {_命中} to 0
  138. loop 10 times:
  139. set {_location.1} to location of {_location.1}
  140. increase x-coordinate of {_location.1} by {_x.difference}
  141. increase y-coordinate of {_location.1} by {_y.difference}
  142. increase z-coordinate of {_location.1} by {_z.difference}
  143. 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
  144. loop entities in radius 1.3 around block at location of {_location.1}:
  145. if loop-entity isn't a player or a dropped item:
  146. if {_命中} is not 3:
  147. add 1 to {_命中}
  148. make player damage loop-entity by ( ({_PHYSICDMG}*0.65) + ({_MAGICDMG}*0.8) ) * {_消耗mp}*3.5/200 * (20)
  149. 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
  150. stop loop
  151. stop
  152. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  153. #[ 初心者 - 終極生命恢復 ]
  154. if uncolored name of player's tool contains "終極生命恢復":
  155. if Skill(player, "&d終極生命恢復", {@終極生命恢復.Max}, {@終極生命恢復.CD}, {@終極生命恢復.MP}) is true:
  156. set {冷卻.%player%::終極生命恢復} to now
  157. drawDot count 8, particle "heart", XYZ 0.2, 0.5, 0.2, center player, visibleRange 32, pulseDelay 2, keepFor 5 seconds
  158. play "ENTITY_FIREWORK_LAUNCH" to player with volume 1 and pitch 2
  159. loop 5 times:
  160. heal player by 2
  161. wait 1 second
  162. stopeffect id "終極生命恢復%player%"
  163. stop
  164. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  165. #[ 初心者 - 終極疾風幻步 ]
  166. if uncolored name of player's tool contains "終極疾風幻步":
  167. if Skill(player, "&b終極疾風幻步", {@終極疾風幻步.Max}, {@終極疾風幻步.CD}, {@終極疾風幻步.MP}) is true:
  168. set {冷卻.%player%::終極疾風幻步} to now
  169. drawRings particle "fireworkspark", center player, id "終極疾風幻步%player%", rainbowMode no, randomRotation no, animated yes, radius 1, ringCount 2, ringDensity 6, visibleRange 32, pulseDelay 1
  170. play "ENTITY_RABBIT_HURT" to player with volume 1 and pitch 2
  171. set {技能加速.%player%} to {玩家資料.%player%::移動速度}*0.5
  172. wait 15 seconds
  173. delete {技能加速.%player%}
  174. stopeffect id "終極疾風幻步%player%"
  175. stop
  176. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  177. #[ 全職業 - 冒險者的祝福 ]
  178. if uncolored name of player's tool contains "冒險者的祝福":
  179. if Skill(player, "&6冒險者的祝福", {@冒險者的祝福.Max}, {@冒險者的祝福.CD}, {@冒險者的祝福.MP}) is true:
  180. set {冷卻.%player%::冒險者的祝福} to now
  181. play "ENTITY_PLAYER_LEVELUP" to player with volume 500 and pitch 1.5
  182. play "ENTITY_PLAYER_LEVELUP" to player with volume 500 and pitch 2
  183. play "ENTITY_PLAYER_LEVELUP" to player with volume 500 and pitch 2.5
  184. play "ENTITY_PLAYER_LEVELUP" to player with volume 500 and pitch 3
  185. if {BUFF.冒險者的祝福time::%player%} isn't set:
  186. set {BUFF.冒險者的祝福time::%player%} to now
  187. if {玩家資料.%player%::玩家職業} is "法師" or "祭司" or "主教" or "煉獄巫師" or "巫師" or "火毒魔導" or "冰雷魔導":
  188. set {BUFF.冒險者的祝福.魔法攻擊力::%player%} to 200
  189. if {玩家資料.%player%::玩家職業} is "戰士" or "騎士" or "龍騎士" or "聖騎士" or "劍士" or "劍鬥士" or "劍俠" or "盜賊" or "俠客" or "影武者" or "拳霸" or "刺客" or "夜使者" or "暗器使" or "弓箭手" or "遊俠" or "箭神" or "槍神" or "獵人" or "神箭手" or "重砲手":
  190. set {BUFF.冒險者的祝福.物理攻擊力::%player%} to 200
  191. else:
  192. set {BUFF.冒險者的祝福.魔法攻擊力::%player%} to 100
  193. set {BUFF.冒險者的祝福.物理攻擊力::%player%} to 100
  194. set {BUFF.冒險者的祝福.防禦力::%player%} to 150
  195. set {BUFF.冒險者的祝福.移動速度::%player%} to 25
  196. set {BUFF.冒險者的祝福.跳躍力::%player%} to 25
  197. set {BUFF.冒險者的祝福.爆擊率::%player%} to 5
  198. set {BUFF.冒險者的祝福.爆擊傷害::%player%} to 10
  199. set {BUFF.冒險者的祝福.血量恢復量::%player%} to 500
  200. set {BUFF.冒險者的祝福.魔量恢復量::%player%} to 10
  201. add {BUFF.冒險者的祝福.魔法攻擊力::%player%} to {玩家資料.%player%::魔法攻擊力}
  202. add {BUFF.冒險者的祝福.物理攻擊力::%player%} to {玩家資料.%player%::物理攻擊力}
  203. add {BUFF.冒險者的祝福.防禦力::%player%} to {玩家資料.%player%::防禦力}
  204. add {BUFF.冒險者的祝福.移動速度::%player%} to {玩家資料.%player%::移動速度}
  205. add {BUFF.冒險者的祝福.跳躍力::%player%} to {玩家資料.%player%::跳躍力}
  206. add {BUFF.冒險者的祝福.爆擊率::%player%} to {玩家資料.%player%::爆擊率}
  207. add {BUFF.冒險者的祝福.爆擊傷害::%player%} to {玩家資料.%player%::爆擊傷害}
  208. add {BUFF.冒險者的祝福.血量恢復量::%player%} to {玩家資料.%player%::血量恢復量}
  209. add {BUFF.冒險者的祝福.魔量恢復量::%player%} to {玩家資料.%player%::魔量恢復量}
  210. execute player command "冒險者的祝福效果持續檢測時間"
  211. drawWarpRings style 1, particle "fireworkspark", center player, id "冒險者的祝福1%player%", rainbowMode false, scan true, height 2, radius 0.5, ringCount 5, ringDensity 5, visibleRange 32, pulseDelay 0.8
  212. drawWarpRings style 2, particle "redstone", RGB 255, 209, 5, center player, id "冒險者的祝福2%player%", rainbowMode false, scan true, height 2, radius 0.5, ringCount 5, ringDensity 5, visibleRange 32, pulseDelay 0.8
  213. wait 1 seconds
  214. stopeffect id "冒險者的祝福1%player%"
  215. stopeffect id "冒險者的祝福2%player%"
  216.  
  217.  
  218. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  219. # [ Buff 增益效果 ]
  220. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  221. #[ 全職業 - 冒險者的祝福 ]
  222. on command:
  223. command is "冒險者的祝福效果持續檢測時間"
  224. cancel event
  225. if {BUFF.冒險者的祝福.防禦力::%player%} isn't set:
  226. stop
  227. set {_executename} to "%player%"
  228. set {_冷卻} to difference between {BUFF.冒險者的祝福time::%{_executename}%} and now
  229. while {_冷卻} is less than {@冒險者的祝福.受益時間} second:
  230. set {_冷卻} to difference between {BUFF.冒險者的祝福time::%{_executename}%} and now
  231. wait 5.1 seconds
  232. if player is online:
  233. remove {BUFF.冒險者的祝福.魔法攻擊力::%{_executename}%} from {玩家資料.%{_executename}%::魔法攻擊力}
  234. remove {BUFF.冒險者的祝福.物理攻擊力::%{_executename}%} from {玩家資料.%{_executename}%::物理攻擊力}
  235. remove {BUFF.冒險者的祝福.防禦力::%{_executename}%} from {玩家資料.%{_executename}%::防禦力}
  236. remove {BUFF.冒險者的祝福.移動速度::%{_executename}%} from {玩家資料.%{_executename}%::移動速度}
  237. remove {BUFF.冒險者的祝福.跳躍力::%{_executename}%} from {玩家資料.%{_executename}%::跳躍力}
  238. remove {BUFF.冒險者的祝福.爆擊率::%{_executename}%} from {玩家資料.%{_executename}%::爆擊率}
  239. remove {BUFF.冒險者的祝福.爆擊傷害::%{_executename}%} from {玩家資料.%{_executename}%::爆擊傷害}
  240. remove {BUFF.冒險者的祝福.血量恢復量::%{_executename}%} from {玩家資料.%{_executename}%::血量恢復量}
  241. remove {BUFF.冒險者的祝福.魔量恢復量::%{_executename}%} from {玩家資料.%{_executename}%::魔量恢復量}
  242. send "{@Tag} &c<&6冒險者的祝福&c> &c持續時間已到" to player
  243. delete {BUFF.冒險者的祝福.魔法攻擊力::%{_executename}%}
  244. delete {BUFF.冒險者的祝福.物理攻擊力::%{_executename}%}
  245. delete {BUFF.冒險者的祝福.防禦力::%{_executename}%}
  246. delete {BUFF.冒險者的祝福.移動速度::%{_executename}%}
  247. delete {BUFF.冒險者的祝福.跳躍力::%{_executename}%}
  248. delete {BUFF.冒險者的祝福.爆擊率::%{_executename}%}
  249. delete {BUFF.冒險者的祝福.爆擊傷害::%{_executename}%}
  250. delete {BUFF.冒險者的祝福.血量恢復量::%{_executename}%}
  251. delete {BUFF.冒險者的祝福.魔量恢復量::%{_executename}%}
  252. delete {BUFF.冒險者的祝福time::%{_executename}%}
  253.  
  254. on join:
  255. if {BUFF.冒險者的祝福.防禦力::%player%} is set:
  256. remove {BUFF.冒險者的祝福.魔法攻擊力::%player%} from {玩家資料.%player%::魔法攻擊力}
  257. remove {BUFF.冒險者的祝福.物理攻擊力::%player%} from {玩家資料.%player%::物理攻擊力}
  258. remove {BUFF.冒險者的祝福.防禦力::%player%} from {玩家資料.%player%::防禦力}
  259. remove {BUFF.冒險者的祝福.移動速度::%player%} from {玩家資料.%player%::移動速度}
  260. remove {BUFF.冒險者的祝福.跳躍力::%player%} from {玩家資料.%player%::跳躍力}
  261. remove {BUFF.冒險者的祝福.爆擊率::%player%} from {玩家資料.%player%::爆擊率}
  262. remove {BUFF.冒險者的祝福.爆擊傷害::%player%} from {玩家資料.%player%::爆擊傷害}
  263. remove {BUFF.冒險者的祝福.血量恢復量::%player%} from {玩家資料.%player%::血量恢復量}
  264. remove {BUFF.冒險者的祝福.魔量恢復量::%player%} from {玩家資料.%player%::魔量恢復量}
  265. send "{@Tag} &c<&6冒險者的祝福&c> &c因離線而效果消失" to player
  266. delete {BUFF.冒險者的祝福.魔法攻擊力::%player%}
  267. delete {BUFF.冒險者的祝福.物理攻擊力::%player%}
  268. delete {BUFF.冒險者的祝福.防禦力::%player%}
  269. delete {BUFF.冒險者的祝福.移動速度::%player%}
  270. delete {BUFF.冒險者的祝福.跳躍力::%player%}
  271. delete {BUFF.冒險者的祝福.爆擊率::%player%}
  272. delete {BUFF.冒險者的祝福.爆擊傷害::%player%}
  273. delete {BUFF.冒險者的祝福.血量恢復量::%player%}
  274. delete {BUFF.冒險者的祝福.魔量恢復量::%player%}
  275. delete {BUFF.冒險者的祝福time::%player%}
  276.  
  277.  
  278.  
  279. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  280. # [ ClearVariable 清除變數 ]
  281. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  282. on any movement:
  283. {冷卻.%player%::終極魔力爆擊} is set:
  284. set {_冷卻} to difference between {冷卻.%player%::終極魔力爆擊} and now
  285. if {_冷卻} >= {@終極魔力爆擊.CD} second:
  286. delete {冷卻.%player%::終極魔力爆擊}
  287.  
  288. {冷卻.%player%::終極生命恢復} is set:
  289. set {_冷卻} to difference between {冷卻.%player%::終極生命恢復} and now
  290. if {_冷卻} >= {@終極生命恢復.CD} second:
  291. delete {冷卻.%player%::終極生命恢復}
  292.  
  293. {冷卻.%player%::終極疾風幻步} is set:
  294. set {_冷卻} to difference between {冷卻.%player%::終極疾風幻步} and now
  295. if {_冷卻} >= {@終極疾風幻步.CD} second:
  296. delete {冷卻.%player%::終極疾風幻步}
  297.  
  298. {冷卻.%player%::冒險者的祝福} is set:
  299. set {_冷卻} to difference between {冷卻.%player%::冒險者的祝福} and now
  300. if {_冷卻} >= {@冒險者的祝福.CD} second:
  301. delete {冷卻.%player%::冒險者的祝福}
  302.  
  303.  
  304.  
  305.  
  306.  
  307. on right click:
  308. if name of player's tool contains "超技能":
  309. if lore of player's tool contains "&9無法丟棄" or "&9無法交易":
  310. stop
  311. else:
  312. set {_lore} to lore of player's tool
  313. set lore of player's tool to "%{_lore}%||&9無法丟棄||&9無法交易"
Advertisement
Add Comment
Please, Sign In to add comment