Lua API
On this page

Trade

Inherits from

Fields:

IsOpen boolean

read only

Check if a trade is currently going on.

PartnerAccepted boolean

read only

Wether or not your partner has accepted the trade. This is the state of the green "Trade" button in acclient. Both parties must accept for the trade to be completed.

PartnerId number

read only

The id of your current trade partner

PartnerItemIds number[]

read only

The ids of the items on your partner's side of the trade window. (these are the items you will be recieving)

YouAccepted boolean

read only

Wether or not you have accepted the trade. This is the state of the green "Trade" button in acclient. Both parties must accept for the trade to be completed.

YourItemIds number[]

read only

The ids of the items on your side of the trade window. (these are the items you are trading away)

Events:

OnAccepted TradeAcceptedEventArgs

The trade has been accepted by someone. (trade is still ongoing, this just means someone clicked the "Trade" arrow and is willing to accept the current trade)

OnCompleted TradeCompletedEventArgs

The trade has been accepted by both parties and is now completed. The trade window remains open.

OnDeclined TradeDeclinedEventArgs

Trade has been declined by someone. (trade is still ongoing, this just means they unchecked the "Trade" arrow and are not willing to accept the current trade)

OnEnded TradeEndedEventArgs

The current trade has ended. (You no longer have a trade partner)

OnFailed TradeFailedEventArgs

The trade failed for some unknown reason. This clears the trade items from both sides, and declines the trade on both sides. The trade window remains open.

OnFailedToAddObject ObjectFailedToAddToTradeEventArgs

An object you tried to add to the trade window failed to be added.

OnObjectAdded ObjectAddedToTradeEventArgs

An object has been added to the trade window.

OnReset TradeResetEventArgs

Trade has been reset.

OnStarted TradeStartedEventArgs

A new trade has started

Methods:

GetPropertyKeys() : string[]

Returns a list of strings of all public property / field names. Useful for reflection on UserData in lua scripts

Returns:string[]

ToString() : string

Returns a string that represents the current object.

Returns:string