Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
PlusEMU Diamond Timer
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Brad" data-source="post: 376412" data-attributes="member: 17995"><p>show me the curre</p><p></p><p>This would only work for those offline <img src="/styles/default/xenforo/smilies/emojione/tongue.png" class="smilie" loading="lazy" alt=":p" title="Stick Out Tongue :p" data-shortname=":p" /></p><p></p><p>give me 5 minutes and Ill code it for you.</p><p>[doublepost=1464965475,1464965091][/doublepost]ok here goes.</p><p>goto PlusStaticGameSettings.cs and add</p><p>[CODE]public const int UserDiamondsUpdateAmount = 1;[/CODE]</p><p>then goto habbo.cs & find public void CheckCreditsTimer() then change it to this.</p><p>[CODE] public void CheckCreditsTimer()</p><p> {</p><p> try</p><p> {</p><p> this._creditsTickUpdate--;</p><p></p><p> if (this._creditsTickUpdate <= 0)</p><p> {</p><p> int CreditUpdate = PlusStaticGameSettings.UserCreditsUpdateAmount;</p><p> int DucketUpdate = PlusStaticGameSettings.UserPixelsUpdateAmount;</p><p> int DiamondUpdate = PlusStaticGameSettings.UserDiamondsUpdateAmount;</p><p> </p><p> SubscriptionData SubData = null;</p><p> if (PlusEnvironment.GetGame().GetSubscriptionManager().TryGetSubscriptionData(this._vipRank, out SubData))</p><p> {</p><p> CreditUpdate += SubData.Credits;</p><p> DucketUpdate += SubData.Duckets;</p><p> DiamondUpdate += SubData.Diamonds;</p><p> }</p><p></p><p> this._credits += CreditUpdate;</p><p> this._duckets += DucketUpdate;</p><p> this._diamonds += DiamondUpdate;</p><p></p><p> this._client.SendMessage(new CreditBalanceComposer(this._credits));</p><p> this._client.SendMessage(new HabboActivityPointNotificationComposer(this._duckets, DucketUpdate));</p><p> this._client.SendMessage(new HabboActivityPointNotificationComposer(this.Diamonds, DiamondUpdate, 5));</p><p> this.CreditsUpdateTick = PlusStaticGameSettings.UserCreditsUpdateTimer;</p><p> }</p><p> }</p><p> catch { }</p><p> }[/CODE]</p><p>Then goto SubscriptionData.cs and change it all to this.</p><p>[CODE]using System;</p><p>using System.Collections.Generic;</p><p>using System.Linq;</p><p>using System.Text;</p><p>using System.Threading.Tasks;</p><p></p><p>namespace Plus.HabboHotel.Subscriptions</p><p>{</p><p> public class SubscriptionData</p><p> {</p><p> public int Id { get; set; }</p><p> public string Name { get; set; }</p><p> public string Badge { get; set; }</p><p> public int Credits { get; set; }</p><p> public int Duckets { get; set; }</p><p> public int Respects { get; set; }</p><p> public int Diamonds { get; set; }</p><p></p><p> public SubscriptionData(int Id, string Name, string Badge, int Credits, int Duckets, int Respects, int Diamonds)</p><p> {</p><p> this.Id = Id;</p><p> this.Name = Name;</p><p> this.Badge = Badge;</p><p> this.Credits = Credits;</p><p> this.Duckets = Duckets;</p><p> this.Respects = Respects;</p><p> this.Diamonds = Diamonds;</p><p> }</p><p> }</p><p>}</p><p>[/CODE]</p><p>Then goto SubscriptionManager.cs and replace it all with this.</p><p>[CODE]using log4net;</p><p>using Plus.Database.Interfaces;</p><p>using System;</p><p>using System.Collections.Generic;</p><p>using System.Data;</p><p>using System.Linq;</p><p>using System.Text;</p><p>using System.Threading.Tasks;</p><p></p><p>namespace Plus.HabboHotel.Subscriptions</p><p>{</p><p> public class SubscriptionManager</p><p> {</p><p> private static ILog log = LogManager.GetLogger("Plus.HabboHotel.Subscriptions.SubscriptionManager");</p><p></p><p> private readonly Dictionary<int, SubscriptionData> _subscriptions = new Dictionary<int, SubscriptionData>();</p><p></p><p> public SubscriptionManager()</p><p> {</p><p> }</p><p></p><p> public void Init()</p><p> {</p><p> if (this._subscriptions.Count > 0)</p><p> this._subscriptions.Clear();</p><p></p><p> using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())</p><p> {</p><p> dbClient.SetQuery("SELECT * FROM `subscriptions`;");</p><p> DataTable GetSubscriptions = dbClient.getTable();</p><p></p><p> if (GetSubscriptions != null)</p><p> {</p><p> foreach (DataRow Row in GetSubscriptions.Rows)</p><p> {</p><p> if (!this._subscriptions.ContainsKey(Convert.ToInt32(Row["id"])))</p><p> this._subscriptions.Add(Convert.ToInt32(Row["id"]), new SubscriptionData(Convert.ToInt32(Row["id"]), Convert.ToString(Row["name"]), Convert.ToString(Row["badge_code"]), Convert.ToInt32(Row["credits"]), Convert.ToInt32(Row["duckets"]), Convert.ToInt32(Row["respects"]), Convert.ToInt32(Row["diamonds"])));</p><p> }</p><p> }</p><p> }</p><p></p><p> log.Info("Loaded " + this._subscriptions.Count + " subscriptions.");</p><p> }</p><p></p><p> public bool TryGetSubscriptionData(int Id, out SubscriptionData Data)</p><p> {</p><p> return this._subscriptions.TryGetValue(Id, out Data);</p><p> }</p><p> }</p><p>}</p><p>[/CODE]</p></blockquote><p></p>
[QUOTE="Brad, post: 376412, member: 17995"] show me the curre This would only work for those offline :p give me 5 minutes and Ill code it for you. [doublepost=1464965475,1464965091][/doublepost]ok here goes. goto PlusStaticGameSettings.cs and add [CODE]public const int UserDiamondsUpdateAmount = 1;[/CODE] then goto habbo.cs & find public void CheckCreditsTimer() then change it to this. [CODE] public void CheckCreditsTimer() { try { this._creditsTickUpdate--; if (this._creditsTickUpdate <= 0) { int CreditUpdate = PlusStaticGameSettings.UserCreditsUpdateAmount; int DucketUpdate = PlusStaticGameSettings.UserPixelsUpdateAmount; int DiamondUpdate = PlusStaticGameSettings.UserDiamondsUpdateAmount; 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.SendMessage(new CreditBalanceComposer(this._credits)); this._client.SendMessage(new HabboActivityPointNotificationComposer(this._duckets, DucketUpdate)); this._client.SendMessage(new HabboActivityPointNotificationComposer(this.Diamonds, DiamondUpdate, 5)); this.CreditsUpdateTick = PlusStaticGameSettings.UserCreditsUpdateTimer; } } catch { } }[/CODE] Then goto SubscriptionData.cs and change it all to this. [CODE]using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Plus.HabboHotel.Subscriptions { public class SubscriptionData { public int Id { get; set; } public string Name { get; set; } public string Badge { get; set; } public int Credits { get; set; } public int Duckets { get; set; } public int Respects { get; set; } public int Diamonds { get; set; } public SubscriptionData(int Id, string Name, string Badge, int Credits, int Duckets, int Respects, int Diamonds) { this.Id = Id; this.Name = Name; this.Badge = Badge; this.Credits = Credits; this.Duckets = Duckets; this.Respects = Respects; this.Diamonds = Diamonds; } } } [/CODE] Then goto SubscriptionManager.cs and replace it all with this. [CODE]using log4net; using Plus.Database.Interfaces; using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Plus.HabboHotel.Subscriptions { public class SubscriptionManager { private static ILog log = LogManager.GetLogger("Plus.HabboHotel.Subscriptions.SubscriptionManager"); private readonly Dictionary<int, SubscriptionData> _subscriptions = new Dictionary<int, SubscriptionData>(); public SubscriptionManager() { } public void Init() { if (this._subscriptions.Count > 0) this._subscriptions.Clear(); using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.SetQuery("SELECT * FROM `subscriptions`;"); DataTable GetSubscriptions = dbClient.getTable(); if (GetSubscriptions != null) { foreach (DataRow Row in GetSubscriptions.Rows) { if (!this._subscriptions.ContainsKey(Convert.ToInt32(Row["id"]))) this._subscriptions.Add(Convert.ToInt32(Row["id"]), new SubscriptionData(Convert.ToInt32(Row["id"]), Convert.ToString(Row["name"]), Convert.ToString(Row["badge_code"]), Convert.ToInt32(Row["credits"]), Convert.ToInt32(Row["duckets"]), Convert.ToInt32(Row["respects"]), Convert.ToInt32(Row["diamonds"]))); } } } log.Info("Loaded " + this._subscriptions.Count + " subscriptions."); } public bool TryGetSubscriptionData(int Id, out SubscriptionData Data) { return this._subscriptions.TryGetValue(Id, out Data); } } } [/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
PlusEMU Diamond Timer
Top