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 Releases
Server Releases
Wealth Report Command
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="Altercationz" data-source="post: 450032" data-attributes="member: 59038"><p>This is kind of like fresh's wealth command but I believe he fetches all the furniture names directly from a table so you can just refresh the table without restarting - which is what I would of done if I was actually using this.</p><p>Feel free to do that with this or whatever.</p><p></p><p>It kind of replaces the stats command, you can add whatever you want to it.</p><p>If fetches furniture or stats information on any user even if your rank 1.</p><p>I have a trusted system on my emulator, code something in so only users that are "trusted" can use it.</p><p>This is what it looks like:</p><p></p><p><img src="http://i65.tinypic.com/ncect4.jpg" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p></p><p>[CODE]</p><p>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>using Plus.Utilities;</p><p>using Plus.Database.Interfaces;</p><p>using Plus.HabboHotel.GameClients;</p><p>using Plus.Communication.Packets.Outgoing.Rooms.Chat;</p><p></p><p>namespace Plus.HabboHotel.Rooms.Chat.Commands.User.Fun</p><p>{</p><p> class WealthCommand : IChatCommand</p><p> {</p><p> public string PermissionRequired</p><p> {</p><p> get { return "command_wealth"; }</p><p></p><p> }</p><p> public string Parameters</p><p> {</p><p> get { return "%username%"; }</p><p></p><p> }</p><p> public string Description</p><p> {</p><p> get { return "Check an inventory."; }</p><p> }</p><p> public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)</p><p> {</p><p> if (Params.Length == 1)</p><p> {</p><p> Session.SendWhisper("Incorrect format! Usage: :wealth x");</p><p> return;</p><p> }</p><p> GameClient Target = PlusEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);</p><p> {</p><p> int Thrones;</p><p> int Dinos;</p><p></p><p> using (IQueryAdapter Adapter = PlusEnvironment.GetDatabaseManager().GetQueryReactor())</p><p> {</p><p> Adapter.SetQuery("SELECT COUNT(*) FROM items i JOIN furniture f ON (i.base_item = f.id) WHERE f.public_name = @item1 AND i.user_id = @userid");</p><p> Adapter.AddParameter("item1", "throne");</p><p> Adapter.AddParameter("userid", Target.GetHabbo().Id);</p><p> Thrones = Adapter.getInteger();</p><p> }</p><p></p><p> string text = "Wealth report for <b>" + Target.GetHabbo().Username + "</b>@ <b>Item Report</b>@ <b>Thrones:</b> " + Thrones + "@<b>Currency Report</b>@Credits: " + Target.GetHabbo().Credits + "@Duckets: " + Target.GetHabbo().Duckets + "";</p><p> text = text.Replace("@", "" + System.Environment.NewLine);</p><p></p><p> Session.SendNotification(text);</p><p> }</p><p> }</p><p> }</p><p>}</p><p>[/CODE]</p><p></p><p>Assuming someone doesn't know how to add this, don't forget to add it to permissions_commands and the CommandManager.cs</p><p></p><p>You can easily add more rares but i'll leave that up to whoever uses this.</p></blockquote><p></p>
[QUOTE="Altercationz, post: 450032, member: 59038"] This is kind of like fresh's wealth command but I believe he fetches all the furniture names directly from a table so you can just refresh the table without restarting - which is what I would of done if I was actually using this. Feel free to do that with this or whatever. It kind of replaces the stats command, you can add whatever you want to it. If fetches furniture or stats information on any user even if your rank 1. I have a trusted system on my emulator, code something in so only users that are "trusted" can use it. This is what it looks like: [IMG]http://i65.tinypic.com/ncect4.jpg[/IMG] [CODE] using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Plus.Utilities; using Plus.Database.Interfaces; using Plus.HabboHotel.GameClients; using Plus.Communication.Packets.Outgoing.Rooms.Chat; namespace Plus.HabboHotel.Rooms.Chat.Commands.User.Fun { class WealthCommand : IChatCommand { public string PermissionRequired { get { return "command_wealth"; } } public string Parameters { get { return "%username%"; } } public string Description { get { return "Check an inventory."; } } public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params) { if (Params.Length == 1) { Session.SendWhisper("Incorrect format! Usage: :wealth x"); return; } GameClient Target = PlusEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]); { int Thrones; int Dinos; using (IQueryAdapter Adapter = PlusEnvironment.GetDatabaseManager().GetQueryReactor()) { Adapter.SetQuery("SELECT COUNT(*) FROM items i JOIN furniture f ON (i.base_item = f.id) WHERE f.public_name = @item1 AND i.user_id = @userid"); Adapter.AddParameter("item1", "throne"); Adapter.AddParameter("userid", Target.GetHabbo().Id); Thrones = Adapter.getInteger(); } string text = "Wealth report for <b>" + Target.GetHabbo().Username + "</b>@ <b>Item Report</b>@ <b>Thrones:</b> " + Thrones + "@<b>Currency Report</b>@Credits: " + Target.GetHabbo().Credits + "@Duckets: " + Target.GetHabbo().Duckets + ""; text = text.Replace("@", "" + System.Environment.NewLine); Session.SendNotification(text); } } } } [/CODE] Assuming someone doesn't know how to add this, don't forget to add it to permissions_commands and the CommandManager.cs You can easily add more rares but i'll leave that up to whoever uses this. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Releases
Server Releases
Wealth Report Command
Top