henry900326

Untitled

Sep 27th, 2018
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 43.86 KB | None | 0 0
  1. Function PHY_DMG(entityToSet: entity) :: number:
  2. return 1
  3. Function MAG_DMG(entityToSet: entity) :: number:
  4. return 1
  5.  
  6. Function SKI_DMG(entityToSet: entity) :: number:
  7. return 1
  8.  
  9.  
  10.  
  11. on left click:
  12. world of player isn't "miniwar"
  13. "%uncolored lore of player's tool%" contain "武器類型:"
  14. set {_STRATK} to {玩家資料.%player%::力量} * 0.5
  15. set {_DEXATK} to {玩家資料.%player%::敏捷} * 0.7
  16. set {_INTATK} to {玩家資料.%player%::智慧} * 0.6
  17. set {_LUKATK} to {玩家資料.%player%::幸運} * 0.4
  18. set {_PHYSICDMG} to {玩家資料.%player%::物理攻擊力}
  19. set {_MAGICDMG} to {玩家資料.%player%::魔法攻擊力}
  20. if {幾轉職業::%{玩家資料.%player%::玩家職業}%} is 0:
  21. add ({_STRATK} + {_DEXATK} + {_LUKATK}) to {_PHYSICDMG}
  22. add ({_INTATK} + {_LUKATK}) to {_MAGICDMG}
  23. if {幾轉職業::%{玩家資料.%player%::玩家職業}%} is 1:
  24. add ({_STRATK} + {_DEXATK} + {_LUKATK})*1.2 to {_PHYSICDMG}
  25. add ({_INTATK} + {_LUKATK})*1.2 to {_MAGICDMG}
  26. if {幾轉職業::%{玩家資料.%player%::玩家職業}%} is 2:
  27. add ({_STRATK} + {_DEXATK} + {_LUKATK})*1.4 to {_PHYSICDMG}
  28. add ({_INTATK} + {_LUKATK})*1.4 to {_MAGICDMG}
  29. if {幾轉職業::%{玩家資料.%player%::玩家職業}%} is 3:
  30. add ({_STRATK} + {_DEXATK} + {_LUKATK})*1.8 to {_PHYSICDMG}
  31. add ({_INTATK} + {_LUKATK})*1.8 to {_MAGICDMG}
  32. set {_check} to {玩家資料.%player%::最大血量}
  33. if {幾轉職業::%{玩家資料.%player%::玩家職業}%} is 0:
  34. add ({玩家資料.%player%::力量} * 5) to {_check}
  35. add ({玩家資料.%player%::智慧} * 4) to {_check}
  36. add ({玩家資料.%player%::敏捷} * 3) to {_check}
  37. add ({玩家資料.%player%::幸運} * 2) to {_check}
  38. if {幾轉職業::%{玩家資料.%player%::玩家職業}%} is 1:
  39. add ({玩家資料.%player%::力量} * 5)*1.25 to {_check}
  40. add ({玩家資料.%player%::智慧} * 4)*1.25 to {_check}
  41. add ({玩家資料.%player%::敏捷} * 3)*1.25 to {_check}
  42. add ({玩家資料.%player%::幸運} * 2)*1.25 to {_check}
  43. if {幾轉職業::%{玩家資料.%player%::玩家職業}%} is 2:
  44. add ({玩家資料.%player%::力量} * 5)*1.5 to {_check}
  45. add ({玩家資料.%player%::智慧} * 4)*1.5 to {_check}
  46. add ({玩家資料.%player%::敏捷} * 3)*1.5 to {_check}
  47. add ({玩家資料.%player%::幸運} * 2)*1.5 to {_check}
  48. if {幾轉職業::%{玩家資料.%player%::玩家職業}%} is 3:
  49. add ({玩家資料.%player%::力量} * 5)*2 to {_check}
  50. add ({玩家資料.%player%::智慧} * 4)*2 to {_check}
  51. add ({玩家資料.%player%::敏捷} * 3)*2 to {_check}
  52. add ({玩家資料.%player%::幸運} * 2)*2 to {_check}
  53. set {_lore::*} to uncolored lore of player's tool split at "||"
  54. loop {_lore::*}:
  55. if {_lore::%loop-index%} contain "等級需求 -":
  56. replace all "等級需求" , "-" and " " with "" in {_lore::%loop-index%}
  57. set {_lore::%loop-index%} to {_lore::%loop-index%} parsed as integer
  58. if {_lore::%loop-index%} is more than {玩家資料.%player%::玩家等級}:
  59. send "&6武器 >> &c武器無法使用,請確認是否符合武器使用條件!"
  60. cancel event
  61. stop
  62. if {_lore::%loop-index%} contains "[ 技能 ]":
  63. stop
  64. if {_lore::%loop-index%} contain "職業需求":
  65. replace all "職業需求" , ":" , "[" , "]" and " " with "" in {_lore::%loop-index%}
  66. if {_lore::%loop-index%} is "全職業":
  67. set {_useless} to 1
  68. else if {_lore::%loop-index%} isn't {玩家資料.%player%::玩家職業}:
  69. send "&6武器 >> &c武器無法使用,請確認是否符合武器使用條件!" to player
  70. cancel event
  71. stop
  72. if {_lore::%loop-index%} contain "魔法攻擊力 -":
  73. replace all "魔法攻擊力" , "-" and " " with "" in {_lore::%loop-index%}
  74. set {_lore::%loop-index%} to {_lore::%loop-index%} parsed as integer
  75. set {_暫時.%player%.武器魔法攻擊力} to {_lore::%loop-index%}
  76. if {_lore::%loop-index%} contain "物理攻擊力 -":
  77. replace all "物理攻擊力" , "-" and " " with "" in {_lore::%loop-index%}
  78. set {_lore::%loop-index%} to {_lore::%loop-index%} parsed as integer
  79. set {_暫時.%player%.武器物理攻擊力} to {_lore::%loop-index%}
  80. if {_lore::%loop-index%} contain "技能 - 魔力回收":
  81. set {_magicrestore} to 1
  82. if {_lore::%loop-index%} contain "技能 - 隨機二重標":
  83. set {_chancedoublestar} to 1
  84. if {_lore::%loop-index%} contain "技能 - 隨機三重標":
  85. set {_chancetribblestar} to 1
  86. if {_lore::%loop-index%} contain "技能 - 命運二重標":
  87. set {_bigchancedoublestar} to 1
  88. if {_lore::%loop-index%} contain "技能 - 絕命二重標":
  89. set {_doublestar} to 1
  90. if {_lore::%loop-index%} contain "技能 - 隨機二重箭":
  91. set {_chancedoublearrow} to 1
  92. if {_lore::%loop-index%} contain "技能 - 隨機三重箭":
  93. set {_chancetribblearrow} to 1
  94. if {_lore::%loop-index%} contain "技能 - 命運二重箭":
  95. set {_bigchancedoublearrow} to 1
  96. if {_lore::%loop-index%} contain "技能 - 絕命二重箭":
  97. set {_doublearrow} to 1
  98. loop 1 times:
  99. if "%uncolored lore of player's tool%" contain "武器類型: [ 魔杖 ]":
  100. if difference between {冷卻.%player%::魔環打擊} and now is more than or equal to 1.1 second:
  101. delete {冷卻.%player%::魔環打擊}
  102. if {冷卻.%player%::魔環打擊} is set:
  103. stop
  104. set {_魔環打擊} to block 2 in front player
  105. set {_魔環打擊} to location of {_魔環打擊}
  106. set {冷卻.%player%::魔環打擊} to now
  107. set {_count} to 0
  108. drawWarpRings style 2, particle "witchspell", center {_魔環打擊}, id "魔環打擊%player%", rainbowMode false, scan true, height 4, radius 3, ringCount 5, ringDensity 20, visibleRange 32, pulseDelay 1
  109. wait 3 ticks
  110. loop entities in radius 3 around block at location of {_魔環打擊}:#給予範圍傷
  111. if loop-entity isn't a player or a dropped item:
  112. set {_integer} to MAG_DMG(loop-entity)
  113. set {_幾率.%player%} to ({玩家資料.%player%::爆擊率} + 5) / 100
  114. Chance of {_幾率.%player%}:
  115. set {_boom.damage} to {玩家資料.%player%::爆擊傷害} + 11
  116. make player damage loop-entity by ({_MAGICDMG} + {_暫時.%player%.武器魔法攻擊力})*( 1.05 + {_boom.damage} / 100) * {_integer}
  117. play "ENTITY_ENDERDRAGON_HURT" to player with volume 1 and pitch 1
  118. else:
  119. make player damage loop-entity by ({_MAGICDMG} + {_暫時.%player%.武器魔法攻擊力}) * {_integer}
  120. if {_magicrestore} is 1:
  121. if ({玩家魔力值.%player%} + 1) is more than {玩家資料.%player%::魔力值}:
  122. set {玩家魔力值.%player%} to {玩家資料.%player%::魔力值}
  123. else:
  124. add 1 to {玩家魔力值.%player%}
  125. set {_math} to 0.99 * {玩家魔力值.%player%} / {玩家資料.%player%::魔力值}
  126. if {_math} is more than or equal to 1:
  127. set {_math} to 0.99
  128. set {玩家魔力值.%player%} to {玩家資料.%player%::魔力值}
  129. set level progress of the player to {_math}
  130. set player's level to {玩家魔力值.%player%}
  131. set {_count} to 1
  132. play "BLOCK_ANVIL_PLACE" to player with volume 1 and pitch 4
  133. wait 5 ticks
  134. stopeffect id "魔環打擊%player%"
  135. if "%uncolored lore of player's tool%" contain "武器類型: [ 權杖 ]":
  136. if difference between {冷卻.%player%::光擊} and now is more than or equal to 0.4 second:
  137. delete {冷卻.%player%::光擊}
  138. if {冷卻.%player%::光擊} is set:
  139. stop
  140. set {_光擊} to block 2 in front player
  141. set {_光擊} to location of {_光擊}
  142. set {冷卻.%player%::光擊} to now
  143. set {_count} to 0
  144. loop entities in radius 3 around block at location of {_光擊}:#給予範圍傷
  145. if {_count} is 0:
  146. if loop-entity isn't a player or a dropped item:
  147. set {_integer} to MAG_DMG(loop-entity)
  148. drawWarpRings style 1, particle "endrod", center loop-entity, id "光擊%player%", rainbowMode false, scan true, height 3, radius 0.7, ringCount 5, ringDensity 6, visibleRange 32, pulseDelay 0.3
  149. set {_幾率.%player%} to ({玩家資料.%player%::爆擊率} + 5) / 100
  150. Chance of {_幾率.%player%}:
  151. set {_boom.damage} to {玩家資料.%player%::爆擊傷害} + 11
  152. make player damage loop-entity by ({_MAGICDMG} + {_暫時.%player%.武器魔法攻擊力})*( 1.05 + {_boom.damage} / 100) * {_integer}
  153. play "ENTITY_ENDERDRAGON_HURT" to player with volume 1 and pitch 1
  154. else:
  155. make player damage loop-entity by ({_MAGICDMG} + {_暫時.%player%.武器魔法攻擊力}) * {_integer}
  156. if {_magicrestore} is 1:
  157. if ({玩家魔力值.%player%} + 1) is more than {玩家資料.%player%::魔力值}:
  158. set {玩家魔力值.%player%} to {玩家資料.%player%::魔力值}
  159. else:
  160. add 1 to {玩家魔力值.%player%}
  161. set {_math} to 0.99 * {玩家魔力值.%player%} / {玩家資料.%player%::魔力值}
  162. if {_math} is more than or equal to 1:
  163. set {_math} to 0.99
  164. set {玩家魔力值.%player%} to {玩家資料.%player%::魔力值}
  165. set level progress of the player to {_math}
  166. set player's level to {玩家魔力值.%player%}
  167. set {_count} to 1
  168. loop entities in radius 3 around block at location of {_光擊}:#給予範圍傷
  169. if loop-entity isn't a player or a dropped item:
  170. set {_integer} to MAG_DMG(loop-entity)
  171. set {_幾率.%player%} to ({玩家資料.%player%::爆擊率} + 5) / 100
  172. if {玩家資料.%player%::玩家等級} is more than or equal to 105:
  173. set {_120散光} to 2
  174. else:
  175. set {_120散光} to 1
  176. Chance of {_幾率.%player%}:
  177. set {_boom.damage} to {玩家資料.%player%::爆擊傷害} + 11
  178. if {技能.%player%::神聖之光} is more than or equal to 1:
  179. make player damage loop-entity by (({_MAGICDMG} + {_暫時.%player%.武器魔法攻擊力})*( 1.05 + {_boom.damage} / 100) * {_integer})*{技能.%player%::神聖之光}*5/100*{_120散光}
  180. else:
  181. wait 7 ticks
  182. stopeffect id "光擊%player%"
  183. stop
  184. play "ENTITY_ENDERDRAGON_HURT" to player with volume 1 and pitch 1
  185. else:
  186. if {技能.%player%::神聖之光} is more than or equal to 1:
  187. make player damage loop-entity by (({_MAGICDMG} + {_暫時.%player%.武器魔法攻擊力}) * {_integer})*{技能.%player%::神聖之光}*5/100*{_120散光}
  188. else:
  189. wait 7 ticks
  190. stopeffect id "光擊%player%"
  191. stop
  192. else:
  193. if {技能.%player%::復甦之光} is more than or equal to 1:
  194. heal the loop-entity by 0.05*{技能.%player%::復甦之光}
  195. play "ENTITY_ELDER_GUARDIAN_DEATH" to player with volume 100 and pitch 2
  196. wait 7 ticks
  197. stopeffect id "光擊%player%"
  198. if "%uncolored lore of player's tool%" contain "武器類型: [ 火杖 ]":
  199. if {玩家資料.%player%::玩家職業} isn't "火毒魔導" or "巫師":
  200. if difference between {冷卻.%player%::火杖} and now is more than or equal to 10 second:
  201. delete {冷卻.%player%::火杖}
  202. if {冷卻.%player%::火杖} is set:
  203. stop
  204. else:
  205. if difference between {冷卻.%player%::火杖} and now is more than or equal to 1.5 second:
  206. delete {冷卻.%player%::火杖}
  207. if {冷卻.%player%::火杖} is set:
  208. stop
  209. set {_火杖} to block 5 in front player
  210. set {_火杖} to location of {_火杖}
  211. set {冷卻.%player%::火杖} to now
  212. set {_count} to 0
  213. loop entities in radius 5 around block at location of {_火杖}:#給予範圍傷
  214. if loop-entity isn't a player or a dropped item:
  215. set {_integer} to MAG_DMG(loop-entity)
  216. drawWarpRings style 1, particle "flame", center player, id "火杖%player%", rainbowMode false, scan true, height 1, radius 0.4, ringCount 8, ringDensity 7, visibleRange 32, pulseDelay 1
  217. drawDot count 5, particle lava, XYZ 0.1, 2, -0.1, center loop-entity, visibleRange 20, pulseDelay 2, keepFor 0.2 seconds
  218. set {_幾率.%player%} to ({玩家資料.%player%::爆擊率} + 5) / 100
  219. Chance of {_幾率.%player%}:
  220. set {_boom.damage} to {玩家資料.%player%::爆擊傷害} + 11
  221. make player damage loop-entity by ({_MAGICDMG} + {_暫時.%player%.武器魔法攻擊力})*( 1.05 + {_boom.damage} / 100) * {_integer}
  222. play "ENTITY_ENDERDRAGON_HURT" to player with volume 1 and pitch 1
  223. else:
  224. make player damage loop-entity by ({_MAGICDMG} + {_暫時.%player%.武器魔法攻擊力}) * {_integer}
  225. if {_magicrestore} is 1:
  226. if ({玩家魔力值.%player%} + 1) is more than {玩家資料.%player%::魔力值}:
  227. set {玩家魔力值.%player%} to {玩家資料.%player%::魔力值}
  228. else:
  229. add 1 to {玩家魔力值.%player%}
  230. set {_math} to 0.99 * {玩家魔力值.%player%} / {玩家資料.%player%::魔力值}
  231. if {_math} is more than or equal to 1:
  232. set {_math} to 0.99
  233. set {玩家魔力值.%player%} to {玩家資料.%player%::魔力值}
  234. set level progress of the player to {_math}
  235. set player's level to {玩家魔力值.%player%}
  236. set {_count} to 1
  237. play "ENTITY_BLAZE_SHOOT" to player with volume 1 and pitch 2
  238. wait 8 ticks
  239. stopeffect id "火杖%player%"
  240. if "%uncolored lore of player's tool%" contain "武器類型: [ 冰杖 ]":
  241. if {玩家資料.%player%::玩家職業} isn't "冰雷魔導" or "巫師":
  242. if difference between {冷卻.%player%::冰杖} and now is more than or equal to 5 second:
  243. delete {冷卻.%player%::冰杖}
  244. if {冷卻.%player%::冰杖} is set:
  245. stop
  246. if difference between {冷卻.%player%::冰杖} and now is more than or equal to 0.75 second:
  247. delete {冷卻.%player%::冰杖}
  248. if {冷卻.%player%::冰杖} is set:
  249. stop
  250. set {_冰杖} to block 2 in front player
  251. set {_冰杖} to location of {_冰杖}
  252. set {冷卻.%player%::冰杖} to now
  253. loop entities in radius 4 around block at location of {_冰杖}:#給予範圍傷
  254. if loop-entity isn't a player or a dropped item:
  255. set {_boom.damage} to {玩家資料.%player%::爆擊傷害} + 11
  256. set {_integer} to MAG_DMG(loop-entity)
  257. drawWarpRings style 7, particle "snowball", center player, id "冰杖%player%", rainbowMode false, scan true, height 3, radius 4, ringCount 8, ringDensity 6, visibleRange 32, pulseDelay 1
  258. set {_幾率.%player%} to ({玩家資料.%player%::爆擊率} + 5) / 100
  259. Chance of {_幾率.%player%}:
  260. set {_boom.damage} to {玩家資料.%player%::爆擊傷害} + 11
  261. make player damage loop-entity by ({_MAGICDMG} + {_暫時.%player%.武器魔法攻擊力})*( 1.05 + {_boom.damage} / 100) * {_integer}
  262. play "ENTITY_ENDERDRAGON_HURT" to player with volume 1 and pitch 1
  263. else:
  264. make player damage loop-entity by ({_MAGICDMG} + {_暫時.%player%.武器魔法攻擊力}) * {_integer}
  265. if {_magicrestore} is 1:
  266. if ({玩家魔力值.%player%} + 1) is more than {玩家資料.%player%::魔力值}:
  267. set {玩家魔力值.%player%} to {玩家資料.%player%::魔力值}
  268. else:
  269. add 1 to {玩家魔力值.%player%}
  270. set {_math} to 0.99 * {玩家魔力值.%player%} / {玩家資料.%player%::魔力值}
  271. if {_math} is more than or equal to 1:
  272. set {_math} to 0.99
  273. set {玩家魔力值.%player%} to {玩家資料.%player%::魔力值}
  274. set level progress of the player to {_math}
  275. set player's level to {玩家魔力值.%player%}
  276. play "BLOCK_SAND_BREAK" to player with volume 1 and pitch 2
  277. wait 7 ticks
  278. stopeffect id "冰杖%player%"
  279. if "%uncolored lore of player's tool%" contain "武器類型: [ 長杖 ]":
  280. if difference between {冷卻.%player%::長杖} and now is more than or equal to 1.25 second:
  281. delete {冷卻.%player%::長杖}
  282. if {冷卻.%player%::長杖} is set:
  283. stop
  284. set {冷卻.%player%::長杖} to now
  285. set {_攻擊次數} to 1
  286. set {_傷害} to 1
  287. if {技能.%player%::魔法之矛} is 0 or 1:
  288. set {_攻擊次數} to 1
  289. set {_傷害} to 1
  290. if {技能.%player%::魔法之矛} is 2 or 3:
  291. set {_攻擊次數} to 2
  292. set {_傷害} to 0.9
  293. if {技能.%player%::魔法之矛} is 4 or 5:
  294. set {_攻擊次數} to 3
  295. set {_傷害} to 0.85
  296. if {技能.%player%::魔法之矛} is 6 or 7:
  297. set {_攻擊次數} to 4
  298. set {_傷害} to 0.8
  299. if {技能.%player%::魔法之矛} is 8 or 9:
  300. set {_攻擊次數} to 5
  301. set {_傷害} to 0.75
  302. if {技能.%player%::魔法之矛} is 10:
  303. set {_攻擊次數} to 6
  304. set {_傷害} to 0.7
  305. loop {_攻擊次數} times:
  306. set {_長杖} to block 2 in front player
  307. set {_長杖} to location of {_長杖}
  308. drawWarpRings style 7, particle "sweep", center {_長杖}, id "長杖%player%", rainbowMode false, scan true, height 0.7, radius 0.6, ringCount 1, ringDensity 1, visibleRange 32, pulseDelay 0.6
  309. play "ENTITY_PLAYER_ATTACK_WEAK" to player with volume 1 and pitch 2
  310. play "ENTITY_PLAYER_ATTACK_WEAK" to player with volume 1 and pitch 1
  311. loop entities in radius 1.8 around block at location of {_長杖}:
  312. if loop-entity isn't a player or a dropped item:
  313. set {_boom.damage} to {玩家資料.%player%::爆擊傷害} + 11
  314. set {_integer} to MAG_DMG(loop-entity)
  315. set {_幾率.%player%} to ({玩家資料.%player%::爆擊率} + 5) / 100
  316. Chance of {_幾率.%player%}:
  317. set {_boom.damage} to {玩家資料.%player%::爆擊傷害} + 11
  318. make player damage loop-entity by (({_MAGICDMG} + {_暫時.%player%.武器魔法攻擊力})*( 1.05 + {_boom.damage} / 100) * {_integer}) * {_傷害}
  319. play "ENTITY_ENDERDRAGON_HURT" to player with volume 1 and pitch 1
  320. else:
  321. make player damage loop-entity by (({_MAGICDMG} + {_暫時.%player%.武器魔法攻擊力}) * {_integer}) * {_傷害}
  322. if {_magicrestore} is 1:
  323. if ({玩家魔力值.%player%} + 1) is more than {玩家資料.%player%::魔力值}:
  324. set {玩家魔力值.%player%} to {玩家資料.%player%::魔力值}
  325. else:
  326. add 1 to {玩家魔力值.%player%}
  327. set {_math} to 0.99 * {玩家魔力值.%player%} / {玩家資料.%player%::魔力值}
  328. if {_math} is more than or equal to 1:
  329. set {_math} to 0.99
  330. set {玩家魔力值.%player%} to {玩家資料.%player%::魔力值}
  331. set level progress of the player to {_math}
  332. set player's level to {玩家魔力值.%player%}
  333. wait 1.5 ticks
  334. stopeffect id "長杖%player%"
  335. if "%uncolored lore of player's tool%" contain "武器類型: [ 長槍 ]":
  336. if {玩家資料.%player%::玩家職業} isn't "龍騎士" or "騎士" or "聖騎士":
  337. if difference between {冷卻.%player%::揮刺} and now is more than or equal to 4 second:
  338. delete {冷卻.%player%::揮刺}
  339. if {冷卻.%player%::揮刺} is set:
  340. stop
  341. if difference between {冷卻.%player%::揮刺} and now is more than or equal to 0.6 second:
  342. delete {冷卻.%player%::揮刺}
  343. if {冷卻.%player%::揮刺} is set:
  344. stop
  345. set {_揮刺} to block 2 in front player
  346. set {_揮刺} to location of {_揮刺}
  347. set {冷卻.%player%::揮刺} to now
  348. set {_pass} to 0
  349. drawWarpRings style 7, particle "crit", center {_揮刺}, id "揮刺%player%", rainbowMode false, scan true, height 2, radius 3, ringCount 4, ringDensity 5, visibleRange 32, pulseDelay 1
  350. wait 3 ticks
  351. loop entities in radius 3 around block at location of {_揮刺}:#給予範圍傷
  352. if loop-entity isn't a player or a dropped item:
  353. set {_integer} to PHY_DMG(loop-entity)
  354. set {_幾率.%player%} to ({玩家資料.%player%::爆擊率} + 15) / 100
  355. Chance of {_幾率.%player%}:
  356. set {_boom.damage} to {玩家資料.%player%::爆擊傷害} + round({玩家資料.%player%::力量} / 80)
  357. make player damage loop-entity by ({_PHYSICDMG} + {_暫時.%player%.武器物理攻擊力})*( 1.1 + {_boom.damage} / 100) * {_integer}
  358. play "ENTITY_ENDERDRAGON_HURT" to player with volume 1 and pitch 1
  359. else:
  360. make player damage loop-entity by ({_PHYSICDMG} + {_暫時.%player%.武器物理攻擊力}) * {_integer}
  361. drawDot count 1, particle "sweep", material portal, XYZ 0.5, 0.5, 0.5, center loop-entity, visibleRange 32, pulseDelay 2, keepFor 0.2 seconds
  362. play "ENTITY_PLAYER_ATTACK_SWEEP" to player with volume 1 and pitch 2
  363. wait 5 ticks
  364. stopeffect id "揮刺%player%"
  365. if {技能.%player%::槍連擊} is set:
  366. if {玩家資料.%player%::玩家等級} is more than or equal to 100:
  367. set {_120武器槍連擊} to 2
  368. else:
  369. set {_120武器槍連擊} to 1
  370. loop {_120武器槍連擊} times:
  371. set {_攻擊範圍} to block 2 infront player
  372. set {_攻擊範圍} to location of {_攻擊範圍}
  373. drawDot count 5, particle critmagic, XYZ 0.5, 1, 0.5, center player, visibleRange 32, pulseDelay 2, keepFor 0.5 seconds
  374. play "ENTITY_PLAYER_ATTACK_CRIT" to player with volume 1 and pitch 2
  375. loop entities in radius 5 of {_攻擊範圍}:
  376. if loop-entity isn't a player or a dropped item:
  377. set loop-entity's target to player
  378. make player damage loop-entity by ({_PHYSICDMG})*(2.5+0.5*{技能.%player%::槍連擊})/2
  379. set loop-entity's target to player
  380. 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
  381. drawDot count 2, particle sweep, XYZ 0.5, 1, 0.5, center loop-entity, visibleRange 32, pulseDelay 2, keepFor 0.1 seconds
  382. add loop-entity to {_暈眩::*}
  383. add "{NoAI:1}" to nbt of loop-entity
  384. loop {_暈眩::*}:
  385. add "{NoAI:0}" to nbt of loop-value-2
  386. stop
  387. if "%uncolored lore of player's tool%" contain "武器類型: [ 弩 ]":
  388. cancel event
  389. if {玩家資料.%player%::玩家職業} isn't "獵人" or "神箭手":
  390. if difference between {冷卻.%player%::弓箭發射} and now is more than or equal to 4 second:
  391. delete {冷卻.%player%::弓箭發射}
  392. if {冷卻.%player%::弓箭發射} is set:
  393. stop
  394. if difference between {冷卻.%player%::弓箭發射} and now is more than or equal to 0.6 second:
  395. delete {冷卻.%player%::弓箭發射}
  396. if {冷卻.%player%::弓箭發射} is set:
  397. stop
  398. set {冷卻.%player%::弓箭發射} to now
  399. shoot an arrow from the player with velocity 3
  400. play "ENTITY_ARROW_SHOOT" to player with volume 2 and pitch 3
  401. wait 2 ticks
  402. if {冷卻.%player%::萬箭齊發} is set:
  403. chance of 15%:
  404. loop 5 times:
  405. loop 2 times:
  406. shoot an arrow from the player with velocity 3
  407. play "ENTITY_ARROW_SHOOT" to player with volume 2 and pitch 3
  408. drawDot count 6, particle "sweep", XYZ -2, 2, -2, center player, visibleRange 32, pulseDelay 2, keepFor 0.2 seconds
  409. wait 1 ticks
  410. if {_chancetribblearrow} is set:
  411. chance of 20%:
  412. loop 2 times:
  413. shoot an arrow from the player with velocity 3
  414. play "ENTITY_ARROW_SHOOT" to player with volume 2 and pitch 3
  415. wait 2 ticks
  416. if {_chancedoublearrow} is set:
  417. chance of 20%:
  418. shoot an arrow from the player with velocity 3
  419. play "ENTITY_ARROW_SHOOT" to player with volume 2 and pitch 3
  420. if {_bigchancedoublearrow} is set:
  421. chance of 40%:
  422. shoot an arrow from the player with velocity 3
  423. play "ENTITY_ARROW_SHOOT" to player with volume 2 and pitch 3
  424. if {_doublearrow} is set:
  425. shoot an arrow from the player with velocity 3
  426. play "ENTITY_ARROW_SHOOT" to player with volume 2 and pitch 3
  427. if "%uncolored lore of player's tool%" contain "武器類型: [ 弓 ]":
  428. cancel event
  429. if {玩家資料.%player%::玩家職業} isn't "遊俠" or "箭神" or "弓箭手":
  430. if difference between {冷卻.%player%::弓箭發射} and now is more than or equal to 6 second:
  431. delete {冷卻.%player%::弓箭發射}
  432. if {冷卻.%player%::弓箭發射} is set:
  433. stop
  434. if difference between {冷卻.%player%::弓箭發射} and now is more than or equal to 1 second:
  435. delete {冷卻.%player%::弓箭發射}
  436. if {冷卻.%player%::弓箭發射} is set:
  437. stop
  438. set {冷卻.%player%::弓箭發射} to now
  439. shoot an arrow from the player with velocity 2.5
  440. play "ENTITY_ARROW_SHOOT" to player with volume 2 and pitch 3
  441. wait 2 ticks
  442. if {_chancetribblearrow} is set:
  443. chance of 20%:
  444. loop 2 times:
  445. shoot an arrow from the player with velocity 2.4
  446. play "ENTITY_ARROW_SHOOT" to player with volume 2 and pitch 3
  447. wait 2 ticks
  448. if {_chancedoublearrow} is set:
  449. chance of 20%:
  450. shoot an arrow from the player with velocity 2.4
  451. play "ENTITY_ARROW_SHOOT" to player with volume 2 and pitch 3
  452. if {_bigchancedoublearrow} is set:
  453. chance of 40%:
  454. shoot an arrow from the player with velocity 2.4
  455. play "ENTITY_ARROW_SHOOT" to player with volume 2 and pitch 3
  456. if {_doublearrow} is set:
  457. shoot an arrow from the player with velocity 2.4
  458. play "ENTITY_ARROW_SHOOT" to player with volume 2 and pitch 3
  459. if {技能.%player%::火鳳衝擊} is set:
  460. chance of 5*{技能.%player%::火鳳衝擊}%:
  461. wait 2 ticks
  462. drawDot count 10, particle "flame", XYZ -2, 2, -2, center player, visibleRange 32, pulseDelay 2, keepFor 0.2 seconds
  463. play "ENTITY_BLAZE_SHOOT" to player with volume 2 and pitch 3
  464. shoot an arrow from the player with velocity 10
  465. if "%uncolored lore of player's tool%" contain "武器類型: [ 飛鏢 ]":
  466. if {玩家資料.%player%::玩家職業} isn't "夜使者" or "暗器使" or "刺客" or "盜賊":
  467. if difference between {冷卻.%player%::飛鏢發射} and now is more than or equal to 3 second:
  468. delete {冷卻.%player%::飛鏢發射}
  469. if {冷卻.%player%::飛鏢發射} is set:
  470. stop
  471. if difference between {冷卻.%player%::飛鏢發射} and now is more than or equal to 0.38 second:
  472. delete {冷卻.%player%::飛鏢發射}
  473. if {冷卻.%player%::飛鏢發射} is set:
  474. stop
  475. set {冷卻.%player%::飛鏢發射} to now
  476. shoot an arrow from the player with velocity 1.4
  477. if difference between {冷卻.%player%::四飛閃} and now is less than 8 seconds:
  478. shoot an arrow from the player with velocity 1.4
  479. play "ENTITY_ARROW_SHOOT" to player with volume 1 and pitch 0
  480. if {技能.%player%::暗鏢連攜} is set:
  481. chance of {技能.%player%::暗鏢連攜}*10%:
  482. wait 2.15 ticks
  483. play "ENTITY_ARROW_SHOOT" to player with volume 1 and pitch 0
  484. shoot an arrow from the player with velocity 1.4
  485. wait 2.15 ticks
  486. if {_chancedoublestar} is set:
  487. chance of 20%:
  488. shoot an arrow from the player with velocity 1.4
  489. play "ENTITY_ARROW_SHOOT" to player with volume 1 and pitch 0
  490. if {_chancetribblestar} is set:
  491. chance of 20%:
  492. loop 3 times:
  493. shoot an arrow from the player with velocity 1.4
  494. play "ENTITY_ARROW_SHOOT" to player with volume 1 and pitch 0
  495. wait 2.2 ticks
  496. if {_bigchancedoublestar} is set:
  497. chance of 40%:
  498. shoot an arrow from the player with velocity 1.4
  499. play "ENTITY_ARROW_SHOOT" to player with volume 1 and pitch 0
  500. if {_doublestar} is set:
  501. shoot an arrow from the player with velocity 1.4
  502. play "ENTITY_ARROW_SHOOT" to player with volume 1 and pitch 0
  503. if "%uncolored lore of player's tool%" contain "武器類型: [ 火槍 ]":
  504. if {裝彈中.%player%} is not set:
  505. set {_Weapon::*} to name of player's tool split at "«"
  506. replace all "»" with "" in {_Weapon::2}
  507. set {_Weapon2::*} to {_Weapon::2} split at "/"
  508. set {_剩餘子彈} to {_Weapon2::1} parsed as number
  509. set {_補充} to "%20 - {_剩餘子彈}%" parsed as number
  510. if {_剩餘子彈} is 20:
  511. send "&6武器 >> &c彈藥已滿" to player
  512. stop
  513. if {玩家資料.%player%::子彈} is not set:
  514. set {玩家資料.%player%::子彈} to 0
  515. if {玩家資料.%player%::子彈} = 0:
  516. send "&6武器 >> &c彈藥不足 無法填充 請補充彈藥" to player
  517. stop
  518. set {裝彈中.%player%} to 1
  519. send "&6武器 >> &c彈藥裝填中 請稍後" to player
  520. apply slowness 3 without any particles to the player for 1 second
  521. loop 5 times:
  522. play "ENTITY_BAT_TAKEOFF" to player with volume 1 and pitch 2
  523. wait 4 tick
  524. send "%{_補充}%"
  525. send "%{_剩餘子彈}%"
  526. send "%{玩家資料.%player%::子彈}%"
  527. if {玩家資料.%player%::子彈} >= {_補充}:
  528. add {_補充} to {_剩餘子彈}
  529. remove {_補充} from {玩家資料.%player%::子彈}
  530. else if {玩家資料.%player%::子彈} < {_補充}:
  531. add {玩家資料.%player%::子彈} to {_剩餘子彈}
  532. remove {玩家資料.%player%::子彈} from {玩家資料.%player%::子彈}
  533. if "%uncolored lore of player's tool%" contain "武器類型: [ 火槍 ]":
  534. set name of player's tool to "%{_Weapon::1}%«%{_剩餘子彈}%/%{玩家資料.%player%::子彈}%»"
  535. delete {裝彈中.%player%}
  536. stop
  537. on right click:
  538. world of player isn't "miniwar"
  539. "%uncolored lore of player's tool%" contain "武器類型:"
  540. set {_lore::*} to uncolored lore of player's tool split at "||"
  541. loop {_lore::*}:
  542. if {_lore::%loop-index%} contain "等級需求 -":
  543. replace all "等級需求" , "-" and " " with "" in {_lore::%loop-index%}
  544. set {_lore::%loop-index%} to {_lore::%loop-index%} parsed as integer
  545. if {_lore::%loop-index%} is more than {玩家資料.%player%::玩家等級}:
  546. send "&6武器 >> &c武器無法使用,請確認是否符合武器使用條件!"
  547. cancel event
  548. stop
  549. if {_lore::%loop-index%} contains "[ 技能 ]":
  550. stop
  551. if {_lore::%loop-index%} contain "職業需求":
  552. replace all "職業需求" , ":" , "[" , "]" and " " with "" in {_lore::%loop-index%}
  553. if {_lore::%loop-index%} is "全職業":
  554. set {_useless} to 1
  555. else if {_lore::%loop-index%} isn't {玩家資料.%player%::玩家職業}:
  556. send "&6武器 >> &c武器無法使用,請確認是否符合武器使用條件!" to player
  557. cancel event
  558. stop
  559. if {_lore::%loop-index%} contain "魔法攻擊力 -":
  560. replace all "魔法攻擊力" , "-" and " " with "" in {_lore::%loop-index%}
  561. set {_lore::%loop-index%} to {_lore::%loop-index%} parsed as integer
  562. set {_暫時.%player%.武器魔法攻擊力} to {_lore::%loop-index%}
  563. if {_lore::%loop-index%} contain "物理攻擊力 -":
  564. replace all "物理攻擊力" , "-" and " " with "" in {_lore::%loop-index%}
  565. set {_lore::%loop-index%} to {_lore::%loop-index%} parsed as integer
  566. set {_暫時.%player%.武器物理攻擊力} to {_lore::%loop-index%}
  567. loop 1 times:
  568. if "%uncolored lore of player's tool%" contain "武器類型: [ 火槍 ]":
  569. if {玩家資料.%player%::火槍射擊} isn't "槍神":
  570. if difference between {冷卻.%player%::火槍射擊} and now is more than or equal to 3 second:
  571. delete {冷卻.%player%::火槍射擊}
  572. if {冷卻.%player%::火槍射擊} is set:
  573. stop
  574. if difference between {冷卻.%player%::火槍射擊} and now is more than or equal to 0.3 second:
  575. delete {冷卻.%player%::火槍射擊}
  576. if {冷卻.%player%::火槍射擊} is set:
  577. stop
  578. if {裝彈中.%player%} is 1:
  579. stop
  580. set {冷卻.%player%::火槍射擊} to now
  581. set {_Weapon::*} to name of player's tool split at "«"
  582. replace all "»" with "" in {_Weapon::2}
  583. set {_Weapon2::*} to {_Weapon::2} split at "/"
  584. set {_剩餘子彈} to {_Weapon2::1} parsed as number
  585. if {_剩餘子彈} > 0:
  586. remove 1 from {_剩餘子彈}
  587. else if {_剩餘子彈} < 0:
  588. set {_剩餘子彈} to 0
  589. else if {_剩餘子彈} = 0:
  590. if {玩家資料.%player%::子彈} is not set:
  591. set {玩家資料.%player%::子彈} to 0
  592. if {玩家資料.%player%::子彈} = 0:
  593. send "&6武器 >> &c彈藥不足 無法填充 請補充彈藥" to player
  594. set name of player's tool to "%{_Weapon::1}%«0/0»"
  595. stop
  596. set {裝彈中.%player%} to 1
  597. send "&6武器 >> &c彈藥裝填中 請稍後" to player
  598. apply slowness 3 without any particles to the player for 1 second
  599. loop 5 times:
  600. play "ENTITY_BAT_TAKEOFF" to player with volume 1 and pitch 2
  601. wait 4 tick
  602. if {玩家資料.%player%::子彈} < 20:
  603. add {玩家資料.%player%::子彈} to {_剩餘子彈}
  604. remove {玩家資料.%player%::子彈} from {玩家資料.%player%::子彈}
  605. else if {玩家資料.%player%::子彈} >= 20:
  606. add 20 to {_剩餘子彈}
  607. remove 20 from {玩家資料.%player%::子彈}
  608. if "%uncolored lore of player's tool%" contain "武器類型: [ 火槍 ]":
  609. set name of player's tool to "%{_Weapon::1}%«%{_剩餘子彈}%/%{玩家資料.%player%::子彈}%»"
  610. delete {裝彈中.%player%}
  611. stop
  612. set name of player's tool to "%{_Weapon::1}%«%{_剩餘子彈}%/%{玩家資料.%player%::子彈}%»"
  613. play "ENTITY_ZOMBIE_ATTACK_DOOR_WOOD" to player with volume 1 and pitch 1
  614. set {_location.1} to block above player
  615. set {_location.2} to block 12 in front player
  616. add 2 to y-coordinate of {_location.2}
  617. set {_x.1} to x-coordinate of {_location.1}
  618. set {_x.2} to x-coordinate of {_location.2}
  619. set {_y.1} to y-coordinate of {_location.1}
  620. set {_y.2} to y-coordinate of {_location.2}
  621. set {_z.1} to z-coordinate of {_location.1}
  622. set {_z.2} to z-coordinate of {_location.2}
  623. set {_x.difference} to ({_x.2} - {_x.1}) / 10
  624. set {_y.difference} to ({_y.2} - {_y.1}) / 10
  625. set {_z.difference} to ({_z.2} - {_z.1}) / 10
  626. loop 10 times:
  627. set {_location.1} to location of {_location.1}
  628. drawDot count 4, particle "smoke", XYZ 0, 0, 0, center {_location.1}, visibleRange 32, pulseDelay 2, keepFor 0.1 seconds
  629. increase x-coordinate of {_location.1} by {_x.difference}
  630. increase y-coordinate of {_location.1} by {_y.difference}
  631. increase z-coordinate of {_location.1} by {_z.difference}
  632. loop entities in radius 1.1 around block at location of {_location.1}:
  633. if loop-entity isn't a player or a dropped item:
  634. set {_命中} to 1
  635. set {_integer} to PHY_DMG(loop-entity)
  636. set {_幾率.%player%} to ({玩家資料.%player%::爆擊率} + 10) / 100
  637. set {_boom.damage} to {玩家資料.%player%::爆擊傷害} + 2
  638. Chance of {_幾率.%player%}:
  639. set {_boom.damage} to {玩家資料.%player%::爆擊傷害} + 2
  640. make player damage loop-entity by ({_PHYSICDMG}+{_暫時.%player%.武器物理攻擊力}) * ( 1.05 + {_boom.damage} / 100) * {_integer}
  641. play "ENTITY_ENDERDRAGON_HURT" to player with volume 1 and pitch 1
  642. else:
  643. make player damage loop-entity by ({_PHYSICDMG}+{_暫時.%player%.武器物理攻擊力}) * {_integer}
  644. play "ENTITY_BLAZE_HURT" to player with volume 1 and pitch 1
  645. exit loop
  646. if {_命中} is 1:
  647. exit loop
  648. stop
  649. if "%uncolored lore of player's tool%" contain "武器類型: [ 重砲 ]":
  650. if {玩家資料.%player%::重砲手} isn't "重砲手":
  651. if difference between {冷卻.%player%::重砲射擊} and now is more than or equal to 5 second:
  652. delete {冷卻.%player%::重砲射擊}
  653. if {冷卻.%player%::重砲射擊} is set:
  654. stop
  655. if difference between {冷卻.%player%::重砲射擊} and now is more than or equal to 1.25 second:
  656. delete {冷卻.%player%::重砲射擊}
  657. if {冷卻.%player%::重砲射擊} is set:
  658. stop
  659. if {玩家資料.%player%::子彈} is not set:
  660. set {玩家資料.%player%::子彈} to 0
  661. if {玩家資料.%player%::子彈} = 0:
  662. send "&6武器 >> &c彈藥不足 無法開火 請補充彈藥" to player
  663. stop
  664. set {冷卻.%player%::重砲射擊} to now
  665. play "ENTITY_ZOMBIE_ATTACK_DOOR_WOOD" to player with volume 1 and pitch 0
  666. play "ENTITY_GENERIC_EXPLODE" to player with volume 1 and pitch 1
  667. set {_location.1} to block above player
  668. set {_距離} to 12+round({技能.%player%::重砲精通}/2)
  669. set {_距離} to {_距離} parsed as integer
  670. set {_距離2} to round({_距離}*2/3)
  671. set {_location.2} to block {_距離} in front player
  672. add 2 to y-coordinate of {_location.2}
  673. set {_x.1} to x-coordinate of {_location.1}
  674. set {_x.2} to x-coordinate of {_location.2}
  675. set {_y.1} to y-coordinate of {_location.1}
  676. set {_y.2} to y-coordinate of {_location.2}
  677. set {_z.1} to z-coordinate of {_location.1}
  678. set {_z.2} to z-coordinate of {_location.2}
  679. set {_x.difference} to ({_x.2} - {_x.1}) / {_距離2}
  680. set {_y.difference} to ({_y.2} - {_y.1}) / {_距離2}
  681. set {_z.difference} to ({_z.2} - {_z.1}) / {_距離2}
  682. set {_命中} to 0
  683. add player to {_命中::*}
  684. loop {_距離2} times:
  685. set {_location.1} to location of {_location.1}
  686. drawDot count 1, particle "flame", XYZ 0.25, 0.25, 0.25, center {_location.1}, visibleRange 32, pulseDelay 2, keepFor 0.1 seconds
  687. drawDot count 1, particle "flame", XYZ -0.25, 0.25, 0.25, center {_location.1}, visibleRange 32, pulseDelay 2, keepFor 0.1 seconds
  688. drawDot count 1, particle "flame", XYZ 0.25, 0.25, -0.25, center {_location.1}, visibleRange 32, pulseDelay 2, keepFor 0.1 seconds
  689. drawDot count 1, particle "flame", XYZ -0.25, 0.25, -0.25, center {_location.1}, visibleRange 32, pulseDelay 2, keepFor 0.1 seconds
  690. drawDot count 6, particle "smoke", XYZ 0, 0, 0, center {_location.1}, visibleRange 32, pulseDelay 2, keepFor 0.5 seconds
  691. increase x-coordinate of {_location.1} by {_x.difference}
  692. increase y-coordinate of {_location.1} by {_y.difference}
  693. increase z-coordinate of {_location.1} by {_z.difference}
  694. loop entities in radius 2 around block at location of {_location.1}:
  695. if loop-entity isn't a player or a dropped item:
  696. if {_命中::*} do not contain loop-entity:
  697. add 1 to {_命中}
  698. add loop-entity to {_命中::*}
  699. set {_integer} to PHY_DMG(loop-entity)
  700. set {_幾率.%player%} to ({玩家資料.%player%::爆擊率} + 10) / 100
  701. set {_boom.damage} to {玩家資料.%player%::爆擊傷害} + 2
  702. Chance of {_幾率.%player%}:
  703. set {_boom.damage} to {玩家資料.%player%::爆擊傷害} + 2
  704. make player damage loop-entity by ({_PHYSICDMG}+{_暫時.%player%.武器物理攻擊力}) * ( 1.05 + {_boom.damage} / 100) * {_integer} * ((10.5-{_命中}*0.5)/10)
  705. play "ENTITY_ENDERDRAGON_HURT" to player with volume 1 and pitch 1
  706. else:
  707. make player damage loop-entity by ({_PHYSICDMG}+{_暫時.%player%.武器物理攻擊力}) * {_integer}
  708. play "ENTITY_BLAZE_HURT" to player with volume 1 and pitch 0
  709. if {_命中} is 5:
  710. stop
  711. wait 1 tick
  712. on inventory click:
  713. if {玩家資料.%player%::玩家職業} is "槍神":
  714. if {裝彈中.%player%} is set:
  715. send "&6武器 >> &c彈藥裝填中 無法切換" to player
  716. cancel event
  717. on hotbar switch:
  718. if {玩家資料.%player%::玩家職業} is "槍神":
  719. if {裝彈中.%player%} is set:
  720. send "&6武器 >> &c彈藥裝填中 無法切換" to player
  721. cancel event
  722. on right click:
  723. name of player's tool is "&6彈夾":
  724. remove 1 of player's tool from player's tool
  725. add 100 to {玩家資料.%player%::子彈}
  726. send "你獲得了 100 個子彈"
  727. command /裝彈:
  728. trigger:
  729. player is an OP:
  730. give 1 of dye:8 named "&6彈夾" with lore "&7右鍵獲得100發子彈" to player
  731. on quit:
  732. if {玩家資料.%player%::玩家職業} is "槍神":
  733. delete {裝彈中.%player%}
  734. on damage:
  735. world of shooter isn't "miniwar"
  736. if shooter is player:
  737. if projectile is an arrow:
  738. set {_STRATK} to {玩家資料.%shooter%::力量} * 0.5
  739. set {_DEXATK} to {玩家資料.%shooter%::敏捷} * 0.7
  740. set {_INTATK} to {玩家資料.%shooter%::智慧} * 0.6
  741. set {_LUKATK} to {玩家資料.%shooter%::幸運} * 0.4
  742. set {_PHYSICDMG} to {玩家資料.%shooter%::物理攻擊力}
  743. set {_MAGICDMG} to {玩家資料.%shooter%::魔法攻擊力}
  744. if {幾轉職業::%{玩家資料.%shooter%::玩家職業}%} is 0:
  745. add ({_STRATK} + {_DEXATK} + {_LUKATK}) to {_PHYSICDMG}
  746. add ({_INTATK} + {_LUKATK}) to {_MAGICDMG}
  747. if {幾轉職業::%{玩家資料.%shooter%::玩家職業}%} is 1:
  748. add ({_STRATK} + {_DEXATK} + {_LUKATK})*1.2 to {_PHYSICDMG}
  749. add ({_INTATK} + {_LUKATK})*1.2 to {_MAGICDMG}
  750. if {幾轉職業::%{玩家資料.%shooter%::玩家職業}%} is 2:
  751. add ({_STRATK} + {_DEXATK} + {_LUKATK})*1.4 to {_PHYSICDMG}
  752. add ({_INTATK} + {_LUKATK})*1.4 to {_MAGICDMG}
  753. if {幾轉職業::%{玩家資料.%shooter%::玩家職業}%} is 3:
  754. add ({_STRATK} + {_DEXATK} + {_LUKATK})*1.8 to {_PHYSICDMG}
  755. add ({_INTATK} + {_LUKATK})*1.8 to {_MAGICDMG}
  756. set {_check} to {玩家資料.%shooter%::最大血量}
  757. if {幾轉職業::%{玩家資料.%shooter%::玩家職業}%} is 0:
  758. add ({玩家資料.%shooter%::力量} * 5) to {_check}
  759. add ({玩家資料.%shooter%::智慧} * 4) to {_check}
  760. add ({玩家資料.%shooter%::敏捷} * 3) to {_check}
  761. add ({玩家資料.%shooter%::幸運} * 2) to {_check}
  762. if {幾轉職業::%{玩家資料.%shooter%::玩家職業}%} is 1:
  763. add ({玩家資料.%shooter%::力量} * 5)*1.25 to {_check}
  764. add ({玩家資料.%shooter%::智慧} * 4)*1.25 to {_check}
  765. add ({玩家資料.%shooter%::敏捷} * 3)*1.25 to {_check}
  766. add ({玩家資料.%shooter%::幸運} * 2)*1.25 to {_check}
  767. if {幾轉職業::%{玩家資料.%shooter%::玩家職業}%} is 2:
  768. add ({玩家資料.%shooter%::力量} * 5)*1.5 to {_check}
  769. add ({玩家資料.%shooter%::智慧} * 4)*1.5 to {_check}
  770. add ({玩家資料.%shooter%::敏捷} * 3)*1.5 to {_check}
  771. add ({玩家資料.%shooter%::幸運} * 2)*1.5 to {_check}
  772. if {幾轉職業::%{玩家資料.%shooter%::玩家職業}%} is 3:
  773. add ({玩家資料.%shooter%::力量} * 5)*2 to {_check}
  774. add ({玩家資料.%shooter%::智慧} * 4)*2 to {_check}
  775. add ({玩家資料.%shooter%::敏捷} * 3)*2 to {_check}
  776. add ({玩家資料.%shooter%::幸運} * 2)*2 to {_check}
  777. if {冷卻.%shooter%::暴風神射} is set:
  778. set {_PHYSICDMG} to {_PHYSICDMG}*1.75
  779. set {_lore::*} to uncolored lore of shooter's tool split at "||"
  780. set {_integer} to PHY_DMG(victim)
  781. set {_幾率.%shooter%} to ({玩家資料.%shooter%::爆擊率} + 10) / 100
  782. loop {_lore::*}:
  783. if {_lore::%loop-index%} contain "等級需求 -":
  784. replace all "等級需求" , "-" and " " with "" in {_lore::%loop-index%}
  785. set {_lore::%loop-index%} to {_lore::%loop-index%} parsed as integer
  786. if {_lore::%loop-index%} is more than {玩家資料.%shooter%::玩家等級}:
  787. send "&6武器 >> &c武器無法使用,請確認是否符合武器使用條件!"
  788. cancel event
  789. stop
  790. if {_lore::%loop-index%} contain "職業需求":
  791. replace all "職業需求" , ":" , "[" , "]" and " " with "" in {_lore::%loop-index%}
  792. if {_lore::%loop-index%} is "全職業":
  793. set {_useless} to 1
  794. else if {_lore::%loop-index%} isn't {玩家資料.%shooter%::玩家職業}:
  795. send "&6武器 >> &c武器無法使用,請確認是否符合武器使用條件!" to shooter
  796. cancel event
  797. stop
  798. if {_lore::%loop-index%} contain "物理攻擊力 -":
  799. replace all "物理攻擊力" , "-" and " " with "" in {_lore::%loop-index%}
  800. set {_lore::%loop-index%} to {_lore::%loop-index%} parsed as integer
  801. set {_武器物理攻擊力} to {_lore::%loop-index%}
  802. Chance of {_幾率.%shooter%}:
  803. set {_boom.damage} to {玩家資料.%shooter%::爆擊傷害} + 2
  804. set damage to ({_PHYSICDMG}+{_武器物理攻擊力}) * 0.5 *( 1.05 + {_boom.damage} / 100) * {_integer}
  805. play "ENTITY_ENDERDRAGON_HURT" to shooter with volume 1 and pitch 1
  806. else:
  807. set damage to ({_PHYSICDMG}+{_武器物理攻擊力}) * 0.5 * {_integer}
  808. # if difference between {冷卻.%attacker%::魔力值恢復} and now is more than or equal to 1 second:
  809. # delete {冷卻.%attacker%::魔力值恢復}
  810. # if {冷卻.%attacker%::魔力值恢復} is set:
  811. # stop
  812. # add {玩家資料.%attacker%::魔量吸收量} to {玩家魔力值.%attacker%}
  813. # set {_math} to 0.99 * {玩家魔力值.%attacker%} / {玩家資料.%attacker%::魔力值}
  814. # if {_math} is more than or equal to 1:
  815. # set {_math} to 0.99
  816. # set {玩家魔力值.%attacker%} to {玩家資料.%attacker%::魔力值}
  817. # set level progress of the attacker to {_math}
  818. # set attacker's level to {玩家魔力值.%attacker%}
  819. # set {冷卻.%attacker%::魔力值恢復} to now
  820. command /testcd:
  821. trigger:
  822. loop all players:
  823. if {冷卻.%loop-player%::*} is set:
  824. loop {冷卻.%loop-player%::*}:
  825. add 1 to {_cdlist.%loop-player%}
  826. send "%loop-player% %{_cdlist.%loop-player%}%" to player
Advertisement
Add Comment
Please, Sign In to add comment