Death Messages

  • 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!

Status
Not open for further replies.

KAVKAZIE

Active Member
Feb 27, 2017
146
0
16
Hey, How to add attacker's killing tool to the death message ? Thanks!

Code:
on death of player:
    set death message to ""
        
    if {leaf.ffa.%uuid of victim%.mode} is set:
        clear drops
        
        if attacker is not set:
            send "&eYou were killed and lost &c-3 &eELO!" to victim
        else:
            send "&eYou were killed by &c%attacker% &eand lost &c-3 &eELO!" to victim
            
        send "&eYou have killed &a%victim% &eand received &a+6 &eELO!" to attacker
        add 1 to {leaf.ffa.%uuid of attacker%.%{leaf.ffa.%uuid of attacker%.mode}%.kills}
        add 1 to {leaf.ffa.%uuid of victim%.%{leaf.ffa.%uuid of victim%.mode}%.deaths}
        add 3 to {leaf.ffa.%uuid of attacker%.%{leaf.ffa.%uuid of attacker%.mode}%.points}
        add -3 to {leaf.ffa.%uuid of victim%.%{leaf.ffa.%uuid of victim%.mode}%.points}
        add 1 to {leaf.ffa.%uuid of attacker%.%{leaf.ffa.%uuid of attacker%.mode}%.streak}
        set {leaf.ffa.%uuid of victim%.%{leaf.ffa.%uuid of victim%.mode}%.streak} to 0
            
    if attacker is a player:
        if projectile is set:
            if victim is player:
                broadcast "&c%victim%&4[%{leaf.ffa.%uuid of victim%.%{leaf.ffa.%uuid of victim%.mode}%.kills}%] &ewas shot by &c%attacker%&4[%{leaf.ffa.%uuid of attacker%.%{leaf.ffa.%uuid of attacker%.mode}%.kills}%]&e."
                stop
    
    if attacker is not a player:
        if attacker is set:
            if victim is player:
                broadcast "&c%victim%&4[%{leaf.ffa.%uuid of victim%.%{leaf.ffa.%uuid of victim%.mode}%.kills}%] &ewas killed by &c%attacker%&e."
                stop
    
    if attacker is a player:
        if attacker is set:
            if victim is player:
                broadcast "&c%victim%&4[%{leaf.ffa.%uuid of victim%.%{leaf.ffa.%uuid of victim%.mode}%.kills}%] &ewas slain by &c%attacker%&4[%{leaf.ffa.%uuid of attacker%.%{leaf.ffa.%uuid of attacker%.mode}%.kills}%]&e."
                stop
    
    if damage was caused by potion:
        if victim is player:
            broadcast "&c%victim%&4[%{leaf.ffa.%uuid of victim%.%{leaf.ffa.%uuid of victim%.mode}%.kills}%] &ewas killed by &cMagic&e."
            stop
    
    if damage was caused by fall:
        if victim is player:
            broadcast "&c%victim%&4[%{leaf.ffa.%uuid of victim%.%{leaf.ffa.%uuid of victim%.mode}%.kills}%] &etried the leap of faith."
            stop
    
    if damage was caused by lava:
        if victim is player:
            broadcast "&c%victim%&4[%{leaf.ffa.%uuid of victim%.%{leaf.ffa.%uuid of victim%.mode}%.kills}%] &ethought swimming in lava was a good idea."
            stop
    
    if damage was caused by burning:
        if victim is player:
            broadcast "&c%victim%&4[%{leaf.ffa.%uuid of victim%.%{leaf.ffa.%uuid of victim%.mode}%.kills}%] &ejust got Roasted."
            stop
    
    if damage was caused by drown:
        if victim is player:
            broadcast "&c%victim%&4[%{leaf.ffa.%uuid of victim%.%{leaf.ffa.%uuid of victim%.mode}%.kills}%] &enever learned how to swim."
            stop
    
    if damage was caused by starvation:
        if victim is player:
            broadcast "&c%victim%&4[%{leaf.ffa.%uuid of victim%.%{leaf.ffa.%uuid of victim%.mode}%.kills}%] &ewas starved to death."
            stop
    
    if damage was caused by lightning:
        if victim is player:
            broadcast "&c%victim%&4[%{leaf.ffa.%uuid of victim%.%{leaf.ffa.%uuid of victim%.mode}%.kills}%] &ewas struck by lightning."
            stop
    
    if damage was caused by block explosion:
        if victim is player:
            broadcast "&c%victim%&4[%{leaf.ffa.%uuid of victim%.%{leaf.ffa.%uuid of victim%.mode}%.kills}%] &ewas blown to bits."
            stop

    wait 20 ticks
    force respawn player
 
try this
Code:
send "&eYou were killed by &c%attacker% &eusing &c%attacker's tool% &eand lost &c-3 &eELO!" to victim
 
Status
Not open for further replies.