Overview
‘The Junk Drawer of UtilityBelt’ -Cosmic Jester
Commands
/ub
Prints current build version to chat
Examples:
/ub
- Prints current build version to chat
/ub help [command]
Prints help for UB command line usage
Examples:
/ub help
- Prints out all available UB commands/ub help printcolors
- Prints out help and usage information for the printcolors command
/ub opt {list | get <option> | set <option> <newValue> | toggle <options>}
Manage plugin settings from the command line
Examples:
/ub opt list
- Lists all available settings./ub opt get Plugin.Debug
- Gets the current value for the “Plugin.Debug” setting/ub opt toggle Plugin.Debug
- Toggles the current value for the “Plugin.Debug” setting/ub opt set Plugin.Debug true
- Sets the “Plugin.Debug” setting to True
/ub date[utc] [format]
Prints current date with an optional format. See https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings for formatting options.
Examples:
/ub date hh:mm:ss tt
- Prints current local time ‘06:09:01 PM’/ub dateutc dddd dd MMMM
- Prints current utc date ‘Friday 29 August’
/ub delay <millisecondDelay> <command>
Thinks to yourself with your current vitae percentage
Examples:
/ub delay 5000 /say hello
- Runs “/say hello” after a 3000ms delay (3 seconds)
/ub closestportal
Uses the closest portal.
Examples:
/ub closestportal
- Uses the closest portal
/ub portal[p] <portalName>
Portal commands, with build in VTank pausing.
Examples:
/ub portal Gateway
- Uses portal with exact name “Gateway”/ub portalp Portal
- Uses portal with name partially matching “Portal”
/ub follow[p] <name>
Follow player commands
Examples:
/ub follow Zero Cool
- Sets a VTank nav route to follow “Zero Cool”/ub followp Zero
- Sets a VTank nav route to follow a character with a name partially matching “Zero”
/ub mexec <expression>
Evaluates a meta expression
Examples:
/ub mexec <expression>
- Evaluates expression
/ub pos
Prints position information for the currently selected object
/ub printcolors
Prints out all available chat colors
Examples:
/ub printcolors
- Prints out all available chat colors
/ub propertydump
Prints information for the currently selected object
/ub playsound [volume] <filepath>
Play a sound from the client
Examples:
/ub playsound 100 C:\test.wav
- Plays absolute path to music file at 100% volume/ub playsound 50 test.wav
- Plays test.wav from the UB plugin storage directory at 50% volume
/ub vitae
Thinks to yourself with your current vitae percentage
/ub swearallegiance[p][ <name|id|selected>]
Swear Allegiance
Examples:
/ub swearallegiance Yonneh
- Swear Allegiance toYonneh
/ub swearallegiancep Yo
- Swear Allegiance to a character with a name partially matchingYo
./ub swearallegiance
- Swear Allegiance to the closest character/ub swearallegiance selected
- Swear Allegiance to the selected character
/ub breakallegiance[p][ <name|id|selected>]
Break Allegiance (TODO: scan Allegiance Heirarchy, instead of visible)
Examples:
/ub breakallegiance Yonneh
- Break your Allegiance toYonneh
(noooooooooooo)/ub breakallegiancep Yo
- Break Allegiance from a character with a name partially matchingYo
./ub breakallegiance
- Break Allegiance from the closest character/ub breakallegiance selected
- Break Allegiance from the selected character
Settings
Plugin.CheckForUpdates
Default Value: True
Check for plugin updates on login
Plugin.Debug
Default Value: False
Show debug messages
Plugin.SettingsProfile
Default Value: [character]
Settings profile. Choose [character] to use a private copy of settings for this character.
Plugin.WindowPositionX
Default Value: 100
Main UB Window X position for this character (left is 0)
Plugin.WindowPositionY
Default Value: 100
Main UB Window Y position for this character (top is 0)
Plugin.SettingsWindowPositionX
Default Value: 140
Settings Window X position for this character (left is 0)
Plugin.SettingsWindowPositionY
Default Value: 140
Settings Window Y position for this character (top is 0)
Plugin.PortalThink
Default Value: False
Think to yourself when portal use success/fail
Plugin.PortalTimeout
Default Value: 5000
Timeout to retry portal use, in milliseconds
Plugin.PortalAttempts
Default Value: 3
Attempts to retry using a portal
Plugin.VideoPatch
Default Value: False
Patches the client (in realtime) to disable 3d rendering
Plugin.VideoPatchFocus
Default Value: False
Disables VideoPatch while the client has focus
Plugin.BackgroundFrameLimit
Default Value: 0
Limits frame while the client does not have focus
Plugin.PCap
Default Value: False
Enables a rolling PCAP buffer, to export recent packets
Plugin.PCapBufferDepth
Default Value: 5000
PCap rolling buffer depth
Expression Methods
vitae[]
Gets your character’s current vitae percentage as a number
Returns: number - Returns a number
Examples:
vitae[]
- returns your current vitae % as a number
getworldname[]
Gets the name of the currently connected world/server
Returns: string - Returns the name of the current world/server
Examples:
getworldname[]
- Returns the name of the current world/server
wobjectfindnearestbytemplatetype[number templatetype]
Attempted to find the nearest landscape world object with the specified template type
Parameters:
- Param #0: templatetype (number) - templatetype to filter by
Returns: WorldObject - Returns a worldobject
Examples:
wobjectfindnearestbytemplatetype[42137]
- Returns a worldobject with templaye type 42137 (level 10 ice tachi warden)
wobjectgetintprop[WorldObject obj, number property]
Returns an int property from a specific world object, or 0 if it’s undefined
Parameters:
- Param #0: obj (WorldObject) - World object to get intproperty of
- Param #1: property (number) - IntProperty to return
Returns: number - Returns an int property value
Examples:
wobjectgetintprop[wobjectgetselection[],218103808]
- Returns the template type of the currently selected object
getheadingto[WorldObject obj]
Calculates the heading in degrees (0-360 clockwise, 0 is north) from your player to the target object
Parameters:
- Param #0: obj (WorldObject) - World object to calculate heading towards
Returns: number - Returns the heading in degrees from your player to the target object
Examples:
getheadingto[wobjectgetselection[]]
- Returns the heading in degrees from your player to the target object
getheading[WorldObject obj]
Returns the heading in degrees (0-360 clockwise, 0 is north) the target object is facing
Parameters:
- Param #0: obj (WorldObject) - World object to get the heading of
Returns: number - Returns the heading in degrees that the target object is facing
Examples:
getheading[wobjectgetselection[]]
- Returns the heading in degrees that your current selection is facing
acos[number d]
Returns the angle whos cosine is the specified number
Parameters:
- Param #0: d (number) - A number representing a cosine, where d must be greater than or equal to -1, but less than or equal to 1.
Returns: number - Returns the angle whos cosine is the specified number
asin[number d]
Returns the angle whose sine is the specified number
Parameters:
- Param #0: d (number) - A number representing a sine, where d must be greater than or equal to -1, but less than or equal to 1.
Returns: number - Returns the angle whose sine is the specified number
atan[number d]
Returns the angle whose tangent is the specified number.
Parameters:
- Param #0: d (number) - A number representing a tangent.
Returns: number - Returns the angle whose tangent is the specified number.
atan2[number y, number x]
Returns the angle whose tangent is the quotient of two specified numbers.
Parameters:
- Param #0: y (number) - The y coordinate of a point.
- Param #1: x (number) - The x coordinate of a point.
Returns: number - Returns the angle whose tangent is the quotient of two specified numbers.
cos[number d]
Returns the cosine of the specified angle.
Parameters:
- Param #0: d (number) - An angle, measured in radians.
Returns: number - Returns the cosine of the specified angle.
cosh[number d]
Returns the hyperbolic cosine of the specified angle.
Parameters:
- Param #0: d (number) - An angle, measured in radians.
Returns: number - Returns the hyperbolic cosine of the specified angle.
sin[number d]
Returns the sine of the specified angle.
Parameters:
- Param #0: d (number) - An angle, measured in radians.
Returns: number - Returns the sine of the specified angle.
sinh[number d]
Returns the hyperbolic sine of the specified angle.
Parameters:
- Param #0: d (number) - An angle, measured in radians.
Returns: number - Returns the hyperbolic sine of the specified angle.
sqrt[number d]
Returns the square root of a specified number.
Parameters:
- Param #0: d (number) - The number whose square root is to be found
Returns: number - Returns the square root of a specified number.
tan[number d]
Returns the tangent of the specified angle.
Parameters:
- Param #0: d (number) - An angle, measured in radians.
Returns: number - Returns the tangent of the specified angle.
tanh[number d]
Returns the hyperbolic tangent of the specified angle.
Parameters:
- Param #0: d (number) - An angle, measured in radians.
Returns: number - Returns the hyperbolic tangent of the specified angle.
listcreate[…items items]
Creates a new list object. The list is empty by default.
Parameters:
- Param #0: items (…items) - items to isntantiate the list with
Returns: List - Creates and returns a new list
Examples:
listcreate[]
- Returns a new empty listlistcreate[1,2,3]
- Returns a new list with 3 items: 1,2,3setvar[myList,listcreate[]]
- Creates a new list and stores it inmyList
variable
listadd[List list, Object item]
Adds an item to the end of a list
Parameters:
- Param #0: list (List) - The list to add the item to
- Param #1: item (Object) - Item to add to list, can be any type. Lists cannot contain references to themselves.
Returns: List - Returns the list object
Examples:
listadd[getvar[myList],`some value`]
- Addssome value
string to the list stored inmyList
variable
listinsert[List list, Object item, number index]
Inserts an item at the specified index of the list
Parameters:
- Param #0: list (List) - The list to add the item to
- Param #1: item (Object) - Item to add to list, can be any type. Lists cannot contain references to themselves.
- Param #2: index (number) - The index in the list where the item should be inserted
Returns: List - Returns the list object
Examples:
listinsert[getvar[myList],`some value`,1]
- Insertssome value
at index 1 (second item) in the list
listremove[List list, Object item]
Removes the first occurance of an item from the list
Parameters:
- Param #0: list (List) - The list to remove the item from
- Param #1: item (Object) - Item to remove from the list.
Returns: List - Returns the list object
Examples:
listremove[getvar[myList],`some value`]
- Removes the first occurance ofsome value
string from the list stored inmyList
variable
listremoveat[List list, number index]
Removes the specified index from the list
Parameters:
- Param #0: list (List) - The list to remove the item from
- Param #1: index (number) - Index to remove from the list.
Returns: List - Returns the list object
Examples:
listremoveat[getvar[myList],1]
- Removes the second item from the list stored inmyList
variable
listgetitem[List list, number index]
Retrieves the item at the specified list index. Lists are zero based, so the first item in the list is at index 0. If the index does not exist, it throws an error
Parameters:
- Param #0: list (List) - The list to retrieve the item from
- Param #1: index (number) - Index to retrieve from the list. Lists are zero based, so the first item is at index 0
Returns: Object - Returns the item at the specified list index
Examples:
listgetitem[getvar[myList],0]
- Retrieves the first item from the list stored inmyList
variable
listcontains[List list, Object item]
Checks if the specified item is contained in the list
Parameters:
- Param #0: list (List) - The list to check
- Param #1: item (Object) - The item to check if the list contains
Returns: number - Returns 1 if found, 0 otherwise
Examples:
listcontains[getvar[myList],`some value`]
- Checks if the list stored inmyList
variable contains the stringsome value
listindexof[List list, Object item]
Finds the index of the first occurance of an item in a list. Indexes are zero based.
Parameters:
- Param #0: list (List) - The list to check
- Param #1: item (Object) - The item to check if the list contains
Returns: number - Returns the index of the first occurence of the specified item, or -1 if not found
Examples:
listindexof[getvar[myList],`some value`]
- Returns the index of the first occurence of the stringsome value
listlastindexof[List list, Object item]
Finds the index of the last occurance of an item in a list. Indexes are zero based.
Parameters:
- Param #0: list (List) - The list to check
- Param #1: item (Object) - The item to check if the list contains
Returns: number - Returns the index of the last occurence of the specified item, or -1 if not found
Examples:
listlastindexof[getvar[myList],`some value`]
- Returns the index of the last occurence of the stringsome value
listcopy[List list]
Creates a copy of a list
Parameters:
- Param #0: list (List) - The list to copy
Returns: List - Returns a copy of the specified list
Examples:
setvar[myListTwo,listcopy[getvar[myList]]
- Copies the list stored in myList variable to a variable called myListTwo
listreverse[List list]
Creates a copy of a list, and reverses the order
Parameters:
- Param #0: list (List) - The list to reverse
Returns: List - Returns a copy of the specified list, but the order is reversed
Examples:
setvar[myListReversed,listreverse[getvar[myList]]
- Copies the list stored in myList variable, reverses it, and stores it to a variable called myListReversed
listpop[List list, number index=-1]
Removes the value at the specified index of the array and returns the item. If no index is passed, it uses the index of the last item in the array. Indexes are zero based.
Parameters:
- Param #0: list (List) - The list to pop the item from
- Param #1: index (number) (Default: -1) - Optional index to remove, if not provided, uses the index of the last item in the array
Returns: Object - Returns the value removed from the array
Examples:
listpop[getvar[myList]]
- Removes and returns the last item in the list stored in myList variablelistpop[getvar[myList],0]
- Removes and returns the first item in the list stored in myList variable
listcount[List list]
Counts the number of items contained in a list
Parameters:
- Param #0: list (List) - The list to count the items in
Returns: number - Returns a count of how many items are contained in the list
Examples:
listcount[getvar[myList]]
- Returns the number of items stored in the list stored inmyList
variable
listclear[List list]
Clears all items from the specified list
Parameters:
- Param #0: list (List) - The list to clear
Returns: List - Returns the list
Examples:
listclear[getvar[myList]]
- Removes all items from the list stored in the variablemyList
dictcreate[…items items]
Creates a new dictionary object. The dictionary is empty by default. The list of arguments must be even and broken in key-value pairs. Keys must be strings. Values may be any type.
Parameters:
- Param #0: items (…items) - items to instantiate the dictionary with. alternates keys and values
Returns: Dictionary - Creates and returns a new dictionary
Examples:
dictcreate[]
- Returns a new empty dictionarydictcreate[a,2,b,listcreate[4,5]]
- Returns a new dictionary with 2 items: a=>2,b=>[4,5]setvar[myDict,dictcreate[]]
- Creates a new empty dictionary and stores it inmyDict
variable
dictgetitem[Dictionary dict, string key]
Retrieves the item at the specified dictionary key. If the key does not exist, it throws an error
Parameters:
- Param #0: dict (Dictionary) - The dict to retrieve the item from
- Param #1: key (string) - Key to retrieve from the dict.
Returns: Object - Returns the item for the specified key
Examples:
dictgetitem[getvar[myDict],foo]
- Retrieves the item stored inmyDict
for the keyfoo
dictadditem[Dictionary dict, string key, Object value]
Adds the Key Value pair to the dictionary. Returns true if it overwrote a key, false otherwise. Will throw an exception if the key is not a string
Parameters:
- Param #0: dict (Dictionary) - The dict to add key item pair to
- Param #1: key (string) - Key to add to the dict
- Param #2: value (Object) - Value to add to the dict
Returns: number - Returns True if it overwrote a key, False otherwise
Examples:
dictadditem[getvar[myDict],foo,1]
- adds a key foo tomyDict
and sets the value to 1
dicthaskey[Dictionary dict, string key]
Checks if the dictionary contains the key. Returns true if it does, false otherwise
Parameters:
- Param #0: dict (Dictionary) - The dict to check for a key
- Param #1: key (string) - Key to look for
Returns: number - Returns True if dictionary has the key, False otherwise
Examples:
dicthaskey[getvar[myDict],foo]
- Returns true ifmyDict
has the keyfoo
, false otherwise
dictremovekey[Dictionary dict, string key]
Deletes the specified key from the dictionary.
Parameters:
- Param #0: dict (Dictionary) - The dict to delete the key from
- Param #1: key (string) - Key to remove
Returns: number - Returns True if dictionary had the key, False otherwise
Examples:
dictremovekey[getvar[myDict],foo]
- Removes the keyfoo
from the dictionarymyDict
dictkeys[Dictionary dict]
Returns a list of keys
Parameters:
- Param #0: dict (Dictionary) - The dictionary to return keys from
Returns: List - Returns a list of keys
Examples:
dictkeys[getvar[myDict]]
- Returns a list of all the keys inmyDict
dictvalues[Dictionary dict]
Returns a list of keys
Parameters:
- Param #0: dict (Dictionary) - The dictionary to return values from
Returns: List - Returns a list of values
Examples:
dictkeys[getvar[myDict]]
- Returns a list of all the values inmyDict
dictsize[Dictionary dict]
Returns the size of the dictionary
Parameters:
- Param #0: dict (Dictionary) - The dictionary to return size of
Returns: number - Returns a number size
Examples:
dictsize[dictcreate[a,b,c,d]]
- Returns 2 as the example dict isa=>b, c=>d
dictclear[Dictionary dict]
Clears the dictionary contents and returns the dictionary
Parameters:
- Param #0: dict (Dictionary) - The dictionary to clear
Returns: Dictionary - Returns the dictionary
Examples:
dictclear[getvar[myDict]]
- Returns the empty dictionarymyDict
dictcopy[Dictionary dict]
Creates a new dictionary and copies over all the key value pairs. This is a shallow copy.
Parameters:
- Param #0: dict (Dictionary) - The dictionary copy
Returns: Dictionary - Returns the new copy
Examples:
setvar[myDict2,dictcopy[getvar[myDict]]]
- Creates a shallow copy ofmyDict
and stores it inmyDict2
getregexmatch[string text, string regex]
Returns the part of the text that matches the specified regex
Parameters:
- Param #0: text (string) - The text to check the regex against
- Param #1: regex (string) - The regex
Returns: string - Returns the part of the text that matches the specified regex
Examples:
getregexmatch[`test 123`,`\d+`]
- Returns the string123