Files
death-message-fix.sk
Code
1 65
death-message-fix.sk
# Custom Death Messages with Ranks
# Shows: ☠ PlayerName RANK &c&lFormatted was slain by Killer
# Version: 2.0
options:
skull: &c☠
debug: false
on death of player:
if attacker is set:
set {_victim} to victim
set {_killer} to attacker
set {_victimName} to name of {_victim}
set {_killerName} to name of {_killer}
set {_victimRank} to {_victim}'s prefix
set {_killerRank} to {_killer}'s prefix
if {_victimRank} is set:
set {_victimRank} to uncolored {_victimRank}
replace all "[" with "" in {_victimRank}
replace all "]" with "" in {_victimRank}
replace all " " with "" in {_victimRank}
else:
set {_victimRank} to "PLAYER"
if {_killerRank} is set:
set {_killerRank} to uncolored {_killerRank}
replace all "[" with "" in {_killerRank}
replace all "]" with "" in {_killerRank}
replace all " " with "" in {_killerRank}
else:
set {_killerRank} to "PLAYER"
set {_victimFormatted} to {_victim}'s prefix ? "&7Player"
set {_killerFormatted} to {_killer}'s prefix ? "&7Player"
if tool of {_killer} is set:
set {_weapon} to name of tool of {_killer}
if {_weapon} is not set:
set {_weapon} to type of tool of {_killer}
set death message to "{@skull} &f%{_victimName}% &7%{_victimRank}% %{_victimFormatted}% &7was slain by &f%{_killerName}% &7%{_killerRank}% %{_killerFormatted}% &7using &f%{_weapon}%"
else:
set death message to "{@skull} &f%{_victimName}% &7%{_victimRank}% %{_victimFormatted}% &7was slain by &f%{_killerName}% &7%{_killerRank}% %{_killerFormatted}%"
if {@debug} is true:
send "&7[Debug] Death: %death message%" to console
else:
set {_victim} to victim
set {_victimName} to name of {_victim}
set {_victimRank} to {_victim}'s prefix
if {_victimRank} is set:
set {_victimRank} to uncolored {_victimRank}
replace all "[" with "" in {_victimRank}
replace all "]" with "" in {_victimRank}
replace all " " with "" in {_victimRank}
else:
set {_victimRank} to "PLAYER"
set {_victimFormatted} to {_victim}'s prefix ? "&7Player"
set death message to "{@skull} &f%{_victimName}% &7%{_victimRank}% %{_victimFormatted}% &7died"