1. 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!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

API Radońsk 0.3

A simple vanilla skript utility API

  1. Pexien
    Supported Minecraft Versions:
    • 1.12, 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 (Text):
    1. command /kdr average:
    2.     trigger:s
    3.         loop {kitpvp::players::*}:
    4.             add {kitpvp::players::%loop-value%::kdr} to {_kdrs::*}
    5.         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 (Text):
    1. command /normalbalance:
    2.     trigger:
    3.         loop {balance::*}:
    4.             add {balance::%loop-value%} to {_bals::*}
    5.         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 (Text):
    1. command /topplayers:
    2.     trigger:
    3.         loop {kitpvp::players::*}:
    4.             set {_kills::%loop-value%} to {kitpvp::players::%loop-value%::kills}
    5.         set {_topkills} to mode({_kills::*})
    6.         loop {_topkills::*}:
    7.             add loop-index to {_topplayers::*}
    8.         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 (Text):
    1. command /playtime range:
    2.     trigger:
    3.         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 (Text):
    1. command /dataset <numbers>:
    2.     trigger:
    3.         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 (Text):
    1. command /inverse <number>:
    2.  
    3.     trigger:
    4.         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 (Text):
    1. command /quiet <text>:
    2.     trigger:
    3.         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 (Text):
    1. command /LOUD <text>:
    2.     trigger:
    3.         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 (Text):
    1. command /playercount:
    2.     trigger:
    3.         send "Number of online players: %playerCount()%"
    Get online players, returns a list of all of the online players.
    Usage: onlinePlayers()
    Example:
    Code (Text):
    1. command /online:
    2.     trigger:
    3.         send "Online Players: %onlinePlayers()%"
    String hashing, hashes the inputted string using a configurable hashing method (SHA-256, or MD5)
    Usage: hashString(string)
    Example:
    Code (Text):
    1. on join:
    2.     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 (Text):
    1. command /radonsk reload:
    2.     trigger:
    3.         skReload("radonsk")
    4.         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 (Text):
    1. command /send number <number>:
    2.     trigger:
    3.         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 (Text):
    1. command /skgr <text> <object>:
    2.     trigger:
    3.         gamerule(arg-1, arg-2)
    4.         send "Updates gamerule."
    Temporary potion effect, give a player a temporary potion effect.
    Usage: tempEffect(player, potion effect, integer (amplifier), timespan)
    Example:
    Code (Text):
    1. command /run:
    2.     trigger:
    3.         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 (Text):
    1. command /runforever:
    2.     trigger:
    3.         permEffect(player, speed, 10)
    Clear all potion effects, clears all of the currently applied potion effects from the player.
    Usage: clearAllEffects(player)
    Example:
    Code (Text):
    1. command /milk:
    2.     trigger:
    3.         clearAllEffects(player)
    CYOM, create your own menus integration.
    Usage: cyom(Open/Edit)(text (menu), player)
    Example:
    Code (Text):
    1. command /open:
    2.     trigger:
    3.         cyomOpen("main", player)
    Mine reset lite, mine reset lite integration.
    Usage: mrlReset(text (mine))
    Example:
    Code (Text):
    1. command /reset:
    2.     trigger:
    3.         mrlReset("coal")

    Images

    1. Radońsk.png

Recent Updates

  1. added str()