Paste #129325: Gmae crasg

Date: 2024/12/24 15:45:37 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


damage:
    type: world
    events:
        after player left clicks block:
            - if !<player.has_flag[attackcool]>:
                - flag <player> tempstrength:0
            - if !<player.has_flag[tempstrength]>:
                - flag <player> tempstrength:0
            - if !<player.has_flag[strength]>:
                - flag <player> strength:0
            - if <player.item_in_hand.has_flag[melee]> && <player.flag[attackcool]> = 0:
                - spawn armor_stand[visible=false;gravity=false] <player.location.forward[1]> save:aaa
                - define aaa <entry[aaa].spawned_entity>
                - playeffect effect:sweep_attack at:<[aaa].location.above[1]> quantity:1 offset:0
                - foreach <[aaa].location.find_entities[npc].within[2]> as:monster:
                    - hurt <player.item_in_hand.flag[melee].add[<player.flag[strength].add[<player.flag[tempstrength]>]>]> <[monster]> source:<player>
                - wait 0.1s
                - remove <entry[aaa].spawned_entity>
                - flag <player> attackcool:1
                - wait <player.item_in_hand.flag[meleecooldown]>s
                - flag <player> attackcool:0
damage2:
    type: world
    events:
        after player damages entity:
         - if <player.item_in_hand.has_flag[melee]> && <player.flag[attackcool]> = 0:
                - spawn armor_stand[visible=false;gravity=false] <player.location.forward[1]> save:aaa
                - define aaa <entry[aaa].spawned_entity>
                - playeffect effect:sweep_attack at:<[aaa].location.above[1]> quantity:1 offset:0
                - foreach <[aaa].location.find_entities[npc].within[2]> as:monster:
                    - hurt <player.item_in_hand.flag[melee].add[<player.flag[strength].add[<player.flag[tempstrength]>]>]> <[monster]> source:<player>
                - wait 0.1s
                - remove <entry[aaa].spawned_entity>
                - flag <player> attackcool:1
                - wait <player.item_in_hand.flag[meleecooldown]>s
                - flag <player> attackcool:0