Misc
The Misc class contains general purpose functions of common use.
TODO: Misc Constructors
Methods
Misc
.
Beep
()
Misc
.
Beep
()
Play Beep system sound.
Return
Void

Misc
.
CancelPrompt
()
Misc
.
CancelPrompt
()
Cancel a prompt request.
Return
Void

Misc
.
CaptureNow
()
Misc
.
CaptureNow
()
Creates a snapshot of the current UO window.
Return
Void

Misc
.
CheckIgnoreObject
(
serial
)
Misc
.
CheckIgnoreObject
(
serial
)
Check object from ignore list, return true if present. Can check Serial, Items or Mobiles
Parameters
serial
Int32
Mobile
Item
Mobile to check Item to check Serial to check.
Return
Boolean
True: Object is ignored - False: otherwise.
Misc
.
CheckSharedValue
(
name
)
Misc
.
CheckSharedValue
(
name
)
Check if a shared value exixts.
Parameters
name
String
Name of the value.
Return
Boolean
True: Shared value exists - False: otherwise.
Misc
.
ClearDragQueue
()
Misc
.
ClearDragQueue
()
Clear the Drag-n-Drop queue.
Return
Void

Misc
.
ClearIgnore
()
Misc
.
ClearIgnore
()
Clear ignore list from all object
Return
Void

Misc
.
CloseBackpack
()
Misc
.
CloseBackpack
()
Close the backpack. (OSI client only, no ClassicUO)
Return
Void

Misc
.
CloseMenu
()
Misc
.
CloseMenu
()
Close opened Old Menu.
Return
Void

Misc
.
ConfigDirectory
()
Misc
.
ConfigDirectory
()
Get the full path to the Config Directory.
Return
String
Full path to the Scripts Directory.
Misc
.
ContextReply
(
serial
,
respone_num
)
Misc
.
ContextReply
(
serial
,
respone_num
)
Respond to a context menu on mobile or item. Menu ID is base zero, or can use string of menu text.
Parameters
serial
Int32
Mobile
Item
Serial of the Entity serial number of the item to get a context menu from
respone_num
Int32
String
Name of the Entry as wirtten in-game. Poition of the option in the menu. Starts from 0.
Return
Void

Misc
.
DataDirectory
()
Misc
.
DataDirectory
()
Get the full path to the Config Directory.
Return
String
Full path to the Config Directory.
Misc
.
Disconnect
()
Misc
.
Disconnect
()
Force client to disconnect.
Return
Void

Misc
.
DistanceSqrt
(
point_a
,
point_b
)
Misc
.
DistanceSqrt
(
point_a
,
point_b
)
Compute the distance between 2 Point3D using pitagora's.
Parameters
point_a
Point3D
First coordinates.
point_b
Point3D
Second coordinates.
Return
Double

Misc
.
ExportPythonAPI
(
path
,
pretty
)
Misc
.
ExportPythonAPI
(
path
,
pretty
)
Return a string containing list RE Python API list in JSON format.
Parameters
path
String
Name of the output file. (default: Config/AutoComplete.json )
pretty
Boolean
Print a readable JSON. (default: True )
Return
Void

Misc
.
FilterSeason
(
enable
,
seasonFlag
)
Misc
.
FilterSeason
(
enable
,
seasonFlag
)
Enable or disable the Seasons filter forcing a specific season Season filter state will be saved on logout but not the season flag that will be recovered.
Parameters
enable
Boolean
True: enable seasons filter
seasonFlag
UInt32
0: Spring (default fallback) 1: Summer 2: Fall 3: Winter 4: Desolation
Return
Void

Misc
.
FocusUOWindow
()
Misc
.
FocusUOWindow
()
Set UoClient window in focus or restore if minimized.
Return
Void

Misc
.
GetContPosition
()
Misc
.
GetContPosition
()
Get the position of the currently active Gump/Container. (OSI client only, no ClassicUO)
Return
Point
Return X,Y coordinates as a Point2D
Misc
.
GetMapInfo
(
serial
)
Misc
.
GetMapInfo
(
serial
)
Get MapInfo about a Mobile or Item using the serial
Parameters
serial
UInt32
Serial of the object.
Return
Misc.MapInfo
A MapInfo object.
Misc
.
GetMenuTitle
()
Misc
.
GetMenuTitle
()
Get the title of title for open Old Menu.
Return
String
Text of the title.
Misc
.
GetWindowSize
()
Misc
.
GetWindowSize
()
Get a Rectangle representing the window size. See also: https://docs.microsoft.com/dotnet/api/system.drawing.rectangle
Return
Rectangle
Rectangle object. Properties: X, Y, Width, Height.
Misc
.
HasMenu
()
Misc
.
HasMenu
()
Check if an Old Menu is open.
Return
Boolean
True: is open - False: otherwise
Misc
.
HasPrompt
()
Misc
.
HasPrompt
()
Check if have a prompt request.
Return
Boolean
True: there is a prompt - False: otherwise
Misc
.
HasQueryString
()
Misc
.
HasQueryString
()
Check if a have a query string menu opened, return true or false.
Return
Boolean
True: Has quesy - False: otherwise.
Misc
.
IgnoreObject
(
serial
)
Misc
.
IgnoreObject
(
serial
)
Add an entiry to the ignore list. Can ignore Serial, Items or Mobiles.
Parameters
serial
Int32
Mobile
Item
Item to ignore Serial to ignore. Mobile to ignore
Return
Void

Misc
.
Inspect
()
Misc
.
Inspect
()
Prompt the user with a Target. Open the inspector for the selected target.
Return
Void

Misc
.
LastHotKey
()
Misc
.
LastHotKey
()
Returns the latest HotKey recorded by razor as HotKeyEvent object.
Return
HotKeyEvent

Misc
.
LeftMouseClick
(
xpos
,
ypos
,
clientCoords
)
Misc
.
LeftMouseClick
(
xpos
,
ypos
,
clientCoords
)
Perform a phisical left click on the window using Windows API. Is possible to use abolute Screen Coordinates by setting clientCoords=False.
Parameters
xpos
Int32
X click coordinate.
ypos
Int32
Y click coordinate.
clientCoords
Boolean
True: Client coordinates.- False:Screen coordinates (default: True, client).
Return
Void

Misc
.
MenuContain
(
text
)
Misc
.
MenuContain
(
text
)
Search in open Old Menu if contains a specific text.
Parameters
text
String
Text to search.
Return
Boolean
True: Text found - False: otherwise.
Misc
.
MenuResponse
(
text
)
Misc
.
MenuResponse
(
text
)
Perform a menu response by subitem name. If item not exist close menu.
Parameters
text
String
Name of subitem to respond.
Return
Void

Misc
.
MouseLocation
()
Misc
.
MouseLocation
()
Returns a point with the X and Y coordinates of the mouse relative to the UO Window
Return
Point
Return X,Y coords as Point object.
Misc
.
MouseMove
(
posX
,
posY
)
Misc
.
MouseMove
(
posX
,
posY
)
Moves the mouse pointer to the position X,Y relative to the UO window
Parameters
posX
Int32
X screen coordinate.
posY
Int32
Y screen coordinate.
Return
Void

Misc
.
NextContPosition
(
x
,
y
)
Misc
.
NextContPosition
(
x
,
y
)
Return the X,Y of the next container, relative to the game window. (OSI client only, no ClassicUO)
Parameters
x
Int32
X coordinate.
y
Int32
Y coordinate.
Return
Void

Misc
.
NoOperation
()
Misc
.
NoOperation
()
Just do nothing and enjot the present moment.
Return
Void

Misc
.
NoRunStealthStatus
()
Misc
.
NoRunStealthStatus
()
Get the status of "No Run When Stealth" via scripting.
Return
Boolean
True: Open is active - False: otherwise.
Misc
.
NoRunStealthToggle
(
enable
)
Misc
.
NoRunStealthToggle
(
enable
)
Set "No Run When Stealth" via scripting. Changes via scripting are not persistents.
Parameters
enable
Boolean
True: enable the option.
Return
Void

Misc
.
OpenPaperdoll
()
Misc
.
OpenPaperdoll
()
Open the backpack. (OSI client only, no ClassicUO)
Return
Void

Misc
.
Pause
(
millisec
)
Misc
.
Pause
(
millisec
)
Pause the script for a given amount of time.
Parameters
millisec
Int32
Pause duration, in milliseconds.
Return
Void

Misc
.
PetRename
(
serial
,
name
)
Misc
.
PetRename
(
serial
,
name
)
Rename a specific pet.
Parameters
serial
Int32
Mobile
Serial of the pet. Mobile object representing the pet.
name
String
New name to set. name to assign to the pet
Return
Void

Misc
.
QueryStringResponse
(
okcancel
,
response
)
Misc
.
QueryStringResponse
(
okcancel
,
response
)
Perform a query string response by ok or cancel button and specific response string.
Parameters
okcancel
Boolean
OK Button
response
String
Cancel Button
Return
Void

Misc
.
RazorDirectory
()
Misc
.
RazorDirectory
()
Get the full path to the main Razor Enhanced folder. This path maybe be different from the Python starting folder when RE is loaded as plugin (ex: ClassicUO)
Return
String
Path as text
Misc
.
ReadSharedValue
(
name
)
Misc
.
ReadSharedValue
(
name
)
Get a Shared Value, if value not exist return null. Shared values are accessible by every script.
Parameters
name
String
Name of the value.
Return
Object
The stored object.
Misc
.
RemoveSharedValue
(
name
)
Misc
.
RemoveSharedValue
(
name
)
Remove a Shared Value.
Parameters
name
String
Name of the value.
Return
Void

Misc
.
ResetPrompt
()
Misc
.
ResetPrompt
()
Reset a prompt response.
Return
Void

Misc
.
ResponsePrompt
(
text
)
Misc
.
ResponsePrompt
(
text
)
Response a prompt request. Often used to rename runes and similar.
Parameters
text
String
Text of the response.
Return
Void

Misc
.
Resync
()
Misc
.
Resync
()
Trigger a client ReSync.
Return
Void

Misc
.
RightMouseClick
(
xpos
,
ypos
,
clientCoords
)
Misc
.
RightMouseClick
(
xpos
,
ypos
,
clientCoords
)
Perform a phisical Right click on the window.
Parameters
xpos
Int32
X click coordinate.
ypos
Int32
Y click coordinate.
clientCoords
Boolean
True: Client coordinates - False: Screen coordinates (default: True, client).
Return
Void

Misc
.
ScriptDirectory
()
Misc
.
ScriptDirectory
()
Get the full path to the Scripts Directory.
Return
String
Full path to the Scripts Directory.
Misc
.
ScriptRun
(
scriptfile
)
Misc
.
ScriptRun
(
scriptfile
)
Run a script by file name, Script must be present in script grid.
Parameters
scriptfile
String
Name of the script.
Return
Void

Misc
.
ScriptStatus
(
scriptfile
)
Misc
.
ScriptStatus
(
scriptfile
)
Get status of script if running or not, Script must be present in script grid.
Parameters
scriptfile
String
Return
Boolean
True: Script is running - False: otherwise.
Misc
.
ScriptStop
(
scriptfile
)
Misc
.
ScriptStop
(
scriptfile
)
Stop a script by file name, Script must be present in script grid.
Parameters
scriptfile
String
Name of the script.
Return
Void

Misc
.
ScriptStopAll
()
Misc
.
ScriptStopAll
()
Stop all script running.
Return
Void

Misc
.
SendMessage
(
msg
,
color
,
wait
)
Misc
.
SendMessage
(
msg
,
color
,
wait
)
Send a message to the client.
Parameters
msg
Object
Int32
String
Boolean
Double
Single
UInt32
The object to print.
color
Int32
Boolean
Color of the message.
wait
Boolean
True: Wait for confimation. - False: Returns instatnly.
Return
Void

Misc
.
SendToClient
(
keys
)
Misc
.
SendToClient
(
keys
)
Send to the client a list of keystrokes. Can contain control characters: - Send Control+Key: ctrl+u: ^u - Send ENTER: {Enter} Note: some keys don't work with ClassicUO (es: {Enter} )
Parameters
keys
String
List of keys.
Return
Void

Misc
.
SetSharedValue
(
name
,
value
)
Misc
.
SetSharedValue
(
name
,
value
)
Set a Shared Value by specific name, if value exist he repalce value. Shared values are accessible by every script.
Parameters
name
String
Name of the value.
value
Object
Value to set.
Return
Void

Misc
.
ShardName
()
Misc
.
ShardName
()
Get the name of the shard.
Return
String
Name of the shard
Misc
.
UnIgnoreObject
(
serial
)
Misc
.
UnIgnoreObject
(
serial
)
Remove object from ignore list. Can remove serial, items or mobiles
Parameters
serial
Int32
Mobile
Item
Item to unignore Serial to unignore. Item to unignore.
Return
Void

Misc
.
UseContextMenu
(
serial
,
choice
,
delay
)
Misc
.
UseContextMenu
(
serial
,
choice
,
delay
)
Open and click the option of Context menu, given the serial of Mobile or Item, via packets.
Parameters
serial
Int32
Serial of the Item or Mobile.
choice
String
Option as Text or integer.
delay
Int32
Maximum wait for the action to complete.
Return
Boolean
True: Optiona selected succesfully - False: otherwise.
Misc
.
WaitForContext
(
serial
,
delay
,
showContext
)
Misc
.
WaitForContext
(
serial
,
delay
,
showContext
)
Return the List entry of a Context menu, of Mobile or Item objects. The function will ask the server for the List and wait for a maximum amount of time.
Parameters
serial
Int32
Mobile
Item
Entity as Item object. Serial of the entity.
delay
Int32
Maximum wait. max time to wait for context
showContext
Boolean
Show context menu in-game. (default: True)
Return
List[Misc.Context]
A List of Context objects.
Misc
.
WaitForMenu
(
delay
)
Misc
.
WaitForMenu
(
delay
)
Pause script until server send an Old Menu, for a maximum amount of time.
Parameters
delay
Int32
Maximum wait, in milliseconds.
Return
Boolean
True: if the Old Menu is open - False: otherwise.
Misc
.
WaitForPrompt
(
delay
)
Misc
.
WaitForPrompt
(
delay
)
Wait for a prompt for a maximum amount of time.
Parameters
delay
Int32
Maximum wait time.
Return
Boolean
True: Prompt is present - False: otherwise
Misc
.
WaitForQueryString
(
delay
)
Misc
.
WaitForQueryString
(
delay
)
Pause script until server send query string request, for a maximum amount of time.
Parameters
delay
Int32
Maximum wait, in milliseconds.
Return
Boolean
True: if player has a query - False: otherwise.