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,
- function getNewLocation(location: Location, offset: Number, direction: Number) :: 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 getIntegerAsDirection(input: Integer, standAmount: Integer) :: Number:
- # Location incorrect with a different number than four stands
- set {_value} to {_input} / (4/{_standAmount})
- while {_value} >= 4:
- remove 4 from {_value}
- #broadcast "%{_value} parsed as an integer%"
- return {_value}
- #return ({_input} / (4/{_standAmount})) parsed as an integereger
- #return ({_input} / {_standAmount}) parsed as an integer
- #while {_input} >= {_standAmount}/4:
- # remove {_standAmount}/4 from {_input}
- #return {_input} parsed as an integer
- function circle(loc: location, radius: Integer, amount: Integer, entity: EntityType):
- set {_distance} to {_radius} / {_amount} * 2 + 1
- #broadcast "%{_distance}%"
- #set {_startLocation} to location {_distance} meters north of {_loc}
- set {_startLocation} to {_loc}
- loop {_amount} times:
- #if loop-value > 1:
- set {_i} to getIntegerAsDirection("%loop-value%" parsed as an integer, {_amount})
- broadcast "%{_i}%"
- set {_startLocation} to getNewLocation({_startLocation}, {_distance}, getIntegerAsDirection("%loop-value%" parsed as an integer, {_amount}))
- summon {_entity} at {_startLocation}
- # Test commands
- command /circle <Integer> <Integer>:
- trigger:
- circle(location of player, argument 1, argument 2, armor stand)
Advertisement
Add Comment
Please, Sign In to add comment