Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    wycuhmi's Avatar
    Join Date
    Jul 2017
    Gender
    male
    Posts
    88
    Reputation
    27
    Thanks
    92

    Loot Notifications!

    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.

  2. The Following User Says Thank You to wycuhmi For This Useful Post:

    Oxy (02-16-2019)

  3. #2
    Demon's Avatar
    Join Date
    Jul 2015
    Gender
    male
    Location
    Lost
    Posts
    1,095
    Reputation
    86
    Thanks
    316
    My Mood
    Angelic
    Quote Originally Posted by wycuhmi View Post
    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.
    Good job!

    But instead of making a function for every notification type u can just make a base notification function to handle it:
    Code:
    public void SendNotification(string name, string text, int namecolor = 0xFFFFFF, int color = 0xFFFFFF)
    etc
    Nice

  4. #3
    wycuhmi's Avatar
    Join Date
    Jul 2017
    Gender
    male
    Posts
    88
    Reputation
    27
    Thanks
    92
    ah gotcha. thanks for your feedback!

  5. #4
    wycuhmi's Avatar
    Join Date
    Jul 2017
    Gender
    male
    Posts
    88
    Reputation
    27
    Thanks
    92
    bump //10chars
    Thanking my posts makes you super cool!

  6. #5
    dewewe1's Avatar
    Join Date
    Sep 2018
    Gender
    male
    Posts
    13
    Reputation
    10
    Thanks
    1
    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

  7. #6
    SeXZeFPS's Avatar
    Join Date
    Jan 2015
    Gender
    male
    Location
    In your wardrobe
    Posts
    598
    Reputation
    10
    Thanks
    637
    My Mood
    Asleep
    Quote Originally Posted by dewewe1 View Post
    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
    It might just depends on what source that you have.

  8. #7
    wycuhmi's Avatar
    Join Date
    Jul 2017
    Gender
    male
    Posts
    88
    Reputation
    27
    Thanks
    92
    @dewewe1 what source are you using, i may be able to help you
    Thanking my posts makes you super cool!

  9. #8
    Magiertoasti's Avatar
    Join Date
    Jun 2016
    Gender
    male
    Posts
    7
    Reputation
    10
    Thanks
    3

    public static void ShowBags Dosent shows up

    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)

  10. #9
    dewewe1's Avatar
    Join Date
    Sep 2018
    Gender
    male
    Posts
    13
    Reputation
    10
    Thanks
    1
    Quote Originally Posted by Magiertoasti View Post
    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)
    im also using cakes domain (fsod)

  11. #10
    SeXZeFPS's Avatar
    Join Date
    Jan 2015
    Gender
    male
    Location
    In your wardrobe
    Posts
    598
    Reputation
    10
    Thanks
    637
    My Mood
    Asleep
    Quote Originally Posted by Magiertoasti View Post
    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)
    It probably uses this in a for loop?

  12. #11
    FlutterM4rk's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Posts
    365
    Reputation
    16
    Thanks
    228
    My Mood
    Sleepy
    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

  13. #12
    Demon's Avatar
    Join Date
    Jul 2015
    Gender
    male
    Location
    Lost
    Posts
    1,095
    Reputation
    86
    Thanks
    316
    My Mood
    Angelic
    Quote Originally Posted by FlutterM4rk View Post
    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

  14. #13
    philipovrell's Avatar
    Join Date
    Oct 2014
    Gender
    male
    Posts
    22
    Reputation
    10
    Thanks
    1
    My Mood
    Cool
    Hello Mr!

    I have a few Question!

    Where can i find public static void ShowBags in Fsod source? i can't find it

  15. #14
    DarknessRealmsPs's Avatar
    Join Date
    Nov 2017
    Gender
    male
    Location
    my house,my city, god world
    Posts
    37
    Reputation
    10
    Thanks
    1
    My Mood
    Busy
    Quote Originally Posted by wycuhmi View Post
    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.
    i got error in

    public void SendNotif(string text)
    {
    _client.SendPacket(new Text()
    {
    BubbleTime = 0,
    NumStars = -1,
    Name = "<Notification>",
    Txt = text
    TextColor = 0x(hexcode)
    });
    }

    SOURCE:FSOD

  16. #15
    zylixel's Avatar
    Join Date
    Feb 2017
    Gender
    male
    Posts
    8
    Reputation
    10
    Thanks
    0
    My Mood
    Confused
    Quote Originally Posted by DarknessRealmsPs View Post
    i got error in

    public void SendNotif(string text)
    {
    _client.SendPacket(new Text()
    {
    BubbleTime = 0,
    NumStars = -1,
    Name = "<Notification>",
    Txt = text
    TextColor = 0x(hexcode)
    });
    }

    SOURCE:FSOD

    Have you tried changing the hexcode

Page 1 of 2 12 LastLast

Similar Threads

  1. Realm Relay Loot Notifs
    By Nisuxen in forum Realm of the Mad God Tutorials & Source Code
    Replies: 13
    Last Post: 02-01-2015, 04:25 AM
  2. [Help Request] Loot Notification Help
    By evilcitrus in forum Realm of the Mad God Help & Requests
    Replies: 2
    Last Post: 10-17-2013, 12:01 PM
  3. [Outdated] [HEXED TO 16.2] RotMG In-Game Mod selector (new update) LOOT NOTIFICATIONS
    By Mmozoc in forum Realm of the Mad God Hacks & Cheats
    Replies: 56
    Last Post: 09-07-2013, 03:21 AM
  4. [Help Request] loot notification
    By recloud in forum Realm of the Mad God Help & Requests
    Replies: 15
    Last Post: 08-29-2013, 08:31 PM
  5. [Help Request] Loot notifications?
    By Skatzi in forum Realm of the Mad God Help & Requests
    Replies: 6
    Last Post: 08-01-2013, 09:32 AM