having an issue with deathnotes not displaying some players kills but sends them to the console ? anything i could do to fix this ?
DeathNotes
Moved
Total Downloads: 66,139 - First Release: Feb 14, 2015 - Last Update: May 13, 2018
- 4.98519/5, 270 likes
-
These are the relevant code blocks to:
- Fix helicopter death messages
- Add the BradleyAPC
- Support the scientists
Code:List<DeathReason> SleepingDeaths = new List<DeathReason> { --- DeathReason.Helicopter, DeathReason.Tank, DeathReason.Scientist, DeathReason.Slash, --- };
Code:class Attacker { public string name = string.Empty; [JsonIgnore] public BaseCombatEntity entity; public AttackerType type = AttackerType.Invalid; public float healthLeft;public string TryGetName() { if (entity == null) return "No Attacker";if (type == AttackerType.Player) return entity.ToPlayer().displayName; if (type == AttackerType.Scientist) return "Scientist"; if (type == AttackerType.Zombie) return "Zombie"; if (type == AttackerType.Helicopter) return "Patrol Helicopter"; if (type == AttackerType.Tank) return "Bradley APC"; if (type == AttackerType.Turret) return "Auto Turret"; if (type == AttackerType.Self) return "themselves"; if (type == AttackerType.Animal) --- return "No Attacker"; }public AttackerType TryGetType() { if (entity == null) return AttackerType.Invalid; if (entity is NPCMurderer) return AttackerType.Zombie; if (entity.ToPlayer() != null && entity.ToPlayer().displayName != null) return AttackerType.Player; if (entity.ToPlayer() != null && entity.ToPlayer().displayName == null) return AttackerType.Scientist; if (entity.name.Contains("patrolhelicopter")) return AttackerType.Helicopter; if (entity.name.Contains("bradleyapc")) return AttackerType.Tank; if (entity.name.Contains("agents/")) return AttackerType.Animal; if (entity.name.Contains("barricades/") || entity.name.Contains("wall.external.high")) return AttackerType.Structure; if (entity.name.Contains("beartrap.prefab") || entity.name.Contains("landmine.prefab") || entity.name.Contains("spikes.floor.prefab")) return AttackerType.Trap; if (entity.name.Contains("autoturret_deployed.prefab")) return AttackerType.Turret;return AttackerType.Invalid; } }
Code:class Victim { public string name = string.Empty; [JsonIgnore] public BaseCombatEntity entity; public VictimType type = VictimType.Invalid;public string TryGetName() { if (type == VictimType.Player) return entity.ToPlayer().displayName; if (type == VictimType.Scientist) return "Scientist"; if (type == VictimType.Zombie) return "Zombie"; if (type == VictimType.Helicopter) return "Patrol Helicopter"; if (type == VictimType.Tank) return "Bradley APC"; if (type == VictimType.Animal) { if (entity.name.Contains("boar")) return "Boar"; if (entity.name.Contains("horse")) return "Horse"; if (entity.name.Contains("wolf")) return "Wolf"; if (entity.name.Contains("stag")) return "Stag"; if (entity.name.Contains("chicken")) return "Chicken"; if (entity.name.Contains("bear")) return "Bear"; if (entity.name.Contains("zombie")) return "Zombie"; }return "No Victim"; }public VictimType TryGetType() { if (entity == null) return VictimType.Invalid; if (entity is NPCMurderer) return VictimType.Zombie; if (entity.ToPlayer() != null && entity.ToPlayer().displayName != null) return VictimType.Player; if (entity.ToPlayer() != null && entity.ToPlayer().displayName == null) return VictimType.Scientist; if (entity.name.Contains("patrolhelicopter")) return VictimType.Helicopter; if (entity.name.Contains("bradleyapc")) return VictimType.Tank; if ((bool)entity?.name?.Contains("agents/")) return VictimType.Animal;return VictimType.Invalid; } }
Code:public DeathReason TryGetReason() { if (victim.type == VictimType.Helicopter) return DeathReason.HelicopterDeath; if (attacker.type == AttackerType.Helicopter) return DeathReason.Helicopter; if (victim.type == VictimType.Tank) return DeathReason.TankDeath; if (attacker.type == AttackerType.Tank && victim.type == VictimType.Scientist) return DeathReason.TankScientist; if (attacker.type == AttackerType.Tank) return DeathReason.Tank; if (attacker.type == AttackerType.Turret) return DeathReason.Turret; if (attacker.type == AttackerType.Trap) return DeathReason.Trap; if (attacker.type == AttackerType.Structure) return DeathReason.Structure; if (attacker.type == AttackerType.Animal) return DeathReason.Animal; if (victim.type == VictimType.Animal) return DeathReason.AnimalDeath; if (attacker.type == AttackerType.Zombie) return DeathReason.Zombie; if (victim.type == VictimType.Zombie) return DeathReason.ZombieDeath; if (weapon == "F1 Grenade" || weapon == "Survey Charge") return DeathReason.Explosion; if (weapon == "Flamethrower") return DeathReason.Flamethrower; if (victim.type == VictimType.Scientist) return DeathReason.ScientistDeath; if (attacker.type == AttackerType.Scientist) return DeathReason.Scientist; if (victim.type == VictimType.Player) return GetDeathReason(damageType);return DeathReason.Unknown; }
Code:enum VictimType { Player, Scientist, Zombie, Helicopter, Tank, Animal, Invalid }enum AttackerType { Player, Scientist, Helicopter, Tank, Animal, --- }enum DeathReason { --- Tank, TankDeath, TankScientist, Structure, Trap, Animal, AnimalDeath, Scientist, ScientistDeath, Zombie, --- }
Code:--- SetConfig("Messages", "HelicopterDeath", new List<object> { "The {victim} was taken down." }); SetConfig("Messages", "Tank", new List<object> { "{attacker} blew a hole in {victim}'s {bodypart}." }); SetConfig("Messages", "TankDeath", new List<object> { "{victim} was taken down." }); SetConfig("Messages", "TankScientist", new List<object> { "{attacker} drove over a {victim}." }); SetConfig("Messages", "Animal", new List<object> { "A {attacker} followed {victim} until it finally caught him." }); SetConfig("Messages", "AnimalDeath", new List<object> { "{attacker} killed a {victim} with a {weapon}{attachments} from {distance}m." }); SetConfig("Messages", "Scientist", new List<object> { "A {attacker} killed {victim} in self-defence." }); SetConfig("Messages", "ScientistDeath", new List<object> { "A {victim} was killed by {attacker} with a {weapon}{attachments} from {distance}m." }); SetConfig("Messages", "Zombie", new List<object> { "A {attacker} haunted down {victim}." }); --- SetConfig("Messages", "Helicopter Sleeping", new List<object> { "{victim} was sleeping when he was shot to pieces by a {attacker}." }); SetConfig("Messages", "Tank Sleeping", new List<object> { "{attacker} tried to wake up {victim}." }); SetConfig("Messages", "Animal Sleeping", new List<object> { "{victim} was killed by a {attacker} while having a sleep." }); SetConfig("Messages", "Scientist Sleeping", new List<object> { "A {attacker} took {victim} away for science." }); SetConfig("Messages", "Slash Sleeping", new List<object> { "{attacker} slashed sleeping {victim} in half." }); ---
Code:Messages = GetConfig(new Dictionary<string, object> { // Normal --- { "HelicopterDeath", new List<object> { "The {victim} was taken down." }}, { "Tank", new List<object> { "{attacker} blew a hole in {victim}'s {bodypart}." }}, { "TankDeath", new List<object> { "{victim} was taken down." }}, { "TankScientist", new List<object> { "{attacker} drove over a {victim}." }}, { "Animal", new List<object> { "A {attacker} followed {victim} until it finally caught him." }}, { "AnimalDeath", new List<object> { "{attacker} killed a {victim} with a {weapon}{attachments} from {distance}m." }}, { "Scientist", new List<object> { "A {attacker} killed {victim} in self-defence." }}, { "ScientistDeath", new List<object> { "A {victim} was killed by {attacker} with a {weapon}{attachments} from {distance}m." }}, { "Zombie", new List<object> { "A {attacker} haunted down {victim}." }}, --- // Sleeping --- { "Helicopter Sleeping", new List<object> { "{victim} was sleeping when he was shot to pieces by a {attacker}." }}, { "Tank Sleeping", new List<object> { "{attacker} tried to wake up {victim}." }}, { "Animal Sleeping", new List<object> { "{victim} was killed by a {attacker} while having a sleep." }}, { "Scientist Sleeping", new List<object> { "A {attacker} took {victim} away for science." }}, { "Slash Sleeping", new List<object> { "{attacker} slashed sleeping {victim} in half." }}, ---
-
Im not seeing the cs file -
Wulf Community Admin
-
-
i dont know if this has been asked before, but is there a way to set the font size for the chat deaths?
-
@LaserHydra
Hello, would it be possible to put all the kill notes in a separate file to use the localization system?
"lang /en/ DeathNotes.json", (by default) (Attachments, Bodyparts, Messages, Names, Weapons)
"lang /fr/ DeathNotes.json" ...Last edited by a moderator: Feb 18, 2018 -
Hi
would it be possible to fix the death messages, at the minute all deaths of NPC's (Botspawn plugin) , Zombie *green (Radtown animals) "Murderers" or "Scientists from either plugin are shown as "zombie" deaths in chat, But if you have Rust io map or RustAdmin on it shows death of actual entity IE: (12:04:03) | Railway Patrol[8195786/2383862] was killed by bear (Bear) I realise that the Botspawn plugin is still a work in progress but hope that it can be done,Last edited by a moderator: Feb 19, 2018 -
Kills with bows are not registering for the bots. If I kill a scientist with something other than a bow it will display in the kill feed but if you use a bow it says nothing, the kill is getting logged in the console though. Any ideas what the issue could be? Bow kills on animals are showing up as well so the bow is registering.
-
i want to disable the chat feed as im using popup notifications for deathnotes but when i put it to false it still shows even after i reload the plugin.
-
-
How do I set it so it only shows player deaths? I don't care about animals or zombies dying, I only want player deaths to show. (I run a high spawn zombie server)
-
-
-
Not working after wipe
-
Wulf Community Admin
-
-
Pls can you add scientist?
-
Doesn't seem to be working correctly. The death notes show up in the console but they do not display in the chat feed. Anyone else having this issue? Started after the update.
-
Attached Files:
-