Gumps
The Gumps class is used to read and interact with in-game gumps, via scripting.
NOTE
----
During development of scripts that involves interecting with Gumps, is often needed to know gumpids and buttonids.
For this purpose, can be particularly usefull to use *Inspect Gumps* and *Record*, top right, in the internal RE script editor.
TODO: Gumps Constructors
Methods
Gumps.AddAlphaRegion(gd, x, y, width, height)
Gumps.AddAlphaRegion(gd, x, y, width, height)
Parameters
gdGumps.GumpData&@
xInt32
yInt32
widthInt32
heightInt32
Gumps.AddBackground(gd, x, y, width, height, gumpId)
Gumps.AddBackground(gd, x, y, width, height, gumpId)
Parameters
gdGumps.GumpData&@
xInt32
yInt32
widthInt32
heightInt32
gumpIdInt32
Gumps.AddButton(gd, x, y, normalID, pressedID, buttonID, type, param)
Gumps.AddButton(gd, x, y, normalID, pressedID, buttonID, type, param)
Parameters
gdGumps.GumpData&@
xInt32
yInt32
normalIDInt32
pressedIDInt32
buttonIDInt32
typeInt32
paramInt32
Gumps.AddCheck(gd, x, y, inactiveID, activeID, initialState, switchID)
Gumps.AddCheck(gd, x, y, inactiveID, activeID, initialState, switchID)
Parameters
gdGumps.GumpData&@
xInt32
yInt32
inactiveIDInt32
activeIDInt32
initialStateBoolean
switchIDInt32
Gumps.AddGroup(gd, group)
Gumps.AddGroup(gd, group)
Parameters
gdGumps.GumpData&@
groupInt32
Gumps.AddHtml(gd, x, y, width, height, text, background, scrollbar)
Gumps.AddHtml(gd, x, y, width, height, text, background, scrollbar)
Parameters
gdGumps.GumpData&@
xInt32
yInt32
widthInt32
heightInt32
textString
Int32
backgroundBoolean
scrollbarBoolean
Gumps.AddHtmlLocalized(gd, x, y, width, height, number, args, color, background, scrollbar)
Gumps.AddHtmlLocalized(gd, x, y, width, height, number, args, color, background, scrollbar)
Parameters
gdGumps.GumpData&@
xInt32
yInt32
widthInt32
heightInt32
numberInt32
argsString
Int32
Boolean
colorBoolean
Int32
backgroundBoolean
scrollbarBoolean
Gumps.AddImage(gd, x, y, gumpId, hue)
Gumps.AddImage(gd, x, y, gumpId, hue)
Parameters
gdGumps.GumpData&@
xInt32
yInt32
gumpIdInt32
hueInt32
Gumps.AddImageTiled(gd, x, y, width, height, gumpId)
Gumps.AddImageTiled(gd, x, y, width, height, gumpId)
Parameters
gdGumps.GumpData&@
xInt32
yInt32
widthInt32
heightInt32
gumpIdInt32
Gumps.AddImageTiledButton(gd, x, y, normalID, pressedID, buttonID, type, param, itemID, hue, width, height, localizedTooltip)
Gumps.AddImageTiledButton(gd, x, y, normalID, pressedID, buttonID, type, param, itemID, hue, width, height, localizedTooltip)
Parameters
gdGumps.GumpData&@
xInt32
yInt32
normalIDInt32
pressedIDInt32
buttonIDInt32
typeGumps.GumpButtonType
paramInt32
itemIDInt32
hueInt32
widthInt32
heightInt32
localizedTooltipInt32
Gumps.AddItem(gd, x, y, itemID, hue)
Gumps.AddItem(gd, x, y, itemID, hue)
Parameters
gdGumps.GumpData&@
xInt32
yInt32
itemIDInt32
hueInt32
Gumps.AddLabel(gd, x, y, hue, text)
Gumps.AddLabel(gd, x, y, hue, text)
Parameters
gdGumps.GumpData&@
xInt32
yInt32
hueInt32
textString
Int32
Gumps.AddLabelCropped(gd, x, y, width, height, hue, text)
Gumps.AddLabelCropped(gd, x, y, width, height, hue, text)
Parameters
gdGumps.GumpData&@
xInt32
yInt32
widthInt32
heightInt32
hueInt32
textString
Int32
Gumps.AddPage(gd, page)
Parameters
gdGumps.GumpData&@
pageInt32
Gumps.AddRadio(gd, x, y, inactiveID, activeID, initialState, switchID)
Gumps.AddRadio(gd, x, y, inactiveID, activeID, initialState, switchID)
Parameters
gdGumps.GumpData&@
xInt32
yInt32
inactiveIDInt32
activeIDInt32
initialStateBoolean
switchIDInt32
Gumps.AddSpriteImage(gd, x, y, gumpId, spriteX, spriteY, spriteW, spriteH)
Gumps.AddSpriteImage(gd, x, y, gumpId, spriteX, spriteY, spriteW, spriteH)
Parameters
gdGumps.GumpData&@
xInt32
yInt32
gumpIdInt32
spriteXInt32
spriteYInt32
spriteWInt32
spriteHInt32
Gumps.AddTextEntry(gd, x, y, width, height, hue, entryID, initialText)
Gumps.AddTextEntry(gd, x, y, width, height, hue, entryID, initialText)
Parameters
gdGumps.GumpData&@
xInt32
yInt32
widthInt32
heightInt32
hueInt32
entryIDInt32
initialTextString
Int32
Gumps.AddTooltip(gd, cliloc, text)
Gumps.AddTooltip(gd, cliloc, text)
Parameters
gdGumps.GumpData&@
clilocString
Int32
textString
Gumps.CloseGump(gumpid)
Close a specific Gump.
Parameters
gumpidUInt32ID of the gump
Gumps.CreateGump(movable, closable, disposable, resizeable)
Gumps.CreateGump(movable, closable, disposable, resizeable)
Creates an initialized GumpData structure
Parameters
movableBooleanallow the gump to be moved
closableBooleanallow the gump to be right clicked to close
disposableBooleanallow the gump to be disposed (beats me what it does)
resizeableBooleanallow the gump to be resized
Gumps.CurrentGump()
Return the ID of most recent, still open Gump.
Gumps.GetGumpData(gumpid)
Gumps.GetGumpData(gumpid)
Gumps.GetGumpRawLayout(gumpid)
Gumps.GetGumpRawLayout(gumpid)
Get the Raw layout (definition) of a specific gumpid
Return
Stringlayout (definition) of the gump.
Gumps.GetGumpText(gumpid)
Gumps.GetGumpText(gumpid)
Get the Text of a specific Gump.
It is the cliloc translation of the #s in the gump
Return
List[String]List of Text in the gump
Gumps.GetLine(gumpId, line_num)
Gumps.GetLine(gumpId, line_num)
Get a specific DATA line from the gumpId if it exists. Filter by line number.
The textual strings are not considered
Parameters
gumpIdUInt32gump id to get data from
line_numInt32Number of the line.
Return
StringText content of the line. (empty: line not found)
Gumps.GetLineList(gumpId, dataOnly)
Gumps.GetLineList(gumpId, dataOnly)
Get all text from the specified Gump if still open
Parameters
gumpIdUInt32gump id to get data from
dataOnlyBoolean
Return
List[String]Text of the gump.
Gumps.GetTextByID(gd, id)
Gumps.GetTextByID(gd, id)
Parameters
gdGumps.GumpData
idInt32
Gumps.HasGump(gumpId)
Get status if have a gump open or not.
Return
BooleanTrue: There is a Gump open - False: otherwise.
Gumps.IsValid(gumpId)
Validates if the gumpid provided exists in the gump file
Parameters
gumpIdInt32The id of the gump to check for in the gumps.mul file
Gumps.LastGumpGetLine(line_num)
Gumps.LastGumpGetLine(line_num)
Get a specific line from the most recent and still open Gump. Filter by line number.
The text constants on the gump ARE included in indexing
Parameters
line_numInt32Number of the line.
Return
StringText content of the line. (empty: line not found)
Gumps.LastGumpGetLineList()
Gumps.LastGumpGetLineList()
Get all text from the most recent and still open Gump.
Return
List[String]Text of the gump.
Gumps.LastGumpRawLayout()
Gumps.LastGumpRawLayout()
Get the raw layout (definition) of the most recent and still open Gump.
Return
Stringlayout (definition) of the gump.
Gumps.LastGumpTextExist(text)
Gumps.LastGumpTextExist(text)
Search for text inside the most recent and still open Gump.
Parameters
textStringText to search.
Return
BooleanTrue: Text found in active Gump - False: otherwise
Gumps.LastGumpTextExistByLine(line_num, text)
Gumps.LastGumpTextExistByLine(line_num, text)
Search for text, in a spacific line of the most recent and still open Gump.
Parameters
line_numInt32Number of the line.
textStringText to search.
Gumps.LastGumpTile()
Get the list of Gump Tile (! this documentation is a stub !)
Return
List[Int32]List of Gump Tile.
Gumps.ResetGump()
Clean current status of Gumps.
Gumps.SendAction(gumpid, buttonid)
Gumps.SendAction(gumpid, buttonid)
Send a Gump response by gumpid and buttonid.
Parameters
gumpidUInt32ID of the gump.
buttonidInt32ID of the Button to press.
Gumps.SendAdvancedAction(gumpid, buttonid, inSwitches, textlist_id, textlist_str)
Gumps.SendAdvancedAction(gumpid, buttonid, inSwitches, textlist_id, textlist_str)
Send a Gump response, with gumpid and buttonid and advanced switch in gumps.
This function is intended for more complex Gumps, with not only Buttons, but also Switches, CheckBoxes and Text fileds.
This method can also be used only Text fileds, without Switches.
This method can also be used only Switches, without Text fileds.
Parameters
gumpidUInt32ID of the gump.
buttonidInt32ID of the Button.
inSwitchesPythonList
List[Int32]List of ID of ON/Active switches. (empty: all Switches OFF)
textlist_idList[String]
PythonList
List[Int32]List of ID of Text fileds. (empty: all text fileds empty )
textlist_strList[String]
PythonListList of the contents of the Text fields, provided in the same order as textlist_id.
Gumps.SendGump(gumpid, serial, x, y, gumpDefinition, gumpStrings)
Gumps.SendGump(gumpid, serial, x, y, gumpDefinition, gumpStrings)
Sends a gump using an existing GumpData structure
Parameters
gumpidUInt32
Gumps.GumpData
serialUInt32
xUInt32
yUInt32
gumpDefinitionString
gumpStringsList[String]
Gumps.WaitForGump(gumpid, delay)
Gumps.WaitForGump(gumpid, delay)
Waits for a specific Gump to appear, for a maximum amount of time. If gumpid is 0 it will match any Gump.
Parameters
gumpidUInt32ID of the gump. (0: any)
delayInt32Maximum wait, in milliseconds.
Return
BooleanTrue: wait found the gump - False: otherwise.