Advertisement
sora200507

Untitled

Dec 28th, 2018
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.19 KB | None | 0 0
  1. options:
  2. bossbarcolor : PINK
  3. bossbarstyle : SOLID
  4. every tick:
  5. loop all entities:
  6. loop-entity is a living entity
  7. loop-entity is not armor stand
  8. loop-entity is not a wither
  9. loop-entity is not ender dragon
  10. loop-entity is player
  11. {ISplayer.%UUID of loop-entity%} is set
  12. {Isvanish.%loop-entity%} is not set
  13. health of loop-entity > 0
  14. if {bossbar.%UUID of loop-entity%} is not set:
  15. set {bossbar.%UUID of loop-entity%} to new bossbar
  16. set color of bar {bossbar.%UUID of loop-entity%} to {@bossbarcolor}
  17. set style of bar {bossbar.%UUID of loop-entity%} to {@bossbarstyle}
  18. if name of loop-entity is set:
  19. if {%loop-entity%.overhealth} is not set:
  20. set name of bar {bossbar.%UUID of loop-entity%} to "%name of loop-entity% %health of loop-entity%/%max health of loop-entity% %loop-entity's level%LEVEL"
  21. else:
  22. set {_health} to {%loop-entity%.overhealth}/2
  23. set name of bar {bossbar.%UUID of loop-entity%} to "%name of loop-entity% %health of loop-entity%/%max health of loop-entity%+%{_health}% %loop-entity's level%LEVEL"
  24. else if name of loop-entity is not set:
  25. if {%loop-entity%.overhealth} is not set:
  26. set name of bar {bossbar.%UUID of loop-entity%} to "%loop-entity% %health of loop-entity%/%max health of loop-entity% %loop-entity's level%LEVEL"
  27. else:
  28. set {_health} to {%loop-entity%.overhealth}/2
  29. set name of bar {bossbar.%UUID of loop-entity%} to "%loop-entity% %health of loop-entity%/%max health of loop-entity%+%{_health}% %loop-entity's level%LEVEL"
  30. if {%loop-entity%.overhealth} is 0:
  31. set {_health} to {%loop-entity%.overhealth}/2
  32. set {_health2} to {%loop-entity%.overhealthmax}/2
  33. set {_health} to {_health}+loop-entity's health
  34. set {_health2} to {_health2}+loop-entity's max health
  35. set progress of bar {bossbar.%UUID of loop-entity%} to {_health}/{_health2}
  36. else if {%loop-entity%.overhealth} is not set:
  37. set progress of bar {bossbar.%UUID of loop-entity%} to health of loop-entity/max health of loop-entity
  38. else:
  39. set {_health} to {%loop-entity%.overhealth}/2
  40. set {_health2} to {%loop-entity%.overhealthmax}/2
  41. set {_health} to {_health}+loop-entity's health
  42. set {_health2} to {_health2}+loop-entity's max health
  43. set progress of bar {bossbar.%UUID of loop-entity%} to {_health}/{_health2}
  44. loop all players:
  45. if distance between loop-player-1 and loop-entity-1 < 101:
  46. add loop-player-1 to bar {bossbar.%UUID of loop-entity-1%}
  47. if distance between loop-player-1 and loop-entity-1 > 100:
  48. remove loop-player-1 from bar {bossbar.%UUID of loop-entity-1%}
  49. on death:
  50. if {bossbar.%UUID of victim%} is set:
  51. wait 10 tick
  52. remove all players from bar {bossbar.%UUID of victim%}
  53. delete {bossbar.%UUID of victim%}
  54. on quit:
  55. if {bossbar.%UUID of player%} is set:
  56. wait 10 tick
  57. remove all players from bar {bossbar.%UUID of player%}
  58. delete {bossbar.%UUID of player%}
  59. every 1 seconds:
  60. loop all entities:
  61. if {bossbar.%UUID of loop-entity%} is set:
  62. {ISplayer.%UUID of loop-entity%} is not set
  63. wait 10 tick
  64. remove all players from bar {bossbar.%UUID of loop-entity%}
  65. delete {bossbar.%UUID of loop-entity%}
  66. loop all players:
  67. set {ISplayer.%UUID of loop-player%} to true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement