Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Use armor stands to create skills (i.e. comet)
- # Zombie boss: hordes of zombies, etc
- # Skeleton boss: archer, summon skeletons, shoot arrow with high damage
- # Blaze boss: comet/fireball, summon blazes,
- # Stray (shaman): holds stick, summon angry wolves,
- options:
- logo: &4&lBoss&8:&7
- bossGuiName: Bosses
- zombieBossItem: zombie head named "&aZombie Boss" with lore "&8", " &7Click to summon" and " &7the Zombie Boss."
- skeletonBossItem: skeleton head named "&fSkeleton Boss" with lore "&8", " &7Click to summon" and " &7the Skeleton Boss."
- blazeBossItem: blaze rod named "&cSkeleton Boss" with lore "&8", " &7Click to summon" and " &7the Blaze Boss."
- shamanBossItem: stick named "&2Skeleton Boss" with lore "&8", " &7Click to summon" and " &7the Shaman Boss."
- permission: "boss.*"
- function getNewLocation(location: Location, offset: Number, direction: Integer) :: Location:
- if {_direction} is 0:
- set {_location} to location {_offset} meters northeast of {_location}
- else if {_direction} is 1:
- set {_location} to location {_offset} meters northwest of {_location}
- else if {_direction} is 2:
- set {_location} to location {_offset} meters southwest of {_location}
- else if {_direction} is 3:
- set {_location} to location {_offset} meters southeast of {_location}
- return {_location}
- function mustUpdateDirection(input: Number, standsWithTheSameDirection: Integer, dir: Integer) :: boolean:
- if {_standsWithTheSameDirection} < 1:
- set {_standsWithTheSameDirection} to 1
- while {_input} >= {_standsWithTheSameDirection}:
- remove {_standsWithTheSameDirection} from {_input}
- if {_input} is 0:
- return true
- return false
- function getNewDirection(dir: Integer) :: integer:
- add 1 to {_dir}
- if {_dir} is 4:
- set {_dir} to 0
- return {_dir}
- # Number MUST be a duplicate of four
- function circle(loc: location, radius: Integer, amount: Integer, entity: EntityType):
- set {_summonLocation} to location {_radius} meters north of {_loc}
- set {_standsWithTheSameDirection} to {_amount}/4
- set {_distanceBetweenStands} to {_radius}/{_standsWithTheSameDirection}
- set {_dir} to 2
- summon {_entity} at {_summonLocation}
- loop {_amount} -1 times:
- set {_summonLocation} to getNewLocation({_summonLocation}, {_distanceBetweenStands}, {_dir})
- if mustUpdateDirection(loop-value, "%{_standsWithTheSameDirection}%" parsed as an integer, {_dir}) is true:
- set {_dir} to getNewDirection({_dir})
- summon {_entity} at {_summonLocation}
- set display name of last spawned armor stand to "%loop-value%: %{_dir}%"
- command /boss:
- trigger:
- if executor is not player:
- send "{@logo} This command can only be executed by a player."
- else if player doesn't have permission {@permission}:
- send "{@logo} You do not have enough permissions to do this."
- else:
- open chest with 3 rows named "{@bossGuiName}" to player
- loop 10 times:
- set slot loop-value - 1 of player's current inventory to gray stained glass pane named "&k"
- set slot 26 - loop-value - 1 of player's current inventory to gray stained glass pane named "&k"
- set slot 10 of player's current inventory to {@zombieBossItem}
- set slot 11 of player's current inventory to {@skeletonBossItem}
- set slot 12 of player's current inventory to {@blazeBossItem}
- set slot 13 of player's current inventory to {@shamanBossItem}
- set {boss.currentInventory.%player%} to true
- #
- # B o s s e s
- #
- function summonZombieBoss(location: Location):
- set {_zombie} to zombie
- summon {_zombie} at {_location}
- set {_zombie} to last spawned zombie
- set display name of {_zombie} to "&a&lZombie Boss"
- set custom name visibility of {_zombie} to true
- wait 20 ticks
- while {_zombie} is alive:
- set {_rng} to random integer between 0 and 10
- broadcast "RNG: %{_rng}%"
- if {_rng} is 0, 1 or 2:
- circle(location of {_zombie}, 3, 8, zombie)
- wait 40 ticks
- on inventory click:
- if inventory name of player's current inventory is "{@bossGuiName}":
- cancel event
- if clicked item is {@zombieBossItem}:
- summonZombieBoss(location of player)
- close inventory of player
- else if clicked item is {@skeletonBossItem}:
- send "SKELETON"
- close inventory of player
- else if clicked item is {@blazeBossItem}:
- send "BLAZE"
- close inventory of player
- else if clicked item is {@shamanBossItem}:
- send "SHAMAN"
- close inventory of player
- on inventory close:
- delete {boss.currentInventory.%player%}
- on inventory drag:
- if {boss.currentInventory.%player%} is true:
- cancel event
- on quit:
- delete {boss.currentInventory.%player%}
Advertisement
Add Comment
Please, Sign In to add comment