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
colorInt32
Boolean
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, width, height, sx, sy)
Gumps.AddSpriteImage(gd, x, y, gumpID, width, height, sx, sy)
Parameters
gdGumps.GumpData&@
xInt32
yInt32
gumpIDInt32
widthInt32
heightInt32
sxInt32
syInt32
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, number)
Gumps.AddTooltip(gd, number)
Parameters
gdGumps.GumpData&@
numberString
Int32
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.GetGumpRawData(gumpid)
Gumps.GetGumpRawData(gumpid)
Get the Raw Data of a specific gumpid
Return
StringRaw Data of the gump.
Gumps.GetGumpRawText(gumpid)
Gumps.GetGumpRawText(gumpid)
Get the Raw Text of a specific Gump.
Return
List[String]List of Raw Text.
Gumps.GetLine(gumpID, line_num)
Gumps.GetLine(gumpID, line_num)
Get a specific line from the most gumpID if it exists. Filter by line number.
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)
Gumps.GetLineList(gumpID)
Get all text from the specified Gump if still open
Parameters
gumpIDUInt32gump id to get data from
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.
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.LastGumpRawData()
Get the Raw Data of the most recent and still open Gump.
Return
StringRaw Data of the gump.
Gumps.LastGumpRawText()
Get the Raw Text of the most recent and still open Gump.
Return
List[String]List of Raw Text.
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, switchlist_id, textlist_id, textlist_str)
Gumps.SendAdvancedAction(gumpid, buttonid, switchlist_id, textlist_id, textlist_str)
Parameters
gumpidUInt32
buttonidInt32
switchlist_idList[Int32]
textlist_idList[String]
List[Int32]
textlist_strList[String]
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.