Guessing it is not possible since it has been asked numerous times and not implemented.
DeathNotes
Moved
Total Downloads: 66,140 - First Release: Feb 14, 2015 - Last Update: May 13, 2018
- 4.98519/5, 270 likes
-
Wulf Community Admin
-
I added the line
Code:if (type == AttackerType.Murderer) return "Zombie";
Code:Error while compiling: DeathNotes.cs(272,30): error CS0117: `Oxide.Plugins.DeathNotes.AttackerType' does not contain a definition for `Murderer'
-
Code:if (entity.ToPlayer() != null) return AttackerType.Player;
Code:TryGetName() ... if (type == VictimType.Animal) ... if (entity.name.Contains("zombie")) return "Zombie";
Code:return entity.ToPlayer().displayName;
or to see if they're defined as something other than displayName.
[DOUBLEPOST=1509175830][/DOUBLEPOST]
From line 511, you'll need to define the enum for Murderer, see below:
Code:enum VictimType { Player, Helicopter, Animal, Invalid, Murderer } enum AttackerType { Player, Helicopter, Animal, Turret, Structure, Trap, Self, Invalid, Murderer }
Last edited by a moderator: Oct 28, 2017 -
Thank you, I did that and it compiled at least. Now I just need to log into server and see if it works.
-
You might want to add handling for Murderer. I tweaked a copy of the code and now it identifies them rather than leaving it blank (at line 357):
if (entity.ToPlayer().displayName == null)
{
if (entity.name.Contains("murderer"))
return "Murderer";
}
else
{
return entity.ToPlayer().displayName;
} -
Wulf Community Admin
-
What are all these messages?
A Boar followed until it finally -
Within Victim class
Code:if (type == VictimType.Player) { if (entity.ToPlayer().displayName == null) { if (entity is NPCMurderer) return "Zombie"; } else { return entity.ToPlayer().displayName; } }
Code:if (type == AttackerType.Player) { if (entity.ToPlayer().displayName == null) { if (entity is NPCMurderer) return "Zombie"; } else { return entity.ToPlayer().displayName; } }
I've further improved this with the following:
Line 110:
Code:string ZombieColor;
Code:if (type == AttackerType.Player) { if (entity.ToPlayer().displayName == null) { if (entity is NPCMurderer) return "ZombieNPCMurderer"; } else { return entity.ToPlayer().displayName; } }
Line 362:
Code:if (type == VictimType.Player) { if (entity.ToPlayer().displayName == null) { if (entity is NPCMurderer) return "ZombieNPCMurderer"; } else { return entity.ToPlayer().displayName; } }
Code:ZombieColor = GetConfig("#FF0000 ", "Settings", "Zombie Color");
Replace the message string formatting for attacker/victim if name matches ZombieNPCMurderer - or whatever you defined the zombie name as
Code:if (data.victim.name == "ZombieNPCMurderer") message = message.Replace("{victim}", $"A <color={ZombieColor}>Zombie</color>"); else message = message.Replace("{victim}", $"<color={VictimColor}>{data.victim.name}</color>"); if (data.attacker.name == "ZombieNPCMurderer") message = message.Replace("{attacker}", $"A <color={ZombieColor}>Zombie</color>"); else message = message.Replace("{attacker}", $"<color={AttackerColor}>{data.attacker.name}</color>");
Code:"Zombie Color": "#ff0000",
It's not the most graceful way of hacking this plugin, ideally a new type would be implemented, instead of hooking into player - but that's as much to do with how FacePunch have created NPC's I think. Either way, works for now and is better than empty strings all over the place.Last edited by a moderator: Oct 28, 2017 -
@myles. works great thanks
-
-
How to change all this. Is this normal?
([Death Notes] A Boar followed until it finally caught him.)Attached Files:
-
-
-
SetConfig("Settings", "Zombie Color", "#FF0000"); -
hi
How to make that when killing 3 persons, 3 reports about the murder are displayed?Attached Files:
-
-
English
----------------
If you put CustomAI together with Death Notes
on the server begins Bacchanalia, in the chat displays that animals are killing zombies
and the FPS drops to 10, without the CustomAI plugin everything is fine, or without the Death Notes
I did not understand exactly what it gives on the server
Russian
----------------
Если поставить CustomAI вместе с Death Notes
на сервере начинается вакханалия, в чате отображает что животные убивают зомби
а ФПС падает до 10, без плагина CustomAI все нормально, или же без Death Notes
я так и не понял какой именно дает такое на сервере -
Waiting for fix, since player that is killed is not shown and animal kills apparently are not all shown either.
-
Can you give me the config that would be easier thank you
-
-
I am not experiencing any issues other than NPCs being registered as blanks and they usually kill with "NoWeapon".I would probably try adding them on my own if update does not come out anytime soon.