Paste #129330: damge3

Date: 2024/12/24 16:51:36 UTC-08:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17


damage2:
            type: world
            events:
                after player damages entity:
                    - if !<context.entity.has_flag[attackedcoold]>:
                         - 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:
                                    - flag attackedcoold:1 expire:1t
                                    - 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