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

IsTrade

Check if trade window opened.

If char disconnected or not active trade - will return False.

Pascal

function IsTrade : Boolean;

Python

def IsTrade() -> boolean

Example Python

    if IsTrade():
        trader = GetTradeOpponent(0)
        FindType(0xFFFF, GetTradeContainer(0, 2))
        items = GetFoundList()
        
        ConfirmTrade(0)
        
        while IsObjectExists(GetTradeContainer(0, 2)):
            Wait(1)

        for item in items:
            item_type = GetType(item)
            item_name = getTooltip(item).split('|')[0]
#....