Ducket Currency Problem!

Status
Not open for further replies.

Swift

Member
Sep 2, 2013
107
13
Afternoon all,

I recently occured into a problem with the duckets.

I've set the duckets to be 10k after registration and earnt every 30 mins, but when the 30 min timer hits it resets back to 1 ducket.

The duckets update in database correctly however they don’t send the real time duckets to emulator (something to do with packets?)

I've added diamonds timer to checkCreditsTimer() method in Habbo.cs and subscriptionManager.cs.

Could that be the problem that is messing it up?

Any help is appreciated!
 

Sonay

Sonay#0001
Mar 24, 2016
103
53
It can be possible, that you do not use += to add it, only = which has the effect that it is replaced by the number you set.

And its better that you post your code here to have a better look at it.
 

Swift

Member
Sep 2, 2013
107
13
It can be possible, that you do not use += to add it, only = which has the effect that it is replaced by the number you set.

And its better that you post your code here to have a better look at it.

Hi Sonay, thanks for a quick reply! I am in fact using +=, but here is the code nonetheless:

public void CheckCreditsTimer()
{
try
{
this._creditsTickUpdate--;

if (this._creditsTickUpdate <= 0)
{
int CreditUpdate = Convert.ToInt32(PlusEnvironment.GetSettingsManager().TryGetValue("user.currency_scheduler.credit_reward"));
int DucketUpdate = Convert.ToInt32(PlusEnvironment.GetSettingsManager().TryGetValue("user.currency_scheduler.ducket_reward"));
int DiamondUpdate = Convert.ToInt32(PlusEnvironment.GetSettingsManager().TryGetValue("user.currency_scheduler.diamond_reward"));
SubscriptionData SubData = null;
if (PlusEnvironment.GetGame().GetSubscriptionManager().TryGetSubscriptionData(this._vipRank, out SubData))
{
CreditUpdate += SubData.Credits;
DucketUpdate += SubData.Duckets;
DiamondUpdate += SubData.Diamonds;
}

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

this._client.SendPacket(new CreditBalanceComposer(this._credits));
this._client.SendPacket(new HabboActivityPointNotificationComposer(this._duckets, DucketUpdate));
this._client.SendPacket(new HabboActivityPointNotificationComposer(this._diamonds, DiamondUpdate));

this.CreditsUpdateTick = Convert.ToInt32(PlusEnvironment.GetSettingsManager().TryGetValue("user.currency_scheduler.tick"));
this.DiamondsUpdateTick = Convert.ToInt32(PlusEnvironment.GetSettingsManager().TryGetValue("user.currency_scheduler.tick"));
}
}
catch { }
}
 
Status
Not open for further replies.

Users who are viewing this thread

Top