Advertisement
griffen4

Untitled

Sep 5th, 2015
436
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. script options:
  2. $ db url jdbc:mysql://localhost:3306/Coins
  3. $ db username root
  4. $ db password MyPassWord #I Know this works
  5.  
  6. options:
  7. table_prefix: Coins_
  8. refresh: 10
  9.  
  10. On join:
  11. if {firstjoin-%player%} is not set:
  12. set {coins-%player%} to 0
  13. add player to {statslistplayer::*}
  14. update "INSERT INTO `{@table_prefix}Coins` (`Player`, `Coins`) VALUES ('%player%', '0')"
  15.  
  16. On script load:
  17. update "CREATE TABLE IF NOT EXISTS `{@table_prefix}Coins` (`Coins` varchar(255))"
  18.  
  19. every {@refresh} seconds:
  20. loop all players:
  21. update "UPDATE `{@table_prefix}Player` SET `{@table_prefix}Player`.`Coins` = `Coins`+%{coins-%loop-player%}% WHERE `{@table_prefix}Player`.`Player` = '%loop-player%'"
  22.  
  23. command /coins [<text>] [<text>] [<text>]:
  24. permission: coins.use
  25. trigger:
  26. if arg-1 is "help":
  27. send " &bPlayer commands:"
  28. send " &9/Coins Check &7Check your stats"
  29. send " &9/Coins Add"
  30. if arg-1 is "check":
  31. send "Coins: &3%{coins.%player%}%"
  32. if arg-1 is "add":
  33. set {coins.%player%} to 88
  34. if arg-1 is "sync":
  35. if player have permission "Coins.commands.sync":
  36. loop all players:
  37. 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