Hi there,
I have a skript set up for 1v1s, that when one person dies, it teleports the person who killed them to the spot they were BEFORE the duel, so they don't stay in the arena.
(example: player 1 duels player 2, it saves the location of both players as {lastlocation.%player%}, then when player 2 dies, it teleports player 1 to {lastlocation.%player%}.
there is also a custom death message when one player dies, which broadcasts in chat to everyone. When that happens, this is the message:
<none> beat Player2 in a duel.
and then when it's supposed to teleport the one who killed Player2, it doesn't. I'm assuming the expressions I'm using are incorrect, so what are the expressions?
The skript:
I have a skript set up for 1v1s, that when one person dies, it teleports the person who killed them to the spot they were BEFORE the duel, so they don't stay in the arena.
(example: player 1 duels player 2, it saves the location of both players as {lastlocation.%player%}, then when player 2 dies, it teleports player 1 to {lastlocation.%player%}.
there is also a custom death message when one player dies, which broadcasts in chat to everyone. When that happens, this is the message:
<none> beat Player2 in a duel.
and then when it's supposed to teleport the one who killed Player2, it doesn't. I'm assuming the expressions I'm using are incorrect, so what are the expressions?
The skript:
Code:
on death of player:
broadcast "{@prefix} &e%attacker% &7beat &e%victim% &7in a duel."
clear victim's inventory
clear attacker's inventory
teleport victim to {lastlocation.%victim%}
heal victim
teleport attacker to {lastlocation.%attacker%}
heal attacker