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
gd
Gumps.GumpData&@
x
Int32
y
Int32
width
Int32
height
Int32
Return
Void

Gumps
.
AddBackground
(
gd
,
x
,
y
,
width
,
height
,
gumpID
)
Gumps
.
AddBackground
(
gd
,
x
,
y
,
width
,
height
,
gumpID
)
Parameters
gd
Gumps.GumpData&@
x
Int32
y
Int32
width
Int32
height
Int32
gumpID
Int32
Return
Void

Gumps
.
AddButton
(
gd
,
x
,
y
,
normalID
,
pressedID
,
buttonID
,
type
,
param
)
Gumps
.
AddButton
(
gd
,
x
,
y
,
normalID
,
pressedID
,
buttonID
,
type
,
param
)
Parameters
gd
Gumps.GumpData&@
x
Int32
y
Int32
normalID
Int32
pressedID
Int32
buttonID
Int32
type
Int32
param
Int32
Return
Void

Gumps
.
AddCheck
(
gd
,
x
,
y
,
inactiveID
,
activeID
,
initialState
,
switchID
)
Gumps
.
AddCheck
(
gd
,
x
,
y
,
inactiveID
,
activeID
,
initialState
,
switchID
)
Parameters
gd
Gumps.GumpData&@
x
Int32
y
Int32
inactiveID
Int32
activeID
Int32
initialState
Boolean
switchID
Int32
Return
Void

Gumps
.
AddGroup
(
gd
,
group
)
Gumps
.
AddGroup
(
gd
,
group
)
Parameters
gd
Gumps.GumpData&@
group
Int32
Return
Void

Gumps
.
AddHtml
(
gd
,
x
,
y
,
width
,
height
,
text
,
background
,
scrollbar
)
Gumps
.
AddHtml
(
gd
,
x
,
y
,
width
,
height
,
text
,
background
,
scrollbar
)
Parameters
gd
Gumps.GumpData&@
x
Int32
y
Int32
width
Int32
height
Int32
text
Int32
String
background
Boolean
scrollbar
Boolean
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
gd
Gumps.GumpData&@
x
Int32
y
Int32
width
Int32
height
Int32
number
Int32
args
Int32
String
Boolean
color
Int32
Boolean
background
Boolean
scrollbar
Boolean
Return
Void

Gumps
.
AddImage
(
gd
,
x
,
y
,
gumpID
,
hue
)
Gumps
.
AddImage
(
gd
,
x
,
y
,
gumpID
,
hue
)
Parameters
gd
Gumps.GumpData&@
x
Int32
y
Int32
gumpID
Int32
hue
Int32
Return
Void

Gumps
.
AddImageTiled
(
gd
,
x
,
y
,
width
,
height
,
gumpID
)
Gumps
.
AddImageTiled
(
gd
,
x
,
y
,
width
,
height
,
gumpID
)
Parameters
gd
Gumps.GumpData&@
x
Int32
y
Int32
width
Int32
height
Int32
gumpID
Int32
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
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
Return
Void

Gumps
.
AddItem
(
gd
,
x
,
y
,
itemID
,
hue
)
Gumps
.
AddItem
(
gd
,
x
,
y
,
itemID
,
hue
)
Parameters
gd
Gumps.GumpData&@
x
Int32
y
Int32
itemID
Int32
hue
Int32
Return
Void

Gumps
.
AddLabel
(
gd
,
x
,
y
,
hue
,
text
)
Gumps
.
AddLabel
(
gd
,
x
,
y
,
hue
,
text
)
Parameters
gd
Gumps.GumpData&@
x
Int32
y
Int32
hue
Int32
text
Int32
String
Return
Void

Gumps
.
AddLabelCropped
(
gd
,
x
,
y
,
width
,
height
,
hue
,
text
)
Gumps
.
AddLabelCropped
(
gd
,
x
,
y
,
width
,
height
,
hue
,
text
)
Parameters
gd
Gumps.GumpData&@
x
Int32
y
Int32
width
Int32
height
Int32
hue
Int32
text
Int32
String
Return
Void

Gumps
.
AddPage
(
gd
,
page
)
Gumps
.
AddPage
(
gd
,
page
)
Parameters
gd
Gumps.GumpData&@
page
Int32
Return
Void

Gumps
.
AddRadio
(
gd
,
x
,
y
,
inactiveID
,
activeID
,
initialState
,
switchID
)
Gumps
.
AddRadio
(
gd
,
x
,
y
,
inactiveID
,
activeID
,
initialState
,
switchID
)
Parameters
gd
Gumps.GumpData&@
x
Int32
y
Int32
inactiveID
Int32
activeID
Int32
initialState
Boolean
switchID
Int32
Return
Void

Gumps
.
AddSpriteImage
(
gd
,
x
,
y
,
gumpID
,
width
,
height
,
sx
,
sy
)
Gumps
.
AddSpriteImage
(
gd
,
x
,
y
,
gumpID
,
width
,
height
,
sx
,
sy
)
Parameters
gd
Gumps.GumpData&@
x
Int32
y
Int32
gumpID
Int32
width
Int32
height
Int32
sx
Int32
sy
Int32
Return
Void

Gumps
.
AddTextEntry
(
gd
,
x
,
y
,
width
,
height
,
hue
,
entryID
,
initialText
)
Gumps
.
AddTextEntry
(
gd
,
x
,
y
,
width
,
height
,
hue
,
entryID
,
initialText
)
Parameters
gd
Gumps.GumpData&@
x
Int32
y
Int32
width
Int32
height
Int32
hue
Int32
entryID
Int32
initialText
Int32
String
Return
Void

Gumps
.
AddTooltip
(
gd
,
number
)
Gumps
.
AddTooltip
(
gd
,
number
)
Parameters
gd
Gumps.GumpData&@
number
Int32
String
Return
Void

Gumps
.
CloseGump
(
gumpid
)
Gumps
.
CloseGump
(
gumpid
)
Close a specific Gump.
Parameters
gumpid
UInt32
ID of the gump
Return
Void

Gumps
.
CreateGump
(
movable
,
closable
,
disposable
,
resizeable
)
Gumps
.
CreateGump
(
movable
,
closable
,
disposable
,
resizeable
)
Creates an initialized GumpData structure
Parameters
movable
Boolean
allow the gump to be moved
closable
Boolean
allow the gump to be right clicked to close
disposable
Boolean
allow the gump to be disposed (beats me what it does)
resizeable
Boolean
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
gumpid
UInt32
Return
Gumps.GumpData

Gumps
.
HasGump
()
Gumps
.
HasGump
()
Get status if have a gump open or not.
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
gumpId
Int32
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.
Parameters
line_num
Int32
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
.
LastGumpRawData
()
Gumps
.
LastGumpRawData
()
Get the Raw Data of the most recent and still open Gump.
Return
String
Raw Data of the gump.
Gumps
.
LastGumpRawText
()
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
text
String
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_num
Int32
Number of the line.
text
String
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
gumpid
UInt32
ID of the gump.
buttonid
Int32
ID of the Button to press.
Return
Void

Gumps
.
SendAdvancedAction
(
gumpid
,
buttonid
,
switchlist_id
,
textlist_id
,
textlist_str
)
Gumps
.
SendAdvancedAction
(
gumpid
,
buttonid
,
switchlist_id
,
textlist_id
,
textlist_str
)
Parameters
gumpid
UInt32
buttonid
Int32
switchlist_id
List[Int32]
textlist_id
List[Int32]
List[String]
textlist_str
List[String]
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
gumpid
Gumps.GumpData
UInt32
serial
UInt32
x
UInt32
y
UInt32
gumpDefinition
String
gumpStrings
List[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
gumpid
UInt32
ID of the gump. (0: any)
delay
Int32
Maximum wait, in milliseconds.
Return
Boolean
True: wait found the gump - False: otherwise.