====== Scripting - CUO Specific Functions ====== Here can find some information about Scripting functions that work with CUO ===== Map Related ===== {|style="font-size:85%; border:solid 2px; width: 50%;" |style="font-size:150%; padding: 2px" colspan="2" | **Load Map Markers** |- style="background-color:#f0f0f0;" |**Syntax** |style="width: 90%" | CUO.LoadMarkers() |- |colspan="2" |**Description:** |- |colspan="2" | Calls the LoadMarkers function on the CUO world map. The map must be open for this to work. use in your code like: # CUO.LoadMarkers() # |- style="background-color:#f0f0f0;" |**Returns** |nothing |- |**In Object:** |CUO |- style="background-color:#f0f0f0;" |**Parameters:** |} {|style="font-size:85%; border:solid 2px; width: 50%;" |style="font-size:150%; padding: 2px" colspan="2" | **Go to Map Marker** |- style="background-color:#f0f0f0;" |**Syntax** |style="width: 90%" | CUO.GoToMarker(x, y) |- |colspan="2" |**Description:** |- |colspan="2" | Executes the GoToMarker function on the CUO world map passing the x and y you provided. The map must be open for this to work. use in your code like: # CUO.GoToMarker(100, 200) # |- style="background-color:#f0f0f0;" |**Returns** |nothing |- |**In Object:** |CUO |- style="background-color:#f0f0f0;" |**Parameters:** |} {|style="font-size:85%; border:solid 2px; width: 50%;" |style="font-size:150%; padding: 2px" colspan="2" | **FreeView for CUO Map** |- style="background-color:#f0f0f0;" |**Syntax** |style="width: 90%" | CUO.FreeView(bool) |- |colspan="2" |**Description:** |- |colspan="2" | Executes the FreeView function on the CUO world map passing the bool you provided. The map must be open for this to work. use in your code like: # CUO.FreeView(True) # |- style="background-color:#f0f0f0;" |**Returns** |nothing |- |**In Object:** |CUO |- style="background-color:#f0f0f0;" |**Parameters:** |} {|style="font-size:85%; border:solid 2px; width: 50%;" |style="font-size:150%; padding: 2px" colspan="2" | **Close Treasure Map** |- style="background-color:#f0f0f0;" |**Syntax** |style="width: 90%" | CUO.CloseTMap() |- |colspan="2" |**Description:** |- |colspan="2" | Finds the first Treasure Map gump on your screen and closes it. If a Treasure Map gump was found returns True, otherwise returns False. use in your code like: # CUO.CloseTMap() # |- style="background-color:#f0f0f0;" |**Returns** |True if a Treasure map was closed, otherwise False |- |**In Object:** |CUO |- style="background-color:#f0f0f0;" |**Parameters:** |} ===== CUO Profile Option Changes ===== {|style="font-size:85%; border:solid 2px; width: 50%;" |style="font-size:150%; padding: 2px" colspan="2" | **Sets an option in the CUO Profile** |- style="background-color:#f0f0f0;" |**Syntax** |style="width: 90%" | CUO.ProfilePropertySet(string propertyName, bool enable) |- |colspan="2" |**Description:** |- |colspan="2" | This was just an experiment to see if I could automate the changing of CUO properties. use in your code like: # CUO.ProfilePropertySet("fps", "80") # |- style="background-color:#f0f0f0;" |**Returns** |Nothing |- |**In Object:** |CUO |- style="background-color:#f0f0f0;" |**Parameters:** |} ===== CUO Container Gump Functions ===== {|style="font-size:85%; border:solid 2px; width: 50%;" |style="font-size:150%; padding: 2px" colspan="2" | **Opens a Container at a specific location** |- style="background-color:#f0f0f0;" |**Syntax** |style="width: 90%" | CUO.OpenContainerAt(Item bag, int x, int y) |- |colspan="2" |**Description:** |- |colspan="2" | Opens the specified container with the gump at the x, y provided. If already open nothing is done. use in your code like: # CUO.ProfilePropertySet("fps", "80") # |- style="background-color:#f0f0f0;" |**Returns** |Nothing |- |**In Object:** |CUO |- style="background-color:#f0f0f0;" |**Parameters:** |} {|style="font-size:85%; border:solid 2px; width: 50%;" |style="font-size:150%; padding: 2px" colspan="2" | **Sets the location the specified gump will open at** |- style="background-color:#f0f0f0;" |**Syntax** |style="width: 90%" | CUO.SetGumpOpenLocation(uint gumpserial, int x, int y) |- |colspan="2" |**Description:** |- |colspan="2" | Changes the location the gump will open at use in your code like: # CUO.SetGumpOpenLocation(0x456789, 100, 200) # |- style="background-color:#f0f0f0;" |**Returns** |Nothing |- |**In Object:** |CUO |- style="background-color:#f0f0f0;" |**Parameters:** | gumpserial - the Serial id of the container | x - x coordinate on screen | y - y coordinate on screen |} {|style="font-size:85%; border:solid 2px; width: 50%;" |style="font-size:150%; padding: 2px" colspan="2" | **Moves a gump to a specified location** |- style="background-color:#f0f0f0;" |**Syntax** |style="width: 90%" | CUO.MoveGump(uint serial, int x, int y) |- |colspan="2" |**Description:** |- |colspan="2" | Moves a gump on the screen.. Note: I dont think this is working. use in your code like: # CUO.MoveGump(0x456789, 100, 200) # |- style="background-color:#f0f0f0;" |**Returns** |Nothing |- |**In Object:** |CUO |- style="background-color:#f0f0f0;" |**Parameters:** | serial - the Serial id of the container | x - x coordinate on screen | y - y coordinate on screen |} ===== Player Status Gump Functions ===== {|style="font-size:85%; border:solid 2px; width: 50%;" |style="font-size:150%; padding: 2px" colspan="2" | **Show the player status bar at a specific location** |- style="background-color:#f0f0f0;" |**Syntax** |style="width: 90%" | CUO.OpenMyStatusBar(int x, int y) |- |colspan="2" |**Description:** |- |colspan="2" | Opens the player status bar at the specified location. use in your code like: # CUO.OpenMyStatusBar(100, 200) # |- style="background-color:#f0f0f0;" |**Returns** |Nothing |- |**In Object:** |CUO |- style="background-color:#f0f0f0;" |**Parameters:** | x - x coordinate on screen | y - y coordinate on screen |} {|style="font-size:85%; border:solid 2px; width: 50%;" |style="font-size:150%; padding: 2px" colspan="2" | **Remove the player status bar** |- style="background-color:#f0f0f0;" |**Syntax** |style="width: 90%" | CUO.CloseMyStatusBar() |- |colspan="2" |**Description:** |- |colspan="2" | Closes the player status bar. use in your code like: # CUO.CloseMyStatusBar() # |- style="background-color:#f0f0f0;" |**Returns** |Nothing |- |**In Object:** |CUO |- style="background-color:#f0f0f0;" |**Parameters:** |} {|style="font-size:85%; border:solid 2px; width: 50%;" |style="font-size:150%; padding: 2px" colspan="2" | **Open the health bar of a mobile at a specified screen location** |- style="background-color:#f0f0f0;" |**Syntax** |style="width: 90%" | CUO.OpenMobileHealthBar(uint mobileserial, int x, int y, bool custom) |- |colspan="2" |**Description:** |- |colspan="2" | Opens a health bar for a mobile and places the gump at the specified location. use in your code like: # CUO.OpenMobileHealthBar(0x345678, 100, 200, False) # |- style="background-color:#f0f0f0;" |**Returns** |Nothing |- |**In Object:** |CUO |- style="background-color:#f0f0f0;" |**Parameters:** | uint mobileserial | int x | int y | bool custom - True - the CUO square "minimalist" gump vs False - the standard UO gump |} {|style="font-size:85%; border:solid 2px; width: 50%;" |style="font-size:150%; padding: 2px" colspan="2" | **Close the health bar of a mobile** |- style="background-color:#f0f0f0;" |**Syntax** |style="width: 90%" | CUO.CloseMobileHealthBar(uint mobileserial) |- |colspan="2" |**Description:** |- |colspan="2" | Closes a health bar for a mobile. use in your code like: # CUO.CloseMobileHealthBar(0x345678) # |- style="background-color:#f0f0f0;" |**Returns** |Nothing |- |**In Object:** |CUO |- style="background-color:#f0f0f0;" |**Parameters:** | uint mobileserial |} ===== CUO Macro Function ===== {|style="font-size:85%; border:solid 2px; width: 50%;" |style="font-size:150%; padding: 2px" colspan="2" | **Play a CUO macro by name** |- style="background-color:#f0f0f0;" |**Syntax** |style="width: 90%" | CUO.PlayMacro(string macroName) |- |colspan="2" |**Description:** |- |colspan="2" | WARNING Limited Testing: Attempts to play a CUO macro given its name. use in your code like: # CUO.PlayMacro("MyMacro") # |- style="background-color:#f0f0f0;" |**Returns** |Nothing |- |**In Object:** |CUO |- style="background-color:#f0f0f0;" |**Parameters:** | string macroName |}