henry900326

Untitled

Sep 21st, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 54.48 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. Options:
  11. 玩家等級限制: 120
  12. on command:
  13. command is "boomlvl"
  14. cancel event
  15. set {_name} to "%player%"
  16. kick player due to "Disconneted."
  17. wait 20 ticks
  18. delete {玩家資料.%{_name}%::*}
  19. delete app "plugins\players\%{_name}%.yml"
  20. every 15 minutes:
  21. make console execute command "savedata"
  22. on command:
  23. command is "savedata"
  24. send "&b// &6文靜之潭 &e資料備份中 可能會有點卡頓 &b//" to all players
  25. wait 1 seconds
  26. loop all players:
  27. loop {玩家資料.%loop-player%::*}:
  28. set "%loop-index%" to "%loop-value-2%" in yaml file "plugins/players/%loop-player%.yml"
  29. loop all players:
  30. loop {技能.%loop-player%::*}:
  31. set yaml value "技能.%loop-index%" from "plugins/players/%loop-player%.yml" to "%loop-value-2%"
  32. send "&b// &6文靜之潭 &e資料備份成功 可繼續遊玩 &b//" to all players
  33. command /updateHp <number>:
  34. permission: op
  35. trigger:
  36. set "最大血量" to "%arg-1%" in yaml file "plugins/players/%player%.yml"
  37. set {玩家資料.%player%::最大血量} to arg-1
  38. command /expget <text> <number>:
  39. permission: op.oao
  40. trigger:
  41. if {玩家資料.%arg-1%::目前經驗值} is set:
  42. add arg-2 to {玩家資料.%arg-1%::目前經驗值}
  43. send "&6經驗 >> &e您獲得了 %arg-2% EXP。" to arg-1 parsed as player
  44.  
  45. on damage:
  46. if {玩家資料.%attacker%::遊戲模式} is "非打怪":
  47. stop
  48. "%uncolored lore of attacker's tool%" contain "武器類型:" or "物品類型:"
  49. if attacker is a player:
  50. if uncolored name of attacker's tool contain "技能書":
  51. if damage is more than or equal to 50:
  52. set {_integer} to SKI_DMG(victim)
  53. set {_boom} to damage
  54. set damage to damage * {_integer}
  55. if {玩家資料.%attacker%::爆擊率} is set:
  56. set {_幾率.%attacker%} to ({玩家資料.%attacker%::爆擊率}+{玩家資料.%attacker%::幸運}/20) / 100
  57. Chance of {_幾率.%attacker%}:
  58. if {玩家資料.%attacker%::爆擊傷害} is more than 165:
  59. set damage to {_boom} * 2 * {_integer}
  60. else:
  61. set damage to {_boom} *( 1.35 + ({玩家資料.%attacker%::爆擊傷害}-35) / 200) * {_integer}
  62. if difference between {冷卻.%attacker%::魔力值恢復} and now is more than or equal to 3 second:
  63. if "%uncolored lore of attacker's tool%" contain "技能 - 急凍":
  64. apply slowness 3 to victim for 0.5 seconds
  65. if "%uncolored lore of attacker's tool%" contain "技能 - 關節曲解":
  66. apply slowness 1 to victim for 3 seconds
  67. if "%uncolored lore of attacker's tool%" contain "技能 - 骨骼破壞":
  68. apply slowness 2 to victim for 2 seconds
  69. if "%uncolored lore of attacker's tool%" contain "技能 - 同生共死":
  70. apply slowness 3 to victim for 3 seconds
  71. apply slowness 1 to attacker for 1 seconds
  72. if "%uncolored lore of attacker's tool%" contain "技能 - 行軍之力":
  73. apply speed 1 to attacker for 3 seconds
  74. if "%uncolored lore of attacker's tool%" contain "技能 - 閃雷之音":
  75. apply speed 3 to attacker for 1 seconds
  76. if "%uncolored lore of attacker's tool%" contain "技能 - 疾跑模式":
  77. apply speed 2 to attacker for 2 seconds
  78. if "%uncolored lore of attacker's tool%" contain "技能 - 風雷附身":
  79. apply haste 2 to attacker for 1.5 seconds
  80. apply speed 2 to attacker for 1.5 seconds
  81. if "%uncolored lore of attacker's tool%" contain "技能 - 制裁影速":
  82. apply slowness 2 to victim for 1.5 seconds
  83. apply speed 2 to attacker for 1.5 seconds
  84. if "%uncolored lore of attacker's tool%" contain "技能 - 虛影連擊":
  85. apply wither 3 to victim for 0.5 seconds
  86. if "%uncolored lore of attacker's tool%" contain "技能 - 侵蝕":
  87. apply wither 1 to victim for 3 seconds
  88. if "%uncolored lore of attacker's tool%" contain "技能 - 劇毒":
  89. apply wither 2 to victim for 2 seconds
  90. if "%uncolored lore of attacker's tool%" contain "技能 - 流順構造":
  91. apply haste 1 to attacker for 3 seconds
  92. if "%uncolored lore of attacker's tool%" contain "技能 - 急速破壞":
  93. apply haste 3 to attacker for 1 seconds
  94. if "%uncolored lore of attacker's tool%" contain "技能 - 加速時間":
  95. apply haste 2 to attacker for 2 seconds
  96. delete {冷卻.%attacker%::魔力值恢復}
  97. if ({玩家資料.%attacker%::魔量吸收量} + {玩家魔力值.%attacker%}) is more than {玩家資料.%attacker%::魔力值}:
  98. set {玩家魔力值.%attacker%} to {玩家資料.%attacker%::魔力值}
  99. else:
  100. add {玩家資料.%attacker%::魔量吸收量} to {玩家魔力值.%attacker%}
  101. if {玩家資料.%attacker%::玩家職業} is not "拳霸":
  102. set {_math} to 0.99 * {玩家魔力值.%attacker%} / {玩家資料.%attacker%::魔力值}
  103. if {_math} is more than 1:
  104. set {_math} to 0.99
  105. set {玩家魔力值.%attacker%} to {玩家資料.%attacker%::魔力值}
  106. set level progress of the attacker to {_math}
  107. set attacker's level to {玩家魔力值.%attacker%}
  108. set {_check} to {玩家資料.%attacker%::最大血量}
  109. if {幾轉職業::%{玩家資料.%attacker%::玩家職業}%} is 0:
  110. add ({玩家資料.%attacker%::力量} * 5) to {_check}
  111. add ({玩家資料.%attacker%::智慧} * 4) to {_check}
  112. add ({玩家資料.%attacker%::敏捷} * 3) to {_check}
  113. add ({玩家資料.%attacker%::幸運} * 2) to {_check}
  114. if {幾轉職業::%{玩家資料.%attacker%::玩家職業}%} is 1:
  115. add ({玩家資料.%attacker%::力量} * 5)*1.25 to {_check}
  116. add ({玩家資料.%attacker%::智慧} * 4)*1.25 to {_check}
  117. add ({玩家資料.%attacker%::敏捷} * 3)*1.25 to {_check}
  118. add ({玩家資料.%attacker%::幸運} * 2)*1.25 to {_check}
  119. if {幾轉職業::%{玩家資料.%attacker%::玩家職業}%} is 2:
  120. add ({玩家資料.%attacker%::力量} * 5)*1.5 to {_check}
  121. add ({玩家資料.%attacker%::智慧} * 4)*1.5 to {_check}
  122. add ({玩家資料.%attacker%::敏捷} * 3)*1.5 to {_check}
  123. add ({玩家資料.%attacker%::幸運} * 2)*1.5 to {_check}
  124. if {幾轉職業::%{玩家資料.%attacker%::玩家職業}%} is 3:
  125. add ({玩家資料.%attacker%::力量} * 5)*2 to {_check}
  126. add ({玩家資料.%attacker%::智慧} * 4)*2 to {_check}
  127. add ({玩家資料.%attacker%::敏捷} * 3)*2 to {_check}
  128. add ({玩家資料.%attacker%::幸運} * 2)*2 to {_check}
  129. heal attacker by {玩家資料.%attacker%::血量吸收量} / (attacker's max health + {_check}) * attacker's max health
  130. set {冷卻.%attacker%::魔力值恢復} to now
  131. if {冷卻.%attacker%::魔力值恢復} isn't set:
  132. set {冷卻.%attacker%::魔力值恢復} to now
  133. if "%uncolored lore of attacker's tool%" contain "物品類型: [ 技能 ]" or "武器類型: [ 魔杖 ]" or "武器類型: [ 弓 ]" or "武器類型: [ 飛鏢 ]" or "武器類型: [ 權杖 ]" or "武器類型: [ 長槍 ]" or "武器類型: [ 火槍 ]" or "武器類型: [ 火杖 ]" or "武器類型: [ 冰杖 ]" or "武器類型: [ 弩 ]" or "武器類型: [ 長杖 ]":
  134. stop
  135. set {_lore::*} to uncolored lore of attacker's tool split at "||"
  136. loop {_lore::*}:
  137. if {_lore::%loop-index%} contain "等級需求 -":
  138. if {_lore::%loop-index%} contains "技能":
  139. stop
  140. replace all "等級需求" , "-" and " " with "" in {_lore::%loop-index%}
  141. set {_lore::%loop-index%} to {_lore::%loop-index%} parsed as integer
  142. if {_lore::%loop-index%} is more than {玩家資料.%attacker%::玩家等級}:
  143. send "&6武器 >> &c武器無法使用,請確認是否符合武器使用條件!"
  144. cancel event
  145. stop
  146. if {_lore::%loop-index%} contain "職業需求":
  147. replace all "職業需求" , ":" , "[" , "]" and " " with "" in {_lore::%loop-index%}
  148. if {_lore::%loop-index%} contains "技能":
  149. stop
  150. if {_lore::%loop-index%} is "全職業":
  151. set {_useless} to 1
  152. else if {_lore::%loop-index%} isn't {玩家資料.%attacker%::玩家職業}:
  153. send "&6武器 >> &c武器無法使用,請確認是否符合武器使用條件!" to attacker
  154. cancel event
  155. stop
  156. if {_lore::%loop-index%} contain "物理攻擊力 -":
  157. replace all "物理攻擊力" , "-" and " " with "" in {_lore::%loop-index%}
  158. set {_lore::%loop-index%} to {_lore::%loop-index%} parsed as integer
  159. set {_武器攻擊力} to {_lore::%loop-index%}
  160. loop 1 times:
  161. if "%uncolored lore of attacker's tool%" contain "物品類型: [ 武器 ]":
  162. set {_pass} to 1
  163. if "%uncolored lore of attacker's tool%" contain "武器類型: [ 劍 ]":
  164. if difference between {冷卻.%attacker%::劍擊} and now is more than or equal to 0.4 second:
  165. delete {冷卻.%attacker%::劍擊}
  166. if {冷卻.%attacker%::劍擊} is set:
  167. cancel event
  168. stop
  169. chance of ({技能.%attacker%::劍士自尊}*5)%:
  170. if difference between {冷卻.%attacker%::鬥環斬} and now is more than or equal to 1 second:
  171. delete {冷卻.%attacker%::鬥環斬}
  172. if {冷卻.%attacker%::鬥環斬} is set:
  173. exit loop
  174. loop 2 times:
  175. loop entities in radius 3 of victim:
  176. if loop-entity isn't a player or a dropped item or an arrow:
  177. make attacker damage loop-entity by 1
  178. play "ENTITY_ENDERDRAGON_HURT" to attacker with volume 1 and pitch 5
  179. set {冷卻.%attacker%::鬥環斬} to now
  180. if {冷卻.%attacker%::鬥靈迴砍} is set:
  181. delete {冷卻.%attacker%::鬥靈迴砍}
  182. set {冷卻.%attacker%::劍擊} to now
  183. if "%uncolored lore of attacker's tool%" contain "武器類型: [ 匕首 ]":
  184. if difference between {冷卻.%attacker%::匕首擊} and now is more than or equal to 0.15 second:
  185. delete {冷卻.%attacker%::匕首擊}
  186. if {冷卻.%attacker%::匕首擊} is set:
  187. cancel event
  188. stop
  189. set {冷卻.%attacker%::匕首擊} to now
  190. if "%uncolored lore of attacker's tool%" contain "武器類型: [ 拳套 ]":
  191. if difference between {冷卻.%attacker%::拳套連段} and now is more than or equal to 0.5 second:
  192. delete {冷卻.%attacker%::拳套連段}
  193. if {冷卻.%attacker%::拳套連段} is set:
  194. stop
  195. set {冷卻.%attacker%::拳套連段} to now
  196. set {_pass} to 0
  197. set {_連段} to 1
  198. if {連段.%attacker%} is not set:
  199. set {連段.%attacker%} to 1
  200. if {_pass} is 1:
  201. set {_STRATK} to {玩家資料.%attacker%::力量} * 0.5
  202. set {_DEXATK} to {玩家資料.%attacker%::敏捷} * 0.7
  203. set {_INTATK} to {玩家資料.%attacker%::智慧} * 0.6
  204. set {_LUKATK} to {玩家資料.%attacker%::幸運} * 0.4
  205. set {_PHYSICDMG} to {玩家資料.%attacker%::物理攻擊力}
  206. set {_MAGICDMG} to {玩家資料.%attacker%::魔法攻擊力}
  207. if {幾轉職業::%{玩家資料.%attacker%::玩家職業}%} is 0:
  208. add ({_STRATK} + {_DEXATK} + {_LUKATK}) to {_PHYSICDMG}
  209. add ({_INTATK} + {_LUKATK}) to {_MAGICDMG}
  210. if {幾轉職業::%{玩家資料.%attacker%::玩家職業}%} is 1:
  211. add ({_STRATK} + {_DEXATK} + {_LUKATK})*1.2 to {_PHYSICDMG}
  212. add ({_INTATK} + {_LUKATK})*1.2 to {_MAGICDMG}
  213. if {幾轉職業::%{玩家資料.%attacker%::玩家職業}%} is 2:
  214. add ({_STRATK} + {_DEXATK} + {_LUKATK})*1.4 to {_PHYSICDMG}
  215. add ({_INTATK} + {_LUKATK})*1.4 to {_MAGICDMG}
  216. if {幾轉職業::%{玩家資料.%attacker%::玩家職業}%} is 3:
  217. add ({_STRATK} + {_DEXATK} + {_LUKATK})*1.8 to {_PHYSICDMG}
  218. add ({_INTATK} + {_LUKATK})*1.8 to {_MAGICDMG}
  219. if {BUFF.鬥氣爆發time::%attacker%} is set:
  220. add {玩家資料.%attacker%::物理攻擊力} to {_PHYSICDMG}
  221. add {玩家資料.%attacker%::防禦力} to {_PHYSICDMG}
  222. set {_number1} to PHY_DMG(victim)
  223. set {_暗影突判斷} to 0
  224. if {技能.%attacker%::暗影突刺} is set:
  225. chance of (8*{技能.%attacker%::暗影突刺})%:
  226. drawDot count 10, particle "smokelarge", XYZ 0.6, 0.6, 0.6, center victim, visibleRange 32, pulseDelay 2, keepFor 0.2 seconds
  227. if difference between {冷卻.%attacker%::絕殺刃} and now is less than 15 seconds:
  228. set damage to ({_PHYSICDMG}*(4.5+0.3*{技能.%attacker%::暗影突刺}+0.2*{技能.%attacker%::絕殺刃}) + {_武器攻擊力})/2 * {_number1} * 0.95
  229. stop
  230. else:
  231. set damage to ({_PHYSICDMG}*(4.5+0.3*{技能.%attacker%::暗影突刺}) + {_武器攻擊力})/2 * {_number1} * 0.95
  232. play "ENTITY_ENDERDRAGON_HURT" to attacker with volume 1 and pitch 0
  233. set {_暗影突判斷} to 1
  234. if {_暗影突判斷} is 0:
  235. set damage to ({_PHYSICDMG} + {_武器攻擊力})/2 * {_number1} * 0.95
  236. set {_鬥者意志判斷} to 0
  237. if {技能.%attacker%::鬥魂纏身} is 10:
  238. set {_損失生命} to (attacker's max health - attacker's health)*10
  239. if {_損失生命} >= 50:
  240. set {_鬥者意志傷害倍率} to (1/20*{_損失生命})-1.5
  241. set damage to ({_PHYSICDMG} + {_武器攻擊力})/2 * {_number1} * 0.95 * {_鬥者意志傷害倍率}
  242. if {_鬥者意志傷害倍率} >= 2:
  243. drawDot count 20, particle "crit", XYZ 0.6, 0.6, 0.6, center victim, visibleRange 32, pulseDelay 2, keepFor 0.2 seconds
  244. set {_鬥者意志判斷} to 1
  245. if {_鬥者意志判斷} is 0:
  246. set damage to ({_PHYSICDMG} + {_武器攻擊力})/2 * {_number1} * 0.95
  247. if {玩家資料.%attacker%::爆擊率} is set:
  248. set {_幾率.%attacker%} to ({玩家資料.%attacker%::爆擊率} + 15) / 100
  249. Chance of {_幾率.%attacker%}:
  250. if difference between {冷卻.%attacker%::絕殺刃} and now is less than 15 seconds:
  251. set damage to ({_PHYSICDMG}*(4.5+0.3*{技能.%attacker%::暗影突刺}+0.2*{技能.%attacker%::絕殺刃}) + {_武器攻擊力})/2 * {_number1} * 0.95
  252. if {技能.%attacker%::鬥魂纏身} is set:
  253. set damage to ({_PHYSICDMG} + {_武器攻擊力})/2*( 1 + {_boom.damage} / 100) * {_number1} * 0.95 * {_鬥者意志傷害倍率}
  254. else:
  255. set {_omg} to 0.01 * {玩家資料.%attacker%::爆擊傷害} * damage
  256. set {_boom.damage} to {玩家資料.%attacker%::爆擊傷害}
  257. set damage to (({_PHYSICDMG} + {_武器攻擊力})/2)*( 1 + {_boom.damage} / 100) * {_number1} * 0.95
  258. set {_damagetcountforfood} to damage
  259. set {_damagetcountforfoodbonus} to round({_damagetcountforfood}*({料理.攻擊力::%attacker%}/100))
  260. add {_damagetcountforfoodbonus} to damage
  261. if {_連段} is 1:
  262. set {_STRATK} to {玩家資料.%attacker%::力量} * 0.5
  263. set {_DEXATK} to {玩家資料.%attacker%::敏捷} * 0.7
  264. set {_INTATK} to {玩家資料.%attacker%::智慧} * 0.6
  265. set {_LUKATK} to {玩家資料.%attacker%::幸運} * 0.4
  266. set {_PHYSICDMG} to {玩家資料.%attacker%::物理攻擊力}
  267. set {_MAGICDMG} to {玩家資料.%attacker%::魔法攻擊力}
  268. if {幾轉職業::%{玩家資料.%attacker%::玩家職業}%} is 0:
  269. add ({_STRATK} + {_DEXATK} + {_LUKATK}) to {_PHYSICDMG}
  270. add ({_INTATK} + {_LUKATK}) to {_MAGICDMG}
  271. if {幾轉職業::%{玩家資料.%attacker%::玩家職業}%} is 1:
  272. add ({_STRATK} + {_DEXATK} + {_LUKATK})*1.2 to {_PHYSICDMG}
  273. add ({_INTATK} + {_LUKATK})*1.2 to {_MAGICDMG}
  274. if {幾轉職業::%{玩家資料.%attacker%::玩家職業}%} is 2:
  275. add ({_STRATK} + {_DEXATK} + {_LUKATK})*1.4 to {_PHYSICDMG}
  276. add ({_INTATK} + {_LUKATK})*1.4 to {_MAGICDMG}
  277. if {幾轉職業::%{玩家資料.%attacker%::玩家職業}%} is 3:
  278. add ({_STRATK} + {_DEXATK} + {_LUKATK})*1.8 to {_PHYSICDMG}
  279. add ({_INTATK} + {_LUKATK})*1.8 to {_MAGICDMG}
  280. if {BUFF.鬥氣爆發time::%attacker%} is set:
  281. add {玩家資料.%attacker%::物理攻擊力} to {_PHYSICDMG}
  282. add {玩家資料.%attacker%::防禦力} to {_PHYSICDMG}
  283. set {_number1} to PHY_DMG(victim)
  284. set damage to ({_PHYSICDMG} + {_武器攻擊力})/2 * {_number1} * 0.95
  285. if {連段.%attacker%} is 1:
  286. set {連段.%attacker%} to 2
  287. set {_粒子效果} to block 1 up and 2 in front attacker
  288. set {_粒子效果} to location of {_粒子效果}
  289. drawDot count 20, particle "Crit", XYZ 0.6, 0.6, 0.6, center {_粒子效果}, visibleRange 32, pulseDelay 2, keepFor 0.1 seconds
  290. play "ENTITY_PLAYER_ATTACK_CRIT" to attacker with volume 1 and pitch 1
  291. set {_範圍} to location of victim
  292. set {_距離} to distance between attacker and victim
  293. loop entities in radius 1.5 of {_範圍}:
  294. if loop-entity isn't a player or a dropped item:
  295. set {_距離2} to distance between attacker and loop-entity
  296. if {_距離2} > {_距離}:
  297. if loop-entity is not victim:
  298. add loop-entity to {_拳風::*}
  299. set {_拳風傷害} to (({_PHYSICDMG} + {_武器攻擊力})/2 * {_number1} * 0.95)*(1+{技能.%attacker%::連擊}*0.03)
  300. set damage to (({_PHYSICDMG} + {_武器攻擊力})/2 * {_number1} * 0.95)*(1+{技能.%attacker%::連擊}*0.03)
  301. if {玩家資料.%attacker%::爆擊率} is set:
  302. set {_幾率.%attacker%} to ({玩家資料.%attacker%::爆擊率} + 15) / 100
  303. Chance of {_幾率.%attacker%}:
  304. set {_omg} to 0.01 * {玩家資料.%attacker%::爆擊傷害} * damage
  305. set {_boom.damage} to {玩家資料.%attacker%::爆擊傷害}
  306. set damage to ((({_PHYSICDMG} + {_武器攻擊力})/2)*( 1 + {_boom.damage} / 100) * {_number1} * 0.95)*(1+{技能.%attacker%::連擊}*0.03)
  307. set {_拳風傷害} to ((({_PHYSICDMG} + {_武器攻擊力})/2)*( 1 + {_boom.damage} / 100) * {_number1} * 0.95)*(1+{技能.%attacker%::連擊}*0.03)
  308. play "ENTITY_ENDERDRAGON_HURT" to attacker with volume 1 and pitch 1
  309. stop
  310. make attacker damage {_拳風::*} by {_拳風傷害}
  311. wait 20 tick
  312. if {連段.%attacker%} is 2:
  313. set {連段.%attacker%} to 1
  314. stop
  315. else if {連段.%attacker%} is 2:
  316. set {連段.%attacker%} to 3
  317. set {_粒子效果} to block 1 up and 2 in front attacker
  318. set {_粒子效果} to location of {_粒子效果}
  319. drawDot count 20, particle "Crit", XYZ 0.6, 0.6, 0.6, center {_粒子效果}, visibleRange 32, pulseDelay 2, keepFor 0.1 seconds
  320. play "ENTITY_PLAYER_ATTACK_CRIT" to attacker with volume 1 and pitch 1
  321. set {_範圍} to location of victim
  322. set {_距離} to distance between attacker and victim
  323. loop entities in radius 1.5 of {_範圍}:
  324. if loop-entity isn't a player or a dropped item:
  325. set {_距離2} to distance between attacker and loop-entity
  326. if {_距離2} > {_距離}:
  327. if loop-entity is not victim:
  328. add loop-entity to {_拳風::*}
  329. set {_拳風傷害} to (({_PHYSICDMG} + {_武器攻擊力})/2 * {_number1} * 0.95)*(1+{技能.%attacker%::連擊}*0.03)
  330. set damage to (({_PHYSICDMG} + {_武器攻擊力})/2 * {_number1} * 0.95)*(1+{技能.%attacker%::連擊}*0.03)
  331. if {玩家資料.%attacker%::爆擊率} is set:
  332. set {_幾率.%attacker%} to ({玩家資料.%attacker%::爆擊率} + 15) / 100
  333. Chance of {_幾率.%attacker%}:
  334. set {_omg} to 0.01 * {玩家資料.%attacker%::爆擊傷害} * damage
  335. set {_boom.damage} to {玩家資料.%attacker%::爆擊傷害}
  336. set damage to ((({_PHYSICDMG} + {_武器攻擊力})/2)*( 1 + {_boom.damage} / 100) * {_number1} * 0.95)*(1+{技能.%attacker%::連擊}*0.03)
  337. set {_拳風傷害} to ((({_PHYSICDMG} + {_武器攻擊力})/2)*( 1 + {_boom.damage} / 100) * {_number1} * 0.95)*(1+{技能.%attacker%::連擊}*0.03)
  338. play "ENTITY_ENDERDRAGON_HURT" to attacker with volume 1 and pitch 1
  339. stop
  340. make attacker damage {_拳風::*} by {_拳風傷害}
  341. wait 20 tick
  342. if {連段.%attacker%} is 3:
  343. set {連段.%attacker%} to 1
  344. stop
  345. else if {連段.%attacker%} is 3:
  346. if {技能.%attacker%::連擊} is set:
  347. set {連段.%attacker%} to 4
  348. else if {技能.%attacker%::連擊} is not set:
  349. set {連段.%attacker%} to 1
  350. set {_粒子效果} to block 1 up and 2 in front attacker
  351. set {_粒子效果} to location of {_粒子效果}
  352. drawDot count 20, particle "CritMagic", XYZ 0.6, 0.6, 0.6, center {_粒子效果}, visibleRange 32, pulseDelay 2, keepFor 0.1 seconds
  353. play "ENTITY_PLAYER_ATTACK_KNOCKBACK" to attacker with volume 1 and pitch 1
  354. set {_範圍} to location of victim
  355. set {_距離} to distance between attacker and victim
  356. loop entities in radius 2 of {_範圍}:
  357. if loop-entity isn't a player or a dropped item:
  358. set {_距離2} to distance between attacker and loop-entity
  359. if {_距離2} > {_距離}:
  360. if loop-entity is not victim:
  361. add loop-entity to {_拳風::*}
  362. set {_拳風傷害} to (({_PHYSICDMG} + {_武器攻擊力})/2 * {_number1} * 0.95)*(1+{技能.%attacker%::連擊}*0.03)
  363. set damage to (({_PHYSICDMG} + {_武器攻擊力})/2 * {_number1} * 0.95)*(1+{技能.%attacker%::連擊}*0.03)
  364. if {玩家資料.%attacker%::爆擊率} is set:
  365. set {_幾率.%attacker%} to ({玩家資料.%attacker%::爆擊率} + 15) / 100
  366. Chance of {_幾率.%attacker%}:
  367. set {_omg} to 0.01 * {玩家資料.%attacker%::爆擊傷害} * damage
  368. set {_boom.damage} to {玩家資料.%attacker%::爆擊傷害}
  369. set damage to ((({_PHYSICDMG} + {_武器攻擊力})/2)*( 1 + {_boom.damage} / 100) * {_number1} * 0.95)*(1+{技能.%attacker%::連擊}*0.03)
  370. set {_拳風傷害} to ((({_PHYSICDMG} + {_武器攻擊力})/2)*( 1 + {_boom.damage} / 100) * {_number1} * 0.95)*(1+{技能.%attacker%::連擊}*0.03)
  371. play "ENTITY_ENDERDRAGON_HURT" to attacker with volume 1 and pitch 1
  372. stop
  373. make attacker damage {_拳風::*} by {_拳風傷害}
  374. push {_拳風::*} in horizontal direction of attacker at speed 1
  375. if {技能.%attacker%::連擊} is not set:
  376. stop
  377. wait 20 tick
  378. if {連段.%attacker%} is 4:
  379. set {連段.%attacker%} to 1
  380. stop
  381. else if {連段.%attacker%} is 4:
  382. set {連段.%attacker%} to 1
  383. set {_粒子效果} to block 1 up and 2 in front attacker
  384. set {_粒子效果} to location of {_粒子效果}
  385. drawDot count 3, particle "sweep", XYZ 0.6, 0.6, 0.6, center {_粒子效果}, visibleRange 32, pulseDelay 2, keepFor 0.1 seconds
  386. play "ENTITY_PLAYER_ATTACK_SWEEP" to attacker with volume 2 and pitch 1
  387. set {_範圍} to location of victim
  388. set {_距離} to distance between attacker and victim
  389. loop entities in radius 2.5 of {_範圍}:
  390. if loop-entity isn't a player or a dropped item:
  391. set {_距離2} to distance between attacker and loop-entity
  392. if {_距離2} > {_距離}:
  393. if loop-entity is not victim:
  394. add loop-entity to {_拳風::*}
  395. set {_拳風傷害} to (({_PHYSICDMG} + {_武器攻擊力})/2 * {_number1} * 0.95)*(1+{技能.%attacker%::連擊}*0.03)
  396. set damage to (({_PHYSICDMG} + {_武器攻擊力})/2 * {_number1} * 0.95)*(1+{技能.%attacker%::連擊}*0.03)
  397. if {玩家資料.%attacker%::爆擊率} is set:
  398. set {_幾率.%attacker%} to ({玩家資料.%attacker%::爆擊率} + 15) / 100
  399. Chance of {_幾率.%attacker%}:
  400. set {_omg} to 0.01 * {玩家資料.%attacker%::爆擊傷害} * damage
  401. set {_boom.damage} to {玩家資料.%attacker%::爆擊傷害}
  402. set damage to ((({_PHYSICDMG} + {_武器攻擊力})/2)*( 1 + {_boom.damage} / 100) * {_number1} * 0.95)*(1+{技能.%attacker%::連擊}*0.03)
  403. set {_拳風傷害} to ((({_PHYSICDMG} + {_武器攻擊力})/2)*( 1 + {_boom.damage} / 100) * {_number1} * 0.95)*(1+{技能.%attacker%::連擊}*0.03)
  404. play "ENTITY_ENDERDRAGON_HURT" to attacker with volume 1 and pitch 1
  405. stop
  406. make attacker damage {_拳風::*} by {_拳風傷害}
  407. apply slowness 2 to victim for 3 second
  408. apply slowness 2 to {_拳風::*} for 3 second
  409. apply speed 2 to attacker for 3 second
  410. stop
  411. stop
  412. on death:
  413. remove all 1 xp from drops
  414. command /stat [<player>] [<text>] [<number>]:
  415. permission: op.oao
  416. trigger:
  417. if arg-1 isn't set:
  418. send "&c違法操作"
  419. stop trigger
  420. set {_arg=1} to player
  421. if arg-1 is set:
  422. set {_arg=1} to arg-1
  423. if {玩家資料.%{_arg=1}%::*} is set:
  424. if arg-3 is set:
  425. if arg-2 is "power":
  426. set {_w.%arg-3%} to arg-3
  427. if {玩家資料.%{_arg=1}%::剩餘屬性點} is more than or equal to {_w.%arg-3%}:
  428. add arg-3 to {玩家資料.%{_arg=1}%::力量}
  429. set {_w.%arg-3%} to {_w.%arg-3%} * -1
  430. add {_w.%arg-3%} to {玩家資料.%{_arg=1}%::剩餘屬性點}
  431. stop trigger
  432. if arg-2 is "speed":
  433. set {_w.%arg-3%} to arg-3
  434. if {玩家資料.%{_arg=1}%::剩餘屬性點} is more than or equal to {_w.%arg-3%}:
  435. add arg-3 to {玩家資料.%{_arg=1}%::敏捷}
  436. set {_w.%arg-3%} to {_w.%arg-3%} * -1
  437. add {_w.%arg-3%} to {玩家資料.%{_arg=1}%::剩餘屬性點}
  438. stop trigger
  439. if arg-2 is "clever":
  440. set {_w.%arg-3%} to arg-3
  441. if {玩家資料.%{_arg=1}%::剩餘屬性點} is more than or equal to {_w.%arg-3%}:
  442. add arg-3 to {玩家資料.%{_arg=1}%::智慧}
  443. set {_w.%arg-3%} to {_w.%arg-3%} * -1
  444. add {_w.%arg-3%} to {玩家資料.%{_arg=1}%::剩餘屬性點}
  445. stop trigger
  446. if arg-2 is "lucky":
  447. set {_w.%arg-3%} to arg-3
  448. if {玩家資料.%{_arg=1}%::剩餘屬性點} is more than or equal to {_w.%arg-3%}:
  449. add arg-3 to {玩家資料.%{_arg=1}%::幸運}
  450. set {_w.%arg-3%} to {_w.%arg-3%} * -1
  451. add {_w.%arg-3%} to {玩家資料.%{_arg=1}%::剩餘屬性點}
  452. stop trigger
  453. send "&c屬性點不足" to player-arg
  454. function LoadAP(P:player):
  455. if {幾轉職業::%{玩家資料.%{_p}%::玩家職業}%} is 0:
  456. set {_hpcheck} to 1
  457. set {_dmgcheck} to 1
  458. if {幾轉職業::%{玩家資料.%{_p}%::玩家職業}%} is 1:
  459. set {_hpcheck} to 1.25
  460. set {_dmgcheck} to 1.25
  461. if {幾轉職業::%{玩家資料.%{_p}%::玩家職業}%} is 2:
  462. set {_hpcheck} to 1.5
  463. set {_dmgcheck} to 1.5
  464. if {幾轉職業::%{玩家資料.%{_p}%::玩家職業}%} is 3:
  465. set {_hpcheck} to 2
  466. set {_dmgcheck} to 2
  467. set slot 10 of {_p}'s current inventory to diamond sword named "&6《增加力量屬性》" with lore "&e┌----------&e&l●&e----------┐||&f目前力量 &e[ &6%{玩家資料.%{_p}%::力量}% &e]||&f左鍵增加 &c1 &f點||&f右鍵增加 &c10 &f點||&e-----------&e&l●&e-----------||&f目前血量提升量 &e[ &6%{玩家資料.%{_p}%::力量}*5*{_hpcheck}% &e]||&f目前物理攻擊力提升量 &e[ &6%{玩家資料.%{_p}%::力量}*0.5*{_dmgcheck}% &e]||&f每點增加&c %5*{_hpcheck}% &f點血量與&c %0.5*{_dmgcheck}% &f點物理攻擊力||&e└----------&e&l●&e----------┘"
  468. set slot 14 of {_p}'s current inventory to enchanted book named "&b《增加智慧屬性》" with lore "&e┌----------&e&l●&e----------┐||&f目前智慧 &e[ &b%{玩家資料.%{_p}%::智慧}% &e]||&f左鍵增加 &c1 &f點||&f右鍵增加 &c10 &f點||&e-----------&e&l●&e-----------||&f目前血量提升量 &e[ &b%{玩家資料.%{_p}%::智慧}*4*{_hpcheck}% &e]||&f目前魔法攻擊力提升量 &e[ &b%{玩家資料.%{_p}%::智慧}*0.6*{_dmgcheck}% &e]||&f每點增加&c %4*{_hpcheck}% &f點血量與&c %0.6*{_dmgcheck}% &f點魔法攻擊力||&e└----------&e&l●&e----------┘"
  469. set slot 12 of {_p}'s current inventory to golden boots named "&a《增加敏捷屬性》" with lore "&e┌----------&e&l●&e----------┐||&f目前敏捷 &e[ &a%{玩家資料.%{_p}%::敏捷}% &e]||&f左鍵增加 &c1 &f點||&f右鍵增加 &c10 &f點||&e-----------&e&l●&e-----------||&f目前血量提升量 &e[ &a%{玩家資料.%{_p}%::敏捷}*3*{_hpcheck}% &e]||&f目前物理攻擊力提升量 &e[ &a%{玩家資料.%{_p}%::敏捷}*0.7*{_dmgcheck}% &e]||&f每點增加&c %3*{_hpcheck}% &f點血量與&c %0.7*{_dmgcheck}% &f點物理攻擊力||&e└----------&e&l●&e----------┘"
  470. set slot 16 of {_p}'s current inventory to lily pads named "&2《增加幸運屬性》" with lore "&e┌----------&e&l●&e----------┐||&f目前幸運 &e[ &2%{玩家資料.%{_p}%::幸運}% &e]||&f左鍵增加 &c1 &f點||&f右鍵增加 &c10 &f點||&e-----------&e&l●&e-----------||&f目前血量提升量 &e[ &2%{玩家資料.%{_p}%::幸運}*2*{_hpcheck}% &e]||&f目前物理攻擊力提升量 &e[ &2%{玩家資料.%{_p}%::幸運}*0.4*{_dmgcheck}% &e]||||&f目前爆擊率提升量 &e[ &2%{玩家資料.%{_p}%::幸運}*0.05%%% &e]||&f每點增加&c %2*{_hpcheck}% &f點血量,&c 0.05%%&f爆擊率與&c %0.4*{_dmgcheck}% &f點物理/魔法攻擊力||&e└----------&e&l●&e----------┘"
  471. command /stats:
  472. trigger:
  473. open chest with 3 row named "&9&l 文靜之潭&6&l配點介面" to player
  474. if inventory name of player's current inventory contains "配點介面":
  475. if {幾轉職業::%{玩家資料.%player%::玩家職業}%} is 0:
  476. set {_hpcheck} to 1
  477. set {_dmgcheck} to 1
  478. if {幾轉職業::%{玩家資料.%player%::玩家職業}%} is 1:
  479. set {_hpcheck} to 1.25
  480. set {_dmgcheck} to 1.25
  481. if {幾轉職業::%{玩家資料.%player%::玩家職業}%} is 2:
  482. set {_hpcheck} to 1.5
  483. set {_dmgcheck} to 1.5
  484. if {幾轉職業::%{玩家資料.%player%::玩家職業}%} is 3:
  485. set {_hpcheck} to 2
  486. set {_dmgcheck} to 2
  487. loop 9 times:
  488. set slot (loop-number - 1) of player's current inventory to 1 of black stained glass pane named "&7"
  489. loop 5 times:
  490. set slot (9 + (loop-number - 1) * 2) of player's current inventory to 1 of black stained glass pane named "&7"
  491. set slot (18 + (loop-number - 1) * 2) of player's current inventory to 1 of black stained glass pane named "&7"
  492. set slot 10 of player's current inventory to diamond sword named "&6《增加力量屬性》" with lore "&e┌----------&e&l●&e----------┐||&f目前力量 &e[ &6%{玩家資料.%player%::力量}% &e]||&f左鍵增加 &c1 &f點||&f右鍵增加 &c10 &f點||&e-----------&e&l●&e-----------||&f目前血量提升量 &e[ &6%{玩家資料.%player%::力量}*5*{_hpcheck}% &e]||&f目前物理攻擊力提升量 &e[ &6%{玩家資料.%player%::力量}*0.5*{_dmgcheck}% &e]||&f每點增加&c %5*{_hpcheck}% &f點血量與&c %0.5*{_dmgcheck}% &f點物理攻擊力||&e└----------&e&l●&e----------┘"
  493. set slot 14 of player's current inventory to enchanted book named "&b《增加智慧屬性》" with lore "&e┌----------&e&l●&e----------┐||&f目前智慧 &e[ &b%{玩家資料.%player%::智慧}% &e]||&f左鍵增加 &c1 &f點||&f右鍵增加 &c10 &f點||&e-----------&e&l●&e-----------||&f目前血量提升量 &e[ &b%{玩家資料.%player%::智慧}*4*{_hpcheck}% &e]||&f目前魔法攻擊力提升量 &e[ &b%{玩家資料.%player%::智慧}*0.6*{_dmgcheck}% &e]||&f每點增加&c %4*{_hpcheck}% &f點血量與&c %0.6*{_dmgcheck}% &f點魔法攻擊力||&e└----------&e&l●&e----------┘"
  494. set slot 12 of player's current inventory to golden boots named "&a《增加敏捷屬性》" with lore "&e┌----------&e&l●&e----------┐||&f目前敏捷 &e[ &a%{玩家資料.%player%::敏捷}% &e]||&f左鍵增加 &c1 &f點||&f右鍵增加 &c10 &f點||&e-----------&e&l●&e-----------||&f目前血量提升量 &e[ &a%{玩家資料.%player%::敏捷}*3*{_hpcheck}% &e]||&f目前物理攻擊力提升量 &e[ &a%{玩家資料.%player%::敏捷}*0.7*{_dmgcheck}% &e]||&f每點增加&c %3*{_hpcheck}% &f點血量與&c %0.7*{_dmgcheck}% &f點物理攻擊力||&e└----------&e&l●&e----------┘"
  495. set slot 16 of player's current inventory to lily pads named "&2《增加幸運屬性》" with lore "&e┌----------&e&l●&e----------┐||&f目前幸運 &e[ &2%{玩家資料.%player%::幸運}% &e]||&f左鍵增加 &c1 &f點||&f右鍵增加 &c10 &f點||&e-----------&e&l●&e-----------||&f目前血量提升量 &e[ &2%{玩家資料.%player%::幸運}*2*{_hpcheck}% &e]||&f目前物理攻擊力提升量 &e[ &2%{玩家資料.%player%::幸運}*0.4*{_dmgcheck}% &e]||||&f目前爆擊率提升量 &e[ &2%{玩家資料.%player%::幸運}*0.05%%% &e]||&f每點增加&c %2*{_hpcheck}% &f點血量,&c %0.05*{_hpcheck}%%%&f爆擊率與&c %0.4*{_dmgcheck}% &f點物理/魔法攻擊力||&e└----------&e&l●&e----------┘"
  496. set slot 19 of player's current inventory to 1 of red stained glass pane named "&7"
  497. set slot 21 of player's current inventory to 1 of light green stained glass pane named "&7"
  498. set slot 23 of player's current inventory to 1 of light blue stained glass pane named "&7"
  499. set slot 25 of player's current inventory to 1 of yellow stained glass pane named "&7"
  500. on inventory click:
  501. if inventory name of player's current inventory contains "配點介面":
  502. cancel event
  503. if name of clicked item contains "力量" or "智慧" or "敏捷" or "幸運":
  504. if clicked type is left mouse button:
  505. if name of clicked item contains "力量":
  506. execute console command "stat %player% power 1"
  507. if name of clicked item contains "敏捷":
  508. execute console command "stat %player% speed 1"
  509. if name of clicked item contains "智慧":
  510. execute console command "stat %player% clever 1"
  511. if name of clicked item contains "幸運":
  512. execute console command "stat %player% lucky 1"
  513. if clicked type is right mouse button:
  514. if name of clicked item contains "力量":
  515. execute console command "stat %player% power 10"
  516. if name of clicked item contains "敏捷":
  517. execute console command "stat %player% speed 10"
  518. if name of clicked item contains "智慧":
  519. execute console command "stat %player% clever 10"
  520. if name of clicked item contains "幸運":
  521. execute console command "stat %player% lucky 10"
  522. wait 1 ticks
  523. LoadAP(player)
  524. on rightclick:
  525. if name of player's held item contains "屬性重置卷":
  526. set {_amount} to amount of player's held item
  527. set amount of player's held item to {_amount}-1
  528. set "力量" to "4" in yaml file "plugins/players/%player%.yml"
  529. set "智慧" to "4" in yaml file "plugins/players/%player%.yml"
  530. set "敏捷" to "4" in yaml file "plugins/players/%player%.yml"
  531. set "幸運" to "4" in yaml file "plugins/players/%player%.yml"
  532. set {玩家資料.%player%::力量} to 4
  533. set {玩家資料.%player%::智慧} to 4
  534. set {玩家資料.%player%::敏捷} to 4
  535. set {玩家資料.%player%::幸運} to 4
  536. set {_屬性點} to ({玩家資料.%player%::玩家等級}-1)*5
  537. set "剩餘屬性點" to "%{_屬性點}%" in yaml file "plugins/players/%player%.yml"
  538. set {玩家資料.%player%::剩餘屬性點} to {_屬性點}
  539. stop
  540. every 1 minutes:
  541. loop {玩家資料::*}:
  542. if {玩家資料.%loop-index%::高級會員時間} is set:
  543. remove 1 from {玩家資料.%loop-index%::高級會員時間}
  544. if {玩家資料.%loop-index%::高級會員時間} is smaller than or equal to 0:
  545. delete {玩家資料.%loop-index%::高級會員}
  546. delete {玩家資料.%loop-index%::高級會員時間}
  547. set {_高級會員} to loop-index parsed as player
  548. send "特權會員已過期。" to {_高級會員}
  549. command /vip [<text>] [<number>] [<text>]:
  550. permission: op.oao
  551. trigger:
  552. if {玩家資料.%arg-1%::玩家等級} is set:
  553. if {玩家資料.%arg-1%::高級會員} is set:
  554. delete {玩家資料.%arg-1%::高級會員}
  555. send "特權會員已過期。" to arg-1 parsed as player
  556. send "已關閉該玩家特權會員。"
  557. stop
  558. if arg-2 is set:
  559. if arg-3 isn't set:
  560. set {玩家資料.%arg-1%::高級會員時間} to 60 * arg-2
  561. else if arg-3 is "小時":
  562. set {玩家資料.%arg-1%::高級會員時間} to 60 * arg-2
  563. else if arg-3 is "分鐘":
  564. set {玩家資料.%arg-1%::高級會員時間} to arg-2
  565. else if arg-3 contains "天":
  566. set {玩家資料.%arg-1%::高級會員時間} to 60 * arg-2 * 24
  567. set {_內容} to floor({玩家資料.%arg-1%::高級會員時間} / 60)
  568. if {_內容} is equal to 0:
  569. set {_內容} to "%{玩家資料.%arg-1%::高級會員時間}%分鐘"
  570. else if {_內容} is more than or equal to 1:
  571. set {_內容} to "%floor({玩家資料.%arg-1%::高級會員時間} / 60)%小時"
  572. else:
  573. set {_內容} to "%floor({玩家資料.%arg-1%::高級會員時間} / 60 / 24)%天"
  574. send "特權會員已開啟。%{_內容}%" to arg-1 parsed as player
  575. else:
  576. send "永久特權會員已開啟。" to arg-1 parsed as player
  577. set {玩家資料.%arg-1%::高級會員} to now
  578. send "已開啟該玩家特權會員。"
  579. stop
  580. send "該玩家不存在"
  581. on any movement:
  582. if {玩家資料.%player%::遊戲模式} is "非打怪":
  583. stop
  584. set player's walk speed to 0.2 * ({玩家資料.%player%::移動速度}+{技能加速.%player%})/100
  585. if {幾轉職業::%{玩家資料.%player%::玩家職業}%} is 3:
  586. set {_幾轉} to {@玩家等級限制}
  587. if {玩家資料.%player%::玩家等級} is more than or equal to {_幾轉}:
  588. if {玩家資料.%player%::目前經驗值} is more than {玩家資料.%player%::最大經驗值}:
  589. set {玩家資料.%player%::目前經驗值} to {玩家資料.%player%::最大經驗值}
  590. stop
  591. if {玩家資料.%player%::目前經驗值} is more than {玩家資料.%player%::最大經驗值}:
  592. if {玩家資料.%player%::玩家等級} is more than or equal to 1:
  593. set {_clv} to 1.6
  594. if {玩家資料.%player%::玩家等級} is more than or equal to 10:
  595. set {_clv} to 1.4
  596. if {玩家資料.%player%::玩家等級} is more than or equal to 15:
  597. set {_clv} to 1.2
  598. if {玩家資料.%player%::玩家等級} is more than or equal to 31:
  599. set {_clv} to 1.1
  600. if {玩家資料.%player%::玩家等級} is more than or equal to 52:
  601. set {_clv} to 1.05
  602. if {玩家資料.%player%::玩家等級} is more than or equal to 100:
  603. set {_clv} to 1.2
  604. if player isn't op:
  605. if {玩家資料.%player%::玩家等級} is 99:
  606. send all players title "&6[ &e>> &e&l全服廣播祝賀 &e<< &6]" with subtitle "&f玩家 &6&l%player% &f已達到等級 &6&l100 &f等" for 8 seconds
  607. if {玩家資料.%player%::玩家等級} is 119:
  608. send all players title "&6[ &e>> &e&l全服廣播祝賀 &e<< &6]" with subtitle "&f玩家 &6&l%player% &f已達到等級 &a&l120 &f等" for 8 seconds
  609. set {玩家資料.%player%::目前經驗值} to round( {玩家資料.%player%::目前經驗值} ) - {玩家資料.%player%::最大經驗值}
  610. set {玩家資料.%player%::最大經驗值} to round( {_clv} * ({玩家資料.%player%::最大經驗值}))
  611. if {玩家資料.%player%::目前經驗值} is smaller than 0:
  612. set {玩家資料.%player%::目前經驗值} to 0
  613. if {玩家資料.%player%::玩家等級} is more than {_幾轉}:
  614. if {玩家資料.%player%::目前經驗值} is more than {玩家資料.%player%::最大經驗值}:
  615. set {玩家資料.%player%::目前經驗值} to {玩家資料.%player%::最大經驗值}
  616. stop
  617. if {玩家資料.%player%::目前經驗值} is {玩家資料.%player%::最大經驗值}:
  618. stop
  619. set {玩家資料.%player%::玩家等級} to {玩家資料.%player%::玩家等級} + 1
  620. if {玩家資料.%player%::玩家等級} is more than 100:
  621. set {玩家資料.%player%::剩餘屬性點} to {玩家資料.%player%::剩餘屬性點} + 10
  622. else:
  623. set {玩家資料.%player%::剩餘屬性點} to {玩家資料.%player%::剩餘屬性點} + 5
  624. set {玩家資料.%player%::剩餘技能點} to {玩家資料.%player%::剩餘技能點} + 1
  625. if {玩家資料.%player%::目前經驗值} is smaller than {玩家資料.%player%::最大經驗值}:
  626. execute player command "show等級提升showupA5R8GD6VH4TR"
  627. send "&6等級 >> &e您的等級提升至 &6&l%{玩家資料.%player%::玩家等級}% 等 &e了!"
  628. on damage:
  629. attacker is a player
  630. if world of attacker is "miniwar":
  631. if victim is player:
  632. stop
  633. set victim's damage delay to 0 second
  634. command /debugmp:
  635. trigger:
  636. send "%{玩家資料.%player%::魔力值}%" to player
  637. send "%{玩家魔力值.%player%}%" to player
  638. on quit:
  639. delete {玩家魔力值.%player%}
  640. command /spelltest:
  641. trigger:
  642. if {玩家魔力值.%player%} is larger or equal to 20:
  643. send "&cBANG!" to player
  644. remove 20 from {玩家魔力值.%player%}
  645. set {_math} to 0.99 * {玩家魔力值.%player%} / {玩家資料.%player%::魔力值}
  646. if {_math} is more than or equal to 1:
  647. set {_math} to 0.99
  648. set level progress of the player to {_math}
  649. set player's level to {玩家魔力值.%player%}
  650. else:
  651. send "&4魔力不足!" to player
  652. stop
  653. on command:
  654. command is "show等級提升showupA5R8GD6VH4TR"
  655. cancel event
  656. send player title "&6[ &e>> &e&l恭喜 &e<< &6]" with subtitle "&f您的等級已提升至 &6&l%{玩家資料.%player%::玩家等級}% &f等!" for 4 seconds
  657. drawWings style 11, particle1 "totem", speed 0, XYZ 0, 0, 0, particle2 "lava", particle3 "fireworkspark", center player, id "%player%show", rainbowMode false, flapSpeed 1, flapRange 1, angle 120, height 3, space 0.4, visibleRange 30, tps 0, second 1
  658. set {_loop.%player%} to a random integer between 10 and 14
  659. loop {_loop.%player%} times:
  660. wait 2 tick
  661. add 1 to {_notesound.%player%}
  662. if {_notesound.%player%} > 3:
  663. set {_notesound.%player%} to 1
  664. if {_notesound.%player%} = 1:
  665. play "ENTITY_PLAYER_LEVELUP" to player with volume 1 and pitch 2
  666. if {_notesound.%player%} = 2:
  667. play "ENTITY_PLAYER_LEVELUP" to player with volume 1 and pitch 1
  668. if {_notesound.%player%} = 3:
  669. play "ENTITY_PLAYER_LEVELUP" to player with volume 1 and pitch 0
  670. wait 1.5 seconds
  671. stopeffect id "%player%show"
  672. wait 2 seconds
  673. if {玩家資料.%player%::玩家等級} is equal to 10:
  674. send player title "&6[ &e>> &6&l可進行一轉轉職任務 &e<< &6]" with subtitle "&f是時候提升你的實力了!請在霍斯威茲堡附近尋找教官NPC進行轉職任務!" for 4 seconds
  675. wait 6 seconds
  676. send player title "&6[ &e>> &6&l您有一個禮物可領取 &e<< &6]" with subtitle "&f請輸入/levelgift 10領取伺服器準備的小禮物!" for 4 seconds
  677. if {玩家資料.%player%::玩家等級} is equal to 30:
  678. send player title "&6[ &e>> &6&l可進行二轉轉職任務 &e<< &6]" with subtitle "&f是時候突破你的實力了!請在文靜大陸上尋找教官NPC進行轉職任務!" for 4 seconds
  679. wait 6 seconds
  680. send player title "&6[ &e>> &6&l您有一個禮物可領取 &e<< &6]" with subtitle "&f請輸入/levelgift 30領取伺服器準備的小禮物!" for 4 seconds
  681. if {玩家資料.%player%::玩家等級} is equal to 60:
  682. send player title "&6[ &e>> &6&l可進行三轉轉職任務 &e<< &6]" with subtitle "&f是時候激發你的實力了!請在文靜大陸上尋找教官NPC進行轉職任務!" for 4 seconds
  683. broadcast "&6祝賀 >> &e恭喜玩家 &c%player% &e達到 &c60 &e等!"
  684. on damage:
  685. if attacker is victim:
  686. cancel event
  687. stop
  688. #請看死亡復活
  689. command /lv [<text>]:
  690. trigger:
  691. set {_player} to player
  692. if arg-1 is set:
  693. set {_pass} to 0
  694. set {_player} to arg-1 parsed as offlineplayer
  695. if {_player} is online:
  696. set {_pass} to 1
  697. if file existance of "plugins/players/%arg-1%.yml" is false:
  698. set {_player} to player
  699. else:
  700. if {_pass} is 0:
  701. clear {_玩家資料.%{_player}%::*}
  702. set {_玩家資料.%{_player}%::玩家等級} to single value "玩家等級" get of "plugins/players/%{_player}%.yml"
  703. set {_玩家資料.%{_player}%::目前經驗值} to single value "目前經驗值" get of "plugins/players/%{_player}%.yml"
  704. set {_玩家資料.%{_player}%::最大經驗值} to single value "最大經驗值" get of "plugins/players/%{_player}%.yml"
  705. set {_玩家資料.%{_player}%::剩餘屬性點} to single value "剩餘屬性點" get of "plugins/players/%{_player}%.yml"
  706. set {_玩家資料.%{_player}%::剩餘技能點} to single value "剩餘技能點" get of "plugins/players/%{_player}%.yml"
  707. set {_玩家資料.%{_player}%::力量} to single value "力量" get of "plugins/players/%{_player}%.yml"
  708. set {_玩家資料.%{_player}%::智慧} to single value "智慧" get of "plugins/players/%{_player}%.yml"
  709. set {_玩家資料.%{_player}%::敏捷} to single value "敏捷" get of "plugins/players/%{_player}%.yml"
  710. set {_玩家資料.%{_player}%::幸運} to single value "幸運" get of "plugins/players/%{_player}%.yml"
  711. set {_玩家資料.%{_player}%::最大血量} to single value "最大血量" get of "plugins/players/%{_player}%.yml"
  712. set {_玩家資料.%{_player}%::魔力值} to single value "魔力值" get of "plugins/players/%{_player}%.yml"
  713. set {_玩家資料.%{_player}%::防禦力} to single value "防禦力" get of "plugins/players/%{_player}%.yml"
  714. set {_玩家資料.%{_player}%::物理攻擊力} to single value "物理攻擊力" get of "plugins/players/%{_player}%.yml"
  715. set {_玩家資料.%{_player}%::魔法攻擊力} to single value "魔法攻擊力" get of "plugins/players/%{_player}%.yml"
  716. set {_玩家資料.%{_player}%::血量恢復量} to single value "血量恢復量" get of "plugins/players/%{_player}%.yml"
  717. set {_玩家資料.%{_player}%::魔量恢復量} to single value "魔量恢復量" get of "plugins/players/%{_player}%.yml"
  718. set {_玩家資料.%{_player}%::爆擊率} to single value "爆擊率" get of "plugins/players/%{_player}%.yml"
  719. set {_玩家資料.%{_player}%::爆擊傷害} to single value "爆擊傷害" get of "plugins/players/%{_player}%.yml"
  720. set {_玩家資料.%{_player}%::無視防禦} to single value "無視防禦" get of "plugins/players/%{_player}%.yml"
  721. set {_玩家資料.%{_player}%::總傷害} to single value "總傷害" get of "plugins/players/%{_player}%.yml"
  722. set {_玩家資料.%{_player}%::移動速度} to single value "移動速度" get of "plugins/players/%{_player}%.yml"
  723. set {_玩家資料.%{_player}%::跳躍力} to single value "跳躍力" get of "plugins/players/%{_player}%.yml"
  724. set {_玩家資料.%{_player}%::血量吸收量} to single value "血量吸收量" get of "plugins/players/%{_player}%.yml"
  725. set {_玩家資料.%{_player}%::魔量吸收量} to single value "魔量吸收量" get of "plugins/players/%{_player}%.yml"
  726. set {_玩家資料.%{_player}%::經驗卷倍率} to single value "經驗卷倍率" get of "plugins/players/%{_player}%.yml"
  727. set {_玩家資料.%{_player}%::經驗卷時間} to single value "經驗卷時間" get of "plugins/players/%{_player}%.yml"
  728. set {_玩家資料.%{_player}%::高級會員時間} to single value "高級會員時間" get of "plugins/players/%{_player}%.yml"
  729. set {_玩家資料.%{_player}%::伴侶} to single value "伴侶" get of "plugins/players/%{_player}%.yml"
  730. loop {_玩家資料.%{_player}%::*}:
  731. set {_pass} to 0
  732. if loop-index is "高級會員時間":
  733. if loop-value is "永久":
  734. set {_pass} to 1
  735. if {_pass} is 0:
  736. set {_玩家資料.%{_player}%::%loop-index%} to {_玩家資料.%{_player}%::%loop-index%} parsed as integer
  737. set {_玩家資料.%{_player}%::玩家職業} to single value "玩家職業" get of "plugins/players/%{_player}%.yml"
  738. set {_玩家資料.%{_player}%::高級會員} to single value "高級會員" get of "plugins/players/%{_player}%.yml"
  739. if {_玩家資料.%{_player}%::高級會員} isn't "無":
  740. set {_高級會員} to "&c&lV&e&lI&9&lP"
  741. if {_玩家資料.%{_player}%::高級會員時間} isn't "永久":
  742. set {_GG} to floor({_玩家資料.%{_player}%::高級會員時間} / 60)
  743. if {_GG} is equal to 0:
  744. set {_GG} to "(%{_玩家資料.%{_player}%::高級會員時間}%分鐘)"
  745. else if {_GG} is more than or equal to 1:
  746. set {_GG} to "(%floor({_玩家資料.%{_player}%::高級會員時間} / 60)%小時)"
  747. else:
  748. set {_GG} to "(%floor({_玩家資料.%{_player}%::高級會員時間} / 60 / 24)%天)"
  749. else:
  750. set {_GG} to "(永久)"
  751. else:
  752. set {_高級會員} to "&f無"
  753. set {_GG} to ""
  754. send "&6●=--------=《&c&l%{_player}% &4角色資料&6》=--------=●"
  755. send "&e名稱: &9%{_player}% &e高級會員: &9%{_GG}%%{_高級會員}%"
  756. send "&e職業: &b%{_玩家資料.%{_player}%::玩家職業}% &e配偶: &d%{_玩家資料.%{_player}%::伴侶}%"
  757. send "&e等級: &6%{_玩家資料.%{_player}%::玩家等級}% &8&3(&a%round({_玩家資料.%{_player}%::目前經驗值})%&3/&a%{_玩家資料.%{_player}%::最大經驗值}%&3)"
  758. set {_check} to {_玩家資料.%{_player}%::最大血量}
  759. add ({_玩家資料.%{_player}%::力量} * 5) to {_check}
  760. add ({_玩家資料.%{_player}%::智慧} * 3) to {_check}
  761. add ({_玩家資料.%{_player}%::敏捷} * 4) to {_check}
  762. add ({_玩家資料.%{_player}%::幸運} * 3) to {_check}
  763. send "&e生命值: &c%{_check}% &e魔力值: &6%{_玩家資料.%{_player}%::魔力值}%"
  764. send "&e力量: &f[ &6%{_玩家資料.%{_player}%::力量}% &f] &e智慧: &f[ &b%{_玩家資料.%{_player}%::智慧}% &f] "
  765. send "&e敏捷: &f[ &a%{_玩家資料.%{_player}%::敏捷}% &f] &e幸運: &f[ &2%{_玩家資料.%{_player}%::幸運}% &f] "
  766. send "&6●=--------=&c----------------------------&6=--------=●"
  767. send "&e防禦力: &6%{_玩家資料.%{_player}%::防禦力}% "
  768. set {_STRATK} to {_玩家資料.%{_player}%::力量} * 0.5
  769. set {_DEXATK} to {_玩家資料.%{_player}%::敏捷} * 0.6
  770. set {_INTATK} to {_玩家資料.%{_player}%::智慧} * 0.6
  771. set {_LUKATK} to {_玩家資料.%{_player}%::幸運} * 0.7
  772. set {_PHYSICDMG} to {_玩家資料.%{_player}%::物理攻擊力}
  773. set {_MAGICDMG} to {_玩家資料.%{_player}%::魔法攻擊力}
  774. add {_STRATK} + {_DEXATK} + {_LUKATK} to {_PHYSICDMG}
  775. add {_INTATK} to {_MAGICDMG}
  776. send "&e物理攻擊力: &c%{_PHYSICDMG}% &e魔法攻擊力: &b%{_MAGICDMG}% "
  777. send "&e血量恢復量: &c%{_玩家資料.%{_player}%::血量恢復量}% &e魔量恢復量: &b%{_玩家資料.%{_player}%::魔量恢復量}%"
  778. send "&e血量吸收量: &c%{_玩家資料.%{_player}%::血量吸收量}% &e魔量吸收量: &b%{_玩家資料.%{_player}%::魔量吸收量}% "
  779. send "&e爆擊率: &2%{_玩家資料.%{_player}%::爆擊率}%%% &e爆擊傷害: &2%{_玩家資料.%{_player}%::爆擊傷害}%%% "
  780. send "&e無視防禦: &5%{_玩家資料.%{_player}%::無視防禦}%%% &e總傷害: &5%{_玩家資料.%{_player}%::總傷害}%%% "
  781. send "&e移動速度: &a%{_玩家資料.%{_player}%::移動速度}%%% &e跳躍力: &a%{_玩家資料.%{_player}%::跳躍力}%%% "
  782. send "&6●=--------=&c----------------------------&6=--------=●"
  783. stop
  784. if {玩家資料.%{_player}%::高級會員} isn't "無":
  785. set {_高級會員} to "&c&lV&e&lI&9&lP"
  786. if {玩家資料.%{_player}%::高級會員時間} isn't "永久":
  787. set {_GG} to floor({玩家資料.%{_player}%::高級會員時間} / 60)
  788. if {_GG} is equal to 0:
  789. set {_GG} to "(%{玩家資料.%{_player}%::高級會員時間}%分鐘)"
  790. else if {_GG} is more than or equal to 1:
  791. set {_GG} to "(%floor({玩家資料.%{_player}%::高級會員時間} / 60)%小時)"
  792. else:
  793. set {_GG} to "(%floor({玩家資料.%{_player}%::高級會員時間} / 60 / 24)%天)"
  794. else:
  795. set {_GG} to "(永久)"
  796. else:
  797. set {_高級會員} to "&f無"
  798. set {_GG} to ""
  799. send "&6●=--------=《&c&l%{_player}% &4角色資料&6》=--------=●"
  800. send "&e名稱: &9%{_player}% &e高級會員: &9%{_GG}%%{_高級會員}%"
  801. send "&e職業: &b%{玩家資料.%{_player}%::玩家職業}% &e配偶: &d%{玩家資料.%{_player}%::伴侶}%"
  802. send "&e等級: &6%{玩家資料.%{_player}%::玩家等級}% &8&3(&a%round({玩家資料.%{_player}%::目前經驗值})%&3/&a%{玩家資料.%{_player}%::最大經驗值}%&3)"
  803. set {_check} to {玩家資料.%{_player}%::最大血量}
  804. if {幾轉職業::%{玩家資料.%{_player}%::玩家職業}%} is 0:
  805. add ({玩家資料.%{_player}%::力量} * 5) to {_check}
  806. add ({玩家資料.%{_player}%::智慧} * 4) to {_check}
  807. add ({玩家資料.%{_player}%::敏捷} * 3) to {_check}
  808. add ({玩家資料.%{_player}%::幸運} * 2) to {_check}
  809. if {幾轉職業::%{玩家資料.%{_player}%::玩家職業}%} is 1:
  810. add ({玩家資料.%{_player}%::力量} * 5)*1.25 to {_check}
  811. add ({玩家資料.%{_player}%::智慧} * 4)*1.25 to {_check}
  812. add ({玩家資料.%{_player}%::敏捷} * 3)*1.25 to {_check}
  813. add ({玩家資料.%{_player}%::幸運} * 2)*1.25 to {_check}
  814. if {幾轉職業::%{玩家資料.%{_player}%::玩家職業}%} is 2:
  815. add ({玩家資料.%{_player}%::力量} * 5)*1.5 to {_check}
  816. add ({玩家資料.%{_player}%::智慧} * 4)*1.5 to {_check}
  817. add ({玩家資料.%{_player}%::敏捷} * 3)*1.5 to {_check}
  818. add ({玩家資料.%{_player}%::幸運} * 2)*1.5 to {_check}
  819. if {幾轉職業::%{玩家資料.%{_player}%::玩家職業}%} is 3:
  820. add ({玩家資料.%{_player}%::力量} * 5)*2 to {_check}
  821. add ({玩家資料.%{_player}%::智慧} * 4)*2 to {_check}
  822. add ({玩家資料.%{_player}%::敏捷} * 3)*2 to {_check}
  823. add ({玩家資料.%{_player}%::幸運} * 2)*2 to {_check}
  824. send "&e生命值: &c%round({_check})% &e魔力值: &6%{玩家資料.%{_player}%::魔力值}%"
  825. send "&e力量: &f[ &6%{玩家資料.%{_player}%::力量}% &f] &e智慧: &f[ &b%{玩家資料.%{_player}%::智慧}% &f] "
  826. send "&e敏捷: &f[ &a%{玩家資料.%{_player}%::敏捷}% &f] &e幸運: &f[ &2%{玩家資料.%{_player}%::幸運}% &f] "
  827. if {_player} is executor:
  828. send "&e剩餘屬性點: &f%{玩家資料.%{_player}%::剩餘屬性點}%"
  829. send "&e剩餘技能點: &f%{玩家資料.%{_player}%::剩餘技能點}%"
  830. send "&6●=--------=&c----------------------------&6=--------=●"
  831. send "&e防禦力: &6%{玩家資料.%{_player}%::防禦力}% "
  832. set {_STRATK} to {玩家資料.%{_player}%::力量} * 0.5
  833. set {_DEXATK} to {玩家資料.%{_player}%::敏捷} * 0.7
  834. set {_INTATK} to {玩家資料.%{_player}%::智慧} * 0.6
  835. set {_LUKATK} to {玩家資料.%{_player}%::幸運} * 0.4
  836. set {_PHYSICDMG} to {玩家資料.%{_player}%::物理攻擊力}
  837. set {_MAGICDMG} to {玩家資料.%{_player}%::魔法攻擊力}
  838. set {_CRIT} to {玩家資料.%{_player}%::爆擊率}
  839. if {幾轉職業::%{玩家資料.%{_player}%::玩家職業}%} is 0:
  840. add ({_STRATK} + {_DEXATK} + {_LUKATK}) to {_PHYSICDMG}
  841. add ({_INTATK} + {_LUKATK}) to {_MAGICDMG}
  842. if {幾轉職業::%{玩家資料.%{_player}%::玩家職業}%} is 1:
  843. add ({_STRATK} + {_DEXATK} + {_LUKATK})*1.2 to {_PHYSICDMG}
  844. add ({_INTATK} + {_LUKATK})*1.2 to {_MAGICDMG}
  845. if {幾轉職業::%{玩家資料.%{_player}%::玩家職業}%} is 2:
  846. add ({_STRATK} + {_DEXATK} + {_LUKATK})*1.4 to {_PHYSICDMG}
  847. add ({_INTATK} + {_LUKATK})*1.4 to {_MAGICDMG}
  848. if {幾轉職業::%{玩家資料.%{_player}%::玩家職業}%} is 3:
  849. add ({_STRATK} + {_DEXATK} + {_LUKATK})*1.8 to {_PHYSICDMG}
  850. add ({_INTATK} + {_LUKATK})*1.8 to {_MAGICDMG}
  851. add round({玩家資料.%{_player}%::幸運}/20) to {_CRIT}
  852. send "&e物理攻擊力: &c%round({_PHYSICDMG})% &e魔法攻擊力: &b%round({_MAGICDMG})% "
  853. send "&e血量恢復量: &c%{玩家資料.%{_player}%::血量恢復量}% &e魔量恢復量: &b%{玩家資料.%{_player}%::魔量恢復量}%"
  854. send "&e血量吸收量: &c%{玩家資料.%{_player}%::血量吸收量}% &e魔量吸收量: &b%{玩家資料.%{_player}%::魔量吸收量}%"
  855. send "&e爆擊率: &6%{_CRIT}%&6%% &e爆擊傷害: &6%{玩家資料.%{_player}%::爆擊傷害}%&6%%"
  856. send "&e無視防禦: &d%{玩家資料.%{_player}%::無視防禦}%&d%% &e總傷害: &d%{玩家資料.%{_player}%::總傷害}%&d%%"
  857. send "&e移動速度: &a%{玩家資料.%{_player}%::移動速度}%&a%% &e跳躍力: &a%{玩家資料.%{_player}%::跳躍力}%&a%%"
  858. send "&6●=--------=&c----------------------------&6=--------=●"
Advertisement
Add Comment
Please, Sign In to add comment