Home API Manuals About Forum
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

GetTradeOpponent

Returns the serial (ID) of the opponent in the specified secure trade window.

TradeNum — index of the active trade window (1-based, as returned by TradeCount).

Returns 0 if the trade window does not exist or the character is disconnected.

Возвращает серийный номер (ID) оппонента в указанном окне безопасного обмена.

TradeNum — индекс активного окна обмена (начиная с 1, как возвращает TradeCount).

Возвращает 0, если окно обмена не существует или персонаж не подключён.

Pascal

function GetTradeOpponent(TradeNum: Byte): Cardinal;

Python

def GetTradeOpponent(TradeNum: int) -> int: ...

Pascal Example

begin
  if TradeCount > 0 then
    AddToSystemJournal('Trade opponent ID: $' + IntToHex(GetTradeOpponent(1), 8));
end.

Python Example

if TradeCount() > 0:
    AddToSystemJournal(f'Trade opponent ID: ${GetTradeOpponent(1):08X}')

See Also

GetTradeOpponentName, GetTradeContainer, TradeCount, ConfirmTrade, CancelTrade