Solved kill a person skript

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

christianmv84

Active Member
Jul 20, 2017
50
0
0
59
code_language.skript:
on death of player:
    #Projectiles
    if attacker is a player:
        if projectile is set:
            set the death message to "&a%victim% &7fue disparado por &c%attacker% &7con &8[&4%attacker's health%{@Corazon}&8]"
 
    #Mob
    if attacker is a player:
        if attacker is set:
            set the death message to "&a%victim% &7fue asesinado por &c%attacker% &7con &8[&4%attacker's health%{@Corazon}&8]"
 
    #Magic
    if damage was caused by potion:
        set the death message to "&a%victim% &7fue asesinado usando &cmagia"
 
    #Burn
    if damage was caused by burning:
        if victim is player:
            set the death message to "&a%victim% &7murió &cquemado"
            stop
    #Void
    if damage was caused by void:
        if victim is player:
            set the death message to "&a%victim% &7murió por el &cvacio"
            stop

Ey, i have a problem

I want that when you throw a person to the void tell the name of the one that has thrown it and count 1 kill to the person who has thrown it and

The variable kills is {kills.%player%}
 
Try saving the "attacker" before the victim fall in the void.
Maybe with


code_language.skript:
on damage:
  attacker is a player
  victim is a player
  set {attacker} to the attacker
  set {victim} to the victim
  stop
on death:
  if damage was caused by void:
    victim is a player
    set the death message to "&a%victim% &7cayó gracias a %{attacker}%"
    stop
 
Try saving the "attacker" before the victim fall in the void.
Maybe with


code_language.skript:
on damage:
  attacker is a player
  victim is a player
  set {attacker} to the attacker
  set {victim} to the victim
  stop
on death:
  if damage was caused by void:
    victim is a player
    set the death message to "&a%victim% &7cayó gracias a %{attacker}%"
    stop

but you did not add the variable of kills to the attacker
 
but you did not add the variable of kills to the attacker


code_language.skript:
on damage:
  attacker is a player
  victim is a player
  set {who.killed.me.%victim%} to the attacker
  stop
on death:
  if damage was caused by void:
    victim is a player
    set the death message to "&a%victim% &7cayó gracias a %{who.killed.me.%victim%}%"
    add 1 to {kills.%{who.killed.me.%victim%}%}
    stop
 
Last edited:
Sorry, but this isn'T sure! You get maybe a lucky, that someone else get the kills that not hitted the guys. doing this way:

code_language.skript:
on damage:
    attacker is a player
    victim is a player
    set {Hitted::%victim%} to attacker
    set {Hitted::%attacker%} to victim
    wait 10 seconds
    delete {Hitted::%victim%}
    delete {Hitted::%attacker%}

on death:
    if damage was caused by void:
        victim is a player
        if {Hitted::%victim%} is set:
            set death message to "%victim% escape into void with a punch of %{Hitted::%victim%}
            delete {Hitted::%victim%}
        else:
            set death message to "%victim% just jumpend into void!
 
code_language.skript:
on damage:
  attacker is a player
  victim is a player
  set {attacker} to the attacker
  set {victim} to the victim
  stop
on death:
  if damage was caused by void:
    victim is a player
    set the death message to "&a%victim% &7cayó gracias a %{attacker}%"
    add 1 to {kills.%{attacker}%}
    stop

Sorry, but this isn'T sure! You get maybe a lucky, that someone else get the kills that not hitted the guys. doing this way:

code_language.skript:
on damage:
    attacker is a player
    victim is a player
    set {Hitted::%victim%} to attacker
    set {Hitted::%attacker%} to victim
    wait 10 seconds
    delete {Hitted::%victim%}
    delete {Hitted::%attacker%}

on death:
    if damage was caused by void:
        victim is a player
        if {Hitted::%victim%} is set:
            set death message to "%victim% escape into void with a punch of %{Hitted::%victim%}
            delete {Hitted::%victim%}
        else:
            set death message to "%victim% just jumpend into void!


What happened to the other user works?
 
code_language.skript:
on damage:
  attacker is a player
  victim is a player
  set {who.killed.me.%victim%} to the attacker
  stop
on death:
  if damage was caused by void:
    victim is a player
    set the death message to "&a%victim% &7cayó gracias a %{who.killed.me.%victim%}%"
    add 1 to {kills.%{who.killed.me.%victim%}%}
    stop

Now it would work, I edited some lines
 
Sorry, but this isn'T sure! You get maybe a lucky, that someone else get the kills that not hitted the guys. doing this way:

code_language.skript:
on damage:
    attacker is a player
    victim is a player
    set {Hitted::%victim%} to attacker
    set {Hitted::%attacker%} to victim
    wait 10 seconds
    delete {Hitted::%victim%}
    delete {Hitted::%attacker%}

on death:
    if damage was caused by void:
        victim is a player
        if {Hitted::%victim%} is set:
            set death message to "%victim% escape into void with a punch of %{Hitted::%victim%}
            delete {Hitted::%victim%}
        else:
            set death message to "%victim% just jumpend into void!

yes but in this where I add the variable

code_language.skript:
{kills2.%player%}
 
Last edited:
Juuuussstt remain, in Damage events you can use only Attacker + Victim!

Then the variable must be {kills2.%attacker%}?
[doublepost=1514932308,1514931544][/doublepost]
Juuuussstt remain, in Damage events you can use only Attacker + Victim!

1 Error: an entity cannot be saved i.e the contents of the variable {hitted::%the attacked entity%}

code_language.skript:
%{Hitted::%victim%}%
%{Hitted::%attacker%}%
 
Last edited:
no clue what youre doing


add 1 to {kills::%attacker%}

I think I do not explain what I want to do, I mean what you did to me is fine, the concept but what I want, is that by killing that person who kills him he sucks 1 kill and who dies that he sums a death
 
Status
Not open for further replies.