Onenrico

SImple Coin Skript

Sep 9th, 2016
304
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.87 KB | None | 0 0
  1. #command for player
  2. command /coin [<text>]:
  3. trigger:
  4. if arg 1 is not set:
  5. if {coin.%player%} is not set:
  6. set {coin.%player%} to 0
  7. send "Your Coin : %{coin.%player%}%"
  8. stop
  9. send "%arg 1% Coin = %{coin.%arg 1%}%"
  10.  
  11.  
  12.  
  13. #command for admin
  14. command /ecoin [<text>] [<text>] [<text>]:
  15. trigger:
  16. if player don't have permission "coin.admin":
  17. send "You Don't Have &6Coin.admin &fPermission"
  18. stop
  19. if arg 1 is not set:
  20. send "/ecoin <take/give/set> <player> <amount>"
  21. if arg 1 is "set":
  22. if arg 2 is not set:
  23. send "/ecoin <take/give/set> <player> <amount>"
  24. stop
  25. if arg 3 is not set:
  26. send "/ecoin <take/give/set> <player> <amount>"
  27. stop
  28. set {_amount} to arg 3 parsed as number
  29. if {_amount} is not set:
  30. send "Amount of coin must be a number"
  31. stop
  32. set {coin.%arg 2%} to {_amount}
  33. send "%arg 2% Coins set to %arg 3%"
  34. stop
  35. if arg 1 is "give":
  36. if arg 2 is not set:
  37. send "/ecoin <take/give/set> <player> <amount>"
  38. stop
  39. if arg 3 is not set:
  40. send "/ecoin <take/give/set> <player> <amount>"
  41. stop
  42. set {_amount} to arg 3 parsed as number
  43. if {_amount} is not set:
  44. send "Amount of coin must be a number"
  45. stop
  46. add {_amount} to {coin.%arg 2%}
  47. send "%arg 2% Coin = %{coin.%arg 2%}%"
  48. send "Added %arg 3% Coins to %arg 2% account"
  49. stop
  50. if arg 1 is "take":
  51. if arg 2 is not set:
  52. send "/ecoin <take/give/set> <player> <amount>"
  53. stop
  54. if arg 3 is not set:
  55. send "/ecoin <take/give/set> <player> <amount>"
  56. stop
  57. set {_amount} to arg 3 parsed as number
  58. if {_amount} is not set:
  59. send "Amount of coin must be a number"
  60. stop
  61. if {coin.%arg 2%} is not set:
  62. set {coin.%arg 2%} to 0
  63. if {coin.%arg 2%} is more than or equal to {_amount}:
  64. subtract {_amount} from {coin.%arg 2%}
  65. send "%arg 2% Coin = %{coin.%arg 2%}%"
  66. send "You take %arg 3% Coins from %arg 2% account"
  67. stop
  68. send "%arg 2% Coin = %{coin.%arg 2%}%"
  69. send "%arg 2% Coin is less than %arg 3%"
  70. stop
  71.  
  72. options:
  73. hargadiamond: 100
  74. hargarank1: 5000
  75. #Contoh Penggunaan
  76. command /beli [<text>]:
  77. trigger:
  78. if {coin.%player%} is not set:
  79. set {coin.%player%} to 0
  80. if arg 1 is "diamond":
  81. if {coin.%player%} is more than or equal to {@hargadiamond}:
  82. give player 1 diamond
  83. subtract {@hargadiamond} from {coin.%player%}
  84. send "You Bought 1 diamond with price {@hargadiamond}"
  85. send "Your Coin Left : %{coin.%player%}%"
  86. stop
  87. send "You Don't Have Enough Money To Bought Diamond"
  88. if arg 1 is "rank1":
  89. if {coin.%player%} is more than or equal to {@hargarank1}:
  90. subtract {@hargarank1} from {coin.%player%}
  91. console command "/manuadd %player% rank1"
  92. send "You Bought Rank1 with price {@hargarank1}"
  93. send "Your Coin Left : %{coin.%player%}%"
  94. stop
  95. send "You Don't Have Enough Money To Bought rank1"
Advertisement
Add Comment
Please, Sign In to add comment