Radońsk
  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

Supported Minecraft Versions
  1. 1.12
  2. 1.13
header.png

Radońsk:
Welcome to Radońsk, Radońsk is a general purpose Skript API which brings some features that you might not be able to get without addons, such as advanced math calculations, powerful utilities and simpler syntax for a whole host of other amenities.

Installation:
Step 1: Down the the radonsk.sk file from SkUnity
Step 2: Move the radonsk.sk file to your plugins/Skript/scripts/ folder on your server.
Step 3. Run the command /skript reload radonsk

Usage:
If you do not have a basic understanding of how skript functions work, please refer to this tutorial.

Syntax / Documentation:

(Please note that some of the examples are currently untested, or may be there to show basic concept.)

Mean, the mean is a way to find a general representation of all of the values within a data set, this is found by adding all of the values in a data set and and then dividing by the total number of values.
Usage: mean(numbers)
Example:
Code:
command /kdr average:
    trigger:s
        loop {kitpvp::players::*}:
            add {kitpvp::players::%loop-value%::kdr} to {_kdrs::*}
        send "The average KDR of the players is: %mean({_kdrs::*})%"

Median, the mode of a data set (similar to the mean) is a way to get a general representation of all of the values. This is done by listing all of the values from lease to greatest and selecting the middle number, if there are two middle numbers, you find the mean of the two numbers and return that.
Usage: median(numbers)
Example:
Code:
command /normalbalance:
    trigger:
        loop {balance::*}:
            add {balance::%loop-value%} to {_bals::*}
        send "The normal balance for players is: %median({_bals::*})%"

Mode, the mode of a data set the the number(s) or value(s) that occur the most, this is done by counting the amount of time that a value comes up and returning the most occurring value(s).
Usage: mode(numbers)
Example:
Code:
command /topplayers:
    trigger:
        loop {kitpvp::players::*}:
            set {_kills::%loop-value%} to {kitpvp::players::%loop-value%::kills}
        set {_topkills} to mode({_kills::*})
        loop {_topkills::*}:
            add loop-index to {_topplayers::*}
        send "The top players are: %{_topplayers::*}%"

Range, the range of the data set is the total difference between the lowest and the highest value, you find this by ordering the values from least to greatest and subtracting the smallest number from the largest number and return the absolute value.
Usage: range(numbers)
Example:
Code:
command /playtime range:
    trigger:
        send "The total range in play time is %range({stats::playtime::*})%"

Mean absolute deviation, the mean absolute deviation of a data set is the average distance between each data point and the mean. It gives us an idea about the variability in a data set.
Usage: mad(numbers)
Example:
Code:
command /dataset <numbers>:
    trigger:
        send "%mad(arg-1)%"

Additive Inverse, the additive inverse of a number is the number but with the opposite polarity (positive number becomes negative and vice-a-versa). This is done by multiplying the value by -1, when you add an additive number to its inverse they will cancel out and the sum will be 0.
Usage: inverse(number)
Code:
command /inverse <number>:

    trigger:
        send "Inverse: %inverse(arg-1)%"
Convert to lower case, this function converts the text string that you put in to it with all of the capital letters replaced with their lower-case counterparts.
Usage: convertLowerCase(text)
Code:
command /quiet <text>:
    trigger:
        send "Here is your quiet text: %convertLowerCase(arg-1)%"

Convert to upper case, this functions does the exact opposite of the last one in the fact that it replaces all of the lower case letters with uppercase ones.
Usage: convertUpperCase()
Code:
command /LOUD <text>:
    trigger:
        send "Here is your LOUD text: %convertUpperCase(arg-1)%"

Player count, get the number of online players at that given time.
Usage: playerCount()
Example:
Code:
command /playercount:
    trigger:
        send "Number of online players: %playerCount()%"

Get online players, returns a list of all of the online players.
Usage: onlinePlayers()
Example:
Code:
command /online:
    trigger:
        send "Online Players: %onlinePlayers()%"

String hashing, hashes the inputted string using a configurable hashing method (SHA-256, or MD5)
Usage: hashString(string)
Example:
Code:
on join:
    send "%player% joined the game. Hashed ip: %hashString(player's ip)%" to console

Skript reload, natively reload a script within the script itself, instead of having to type out the execute console command effect, you can just call this function.
Usage: skReload(text (script))
Example:
Code:
command /radonsk reload:
    trigger:
        skReload("radonsk")
        send "Reloaded radonsk."

Stringify, this basically converts the object (or type) that you enter in to it to a string and then returns it.
Usage: str(object)
Example:
Code:
command /send number <number>:
    trigger:
        send str(arg-1)
Gamerule, basically just prevents you from having to use the execute console command effect, but making it in to a simple function.
Usage: gamerule(text (gamerule), object (value) )
Example:
Code:
command /skgr <text> <object>:
    trigger:
        gamerule(arg-1, arg-2)
        send "Updates gamerule."
Temporary potion effect, give a player a temporary potion effect.
Usage: tempEffect(player, potion effect, integer (amplifier), timespan)
Example:
Code:
command /run:
    trigger:
        tempEffect(player, speed, 10, 60 seconds)

Permanent potion effect, applies a permanent potion effect to a player.
Usage: permEffect(player, potion effect, integer (amplifier))
Example:
Code:
command /runforever:
    trigger:
        permEffect(player, speed, 10)

Clear all potion effects, clears all of the currently applied potion effects from the player.
Usage: clearAllEffects(player)
Example:
Code:
command /milk:
    trigger:
        clearAllEffects(player)
CYOM, create your own menus integration.
Usage: cyom(Open/Edit)(text (menu), player)
Example:
Code:
command /open:
    trigger:
        cyomOpen("main", player)

Mine reset lite, mine reset lite integration.
Usage: mrlReset(text (mine))
Example:
Code:
command /reset:
    trigger:
        mrlReset("coal")
  • Radońsk.png
    Radońsk.png
    2.9 KB · Views: 202
Author
Pexien
Downloads
784
Views
784
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from Pexien

Latest updates

  1. added str()

    You can now use str(object) and get what ever you put inside the function returned as a string.