Oxy (02-16-2019)
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
now (also in Loots.cs), look for "public static void ShowBags", then inside of that void, add this codeCode:private static string[] notifItem = { "placeholder item", "placeholder item", "placeholder item" };
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 codeCode:if (notifItem.Contains(i.ObjectId)) foreach (var p in enemy.Owner.Players.Values) p.SendHelp(owners[0].Name + " has just gotten (a): '" + i.ObjectId + "'!");
then go back to Loots.cs and change the p.SendHelp from the second instance of code to p.SendNotifCode:public void SendNotif(string text) { _client.SendPacket(new Text() { BubbleTime = 0, NumStars = -1, Name = "<Notification>", Txt = text TextColor = 0x(hexcode) }); }
That's it, folks.
Oxy (02-16-2019)
ah gotcha. thanks for your feedback!
bump //10chars
Thanking my posts makes you super cool!
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 + "'!");
-----------------------------------------------------------------------
in loots.cs "public static void ShowBags" Dont Show up
@dewewe1 what source are you using, i may be able to help you
Thanking my posts makes you super cool!
I am using Cakes Domain and in Loots.cs dosent is any thing like public static void ShowBags just private static void ShowBag(Enemy enemy, string[] owners, int bagType, Item[] items)
copy pasting valor code is just like lol
also, this is pretty inefficient as it does a foreach loop of all players in the world like 20 times when a boss dies, it's better to just queue messages and send them every 3rd tick, with a for loop instead of the foreach loop
Valor must be a garbage source if it had that quality of code. And not really; qeueing messages is unnessary and could create delay; especially in each third itteration.
In general looping through 10-20 players a single world instance isn't even tasking for the program at all. Only thing you would need to be careful about would be more of the lower level things and how the are processed.
Nice
Hello Mr!
I have a few Question!
Where can i find public static void ShowBags in Fsod source? i can't find it