Bender: type: assignment Interact Scripts: - 1 NPC_Bender NPC_Bender: type: interact actions: on assignment: - trigger name:damage state:true steps: 1: chat trigger: trigger: What about /FIRE/ script: - flag bender_type:fire - define bender_type # ^^^ # Make sure you set this flag somewhere # - if %bender_type% == fire { - define blocks li@m@netherrack|m@fire|m@lava # ^^^ # Blocks to bend } else if %bender_type% == water { - define blocks li@m@water|m@ice } else if %bender_type% == earth { # etc } else if %bender_type% == air { # etc } - define lift_blocks # ^^^ # set the range - flag remaining_blocks:|:%lift_blocks% - run s@BenderBlocks def: BenderBlocks: type: task script: - define npc <%1%.as_npc> - if <%npc%.flag[remaining_blocks].as_list.size.as_int> > 0 { - define location <%npc%.flag[remaining_blocks].as_list.random> - define block <%location%.material.id> - if %bender_type% == fire { - modifyblock %location% m@water } - spawn e@falling_block,%block%[velocity=<%npc%.location.block.add[0,2,0]>] %location% save:%location%_block - look duration:1 - push destination:<%npc%.location.block.add[0,2,0]> speed:0.1 - - if %bender_type% == fire { - repeat 5 { - - animate SNEAK - - playeffect FLAME - - playeffect LAVA - - animate ARM_SWING - } - } + - if %bender_type% == fire { + - repeat 5 { + - animate SNEAK + - playeffect FLAME + - playeffect LAVA + - animate ARM_SWING + } + } - flag %npc% remaining_blocks:<-:%location% - wait d@1.5s - run s@BenderBlocks def:%npc% }