heyo, so this tutorial will cover how to add loot notifications (works on fsod, nr-core, and maybe loe).
First in wServer/logic/loot/Loots.cs, Ctrl+F for "public class Loot", then inside of that class, add this code
Code:
private static string[] notifItem = {
"placeholder item",
"placeholder item",
"placeholder item"
};
now (also in Loots.cs), look for "public static void ShowBags", then inside of that void, add this code
Code:
if (notifItem.Contains(i.ObjectId))
foreach (var p in enemy.Owner.Players.Values)
p.SendHelp(owners[0].Name + " has just gotten (a): '"
+ i.ObjectId + "'!");
You can end off here, but if you want to use a color that isn't orange, go to wServer/realm/entities/player/Player.Chat.cs and add this code
Code:
public void SendNotif(string text)
{
_client.SendPacket(new Text()
{
BubbleTime = 0,
NumStars = -1,
Name = "<Notification>",
Txt = text
TextColor = 0x(hexcode)
});
}
then go back to Loots.cs and change the p.SendHelp from the second instance of code to p.SendNotif
That's it, folks.