Satellq Posted November 22, 2020 Share Posted November 22, 2020 So, I recently removed Essentials from my server and added skVault but how do I setup an economy system? Link to comment Share on other sites More sharing options...
_iZ_ Posted November 22, 2020 Share Posted November 22, 2020 Not really sure about SkVault as I've never used it before, but I'd recommend using a variable for economy. If you do decide to do this, make sure the variable is linked to a player's UUID, not their username. Also, use a loop variable to make it easier to do a reset of balances. # Use: {balance::%uuid of player%} #Do not use: {balance::%player%}, {balance.%uuid of player%} or {balance.%player%} # Simple Functions # Show balance balance(s: sender, p: offlpine player): set {_u} to uuid of {_p} #: Set to call {_p}'s uuid (You cannot use the expression %uuid of {_p}%) if {_p} is {_s}: send "&aBalance: &c$%{balance::%{_u}%}%" to {_s} else: send "&a%{_p}%&a's Balance: &c$%{balance::%{_u}%}%" to {_s} command /bal [<offline player>]: permission: server.balance permission message: &4You do not have access to that command. trigger: if arg-1 is not set: balance(sender, player) else: if sender has permission "server.balance.others": balance(sender, arg-1) else: message "&4You do not have access to that command." # Add to player's balance ecoAdd(s: sender, p: offline player, amt: integer): set {_u} to uuid of {_p} add {_amt} to {balance::%{_u}%} if {_p} is not {_s}: send "&c$%{_amt}% &awas added to %{_p}%&a's account." to {_s} send "&c$%{_amt}% &awas added to your account. New balance: &c$%{balance::%{_u}%}%" to {_p} # You can repeat these for removing, setting and resetting balance. # You can also create a command like /eco to call all of these functions as used in the example /bal. 1 » IGN: _iZ_ « » Joined: 12/18/2016 « » VIP: 1/13/2018 « » Helper: 1/29/2021 « » [<3]: 5/8/2021 « » Skript dev « » Discord: iZz#0420 « React to this if I was helpful, found this interesting, or you're just nice Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now