Advertisement
OMan100

Untitled

Nov 19th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.22 KB | None | 0 0
  1. on damage:
  2. if victim's name contains "Level":
  3. set {_lore} to uncolored line 3 of lore of attacker's weapon
  4. replace all "♦ Atk Dmg: " in {_lore} with ""
  5. set {_dmg} to "%{_lore}%" parsed as integer
  6. set {_n::*} to uncolored name of victim split at "[Level "
  7. set {_level} to {_n::2}
  8. replace all "]" in {_level} with ""
  9. set {_level} to "%{_level}%" parsed as integer
  10. set {_name.1::*} to uncolored victim's name split at "♥"
  11. set {_name} to MobType({_name.1::*})
  12. set {_armor} to {dungeon::mob::%{_name}%::defense}
  13. set {_ability.dmg} to 1
  14. set {_armor.effect} to EffectCalculation({_armor}, 10)
  15. if {dungeon::%uuid of attacker%::active} is true:
  16. if {dungeon::%uuid of attacker%::ability} is "Double Slash":
  17. set {_ability.dmg} to 2
  18. send action bar "&aDouble Slash - x2 dmg" to attacker
  19. delete {dungeon::%uuid of attacker%::active}
  20. spawn 20 of "flame":0.01 offset by 1, 1, 1 at victim
  21. else if {dungeon::%uuid of attacker%::ability} is "Execute":
  22. if victim's maximum health * 0.25 > victim's health:
  23. set {_hp} to 0
  24. send action bar "&aEnemy Executed" to attacker
  25. set {dungeon::%uuid of attacker%::active} to false
  26. spawn 20 of "flame":0.01 offset by 1, 1, 1 at victim
  27. else:
  28. send action bar "&cExecute failed - enemy with high health" to attacker
  29. set {dungeon::%uuid of attacker%::active} to false
  30. else if {dungeon::%uuid of attacker%::ability} is "Healthy Body":
  31. set {_ability.dmg} to 1 + (attacker's health / 0.5) * 0.03
  32. send action bar "&aHealthy Body - x%{_ability.dmg}% dmg" to attacker
  33. set {dungeon::%uuid of attacker%::active} to false
  34. spawn 20 of "flame":0.01 offset by 1, 1, 1 at victim
  35. if {dungeon::%uuid of attacker%::stats::strength} > 9:
  36. if attacker's maximum health / attacker's health > 2:
  37. set {_ability.dmg} to {_ability.dmg} * attacker's maximum health / attacker's health / 2
  38.  
  39. if projectile is an arrow:
  40. set {_total.damage} to ({_dmg} - (({_armor.effect} / 100) * {_dmg})) * {arrow.speed::%attacker%} * 1.36 * {_ability.dmg}
  41. else:
  42. set {_damage.taken} to ({_dmg} - (({_armor.effect} / 100) * {_dmg})) * {_ability.dmg}
  43. if {_hp} isn't set:
  44. set {_hp} to victim's health - {_damage.taken}
  45. if {_hp} > 0:
  46. set damage to 0
  47. set victim's health to {_hp}
  48. set name of victim to "%{dungeon::mob::%{_name}%::name}% &c%{_hp}%♥/%victim's max health%♥ &6[Level %{_level}%]"
  49. else:
  50. set {_hp} to 0
  51. set name of victim to "%{dungeon::mob::%{_name}%::name}% &c%{_hp}%♥/%victim's max health%♥ &6[Level %{_level}%]"
  52. kill victim
  53. add 1 to {dungeon::%uuid of attacker%::kills.level}
  54. set {_value} to {_level} * {dungeon::mob::%{_name}%::value}
  55. send action bar "&6+%{_value}% Gold" to attacker
  56. add {_value} to {dungeon::%uuid of attacker%::gold}
  57. add {_value} to {dungeon::%uuid of attacker%::xp}
  58. xpUpdate(attacker)
  59. if {dungeon::%uuid of attacker%::kills.level} = {dungeon::%uuid of attacker%::kills.need}:
  60. if {dungeon::%uuid of attacker%::stats::health} > 14:
  61. set attacker's absorption hearts to 1
  62. send attacker title "&a&lLevel Cleared"
  63. spawn 100 of "flame":0.1 offset by 1, 1, 1 at {dungeon::%uuid of attacker%::end}
  64. set block at {dungeon::%uuid of attacker%::end} to chest
  65. set {_name.item} to LootDraw(attacker)
  66. set {_item} to ItemSet({_name.item})
  67. if "%{_item}%" contains "arrow":
  68. set {_amount} to 5
  69. else:
  70. set {_amount} to 1
  71. add {_amount} of {_item} to inventory of block at {dungeon::%uuid of attacker%::end}
  72. if {dungeon::%uuid of attacker%::stats::health} > 9:
  73. add 1 to attacker's health
  74.  
  75. else if victim is player:
  76. attacker's name contains "Level"
  77. set {_name.1::*} to uncolored attacker's name split at "♥"
  78. set {_name} to MobType({_name.1::*})
  79. set {_n::*} to uncolored name of attacker split at "[Level "
  80. set {_level} to {_n::2}
  81. replace all "]" in {_level} with ""
  82. set {_level} to "%{_level}%" parsed as integer
  83. set {_level.dmg} to (({_level} - 1) * 0.5) + 1
  84. set {_dmg} to {dungeon::mob::%{_name}%::attack} * {_level.dmg}
  85. set {_slot} to 36
  86. loop 4 times:
  87. if slot {_slot} of victim's inventory is set:
  88. set {_lore} to uncolored line 3 of lore of slot {_slot} of victim's inventory
  89. replace all "♦ Defense: " in {_lore} with ""
  90. add ("%{_lore}%" parsed as number) to {_defense.armor}
  91. add 1 to {_slot}
  92. set {_total.armor} to {_defense.armor}
  93. set {_total.damage} to {_dmg}
  94. set {_armor.effect} to EffectCalculation({_total.armor}, 5)
  95. set {_ability.def} to 1
  96. if {dungeon::%uuid of victim%::active} is true:
  97. if {dungeon::%uuid of victim%::ability} is "Fortify":
  98. if difference between {dungeon::%uuid of victim%::ability.used} and now < 2 seconds:
  99. set {_ability.def} to 2
  100. else:
  101. set {dungeon::%uuid of victim%::active} to false
  102.  
  103.  
  104. if {_damage.taken} isn't set:
  105. set {_damage.taken} to ({_total.damage} - (({_armor.effect} * {_ability.def} / 100) * {_total.damage}))
  106. set {_hp} to victim's health - {_damage.taken}
  107. if {_hp} >= 0:
  108. set damage to 0
  109. set victim's health to {_hp}
  110. else:
  111. cancel event
  112. heal victim
  113. clear victim's inventory
  114. send victim title "&c&lGame Over"
  115. make victim execute command "/spawn"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement