From Stealth Client

Jump to: navigation, search


NumGumpButton

function NumGumpButton(GumpIndex, Value:Integer):Boolean

It does not work as a trap for Gump, but only for processing has come Gump.

The principle of operation is the same as that of the Doc:Api/WaitGump, with the only difference that there is no exhaustive search of all gumps in the list, and only the buttons are moving Gump, the index is specified in the GumpIndex

If this button is not found - the server did not sent, and the function returns False.

Button No (Value param) - it's value of "return_value" property of GumpButton. Can be easy obtained from any GetXXXGumpLines or GetGumpInfo methods.

Example:

{Kraft piece of script. 
First, put a trap on target for Ingots on the floor, 
then use to call tinkerools Gump,
then the replacement value TextEntry Gump, 
then press the button Gump.}
  WaitTargetGround($ 1BF5); 
  a:= GetGumpsCount; 
  UseObject(FindType($ 1EB9, backpack));
  while a = GetGumpsCount do
    Wait(50);
  NumGumpTextEntry(GetGumpsCount-1, 513, '30 ');
  NumGumpButton(GetGumpsCount-1, 7956);