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 id
Prints object id 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 combatstate (peace|melee|missile|magic)
Sets combat state
/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
/ub use[li][p] [itemOne] on [itemTwo]
Use Item
Examples:
/ub use Cake
- Use an item with exact name of Cake/ub usepi splitting on gold pea
- Use a partial match (splitting) splitting tool on a gold pea/ub uselp plant
- Use a plant on the landscape./ub usei Stamina Elixer
- Use a stamina elixer in your inventory.
/ub select[li][p] [item]
Select Item
Examples:
/ub select Cake
- Select an item with exact name of Cake/ub selectpi gold
- Select a partial match to the word gold/ub selectlp plant
- Select a partial match of a plant on the landscape.
/ub close corpse
Close the open corpse
Examples:
/ub close corpse
- Close the corpse if one is open
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
listgetitem
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
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
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
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
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
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
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
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
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
listfilter
Creates a new list filtered by the specified expression
Parameters:
- Param #0: list (List) - The list to filter
- Param #1: expression (string) - The expression to use for filtering. $0 (getvar[`0`]) will be set to the current iteration count, $1 will be set to the current item. return 1 to include, 0 to exclude
Returns: List - Returns a new filtered list
Examples:
listfilter[wobjectfindallbyobjectclass[24],`wobjectgetintprop[$1,25]==275`]
- creates a new list with all nearby level 275 characters
listmap
Creates a new list mapped by the specified expression
Parameters:
- Param #0: list (List) - The list to map
- Param #1: expression (string) - The expression to use for mapping. $0 (getvar[`0`]) will be set to the current iteration count, $1 will be set to the current item. return the mapped result
Returns: List - Returns a new mapped list
Examples:
listmap[wobjectfindallbyobjectclass[24],`wobjectgetstringprop[$1,5]
- creates a new list with all nearby players titles
listreduce
Reduces a list down into a single value
Parameters:
- Param #0: list (List) - The list to reduce to a single value
- Param #1: expression (string) - The expression to use for reducing. $0 (getvar[`0`]) will be set to the current iteration count, $1 will be set to the current item, $2 will be set to the current reduced value, return the modified result
Returns: List - Returns a list reduced to a single value
Examples:
listreduce[wobjectfindallbyobjectclass[24],`$2+wobjectgetintprop[$1,25]`]
- find the sum of all nearby character levels
listsort
Creates a list from another, sorted by expression
Parameters:
- Param #0: list (List) - The list to sort
- Param #1: expression (string) - The expression to use for sorting. $1 (getvar[`1`]) will be set to item a, $2 will be set item b, return 0 if they are equal, -1 if $1 is less than $2, and 1 if $1 is greater than $2
Returns: List - Returns a new list sorted by expression
Examples:
listsort[wobjectfindallbyobjectclass[24],`setvar[la,wobjectgetintprop[$1,25]];setvar[lb,wobjectgetintprop[$2,25]];iif[$la==$lb,0,iif[$la<$lb,-1,1]]`]
- get a list of all characters sorted by level
listfromrange
Create a list of numbers between start and end inclusively
Parameters:
- Param #0: start (number) - inclusive start
- Param #1: end (number) - inclusive end
Returns: List - Returns a list of numbers between start to end, inclusive
Examples:
listfromrange[1,10]
- returns a list with numbers 1-10
dictcreate
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
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
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
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
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
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
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
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
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
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
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
uboptget
Returns the value of a ub setting.
Parameters:
- Param #0: name (string) - The name of the variable to get. Prepend global options with
global.
.Returns: Object - Returns the value of the setting, if valid. 0 if invalid setting.
Examples:
uboptget[`Plugin.Debug`]
- Gets the current value for thePlugin.Debug
setting
uboptset
Changes the value of a ub setting.
Parameters:
- Param #0: name (string) - The name of the variable to set. Prepend global options with
global.
.- Param #1: newValue (Object) - The new value to set.
Returns: Object - Returns 1 if successful, 0 if it failed.
Examples:
uboptset[`Plugin.Debug`, 1]
- Sets the current value for thePlugin.Debug
setting to true
isportaling
Checks if your character is currently in portalspace
Returns: number - Returns 1 if in portalspace, 0 otherwise
Examples:
isportaling[]
- Returns 1 if in portalspace, 0 otherwise
exec
Evaluates a string as an expression
Parameters:
- Param #0: text (string) - The expression string to evaluate
Returns: Object - Returns the result of evaluating the expression string
Examples:
exec[`1+1`]
- returns 2
delayexec
Evaluates a string as an expression, after the specified delay
Parameters:
- Param #0: delay (number) - The delay in milliseconds. 1 second = 1000 milliseconds.
- Param #1: text (string) - The expression string to evaluate
Returns: Object - Returns 1
Examples:
delayexec[1000, `1+1`]
- evaluates the expression1+1
after a 1000ms (1s) delay
ifthen
If value is truthy, will execute the trueexpr string and return the results. If value is not truthy it will evaluate falseexpr string and return the results
Parameters:
- Param #0: value (Object) - value to check for truthiness
- Param #1: trueexpr (string) - expression string to evaluate if value is truthy
- Param #2: falseexpr (string) - expression string to evaluate if value is not truthy, optional
Returns: Object - Returns the result of evaluating the conditional expression string
Examples:
ifthen[1, `chatbox[\`true\`]`,`chatbox[\`false\`]`]
- writestrue
to the chatboxifthen[0, `chatbox[\`true\`]`,`chatbox[\`false\`]`]
- writesfalse
to the chatbox
tostring
Converts an object to a string
Parameters:
- Param #0: obj (Object) - The object to convert to a string
Returns: Object - Returns the object, converted to a string
Examples:
tostring[2]
- returns the string2
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
getaccounthash
Returns a hash of the current account name
Returns: string - Returns a hash of the current account name
Examples:
getaccounthash[]
- Returns a hash of the current account name
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
getdatetimelocal
Gets the local date and time using the format provided
Parameters:
- Param #0: text (string) - The format to return the date/time
Returns: string - Returns the local date and time
Examples:
getdatetimelocal[`hh:mm:ss tt`]
- Returns current local time ‘06:09:01 PM’
getdatetimeutc
Gets the universal date and time using the format provided
Parameters:
- Param #0: text (string) - The format to return the date/time
Returns: string - Returns the universal date and time
Examples:
getdatetimeutc[`hh:mm:ss tt`]
- Returns current universal time ‘06:09:01 PM’
getunixtime
Gets the total number of seconds since the unix epoch (jan 1, 1970)
Returns: string - Returns the number of seconds since the unix epoch
Examples:
getunixtime[]
- Returns the number of seconds since the unix epoch
wobjectfindnearestbytemplatetype
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
Returns an int property from a specific world object, or 0 if it’s undefined
Parameters:
- Param #0: obj (WorldObject) - World object to get int property 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
wobjectgetdoubleprop
Returns a double property from a specific world object, or 0 if it’s undefined
Parameters:
- Param #0: obj (WorldObject) - World object to get double property of
- Param #1: property (number) - DoubleProperty to return
Returns: number - Returns a double property value
Examples:
wobjectgetdoubleprop[wobjectgetselection[],167772169]
- Returns the salvage workmanship of the currently selected object
wobjectgetboolprop
Returns a bool property from a specific world object, or 0 if it’s undefined
Parameters:
- Param #0: obj (WorldObject) - World object to get bool property of
- Param #1: property (number) - BoolProperty to return
Returns: number - Returns a bool property value
Examples:
wobjectgetboolprop[wobjectgetselection[],99]
- Returns 1 if the currently selected object is ivoryable
wobjectgetstringprop
Returns a string property from a specific world object, or and empty string if it’s undefined
Parameters:
- Param #0: obj (WorldObject) - World object to get string property of
- Param #1: property (number) - StringProperty to return
Returns: string - Returns a string property value
Examples:
wobjectgetstringprop[wobjectgetselection[],1]
- Returns the name of the currently selected object
wobjecthasdata
Checks if a wobject has assess data from the server
Parameters:
- Param #0: obj (WorldObject) - World object to check if we have assess data for
Returns: number - Returns 1 if we have assess data for the object
Examples:
wobjecthasdata[wobjectgetselection[]]
- Returns 1 if the currently selected object has assess data from the server
wobjectrequestdata
Requests assess data for a wobject from the server
Parameters:
- Param #0: obj (WorldObject) - World object to request assess data for
Returns: number - Returns 1
Examples:
wobjectrequestdata[wobjectgetselection[]]
- Requests assess data from the server for the currently selected object
wobjectlastidtime
Gets the last time a wobjects data was recieved from the server
Parameters:
- Param #0: obj (WorldObject) - World object to check
Returns: number - Returns 1
Examples:
wobjectlastidtime[wobjectgetselection[]]
- Checks the last time the server sent id data for the currently selected object
getheadingto
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
wobjectisvalid
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:
wobjectisvalid[wobjectgetselection[]]
- Returns the heading in degrees from your player to the target object
getequippedweapontype
Returns the equipped weapons object class
Returns: string - Returns the equipped weapons object class
Examples:
getequippedweapontype[]
- Returns the equipped weapons object class
getheading
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
getcombatstate
Get the combat state of your character
Returns: string - Returns your current combat state
Examples:
getcombatstate[]
- Returns the string peace if you are in peace mode
setcombatstate
Sets the combat state of your character
Parameters:
- Param #0: str (string) - combatstate to set
Returns: number - Returns 1 if executed successfully.
Examples:
setcombatstate[peace]
- Sets your combat state to peace mode
getbusystate
Get the busy state of your character and returns a number for the state (0=idle, 1=combining a stack, 2=splitting a stack, 3=???, 4=picking up an item from the ground, 5=moving or unequipping an item, 6=dropping an item to the ground, 7=equipping an item)
Returns: number - Returns the number corresponding to your busy state (moving an item)
Examples:
getbusystate[]
- Returns 0 if your character is idle, otherwise returns the appropriate value
hexstr
converts a number to a hexadecimal string
Parameters:
- Param #0: d (number) - the number to convert
Returns: number - Returns a string
acos
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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