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 SQLCOINS [Skript 2.2, skQuery, MySQL] 1.0.000

Manage your currency with a MySQL-database for more than 1 server at once.

  1. HiiqhFive
    Contributors:
    HiiqhFive
    Supported Minecraft Versions:
    • 1.7, 1.8, 1.9, 1.10, 1.11
    SQL COINS
    for Skript 2.2


    This script implements a currency with MySQL Integration of skQuery.
    PS: I hate designing ressource threads, thats why it's looking shitty. lol.

    [​IMG]
    DEPENDENCIES

    • Skript (at least version 2.2)
    • SkQuery
    • A MySQL Database


    [​IMG]
    HOW TO INSTALL


    1. Install Skript v2.2 on your Spigot/Bukkit server.
    2. Go to "plugins\Skript\scripts"
    3. upload the required file.
    4. open the mentioned file and set up the database connection (example inside the config)
    5. Restart your server or type "/sk reload <script name>"
    (in this case: /sk reload SQL-COINS_1.0.000)


    [​IMG]
    PICTURES

    [​IMG]
    [​IMG]

    [​IMG]
    COMMANDS & PERMISSIONS


    • /money [<player>] » Displays the cash of a player.
    • /eco » Displays admin commands.

    [​IMG]
    CONFIG

    Code (Skript):
    1. options:
    2.     prefix: &8[&cSQLC&8]
    3.     # If you have a server with more than 20 players, it's recommended to activate this option. (Available: True, False)
    4.     run_async: "true"
    5.     # Do you want to allow cheating commands? (Available: True, False)
    6.     allow_admincmd: "true"
    7.  
    8.     # messages
    9.     addcoins_success: &aCoins added to target's account.
    10.     addcoins_setsuccess: &aTarget's cash was set to given amount.
    11.     remcoins_removesuccess:    &aRemoved Coins from target's account.
    12.     remcoins_resetsuccess:    &aReset target's account.
    13.    
    14.     show_cash_me: &aYou have &e[AMOUNT] &aCoins available.
    15.     show_cash_player: &aPlayer &6[PLAYER] &ahas &e[AMOUNT] &aCoins available.
    16.    
    17.     version: 1.0.000

    Code (Skript):
    1. # /*
    2. # * Before using this script, you have to set up your database connection.
    3. # * Here is a little example how to configure it:
    4. # *    $ db url jdbc:mysql://127.0.0.1:3306/coins
    5. # *    $ db username hiiqhfive
    6. # *    $ db password ouas0998b
    7. # */

    [​IMG]
    API
    Code (Skript):
    1. checkCoins(target player)
    2. # Example: checkCoins(player)
    3. # Returns a number. (Cash of target player)
    4.  
    5. hasAmount(target player, amount of cash)
    6. # Example: hasAmount(player, 5000)
    7. # Returns a boolean.
    8.  
    9. addCoins(target player, amount of cash, [setting option])
    10. # Examples:
    11. #    Without setting to a specific number: addCoins(player, 3000)
    12. #    With setting to a specific number: addCoins(player, 3000, 1)
    13. #    --> Account will be set to given amount at arg 2.
    14. # Returns a message.
    15.  
    16. removeCoins(target player, amount of cash, [reset option])
    17. # Examples:
    18. #    Without reset: removeCoins(player, 1234)
    19. #    With reset: removeCoins(player, 0, 1)
    20. #    --> Account will be reset to 0 coins
    21. # Returns a message.
    [​IMG]

    If you have any suggestions, post it in comments!
    Have fun! :emoji_slight_smile:
    WaxtzCraft likes this.

Recent Reviews

  1. Lyrox
    Lyrox
    4/5,
    Version: 1.0.000
    Hey, i have all installed and connected to mysql no errors but if i check /money they send me <none>
  2. iStopcontact
    iStopcontact
    5/5,
    Version: 1.0.000
    Is this skript allready updated with skellet and not SkQuery?
    And if it is updated how do i use it now or is it the same?
    1. HiiqhFive
      Author's Response
      Nah, didn't find some time to do that - but I will definetly update it in the future.
  3. DonaldTrump
    DonaldTrump
    5/5,
    Version: 1.0.000
    Nice, but Skquery mysql is broken and not supported with the "unofficial" skquery update, can you update this script using Skellett's mysql syntax? That would be really nice ;)
    1. HiiqhFive
  4. chowo14
    chowo14
    4/5,
    Version: 1.0.000
    good script but " Current selection does not contain a unique column. Grid edit, checkbox, Edit, Copy and Delete features are not available."

    I'd like to edit peoples gold through PHPMYADMIN

    How can i fix htis?
    thanks
  5. Adrihun
    Adrihun
    5/5,
    Version: 1.0.000
    Excellent script. Good for Minigame servers! Is there a way to add Scoreboards and Add the money to it so it shows you how much money you have on the scoreboard? :) Also, can this be added to Minigame scripts, so whenever you win a game you will get money and it will add +10 or something in the database? :)

    Also, since you are good at MySQL + Script, please look at my post. (I need help)

    https://forums.skunity.com/threads/adding-mysql-to-script.2928/

    Thanks!
    1. HiiqhFive
      Author's Response
      Thanks for your review, I'm appreciating it!
      SQLC contains a lot of API's which can be used very easy. So Just look for the right funtion and use it.

      I'll take a look when I'm at home. :)