Date: 2020/10/08 13:16:48 UTC-07:00
Type: Denizen Script
starplatinumbarrage:
type: task
debug: true
script:
- wait 1t
- define standnpc <player.flag[standentity].as_npc>
- if !<[standnpc].flag[hastarget]>:
- stop
- run spbarragefood
- flag <[standnpc]> spbarrage
- while <player.is_sneaking> && <player.food_level> != 0:
- define entities:|:<[standnpc].location.forward.find.entities.within[2].exclude[<[standnpc]>].exclude[<[standnpc].flag[user]>]>
- spawn oraoraarmorstand <[standnpc].location.above.add[<util.random.decimal[-2].to[2]>,<util.random.decimal[-1].to[2]>,<util.random.decimal[-2].to[2]>]>
- random:
- animate <[standnpc]> animation:arm_swing
- animate <[standnpc]> animation:arm_swing_offhand
- hurt <[entities]> 1.2 source:<[standnpc]>
- foreach <[entities]>:
- adjust <[value]> no_damage_duration:1t
- wait 1t
- flag <[standnpc]> spbarrage:!