Client Notifications

rrrrw4wcwfw

New Member
Feb 10, 2018
10
1
On a hotel when receiving diamonds duckets or credits you receive a notification in the top right corner.

I'm getting notifications when receiving diamonds, but it doesn't show it when I receive duckets and credits? Do I need to enable it somewhere in my variables, or what?
 

rrrrw4wcwfw

New Member
Feb 10, 2018
10
1
By default, Plus doesn't display notifications for recieving any currency besides diamonds. I'm sure you could code it in if you really wanted it.
From my understanding, Plus Emulator sends a CreditBalanceComposer packet to inform users they have gotten new credits. This makes the awful sound and rotates the credit icon. Easily replacable! Go to HabboHotel.Rooms.Chat.Commands.Moderator.GiveCommand.cs in your Emulator's source
At line 56,
REMOVE:
Code:
int Amount;
                            if (int.TryParse(Params[3], out Amount))
                            {
                                Target.GetHabbo().Credits = Target.GetHabbo().Credits += Amount;
                                Target.SendPacket(new CreditBalanceComposer(Target.GetHabbo().Credits));

                                if (Target.GetHabbo().Id != Session.GetHabbo().Id)
                                    Target.SendNotification(Session.GetHabbo().Username + " has given you " + Amount.ToString() + " Credit(s)!");
                                Session.SendWhisper("Successfully given " + Amount + " Credit(s) to " + Target.GetHabbo().Username + "!");
                                break;
                            }
ADD:
Code:
int Amount;
                            if (int.TryParse(Params[3], out Amount))
                            {
                                Target.GetHabbo().Credits = Target.GetHabbo().Credits += Amount;
                                Target.SendPacket(new HabboActivityPointNotificationComposer(Target.GetHabbo().Credits, Amount, 5));

                                if (Target.GetHabbo().Id != Session.GetHabbo().Id)
                                    Target.SendNotification(Session.GetHabbo().Username + " has given you " + Amount.ToString() + " Credit(s)!");
                                Session.SendWhisper("Successfully given " + Amount + " Credit(s) to " + Target.GetHabbo().Username + "!");
                                break;
                            }
Compile & run. Try giving yourself a credit using
Worked fine on my build.
This displays a notification, although the notification shows with the diamonds icon on the left, and says you received diamonds not credits.
 

5050

Member
Feb 25, 2015
34
13
This displays a notification, although the notification shows with the diamonds icon on the left, and says you received diamonds not credits.
It looks like you've gotta use a CreditBalanceComposer unless you've got custom packets after a second look. Deleting my response.
The HabboActivityPointNotificationComposer will alter balances for your Duckets or Diamonds whenever being used.
 

rrrrw4wcwfw

New Member
Feb 10, 2018
10
1
It looks like you've gotta use a CreditBalanceComposer unless you've got custom packets after a second look. Deleting my response.
The HabboActivityPointNotificationComposer will alter balances for your Duckets or Diamonds whenever being used.
It seems like we're talking about different things, here is a screenshot of the notification I'm referring to.


CreditBalanceComposer is what I was using in the first place.
 

5050

Member
Feb 25, 2015
34
13
It seems like we're talking about different things, here is a screenshot of the notification I'm referring to.


CreditBalanceComposer is what I was using in the first place.
CreditBalanceComposer is the only built-in method of giving a user credits (w/o an explicit DB query). Sending a notification like that can only be done through either the CreditBalanceComposer, or a custom-made packet to display the image you want instead of the one to give duckets/diamonds.
 

rrrrw4wcwfw

New Member
Feb 10, 2018
10
1
CreditBalanceComposer is the only built-in method of giving a user credits (w/o an explicit DB query). Sending a notification like that can only be done through either the CreditBalanceComposer, or a custom-made packet to display the image you want instead of the one to give duckets/diamonds.
This doesn't answer how to do it with duckets, but thanks I'll look into doing it with credits this way. Although I don't see how that's possible as the structure of CreditBalanceComposer is just the credit amount.
 

Users who are viewing this thread

Top