- 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.
DEPENDENCIES
• Skript (at least version 2.2)
• SkQuery
• A MySQL Database
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)
PICTURES
COMMANDS & PERMISSIONS
• /money [<player>] » Displays the cash of a player.
• /eco » Displays admin commands.
CONFIG
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.
DEPENDENCIES
• Skript (at least version 2.2)
• SkQuery
• A MySQL Database
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)
PICTURES
COMMANDS & PERMISSIONS
• /money [<player>] » Displays the cash of a player.
• /eco » Displays admin commands.
CONFIG
code_language.skript:
options:
prefix: &8[&cSQLC&8]
# If you have a server with more than 20 players, it's recommended to activate this option. (Available: True, False)
run_async: "true"
# Do you want to allow cheating commands? (Available: True, False)
allow_admincmd: "true"
# messages
addcoins_success: &aCoins added to target's account.
addcoins_setsuccess: &aTarget's cash was set to given amount.
remcoins_removesuccess: &aRemoved Coins from target's account.
remcoins_resetsuccess: &aReset target's account.
show_cash_me: &aYou have &e[AMOUNT] &aCoins available.
show_cash_player: &aPlayer &6[PLAYER] &ahas &e[AMOUNT] &aCoins available.
version: 1.0.000
code_language.skript:
# /*
# * Before using this script, you have to set up your database connection.
# * Here is a little example how to configure it:
# * $ db url jdbc:mysql://127.0.0.1:3306/coins
# * $ db username hiiqhfive
# * $ db password ouas0998b
# */
API
code_language.skript:
checkCoins(target player)
# Example: checkCoins(player)
# Returns a number. (Cash of target player)
hasAmount(target player, amount of cash)
# Example: hasAmount(player, 5000)
# Returns a boolean.
addCoins(target player, amount of cash, [setting option])
# Examples:
# Without setting to a specific number: addCoins(player, 3000)
# With setting to a specific number: addCoins(player, 3000, 1)
# --> Account will be set to given amount at arg 2.
# Returns a message.
removeCoins(target player, amount of cash, [reset option])
# Examples:
# Without reset: removeCoins(player, 1234)
# With reset: removeCoins(player, 0, 1)
# --> Account will be reset to 0 coins
# Returns a message.
If you have any suggestions, post it in comments!
Have fun!
Have fun!