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

ClientGumpResponsePresent

Returns True if the client has answered the gump with this Serial, shown by SendGumpToClient. The answer itself is read with ClientGumpResponse.

Once present, the answer stays until the character state is reset (disconnect), so the method keeps returning True after the answer was read.

Возвращает True, если клиент ответил на гамп с этим Serial, показанный через SendGumpToClient. Сам ответ читается через ClientGumpResponse.

Пришедший ответ хранится до сброса состояния персонажа (дисконнекта), поэтому метод продолжает возвращать True и после того, как ответ прочитан.

Pascal

function ClientGumpResponsePresent(Serial: Cardinal): Boolean;

Python

def ClientGumpResponsePresent(Serial: int) -> bool: ...

Pascal Example

var
  Serial: Cardinal;
  G: TGumpInfo;
begin
  // ... fill G ...
  Serial := SendGumpToClient(G);
  while not ClientGumpResponsePresent(Serial) do
  begin
    // do other work while the menu is open
    Wait(500);
  end;
  AddToSystemJournal('Button: ' + IntToStr(ClientGumpResponse(Serial).ButtonID));
end.

Python Example

serial = SendGumpToClient(g)
while not ClientGumpResponsePresent(serial):
    # do other work while the menu is open
    Wait(500)
AddToSystemJournal(f'Button: {ClientGumpResponse(serial).ButtonID}')

See Also

SendGumpToClient, ClientGumpResponse, WaitForClientGumpResponse