Gumps
The Gumps class is used to read and interact with in-game gumps, via scripting. NOTE ---- During development of scripts that involves interacting with Gumps, is often needed to know gumpids and buttonids. For this purpose, can be particularly useful to use *Inspect Gumps* and *Record*, top right, in the internal RE script editor.
Table of Contents
Methods
AddAlphaRegion
Gumps.AddAlphaRegion(gd, x, y, width, height)gd(Gumps.GumpData&@)x(Int32)y(Int32)width(Int32)height(Int32)
VoidAddBackground
Gumps.AddBackground(gd, x, y, width, height, gumpId)gd(Gumps.GumpData&@)x(Int32)y(Int32)width(Int32)height(Int32)gumpId(Int32)
VoidAddButton
Gumps.AddButton(gd, x, y, normalID, pressedID, buttonID, type, param)gd(Gumps.GumpData&@)x(Int32)y(Int32)normalID(Int32)pressedID(Int32)buttonID(Int32)type(Int32)param(Int32)
VoidAddCheck
Gumps.AddCheck(gd, x, y, inactiveID, activeID, initialState, switchID)gd(Gumps.GumpData&@)x(Int32)y(Int32)inactiveID(Int32)activeID(Int32)initialState(Boolean)switchID(Int32)
VoidAddGroup
Gumps.AddGroup(gd, group)gd(Gumps.GumpData&@)group(Int32)
VoidAddHtml
Gumps.AddHtml(gd, x, y, width, height, text, background, scrollbar)gd(Gumps.GumpData&@)x(Int32)y(Int32)width(Int32)height(Int32)text(String)background(Boolean)scrollbar(Boolean)
VoidAddHtmlLocalized
Gumps.AddHtmlLocalized(gd, x, y, width, height, number, args, color, background, scrollbar)gd(Gumps.GumpData&@)x(Int32)y(Int32)width(Int32)height(Int32)number(Int32)args(String)color(Int32)background(Boolean)scrollbar(Boolean)
VoidAddImage
Gumps.AddImage(gd, x, y, gumpId, hue)gd(Gumps.GumpData&@)x(Int32)y(Int32)gumpId(Int32)hue(Int32)
VoidAddImageTiled
Gumps.AddImageTiled(gd, x, y, width, height, gumpId)gd(Gumps.GumpData&@)x(Int32)y(Int32)width(Int32)height(Int32)gumpId(Int32)
VoidAddImageTiledButton
Gumps.AddImageTiledButton(gd, x, y, normalID, pressedID, buttonID, type, param, itemID, hue, width, height, localizedTooltip)gd(Gumps.GumpData&@)x(Int32)y(Int32)normalID(Int32)pressedID(Int32)buttonID(Int32)type(Gumps.GumpButtonType)param(Int32)itemID(Int32)hue(Int32)width(Int32)height(Int32)localizedTooltip(Int32)
VoidAddItem
Gumps.AddItem(gd, x, y, itemID, hue)gd(Gumps.GumpData&@)x(Int32)y(Int32)itemID(Int32)hue(Int32)
VoidAddLabel
Gumps.AddLabel(gd, x, y, hue, text)gd(Gumps.GumpData&@)x(Int32)y(Int32)hue(Int32)text(String)
VoidAddLabelCropped
Gumps.AddLabelCropped(gd, x, y, width, height, hue, text)gd(Gumps.GumpData&@)x(Int32)y(Int32)width(Int32)height(Int32)hue(Int32)text(String)
VoidAddPage
Gumps.AddPage(gd, page)gd(Gumps.GumpData&@)page(Int32)
VoidAddRadio
Gumps.AddRadio(gd, x, y, inactiveID, activeID, initialState, switchID)gd(Gumps.GumpData&@)x(Int32)y(Int32)inactiveID(Int32)activeID(Int32)initialState(Boolean)switchID(Int32)
VoidAddSpriteImage
Gumps.AddSpriteImage(gd, x, y, gumpId, spriteX, spriteY, spriteW, spriteH)gd(Gumps.GumpData&@)x(Int32)y(Int32)gumpId(Int32)spriteX(Int32)spriteY(Int32)spriteW(Int32)spriteH(Int32)
VoidAddTextEntry
Gumps.AddTextEntry(gd, x, y, width, height, hue, entryID, initialText)gd(Gumps.GumpData&@)x(Int32)y(Int32)width(Int32)height(Int32)hue(Int32)entryID(Int32)initialText(String)
VoidAddTooltip
Gumps.AddTooltip(gd, cliloc, text)gd(Gumps.GumpData&@)cliloc(Int32)text(String)
VoidAllGumpIDs
Gumps.AllGumpIDs()List[UInt32]CloseGump
Gumps.CloseGump(gumpid)Close a specific Gump.
gumpid(UInt32): ID of the gump
VoidCreateGump
Gumps.CreateGump(movable, closable, disposable, resizeable)Creates an initialized GumpData structure
movable(Boolean): allow the gump to be movedclosable(Boolean): allow the gump to be right clicked to closedisposable(Boolean): allow the gump to be disposed (beats me what it does)resizeable(Boolean): allow the gump to be resized
Gumps.GumpDataCurrentGump
Gumps.CurrentGump()Return the ID of most recent, still open Gump.
UInt32GetGumpData
Gumps.GetGumpData(gumpid)gumpid(UInt32)
Gumps.GumpDataGetGumpRawLayout
Gumps.GetGumpRawLayout(gumpid)Get the Raw layout (definition) of a specific gumpid
gumpid(UInt32)
StringGetGumpText
Gumps.GetGumpText(gumpid)Get the Text of a specific Gump. It is the cliloc translation of the #s in the gump
gumpid(UInt32)
List[String]GetLine
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
gumpId(UInt32): gump id to get data fromline_num(Int32): Number of the line.
StringGetLineList
Gumps.GetLineList(gumpId, dataOnly)Get all text from the specified Gump if still open
gumpId(UInt32): gump id to get data fromdataOnly(Boolean)
List[String]GetTextByID
Gumps.GetTextByID(gd, id)gd(Gumps.GumpData)id(Int32)
StringHasGump
Gumps.HasGump(gumpId)Get status if have a gump open or not.
gumpId(UInt32)
BooleanIsValid
Gumps.IsValid(gumpId)Validates if the gumpid provided exists in the gump file
gumpId(Int32): The id of the gump to check for in the gumps.mul file
BooleanLastGumpGetLine
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
line_num(Int32): Number of the line.
StringLastGumpGetLineList
Gumps.LastGumpGetLineList()Get all text from the most recent and still open Gump.
List[String]LastGumpRawLayout
Gumps.LastGumpRawLayout()Get the raw layout (definition) of the most recent and still open Gump.
StringLastGumpTextExist
Gumps.LastGumpTextExist(text)Search for text inside the most recent and still open Gump.
text(String): Text to search.
BooleanLastGumpTextExistByLine
Gumps.LastGumpTextExistByLine(line_num, text)Search for text, in a spacific line of the most recent and still open Gump.
line_num(Int32): Number of the line.text(String): Text to search.
BooleanLastGumpTile
Gumps.LastGumpTile()Get the list of Gump Tile (! this documentation is a stub !)
List[Int32]ResetGump
Gumps.ResetGump()Clean current status of Gumps.
VoidSendAction
Gumps.SendAction(gumpid, buttonid)Send a Gump response by gumpid and buttonid.
gumpid(UInt32): ID of the gump.buttonid(Int32): ID of the Button to press.
VoidSendAdvancedAction
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.
gumpid(UInt32)buttonid(Int32)inSwitches(List[Int32])textlist_id(List[Int32])textlist_str(List[String])
VoidSendGump
Gumps.SendGump(gumpid, serial, x, y, gumpDefinition, gumpStrings)Sends a gump using an existing GumpData structure
gumpid(UInt32)serial(UInt32)x(UInt32)y(UInt32)gumpDefinition(String)gumpStrings(List[String])
VoidWaitForGump
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.
gumpid(UInt32): ID of the gump. (0: any)delay(Int32): Maximum wait, in milliseconds.
Boolean