Trading notifications (Plusemulator)

Unredable

Member
May 17, 2018
34
0
Hello.
I'm currently trying to fix trading notifications like when a user starts to trade with someone it says outloud [Username] has started a trade with [Targetusername]

This is my code:
using System;
using System.Linq;
using System.Text;
using System.Collections.Generic;

using Plus.HabboHotel.Rooms;
using Plus.HabboHotel.Rooms.Trading;

namespace Plus.Communication.Packets.Incoming.Inventory.Trading
{
class TradingAcceptEvent : IPacketEvent
{
public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
{
if (Session == null || Session.GetHabbo() == null || !Session.GetHabbo().InRoom)
return;

Room Room;

if (!PlusEnvironment.GetGame().GetRoomManager().TryGetRoom(Session.GetHabbo().CurrentRoomId, out Room))
Session.SendWhisper("Du har accepterat ditt byte.");
return;

if (!Room.CanTradeInRoom)
return;

Trade Trade = Room.GetUserTrade(Session.GetHabbo().Id);
if (Trade == null)
return;

Trade.Accept(Session.GetHabbo().Id);
}
}
}
 
Hello.
I'm currently trying to fix trading notifications like when a user starts to trade with someone it says outloud [Username] has started a trade with [Targetusername]

This is my code:
using System;
using System.Linq;
using System.Text;
using System.Collections.Generic;

using Plus.HabboHotel.Rooms;
using Plus.HabboHotel.Rooms.Trading;

namespace Plus.Communication.Packets.Incoming.Inventory.Trading
{
class TradingAcceptEvent : IPacketEvent
{
public void Parse(HabboHotel.GameClients.GameClient Session, ClientPacket Packet)
{
if (Session == null || Session.GetHabbo() == null || !Session.GetHabbo().InRoom)
return;

Room Room;

if (!PlusEnvironment.GetGame().GetRoomManager().TryGetRoom(Session.GetHabbo().CurrentRoomId, out Room))
Session.SendWhisper("Du har accepterat ditt byte.");
return;

if (!Room.CanTradeInRoom)
return;

Trade Trade = Room.GetUserTrade(Session.GetHabbo().Id);
if (Trade == null)
return;

Trade.Accept(Session.GetHabbo().Id);
}
}
}


What file should I be looking at to edit this in?
 

JayC

Always Learning
Aug 8, 2013
5,493
1,398
Thats trading accept which would be after the trade is confirmed. You need to find where the users trade is created / the dialog is opened
 

Users who are viewing this thread

Top