henry900326

Untitled

Sep 22nd, 2018
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.48 KB | None | 0 0
  1. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  2. # [ Options 選項 ]
  3. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  4. Options:
  5. Tag: &6技能 &c&l>>
  6.  
  7. #[ 影武者 - 死神圓舞曲 ]
  8. 死神圓舞曲.CD: 4
  9. 死神圓舞曲.MP: 80
  10. 死神圓舞曲.Max: 1
  11.  
  12. #[ 主教 - 天堂之門 ]
  13. 天堂之門.CD: 20
  14. 天堂之門.MP: 250
  15. 天堂之門.Max: 1
  16.  
  17. #[ 箭神 - 元素之箭 ]
  18. 元素之箭.CD: 10
  19. 元素之箭.MP: 100
  20. 元素之箭.Max: 1
  21.  
  22. #[ 箭神 - 旋風落葉神射 ]
  23. 旋風落葉神射.CD: 1
  24. 旋風落葉神射.MP: 1
  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. if uncolored name of player's tool contains "超技能":
  112. if {玩家資料.%player%::玩家等級} < 120:
  113. send "{@Tag} &c等級不足 無法使用該技能" to player
  114. stop
  115. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  116. #[ 影武者 - 死神圓舞曲 ]
  117. if uncolored name of player's tool contains "死神圓舞曲":
  118. {玩家資料.%player%::玩家職業} is "影武者"
  119. if Skill(player, "&6死神圓舞曲", {@死神圓舞曲.Max}, {@死神圓舞曲.CD}, {@死神圓舞曲.MP}) is true:
  120. set {冷卻.%player%::死神圓舞曲} to now
  121. set {_技能.%player%::死神圓舞曲} to 1
  122. play "ENTITY_ELDER_GUARDIAN_CURSE" to player with volume 1000 and pitch 0
  123. drawWarpRings style 4, particle "redstone", RGB 237, 21, 93, center player, id "死神圓舞曲%player%", rainbowMode false, scan true, height 4, radius 2, ringCount 5, ringDensity 20, visibleRange 32, pulseDelay 3
  124. set {死神圓舞曲::%player%} to true
  125. wait 2 tick
  126. set {_location.1} to location of player
  127. set {_location.2} to block 6 horizontally in front player
  128. set {_location.2} to location of {_location.2}
  129. add 3.5 to y-coordinate of {_location.2}
  130. set {_x1} to x-coordinate of {_location.1}
  131. set {_y1} to y-coordinate of {_location.1}
  132. set {_z1} to z-coordinate of {_location.1}
  133. set {_x2} to x-coordinate of {_location.2}
  134. set {_y2} to y-coordinate of {_location.2}
  135. set {_z2} to z-coordinate of {_location.2}
  136. set {_x} to "%({_x2}-{_x1})/4*1.25%" parsed as number
  137. set {_y} to "%({_y2}-{_y1})/8*1.225%" parsed as number
  138. set {_z} to "%({_z2}-{_z1})/4*1.25%" parsed as number
  139. set velocity of player to new Vector {_x}, {_y}, {_z}
  140. wait 3 tick
  141. stopEffect "死神圓舞曲%player%"
  142. drawAtom particle1 "crit", XYZ 0, -1.5, 0, particle2 "sweep", XYZ2 0, -1.5, 0, center player, id "死神圓舞曲%player%", rainbowMode false, innerPCount 1, innerRadius 2, outerPCount 8, orbitCount 4, start 0, visibleRange 30, rotation 75
  143. loop 16 times:
  144. loop entities in radius 3.25 of player:
  145. if loop-entity isn't a player or a dropped item:
  146. set {_x} to {_x}*(16-loop-number)/16
  147. set {_y} to {_y}*(16-loop-number)/16
  148. set {_z} to {_z}*(16-loop-number)/16
  149. set velocity of loop-entity to new Vector {_x}, {_y}, {_z}
  150. set {_damage} to (loop-number*1/15)+(14/15)
  151. make player damage loop-entity by {_PHYSICDMG}*(3*{_技能.%player%::死神圓舞曲})*{_damage}
  152. if {_heal} <= 30:
  153. heal player by {_check}*0.01 / (player's max health + {_check}) * player's max health
  154. add 1 to {_heal}
  155. push loop-entity in horizontal direction of player at speed 0.5
  156. play "ENTITY_PLAYER_ATTACK_KNOCKBACK" to player with volume 1000 and pitch 2
  157. play "ENTITY_PLAYER_ATTACK_SWEEP" to player with volume 1000 and pitch 2
  158. drawDot count 10, particle "smoke", XYZ 0, 1, 0, center player, rainbowMode false, visibleRange 32, pulseDelay 2, keepFor 0.5 seconds
  159. drawDot count 10, particle "mobspell", XYZ 0, 1, 0, center player, rainbowMode false, visibleRange 32, pulseDelay 2, keepFor 0.5 seconds
  160. wait 1 tick
  161. stopEffect "死神圓舞曲%player%"
  162. play "ENTITY_PLAYER_ATTACK_CRIT" to player with volume 1000 and pitch 2
  163. play "ENTITY_PLAYER_ATTACK_KNOCKBACK" to player with volume 1000 and pitch 2
  164. play "ENTITY_PLAYER_ATTACK_SWEEP" to player with volume 1000 and pitch 0
  165. wait 1 tick
  166. drawWarpRings style 3, particle "smoke", XYZ 0, 0.5, 0, center player, id "死神圓舞曲1%player%", rainbowMode false, scan true, height 4, radius 2, ringCount 5, ringDensity 10, visibleRange 32, pulseDelay 0.2
  167. wait 1 tick
  168. drawWarpRings style 3, particle "smoke", XYZ 0, 0.5, 0, center player, id "死神圓舞曲2%player%", rainbowMode false, scan true, height 4, radius 4, ringCount 5, ringDensity 20, visibleRange 32, pulseDelay 0.2
  169. wait 1 tick
  170. drawWarpRings style 3, particle "smoke", XYZ 0, 0.5, 0, center player, id "死神圓舞曲3%player%", rainbowMode false, scan true, height 4, radius 6, ringCount 5, ringDensity 25, visibleRange 32, pulseDelay 0.2
  171. loop entities in radius 7 of player:
  172. if loop-entity isn't a player or a dropped item:
  173. make player damage loop-entity by {_PHYSICDMG}*(15*{_技能.%player%::死神圓舞曲})
  174. drawDot count 8, particle "crit", XYZ 0.6, 1, 0.6, center loop-entity, rainbowMode false, visibleRange 32, pulseDelay 2, keepFor 0.5 seconds
  175. heal player by {_check}*0.05 / (player's max health + {_check}) * player's max health
  176. wait 5 tick
  177. stopEffect "死神圓舞曲1%player%"
  178. stopEffect "死神圓舞曲2%player%"
  179. stopEffect "死神圓舞曲3%player%"
  180. delete {死神圓舞曲::%player%}
  181. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  182. #[ 主教 - 天堂之門 ]
  183. if uncolored name of player's tool contains "天堂之門":
  184. {玩家資料.%player%::玩家職業} is "主教"
  185. if Skill(player, "&6天堂之門", {@天堂之門.Max}, {@天堂之門.CD}, {@天堂之門.MP}) is true:
  186. set {冷卻.%player%::天堂之門} to now
  187. play "BLOCK_CHEST_OPEN" to player with volume 1 and pitch 0
  188. play "BLOCK_LAVA_POP" to player with volume 1 and pitch 1
  189. play "ENTITY_WITHER_SPAWN" to player with volume 1 and pitch 2
  190. set {_location.1} to block below player
  191. set {_location.1} to location of {_location.1}
  192. drawDot count 40, particle "endrod", XYZ 0.1, 10, -0.1, center {_location.1}, visibleRange 32, pulseDelay 2, keepFor 4 seconds
  193. drawWarpRings style 1, particle "fireworkspark", center {_location.1}, id "天堂之門%player%", rainbowMode false, scan true, height 8, radius 8, ringCount 15, ringDensity 15, visibleRange 32, pulseDelay 1
  194. drawWarpRings style 2, particle "spellinstant", center {_location.1}, id "天堂之門2%player%", rainbowMode false, scan true, height 8, radius 5, ringCount 15, ringDensity 15, visibleRange 32, pulseDelay 1
  195. wait 1 seconds
  196. loop 3 times:
  197. play "ENTITY_ELDER_GUARDIAN_DEATH" to player with volume 1 and pitch 2
  198. loop entities in radius 15 around block at location of {_location.1}:
  199. if loop-entity isn't a player or a dropped item:
  200. make player damage loop-entity by ({_MAGICDMG})*15
  201. drawDot count 8, particle "blockdust", material glowstone, XYZ -0.5, 1, 0.5, center loop-entity, visibleRange 32, pulseDelay 2, keepFor 0.1 seconds
  202. drawDot count 8, particle "cloud", XYZ -0.5, 1, 0.5, center loop-entity, visibleRange 32, pulseDelay 2, keepFor 0.1 seconds
  203. drawDot count 25, particle "fireworkspark", XYZ 0.3, 5, -0.3, center loop-entity, visibleRange 32, pulseDelay 2, keepFor 0.1 seconds
  204. drawDot count 1, particle "explosionlarge", XYZ 0, 0, 0, center loop-entity, visibleRange 32, pulseDelay 2, keepFor 1 seconds
  205. else if loop-entity is a player:
  206. send "&6技能 >> &e玩家 &c%player% 使用了 &6天堂之門 &e使你恢復了 &d%{玩家資料.%player%::最大血量}% &e點血量" to loop-entity
  207. heal loop-entity by {玩家資料.%player%::最大血量} / (loop-entity's max health + {_check}) * loop-entity's max health
  208. drawDot count 15, particle "heart", XYZ 0, 5, -0, center loop-entity, visibleRange 32, pulseDelay 2, keepFor 0.2 seconds
  209. play "ENTITY_ELDER_GUARDIAN_DEATH" to loop-entity with volume 1 and pitch 2
  210. wait 20 ticks
  211. wait 20 ticks
  212. stopeffect id "天堂之門%player%"
  213. stopeffect id "天堂之門2%player%"
  214. stop
  215.  
  216. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
  217. #[ 箭神 - 元素之箭 ]
  218. if uncolored name of player's tool contains "旋風落葉神射":
  219. {玩家資料.%player%::玩家職業} is "箭神"
  220. if Skill(player, "&c旋風落葉神射", {@旋風落葉神射.Max}, {@旋風落葉神射.CD}, {@旋風落葉神射.MP}) is true:
  221. set {冷卻.%player%::旋風落葉神射} to now
  222. play "ENTITY_WITHER_SHOOT" to player with volume 1 and pitch 1
  223. set {_location.1} to block above player
  224. set {_location.2} to block 10 up player
  225. drawDot count 20, particle "fireworkspark", XYZ 0, 10, 0, center player, visibleRange 32, pulseDelay 2, keepFor 1 seconds
  226. wait 0.2 seconds
  227. drawDisco style 1, particle redstone, RGB 82, 255, 82, particle2 redstone, RGB2 255, 255, 255, center location of {_location.2}, id "旋風落葉神射%player%", rainbowMode false, maxLines 5, lineLength 15, sphereRadius 0.9, sphereDensity 30, lineDensity 40, visibleRange 32, displacementXYZ 0, 0, 0, pulseDelay 0.5
  228. wait 1 tick
  229. loop 10 times:
  230. play "ENTITY_ARROW_SHOOT" to player with volume 1 and pitch 1
  231. loop entities in radius 12 of {_location.1}:
  232. if loop-entity isn't a player or a dropped item:
  233. make player damage loop-entity by {_PHYSICDMG}*(3*{_技能.%player%::死神圓舞曲})
  234. add loop-entity to {_僵直::*}
  235. add "{NoAI:1}" to nbt of loop-entity
  236. wait 1.2 tick
  237. loop {_僵直::*}:
  238. add "{NoAI:0}" to nbt of loop-value
  239. stopEffect id "旋風落葉神射%player%"
  240. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
  241. #[ 箭神 - 元素之箭 ]
  242. if uncolored name of player's tool contains "元素之箭":
  243. {玩家資料.%player%::玩家職業} is "箭神"
  244. if Skill(player, "&c元素之箭", {@元素之箭.Max}, {@元素之箭.CD}, {@元素之箭.MP}) is true:
  245. set {冷卻.%player%::元素之箭} to now
  246. loop 3 times:
  247. set {_偵測} to 0
  248. play "ENTITY_ARROW_SHOOT" to player with volume 1 and pitch 1
  249. play "ENTITY_ELDER_GUARDIAN_CURSE" to player with volume 1 and pitch 2
  250. set {_location.1} to block above player
  251. set {_location.2} to block 30 in front player
  252. set {_x.1} to x-coordinate of {_location.1}
  253. set {_x.2} to x-coordinate of {_location.2}
  254. set {_y.1} to y-coordinate of {_location.1}
  255. set {_y.2} to y-coordinate of {_location.2}
  256. set {_z.1} to z-coordinate of {_location.1}
  257. set {_z.2} to z-coordinate of {_location.2}
  258. set {_x.difference} to ({_x.2} - {_x.1}) / 30
  259. set {_y.difference} to ({_y.2} - {_y.1}) / 30
  260. set {_z.difference} to ({_z.2} - {_z.1}) / 30
  261. loop 30 times:
  262. set {_location.1} to location of {_location.1}
  263. increase x-coordinate of {_location.1} by {_x.difference}
  264. increase y-coordinate of {_location.1} by {_y.difference}
  265. increase z-coordinate of {_location.1} by {_z.difference}
  266. drawDot count 2, particle "redstone", RGB 250, 0, 0, center {_location.1}, rainbowMode false, visibleRange 32, pulseDelay 2, keepFor 0.2 seconds
  267. drawDot count 2, particle "redstone", RGB 0, 250, 0, center {_location.1}, rainbowMode false, visibleRange 32, pulseDelay 2, keepFor 0.2 seconds
  268. drawDot count 2, particle "redstone", RGB 0, 0, 250, center {_location.1}, rainbowMode false, visibleRange 32, pulseDelay 0, keepFor 0.2 seconds
  269. if {_偵測} is 0:
  270. loop entities in radius 2 around block at location of {_location.1}:
  271. if loop-entity isn't a player or a dropped item:
  272. set {_偵測} to 1
  273. make player damage loop-entity by ({_PHYSICDMG})*(25)
  274. drawDot count 10, particle "blockdust", material lava , XYZ 0.5, 1, 0.5, center loop-entity, visibleRange 32, pulseDelay 2, keepFor 0.1 seconds
  275. play "ENTITY_BLAZE_BURN" to player with volume 1 and pitch 2
  276. drawDot count 1, particle "explosionlarge", XYZ 0, 0, 0, center loop-entity, visibleRange 32, pulseDelay 2, keepFor 0.1 seconds
  277. loop entities in radius 2 around block at location of {_location.1}:
  278. if loop-entity isn't a player or a dropped item:
  279. add loop-entity to {_冰封::*}
  280. add "{NoAI:1}" to nbt of loop-entity
  281. wait 5 ticks
  282. loop 3 times:
  283. loop {_冰封::*}:
  284. make player damage loop-value-2 by ({_PHYSICDMG})*(16)
  285. drawDot count 3, particle "sweep", XYZ 0.5, 1, 0.5, center loop-value-2, visibleRange 32, pulseDelay 2, keepFor 1 seconds
  286. wait 20 ticks
  287. loop {_冰封::*}:
  288. add "{NoAI:0}" to nbt of loop-value
  289. make player damage loop-value by ({_PHYSICDMG})*(30)
  290. drawDot count 20, particle "snowball", XYZ 0.5, 1, 0.5, center loop-value-2, visibleRange 32, pulseDelay 2, keepFor 1 seconds
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  303. # [ ClearVariable 清除變數 ]
  304. #───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────#
  305. on any movement:
  306. {冷卻.%player%::死神圓舞曲} is set:
  307. set {_冷卻} to difference between {冷卻.%player%::死神圓舞曲} and now
  308. if {_冷卻} >= {@死神圓舞曲.CD} second:
  309. delete {冷卻.%player%::死神圓舞曲}
  310.  
  311. {冷卻.%player%::天堂之門} is set:
  312. set {_冷卻} to difference between {冷卻.%player%::天堂之門} and now
  313. if {_冷卻} >= {@天堂之門.CD} second:
  314. delete {冷卻.%player%::天堂之門}
Advertisement
Add Comment
Please, Sign In to add comment