PlusEMU No Trade Quantity?

Feb 27, 2013
140
69
Hello,
I've been trying to solve a problem where users don't have trade quantity but I'm stuck and can't find anything about it online. I've also looked for a custom :trade command that would be similar to :buy where you enter the quantity but I couldn't find anything.
Here's a screenshot of what it looks like:
image.png

Here's a screenshot of what trade quantity looks like:
image.png


I was also told that there IS a fix except the person didn't remember how to do it :/
 

SOUL

┼ ┼ ┼
Nov 10, 2015
224
45
Do you mean post a screenshot of me typing :trade? I don't see any .cs files

You should have trade.cs if not
Code:
using System;
using System.Linq;
using System.Text;
using System.Collections.Generic;

using Plus.HabboHotel.GameClients;

namespace Plus.HabboHotel.Rooms.Chat.Commands.User
{
    class TradeCommand : IChatCommand
    {
        public string PermissionRequired
        {
            get { return "command_trade"; }
        }

        public string Parameters
        {
            get { return "%integer%"; }
        }

        public string Description
        {
            get { return "Set an amount of an item to trade"; }
        }

        public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
        {
            int Amount = 0;

            if (Int32.TryParse(Params[1], out Amount))
            {
                if (Amount > 20000 || Amount < 1)
                {
                    Session.SendWhisper("You must use a value above 0 and below 20000");
                    return;
                }

                Plus.HabboHotel.Rooms.Trading.Trade Trade = Session.GetHabbo().CurrentRoom.GetUserTrade(Session.GetHabbo().Id);

                if (Trade != null)
                {
                    Session.SendWhisper("TradeX set to " + Amount.ToString());
                    Session.GetHabbo().TradeAmount = Amount;
                }
                else
                { 
                    Session.SendWhisper("You are not currently in a trade!");
                }
            }
        }
    }
}
 

SOUL

┼ ┼ ┼
Nov 10, 2015
224
45
What path should this be put in? Also what else do I need to add? Do I need to add this to the database too as a permission_commands? etc?

Open up the project file then go to HabboHotel > Rooms > Chat > Commands > User
- Add a new class called TradeCommand.cs
- Go to commandmanager.cs and add this.Register("trade", new TradeCommand());
- Add in permission _commands command_trade
- Debug EMU
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,195
3,906
It's to do with the variables.

You need to add the following (or set it to true, I would throw this in the overrides though).

multi.item.trading.enabled=true
 

GuruGuru

Member
Dec 1, 2016
52
3
It's to do with the variables.

You need to add the following (or set it to true, I would throw this in the overrides though).

multi.item.trading.enabled=true
I've added the line, do I need to restart the EMU?
 
Open up the project file then go to HabboHotel > Rooms > Chat > Commands > User
- Add a new class called TradeCommand.cs
- Go to commandmanager.cs and add this.Register("trade", new TradeCommand());
- Add in permission _commands command_trade
- Debug EMU
When you say "Debug EMU" Do you mean just restart the server?
 

Queso

echo 'Web Developer';
Nov 29, 2016
233
72
Basically what Sledmore said, search for that in (swf/gamedata/override/external_override_variables.txt) if it's set to false, change it to true, and also make sure your client.php is using override variables, so you'd add, "external.override.variables.txt" : "{url}/swf/gamedata/override/external_override_variables.txt", under {external_vars}, also I usually add ?v=<?php echo time(); ?> to the end of any lines that are collecting from cached files, so that way, people won't have to clear their cache to see any updates. So, if you choose to do this, you'd use this instead, "external.override.variables.txt" : "{url}/swf/gamedata/override/external_override_variables.txt?v=<?php echo time(); ?>"
 

Users who are viewing this thread

Top