PlusEmu - Currency per hour and HC Display

Obbler

GFX Noob
Oct 2, 2016
31
13
Hi there, I'm currently running the latest PlusEmu build but having some difficulty with a few things.

I'd like to remove the "HC Join" area and unsure how to do that. Would it involve directly editting the Habbo.swf?
8bd89e4d551f40b1a184adf6015b88f4.png


I am also wanting to change the currency per 15 minutes/interval. I'd like to give diamonds per hour, and change the base credit/duckets. Simple question sure, and I can find the VIP values (Subscriptions in the mysql database, as server_settings has no effect). Any guidance would be much appreciated.

Thank you.
 

Meap

Don't need glasses if you C#
Nov 7, 2010
1,045
296
Removing HC does directly involve editing the swf yes

Credit timer etc is located in a file
Called PlusStaticGameSettings of which you will need to
Edit in visual studios and for
Diamonds you may have to
Look throughout the forum
I remember someone posting it somewhere
 

Obbler

GFX Noob
Oct 2, 2016
31
13
Removing HC does directly involve editing the swf yes

Credit timer etc is located in a file
Called PlusStaticGameSettings of which you will need to
Edit in visual studios and for
Diamonds you may have to
Look throughout the forum
I remember someone posting it somewhere
Thankyou, have updated credit and duckets totals.

Will look into the client editting later after work, and diamonds hopefully someone else replies while I'm out at work. Have had a search around the forums but couldn't find much (if nobody knows I'll keep searching!) Thanks again.
 
May 1, 2015
467
152
If you want to have the diamonds set per hour, and credits per 15 minutes to have an economy based on diamonds, just replace your credit timer with the following:
Code:
public void CheckCreditsTimer()
        {
            try
            {
                this._creditsTickUpdate--;
                this._DiamondsTick--;

                if (this._creditsTickUpdate <= 0)
                {
                    int CreditUpdate = PlusStaticGameSettings.UserCreditsUpdateAmount;
                    int DucketUpdate = PlusStaticGameSettings.UserPixelsUpdateAmount;
                    int DiamondsUpdate = PlusStaticGameSettings.UserDiamondsUpdateAmount;

                    SubscriptionData SubData = null;
                    if (PlusEnvironment.GetGame().GetSubscriptionManager().TryGetSubscriptionData(this._vipRank, out SubData))
                    {
                        CreditUpdate += SubData.Credits;
                        DucketUpdate += SubData.Duckets;
                         }

                    this._credits += CreditUpdate;
                    this._duckets += DucketUpdate;
                  

                    this._client.SendMessage(new CreditBalanceComposer(this._credits));
                    this._client.SendMessage(new HabboActivityPointNotificationComposer(this._duckets, DucketUpdate));

                    this.CreditsUpdateTick = PlusStaticGameSettings.UserCreditsUpdateTimer;
                }

                if (_DiamondsTick <= 0)
                {
                    int DiamondsUpdate = PlusStaticGameSettings.UserDiamondsUpdateAmount;
                    SubscriptionData SubData = null;
                    if (PlusEnvironment.GetGame().GetSubscriptionManager().TryGetSubscriptionData(this._vipRank, out SubData))
                    {
                        DiamondsUpdate = SubData.Diamonds;
                    }
                    this._diamonds += DiamondsUpdate;
                    this._client.SendMessage(new HabboActivityPointNotificationComposer(this._diamonds, DiamondsUpdate, 5));
                    this.DiamondsTick = PlusStaticGameSettings.DiamondUpdateTimer;
                }
            }
            catch { }
        }
Tested & works perfectly.
 

Obbler

GFX Noob
Oct 2, 2016
31
13
If you want to have the diamonds set per hour, and credits per 15 minutes to have an economy based on diamonds, just replace your credit timer with the following:
Code:
public void CheckCreditsTimer()
        {
            try
            {
                this._creditsTickUpdate--;
                this._DiamondsTick--;

                if (this._creditsTickUpdate <= 0)
                {
                    int CreditUpdate = PlusStaticGameSettings.UserCreditsUpdateAmount;
                    int DucketUpdate = PlusStaticGameSettings.UserPixelsUpdateAmount;
                    int DiamondsUpdate = PlusStaticGameSettings.UserDiamondsUpdateAmount;

                    SubscriptionData SubData = null;
                    if (PlusEnvironment.GetGame().GetSubscriptionManager().TryGetSubscriptionData(this._vipRank, out SubData))
                    {
                        CreditUpdate += SubData.Credits;
                        DucketUpdate += SubData.Duckets;
                         }

                    this._credits += CreditUpdate;
                    this._duckets += DucketUpdate;
                

                    this._client.SendMessage(new CreditBalanceComposer(this._credits));
                    this._client.SendMessage(new HabboActivityPointNotificationComposer(this._duckets, DucketUpdate));

                    this.CreditsUpdateTick = PlusStaticGameSettings.UserCreditsUpdateTimer;
                }

                if (_DiamondsTick <= 0)
                {
                    int DiamondsUpdate = PlusStaticGameSettings.UserDiamondsUpdateAmount;
                    SubscriptionData SubData = null;
                    if (PlusEnvironment.GetGame().GetSubscriptionManager().TryGetSubscriptionData(this._vipRank, out SubData))
                    {
                        DiamondsUpdate = SubData.Diamonds;
                    }
                    this._diamonds += DiamondsUpdate;
                    this._client.SendMessage(new HabboActivityPointNotificationComposer(this._diamonds, DiamondsUpdate, 5));
                    this.DiamondsTick = PlusStaticGameSettings.DiamondUpdateTimer;
                }
            }
            catch { }
        }
Tested & works perfectly.

Just added, didn't give any diamonds. Where would I set the timer for diamonds? This is what I've done:
Code:
using System;
using System.Linq;
using System.Text;
using System.Collections.Generic;

namespace Plus
{
    class PlusStaticGameSettings
    {
        /// <summary>
        ///     The amount of credits a user will recieve every x minutes
        /// </summary>
        public const int UserCreditsUpdateAmount = 250;

        /// <summary>
        ///     The amount of pixels a user will recieve every x minutes
        /// </summary>
        public const int UserPixelsUpdateAmount = 125;
       
       
        /// <summary>
        ///     The amount of diamonds a user will recieve every x minutes (seperate timer)
        /// </summary>
        public const int UserDiamondsUpdateAmount = 1;
       
       
        /// <summary>
        ///     The time a user will have to wait for Diamonds update in minutes
        /// </summary>
        public const int DiamondUpdateTimer = 1;
       

        /// <summary>
        ///     The time a user will have to wait for Credits/Pixels update in minutes
        /// </summary>
        public const int UserCreditsUpdateTimer = 1;



-- All other crap below --

Set the timer to 1 minute to test. Still didn't change anything. After 15 minutes I got 600 credits and 225 duckets. Where my VIP rank is 3 - Set to 500 cr and 125 duckets per interval as VIP (Plus the base it should be sitting at 750cr and 250 duckets total so unsure why I got 600/225). But either way, no diamonds.
 
After some testing. Without VIP I received 100 of each, and 0 diamonds. It seems PlusStaticGameSettings.cs doesn't have an effect.


Edit: Im an idiot. Didn't rebuild emulator.
 
Last edited:
May 1, 2015
467
152
Just added, didn't give any diamonds. Where would I set the timer for diamonds? This is what I've done:
Code:
using System;
using System.Linq;
using System.Text;
using System.Collections.Generic;

namespace Plus
{
    class PlusStaticGameSettings
    {
        /// <summary>
        ///     The amount of credits a user will recieve every x minutes
        /// </summary>
        public const int UserCreditsUpdateAmount = 250;

        /// <summary>
        ///     The amount of pixels a user will recieve every x minutes
        /// </summary>
        public const int UserPixelsUpdateAmount = 125;
      
      
        /// <summary>
        ///     The amount of diamonds a user will recieve every x minutes (seperate timer)
        /// </summary>
        public const int UserDiamondsUpdateAmount = 1;
      
      
        /// <summary>
        ///     The time a user will have to wait for Diamonds update in minutes
        /// </summary>
        public const int DiamondUpdateTimer = 1;
      

        /// <summary>
        ///     The time a user will have to wait for Credits/Pixels update in minutes
        /// </summary>
        public const int UserCreditsUpdateTimer = 1;



-- All other crap below --

Set the timer to 1 minute to test. Still didn't change anything. After 15 minutes I got 600 credits and 225 duckets. Where my VIP rank is 3 - Set to 500 cr and 125 duckets per interval as VIP (Plus the base it should be sitting at 750cr and 250 duckets total so unsure why I got 600/225). But either way, no diamonds.
 
After some testing. Without VIP I received 100 of each, and 0 diamonds. It seems PlusStaticGameSettings.cs doesn't have an effect.


Edit: Im an idiot. Didn't rebuild emulator.
Haha, all good I'm glad everything is sorted now.
 

Obbler

GFX Noob
Oct 2, 2016
31
13
Can you send me what you've got? I've tried doing this and it just keeps giving me a diamond every minute
Can't access the VPS right now. But literally what is above, that's what I followed.

And the comments here:

Remember to create a ->
public const int DiamondUpdateTimer = 1; (That would be every 1 minute)
 

Joe

Well-Known Member
Jun 10, 2012
4,089
1,918
I'm currently using Brad's diamond timer, which uses the same timer as the credits/duckets.
I replaced my CheckCreditsTimer with this one and added "public const int DiamondUpdateTimer = 60;"
Build > Run

It just gives me a diamond every minute.. I'll try this process again, thanks though :D
 
I get the following errors:
b9b24b3dd84b4934a8a4eced2707a756.png

 
90c1ece965de4cf4b493c76e68c29c17.png

If I "Generage field '_DiamondsTick' in 'Habbo' I get the error which I first posted but the emulator successfully builds.
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,195
3,906
Try this?

Before you go straight to the code, I've commented out the SubData bit - it's optional, if you want to add extra diamonds per subscription rank, simply add the integer to the other class.

Open up Habbo.cs

Find:

PHP:
public Habbo(int Id, string Username, int Rank,
Above that, add this:
PHP:
public int DiamondsUpdateTick { get; set; }
Find 'CheckCreditsTimer()' under the before 'if (this._creditsTickUpdate <= 0)' add the following:
PHP:
this._diamondsTickUpdate--;

if (this._diamondsTickUpdate <= 0)
{
    int DiamondUpdate = PlusStaticGameSettings.UserDiamondsUpdateAmount;
 
    /*SubscriptionData SubData = null;
    if (PlusEnvironment.GetGame().GetSubscriptionManager().TryGetSubscriptionData(this._vipRank, out SubData))
    {
        DiamondUpdate += SubData.Diamonds;
    }*/

    this._diamonds += DiamondUpdate;

    this._client.SendPacket(new HabboActivityPointNotificationComposer(this._duckets, DiamondUpdate, 5));

    this.DiamondsUpdateTick = PlusStaticGameSettings.UserDiamondsUpdateTimer;
}

Next open up PlusStaticGameSettings.cs and add the following anywhere:

PHP:
/// <summary>
///     The amount of diamonds a user will recieve every x minutes
/// </summary>
public const int UserDiamondsUpdateAmount = 1;

/// <summary>
///     The time a user will have to wait for Diamonds update in minutes
/// </summary>
public const int UserDiamondsUpdateTimer = 1;
 
Last edited:

Obbler

GFX Noob
Oct 2, 2016
31
13
Try this?

Before you go straight to the code, I've coded out the SubData bit - it's optional, if you want to add extra diamonds per subscription rank, simply add the integer to the other class.

Open up Habbo.cs

Find:

PHP:
public Habbo(int Id, string Username, int Rank,
Above that, add this:
PHP:
public int DiamondsUpdateTick { get; set; }
Find 'CheckCreditsTimer()' under the before 'if (this._creditsTickUpdate <= 0)' add the following:
PHP:
this._diamondsTickUpdate--;

if (this._diamondsTickUpdate <= 0)
{
    int DiamondUpdate = PlusStaticGameSettings.UserDiamondsUpdateAmount;
 
    /*SubscriptionData SubData = null;
    if (PlusEnvironment.GetGame().GetSubscriptionManager().TryGetSubscriptionData(this._vipRank, out SubData))
    {
        DiamondUpdate += SubData.Diamonds;
    }*/

    this._diamonds += DiamondUpdate;

    this._client.SendPacket(new HabboActivityPointNotificationComposer(this._duckets, DiamondUpdate, 5));

    this.DiamondsUpdateTick = PlusStaticGameSettings.UserDiamondsUpdateTimer;
}

Next open up PlusStaticGameSettings.cs and add the following anywhere:

PHP:
/// <summary>
///     The amount of diamonds a user will recieve every x minutes
/// </summary>
public const int UserDiamondsUpdateAmount = 1;

/// <summary>
///     The time a user will have to wait for Diamonds update in minutes
/// </summary>
public const int UserDiamondsUpdateTimer = 1;

Should definitely work. I did something similar to this (had to declare/define the updatetick) before figuring it out, forgot to mention it as I forgot also :>
 

Users who are viewing this thread

Top