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

TradeCheck

Returns the check (acceptance) status of a participant in a secure trade window.

TradeNum — index of the trade window (use TradeCount to get the number of active trades).

Num — which participant to check: 1 = self (your side), 2 = opponent’s side. Value 0 or values above 2 are invalid and return False.

Returns True if the specified participant has checked (accepted) the trade, False otherwise or on error.

Does nothing and returns False if the character is not connected.

Возвращает состояние «галочки» (принятия) участника окна безопасной торговли.

TradeNum — индекс окна торговли (используйте TradeCount для получения числа активных торговых окон).

Num — какого участника проверять: 1 = свой (ваша сторона), 2 = сторона оппонента. Значение 0 или больше 2 — невалидны, возвращается False.

Возвращает True, если указанный участник отметил (принял) торговлю, False — в противном случае или при ошибке.

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

Pascal

function TradeCheck(TradeNum: Byte; Num: Byte): Boolean;

Python

def TradeCheck(TradeNum: int, Num: int) -> bool: ...

Pascal Example

begin
  if TradeCount > 0 then
  begin
    if TradeCheck(0, 1) then
      AddToSystemJournal('You have accepted the trade')
    else
      AddToSystemJournal('You have NOT accepted');

    if TradeCheck(0, 2) then
      AddToSystemJournal('Opponent has accepted')
    else
      AddToSystemJournal('Opponent has NOT accepted');
  end;
end.

Python Example

if TradeCount() > 0:
    if TradeCheck(0, 1):
        AddToSystemJournal('You have accepted the trade')
    else:
        AddToSystemJournal('You have NOT accepted')

    if TradeCheck(0, 2):
        AddToSystemJournal('Opponent has accepted')
    else:
        AddToSystemJournal('Opponent has NOT accepted')

See Also

TradeCount, IsTrade, ConfirmTrade, CancelTrade