ItsTheSky/disky-v1 huggingface dataset:
caseEquals: Checks if the contents of a list of strings are strictly equal with case sensitivity.
Code: caseEquals(strs: strings)
ceil: Rounds a number up, i.e. returns the closest integer larger than or equal to the argument.
Code: ceil(n: number)
ceiling: Alias of ceil.
Code: ceiling(n: number)
clamp: Clamps one or more values between two numbers.
Code: clamp(values: numbers, min: number, max: number)
cos: The cosine function. This is basically the sine shifted by 90°, i.e. cos(a) = sin(a + 90°), for any number a. Uses degrees, not radians.
Code: cos(n: number)
date: Creates a date from a year, month, and day, and optionally also from hour, minute, second and millisecond. A time zone and DST offset can be specified as well (in minutes), if they are left out the server's time zone and DST offset are used (the created date will not retain this information).
Code: date(year: number, month: number, day: number, hour: number = [[integer:0]], minute: number = [[integer:0]], second: number = [[integer:0]], millisecond: number = [[integer:0]], zone_offset: number = [[double:NaN]], dst_offset: number = [[double:NaN]])
exp: The exponential function. You probably don't need this if you don't know what this is.
Code: exp(n: number)
floor: Rounds a number down, i.e. returns the closest integer smaller than or equal to the argument.
Code: floor(n: number)
isNaN: Returns true if the input is NaN (not a number).
Code: isNaN(n: number)
ln: The natural logarithm. You probably don't need this if you don't know what this is. Returns NaN (not a number) if the argument is negative.
Code: ln(n: number)
location: Creates a location from a world and 3 coordinates, with an optional yaw and pitch. If for whatever reason the world is not found, it will fallback to the server's main world.
Code: location(x: number, y: number, z: number, world: world = event-world, yaw: number = [[integer:0]], pitch: number = [[integer:0]])
log: A logarithm, with base 10 if none is specified. This is the inverse operation to exponentiation (for positive bases only), i.e. log(base ^ exponent, base) = exponent for any positive number 'base' and any number 'exponent'. Another useful equation is base ^ log(a, base) = a for any numbers 'base' and 'a'. Please note that due to how numbers are represented in computers, these equations do not hold for all numbers, as the computed values may slightly differ from the correct value. Returns NaN (not a number) if any of the arguments are negative.
Code: log(n: number, base: number = [[integer:10]])
max: Returns the maximum number from a list of numbers.
Code: max(ns: numbers)
min: Returns the minimum number from a list of numbers.
Code: min(ns: numbers)
mod: Returns the modulo of the given arguments, i.e. the remainder of the division d/m, where d and m are the arguments of this function. The returned value is always positive. Returns NaN (not a number) if the second argument is zero.
Code: mod(d: number, m: number)
offlineplayer: Returns a offline player from their name or UUID. This function will still return the player if they're online.
Code: offlineplayer(nameOrUUID: string)
player: Returns an online player from their name or UUID, if player is offline function will return nothing. Setting 'getExactPlayer' parameter to true will return the player whose name is exactly equal to the provided name instead of returning a player that their name starts with the provided name.
Code: player(nameOrUUID: string, getExactPlayer: boolean = [[boolean:false]])
product: Calculates the product of a list of numbers.
Code: product(ns: numbers)
rgb: Returns a RGB color from the given red, green and blue parameters.
Code: rgb(red: long, green: long, blue: long)
round: Rounds a number, i.e. returns the closest integer to the argument. Place a second argument to define the decimal placement.
Code: round(n: number, d: number = [[integer:0]])
sin: The sine function. It starts at 0° with a value of 0, goes to 1 at 90°, back to 0 at 180°, to -1 at 270° and then repeats every 360°. Uses degrees, not radians.
Code: sin(n: number)
sqrt: The square root, which is the inverse operation to squaring a number (for positive numbers only). This is the same as (argument) ^ (1/2) – other roots can be calculated via number ^ (1/root), e.g. set {_l} to {_volume}^(1/3). Returns NaN (not a number) if the argument is negative.
Code: sqrt(n: number)
sum: Sums a list of numbers.
Code: sum(ns: numbers)
tan: The tangent function. This is basically sin(arg)/cos(arg). Uses degrees, not radians.
Code: tan(n: number)
vector: Creates a new vector, which can be used with various expressions, effects and functions.
Code: vector(x: number, y: number, z: number)
world: Gets a world from its name.
Code: world(name: string)
Conditionals: Conditional sections if: executed when its condition is true else if: executed if all previous chained conditionals weren't executed, and its condition is true else: executed if all previous chained conditionals weren't executedparse if: a special case of 'if' condition that its code will not be parsed if the condition is not true else parse if: another special case of 'else if' condition that its code will not be parsed if all previous chained conditionals weren't executed, and its condition is true
Code: else
Loop: Loop sections repeat their code with multiple values.A loop will loop through all elements of the given expression, e.g. all players, worlds, items, etc. The conditions & effects inside the loop will be executed for every of those elements, which can be accessed with ‘loop-’, e.g. send "hello" to loop-player. When a condition inside a loop is not fulfilled the loop will start over with the next element of the loop. You can however use stop loop to exit the loop completely and resume code execution after the end of the loop.Loopable Values All expressions that represent more than one value, e.g. ‘all players’, ‘worlds’, etc., as well as list variables, can be looped. You can also use a list of expressions, e.g. loop the victim and the attacker, to execute the same code for only a few values.List Variables When looping list variables, you can also use loop-index in addition to loop-value inside the loop. loop-value is the value of the currently looped variable, and loop-index is the last part of the variable's name (the part where the list variable has its asterisk *).
Code: loop %objects%
While Loop: While Loop sections are loops that will just keep repeating as long as a condition is met.
Code: [do] while <.+>
Aliases: Used for registering custom aliases for a script.
Code: aliases
Command: Used for registering custom commands.
Code: command <.+>
Function: Functions are structures that can be executed with arguments/parameters to run code. They can also return a value to the trigger that is executing the function. Note that local functions come before global functions execution
Code: [local] function <.+>
Options: Options are used for replacing parts of a script with something else. For example, an option may represent a message that appears in multiple locations. Take a look at the example below that showcases this.
Code: options
Variables: Used for defining variables present within a script. This section is not required, but it ensures that a variable has a value if it doesn't exist when the script is loaded.
Code: variables