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
Return
Void
Gumps.AddBackground(gd, x, y, width, height, gumpId)
Gumps.AddBackground(gd, x, y, width, height, gumpId)
Parameters
gdGumps.GumpData&@ xInt32 yInt32 widthInt32 heightInt32 gumpIdInt32
Return
Void
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
Return
Void
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
Return
Void
Gumps.AddGroup(gd, group)
Gumps.AddGroup(gd, group)
Parameters
gdGumps.GumpData&@ groupInt32
Return
Void
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
Return
Void
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
Return
Void
Gumps.AddImage(gd, x, y, gumpId, hue)
Gumps.AddImage(gd, x, y, gumpId, hue)
Parameters
gdGumps.GumpData&@ xInt32 yInt32 gumpIdInt32 hueInt32
Return
Void
Gumps.AddImageTiled(gd, x, y, width, height, gumpId)
Gumps.AddImageTiled(gd, x, y, width, height, gumpId)
Parameters
gdGumps.GumpData&@ xInt32 yInt32 widthInt32 heightInt32 gumpIdInt32
Return
Void
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
Return
Void
Gumps.AddItem(gd, x, y, itemID, hue)
Gumps.AddItem(gd, x, y, itemID, hue)
Parameters
gdGumps.GumpData&@ xInt32 yInt32 itemIDInt32 hueInt32
Return
Void
Gumps.AddLabel(gd, x, y, hue, text)
Gumps.AddLabel(gd, x, y, hue, text)
Parameters
gdGumps.GumpData&@ xInt32 yInt32 hueInt32 textString Int32
Return
Void
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
Return
Void
Gumps.AddPage(gd, page)
Gumps.AddPage(gd, page)
Parameters
gdGumps.GumpData&@ pageInt32
Return
Void
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
Return
Void
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
Return
Void
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
Return
Void
Gumps.AddTooltip(gd, cliloc, text)
Gumps.AddTooltip(gd, cliloc, text)
Parameters
gdGumps.GumpData&@ clilocString Int32 textString
Return
Void
Gumps.AllGumpIDs()
Gumps.AllGumpIDs()
Return
List[UInt32]
Gumps.CloseGump(gumpid)
Gumps.CloseGump(gumpid)
Close a specific Gump.
Parameters
gumpidUInt32
ID of the gump
Return
Void
Gumps.CreateGump(movable, closable, disposable, resizeable)
Gumps.CreateGump(movable, closable, disposable, resizeable)
Creates an initialized GumpData structure
Parameters
movableBoolean
allow the gump to be moved
closableBoolean
allow the gump to be right clicked to close
disposableBoolean
allow the gump to be disposed (beats me what it does)
resizeableBoolean
allow the gump to be resized
Return
Gumps.GumpData
Gumps.CurrentGump()
Gumps.CurrentGump()
Return the ID of most recent, still open Gump.
Return
UInt32
ID of gump.
Gumps.GetGumpData(gumpid)
Gumps.GetGumpData(gumpid)
Parameters
gumpidUInt32
Return
Gumps.GumpData
Gumps.GetGumpRawLayout(gumpid)
Gumps.GetGumpRawLayout(gumpid)
Get the Raw layout (definition) of a specific gumpid
Parameters
gumpidUInt32
Return
String
layout (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
Parameters
gumpidUInt32
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
gumpIdUInt32
gump id to get data from
line_numInt32
Number of the line.
Return
String
Text 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
gumpIdUInt32
gump 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
Return
String
Gumps.HasGump(gumpId)
Gumps.HasGump(gumpId)
Get status if have a gump open or not.
Parameters
gumpIdUInt32
Return
Boolean
True: There is a Gump open - False: otherwise.
Gumps.IsValid(gumpId)
Gumps.IsValid(gumpId)
Validates if the gumpid provided exists in the gump file
Parameters
gumpIdInt32
The id of the gump to check for in the gumps.mul file
Return
Boolean
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_numInt32
Number of the line.
Return
String
Text 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
String
layout (definition) of the gump.
Gumps.LastGumpTextExist(text)
Gumps.LastGumpTextExist(text)
Search for text inside the most recent and still open Gump.
Parameters
textString
Text to search.
Return
Boolean
True: 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_numInt32
Number of the line.
textString
Text to search.
Return
Boolean
Gumps.LastGumpTile()
Gumps.LastGumpTile()
Get the list of Gump Tile (! this documentation is a stub !)
Return
List[Int32]
List of Gump Tile.
Gumps.ResetGump()
Gumps.ResetGump()
Clean current status of Gumps.
Return
Void
Gumps.SendAction(gumpid, buttonid)
Gumps.SendAction(gumpid, buttonid)
Send a Gump response by gumpid and buttonid.
Parameters
gumpidUInt32
ID of the gump.
buttonidInt32
ID of the Button to press.
Return
Void
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
gumpidUInt32
ID of the gump.
buttonidInt32
ID 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] PythonList
List of the contents of the Text fields, provided in the same order as textlist_id.
Return
Void
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]
Return
Void
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
gumpidUInt32
ID of the gump. (0: any)
delayInt32
Maximum wait, in milliseconds.
Return
Boolean
True: wait found the gump - False: otherwise.