Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- script options:
- $ db url jdbc:mysql://localhost:3306/Coins
- $ db username root
- $ db password MyPassWord #I Know this works
- options:
- table_prefix: Coins_
- refresh: 10
- On join:
- if {firstjoin-%player%} is not set:
- set {coins-%player%} to 0
- add player to {statslistplayer::*}
- update "INSERT INTO `{@table_prefix}Coins` (`Player`, `Coins`) VALUES ('%player%', '0')"
- On script load:
- update "CREATE TABLE IF NOT EXISTS `{@table_prefix}Coins` (`Coins` varchar(255))"
- every {@refresh} seconds:
- loop all players:
- update "UPDATE `{@table_prefix}Player` SET `{@table_prefix}Player`.`Coins` = `Coins`+%{coins-%loop-player%}% WHERE `{@table_prefix}Player`.`Player` = '%loop-player%'"
- command /coins [<text>] [<text>] [<text>]:
- permission: coins.use
- trigger:
- if arg-1 is "help":
- send " &bPlayer commands:"
- send " &9/Coins Check &7Check your stats"
- send " &9/Coins Add"
- if arg-1 is "check":
- send "Coins: &3%{coins.%player%}%"
- if arg-1 is "add":
- set {coins.%player%} to 88
- if arg-1 is "sync":
- if player have permission "Coins.commands.sync":
- loop all players:
- update "UPDATE `{@table_prefix}Coins` SET `{@table_prefix}Coins`.`Coins` = `Coins`+%{coins-%loop-player%}% WHERE `{@table_prefix}Coins`.`Player` = '%loop-player%'"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement