Altercationz
:)
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:
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.
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:
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);
}
}
}
}
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.
Last edited: