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.

Script skWorth 1.2

Create an Essentials "/buy" command letting players buy in-game items using the "worth.yml" file!

  1. TobyMinceraft
    Supported Minecraft Versions:
    • 1.14, 1.15
    skWorth by TobyMinceraft

    Almost everything you see here is described more in-depth on my "wiki" located on my website: https://tmcmedia.risingdawn.fun/projects/skript-buy-command

    A simple script which gives server owners a customizable "/buy" command for players. This allows you to sell ALL vanilla Minecraft items on your server, so long as you have previously set them in your Essentials (or custom) worth.yml file (does not support custom items)

    Almost everything in this skript can be customized, up to a point. You may alter messages to your liking, but they are concealed in the code and may corrupt things if you're not careful! Some configurable options include:
    • Location of worth.yml file, if different than Essentials'
    • Internal name of cache (used by skript-yaml, in case another yaml-based script uses the same name)
    • Chat prefix for messages used by this script (not messages sent to console)
    • Player balance type (not to be confused with money type); this is as simple as player's balance or a Skript variable such as {balance::%player's uuid%}
    • And more! (all of these explained on the "wiki")
    Required Plugins
    Skript (duh)
    - If you don't have Skript, you can't use this script!
    - Used to read yml values from the worth.yml file
    - Used to locate your yml file and necessary plugins

    Optional Plugins
    Essentials / EssentialsX
    - If you want to set an item's worth value using an in-game command, you must install Essentials/EssentialsX; this plugin also comes with it's own economy!
    - Required by Essentials/EssentialsX and most economy plugins
    - Also required if you wish to use "player's balance" as the script's player balance manager

    Tested Plugin / Server Versions
    Skript = v2.4.1
    - Minimum required version: unknown
    skript-yaml = v1.3.2
    - Minimum required version: v1.2.1
    SkQuery = v3.6.5
    - Minimum required version: v3.6.2
    Spigot/Paper = git-Paper-162 (MC: 1.15.2)

    1) This skript does NOT (currently) allow you to set an item's worth using an in-game command. If you want that feature, use the Essentials/EssentialsX plugins. This script automatically detects the worth file generated by Essentials, so all you'd need to do is move your file to the Essentials folder.
    2) Please note: if you can sell an item on your server, (using this script) you can buy it - it is (currently) not possible to make certain items in the worth file to not be purchasable. If I get enough people to suggest it, I may add it as a feature later.
    3) DO NOT use the reviews section to post bugs or request features. Instead, post them in the "Discussions" tab so that way anyone with an answer may respond to your request should they see it before I do.
    4) This script is NOT a standalone player balance management system. Create your own or find one, or use the Essentials plugin or any other Vault-compatible economy plugin.

    How This Script Works
    There's a few steps involved to getting this script to load properly, but here's the gist of what happens:
    1) Script checks to see if you are using the player's balance or a custom skript variable
    2) If using player's balance, script then checks to see if Vault is running (by locating the config); if not, goes to next step
    3) Script checks to see if the default Essentials worth.yml file is found; if not, locates other file specified in the file location option
    4) If all has passed, script finishes loading and the /buy command is ready for use; if not, script file disables itself

    Tutorial / Wiki
    This script doesn't have a tutorial per-say, but the config and options are described more in-depth on the wiki.

    Final Note
    Though this skript is made to work with 1.15 and 1.14, this should work with versions lower, just make sure of the following:
    - The version of Skript you are using works with your server version
    - The version of SkQuery you are using works with your server version
    - The version of Essentials/EssentialsX you are using works with your server version
    - The version of skript-yaml you are using works with your server version
    - The version of Vault you are using works with your server version