It says that I need to use "attacker" or "victim" for death/damage events

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Poinapples

Member
Feb 4, 2024
17
0
1
13
code_language.skript:
on damage:
    if attacker is sneaking:
        if {team.%attacker's uuid%} is 5:
            if {flair_type.%attacker's uuid%} is 2:
                if {cooldown.%attacker's uuid%.locked} is true:
                    cancel event
                else:
                    if {timer.%attacker's uuid%.locked} is true:
                        cancel event
                    else:
                        set {timer.%attacker's uuid%.locked} to true
                        set {timer_display.%attacker's uuid%.locked} to 30
                        play sound "minecraft:entity.warden.sonic_boom" with volume 1 to all players within 6 blocks around the attacker
                        while {timer_display.%attacker's uuid%.locked} is not 0:
                            remove 1 from {timer_display.%attacker's uuid%.locked}
                            apply glowing 2 without particles to victim for 2 seconds replacing the existing effect
                            apply blindness 2 without particles to victim for 2 seconds replacing the existing effect
                            apply strength 2 without particles to attacker for 2 seconds replacing the existing effect
                            send action bar "&9Locked | %{timer_display.%attacker's uuid%.locked}s"
                            wait 1 second
                            if {timer_display.%attacker's uuid%.locked} is 0:
                                set {timer.%attacker's uuid%.locked} to false
                                set {cooldown.%attacker's uuid%.locked} to true
                                set {cooldown_display.%attacker's uuid%.locked} to 120
                                while {cooldown_display.%attacker's uuid%.locked} is not 0:
                                    remove 1 from {cooldown_display.%attacker's uuid%.locked}
                                    send action bar "&4Locked | %{cooldown_display.%attacker's uuid%.locked}%s"
                                    wait 1 second
                                    if {cooldown_display.%attacker's uuid%.locked} is 0:
                                        set {cooldown.%attacker's uuid%.locked} to false
 
Code:
send action bar "&4Locked | %{cooldown_display.%attacker's uuid%.locked}%s"
send action bar "&9Locked | %{timer_display.%attacker's uuid%.locked}s"
Right here, at the end of those 2 lines add "to attacker" or "to victim"