exevent GumpReply
exevent GumpReply {gump} {button} [switches] [id:text ...]- Sets
#GumpReply,#GumpReplyRes,#GumpReplyCnt- uo.dll
GumpReply
Also searchable as: exevent GumpReply · gump reply · answer gump · click gump button · gump button · server gump
exevent GumpReply answers a gump the server sent (a menu, a confirmation, a quest window), as if you
had clicked one of its buttons. It sends the server the same answer the client sends for a click, with
the checkboxes and text fields you give it, and closes the window in the client.
#GumpReplyRes says whether it went out, and
#GumpReply keeps the answer, so the same line can send it again later.
Parameters
Section titled “Parameters”| Parameter | Meaning |
|---|---|
gump |
Which gump: its #GumpTypeID, such as JHEIIPI, for the gump of that type in front; or a number, a position in the last ScanGumps list, such as #GumpIndex. |
button |
The number of the button. 0 means “close”, which every gump accepts. |
switches |
Optional. The IDs of the checkboxes and radio buttons that are on, joined with /: 3/7. - for none. |
id:text |
Optional, one per text field: its ID, a colon, and the text. Write a space as _, a real _ as \_ and a \ as \\. A text is cut at 239 characters, as the client cuts it. |
The button numbers and IDs come from the shard: each gump has its own. The easiest way to find them: click the
button once by hand and read #GumpReply, which records the click (see below). It shows
the button, and the checkboxes and text fields the window sent with it.
Results
Section titled “Results”#GumpReplyRes |
Meaning |
|---|---|
sent |
The answer went out. #GumpReply holds it. |
nogump |
No such gump is open: nothing was sent. |
error |
The words are wrong, or this client build can’t answer gumps: nothing was sent. |
sent means the server got the answer. Whether it did what you wanted, the game tells: the journal, an
item, a new gump.
Examples
Section titled “Examples”Confirm with OKAY (button 1) the confirmation gump of type JHEIIPI, if it is open:
exevent GumpReply JHEIIPI 1if #GumpReplyRes = nogump event sysmessage The confirmation is not open.haltTick checkboxes 3 and 7, type a name into text field 5, and press button 2:
set %menu YISCGQI ; the gump's #GumpTypeID on your shardexevent GumpReply %menu 2 3/7 5:Iron_GolemhaltClose every server gump that is open:
scangumpsfor %i 1 #GumpCnt{ set #GumpIndex %i if #GumpName = generic_gump exevent GumpReply %i 0}haltSend the last answer again, when the same gump opens next time:
set %answer #GumpReplyrepeat scangumps T_ , %answer wait 5until #GumpCnt > 0exevent GumpReply %answerhaltThe last example works because the first word of #GumpReply is the type ID, so scangumps T_ , %answer
looks for that type, and exevent GumpReply %answer sends the whole answer.
- The serial is taken from the gump open now. Each time the server opens a gump it gives it a new
serial, and it ignores an answer with any other serial, without a word. That is why the command finds the
gump in the client every time and never reuses an old serial: an answer kept in
#GumpReplyworks on the next copy of the same gump. - An answer to a gump that is not open does nothing, on the server as in the command (
nogump). - The client’s window closes, as it does after a click. Only for the client’s own gumps with type IDs
from
$2410to$2462(AUNtoGSN) it stays open, because the client keeps some of those open after some buttons. - A button the gump doesn’t have is up to the shard. ModernUO ignores it on most gumps and keeps waiting for an answer, which does no harm; its newer gumps pass it to the gump, and a confirmation then takes it as “not OK”, like Cancel. The client’s window is closed either way.
- Clicks by hand are recorded too. The first
exevent GumpReply, or the first time a script reads#GumpReplyCnt, puts a small hook into the client that records every gump answer it sends:#GumpReplyCntgoes up and#GumpReplyholds the answer. The hook stays until the client closes and changes nothing the client does. On a client build where it can’t be put in safely, only this command’s answers are recorded. - It needs the client’s event hook, as every
exeventdoes.
Reforged notes
Section titled “Reforged notes”exevent GumpReply, #GumpReply and #GumpReplyRes are new in EasyUO Reforged. Old EasyUO skips the
line. No other exevent changes.
It works where #GumpTypeID can be read: client 7.0.29.97 and newer except 7.0.30
to 7.0.46, and the relocatable client_beta.exe. Elsewhere it gives error and sends nothing.