CUO

The CUO_Functions class contains invocation of CUO code using Harmony's AccessTools and Traverse instead of raw reflection.

Table of Contents

Methods

CloseGump

Syntax: CUO.CloseGump(serial)

Close a container gump by serial.

Parameters:
  • serial (UInt32)
Returns: Void

CloseMobileHealthBar

Syntax: CUO.CloseMobileHealthBar(mobileserial)

Close a mobile's health bar gump. Close a mobile's health bar gump.

Parameters:
  • mobileserial (Int32)
Returns: Void

CloseMyStatusBar

Syntax: CUO.CloseMyStatusBar()

Close the player's status bar gump.

Returns: Void

CloseTMap

Syntax: CUO.CloseTMap()

Closes a treasure map gump if open. Returns true if a map was closed.

Returns: Boolean

FollowMobile

Syntax: CUO.FollowMobile(mobileserial)

Make the ClassicUO client follow a specific mobile. Same as alt + left-clicking.

Parameters:
  • mobileserial (UInt32)
Returns: Void

FollowOff

Syntax: CUO.FollowOff()

Stop following the current mobile.

Returns: Void

Following

Syntax: CUO.Following()

Returns the status and target of the follow behavior.

Returns: ValueTuple[Boolean, UInt32]

FreeView

Syntax: CUO.FreeView(free)

Sets FreeView mode on the world map.

Parameters:
  • free (Boolean)
Returns: Void

GetSetting

Syntax: CUO.GetSetting(settingName)

Retrieve a current CUO setting by name.

Parameters:
  • settingName (String)
Returns: String

GoToMarker

Syntax: CUO.GoToMarker(x, y)

Invokes the GoToMarker function inside the CUO code. Map must be open for this to work.

Parameters:
  • x (Int32)
  • y (Int32)
Returns: Void

LoadMarkers

Syntax: CUO.LoadMarkers()

Invokes the LoadMarkers function inside the CUO code. Map must be open for this to work.

Returns: Void

MoveGump

Syntax: CUO.MoveGump(serial, x, y)

Move an open gump or container to a new position.

Parameters:
  • serial (UInt32)
  • x (Int32)
  • y (Int32)
Returns: Void

OpenContainerAt

Syntax: CUO.OpenContainerAt(bag, x, y)

Set a location that CUO will open the container at. Set a location that CUO will open the container at.

Parameters:
  • bag (Item)
  • x (Int32)
  • y (Int32)
Returns: Void

OpenMobileHealthBar

Syntax: CUO.OpenMobileHealthBar(mobileserial, x, y, custom)

Open a mobile's health bar at a position. Open a mobile's health bar at a position.

Parameters:
  • mobileserial (Int32)
  • x (Int32)
  • y (Int32)
  • custom (Boolean)
Returns: Void

OpenMyStatusBar

Syntax: CUO.OpenMyStatusBar(x, y)

Open the player's status bar gump at a position.

Parameters:
  • x (Int32)
  • y (Int32)
Returns: Void

PlayMacro

Syntax: CUO.PlayMacro(macroName)

Play a CUO macro by name.

Parameters:
  • macroName (String)
Returns: Void

ProfilePropertySet

Syntax: CUO.ProfilePropertySet(propertyName, value)

Set a bool property on the current CUO profile by name. Set an int property on the current CUO profile by name. Set a string property on the current CUO profile by name.

Parameters:
  • propertyName (String)
  • value (Boolean)
Returns: Void

SetAutoOpenDoors

Syntax: CUO.SetAutoOpenDoors(enabled)

Push the "auto open doors" and "open doors while pathfinding" settings to the ClassicUO profile. Fail-safe — no-ops if reflection is disabled or the properties don't exist (standard CUO lacks TazUO sub-options).

Parameters:
  • enabled (Boolean)
Returns: Void

SetGumpOpenLocation

Syntax: CUO.SetGumpOpenLocation(gumpserial, x, y)

Set a location that CUO will open the next gump or container at.

Parameters:
  • gumpserial (UInt32)
  • x (Int32)
  • y (Int32)
Returns: Void

TryGetGumpLocation

Syntax: CUO.TryGetGumpLocation(serverSerial)

Reads the current screen position of an open gump by its ServerSerial. Returns null if the gump isn't open or on OSI client.

Parameters:
  • serverSerial (UInt32)
Returns: Nullable[ValueTuple[Int32, Int32]]