Jump to content

how to i add balance to players


vaczz

Recommended Posts

command /bank:
  permission: op
  permission message: "&4This command is'nt ready yet."
  trigger:
    open virtual chest inventory with size 3 named "BANK" to player
    format gui slot 0 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 1 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 2 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 3 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 4 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 5 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 6 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 7 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 8 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 9 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 10 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 11 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 13 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 15 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 16 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 17 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 18 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 19 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 20 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 21 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 22 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 23 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 24 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 25 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 26 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 12 of player with chest named "&bBank" with lore "&6Bank your ores" to run:
      open virtual chest inventory with size 3 named "BANK" to player
      format gui slot 13 of player with diamond named "§b1 Diamond" with lore "§6(amount)" to run:
        add 200 to {balances::%event-offlineplayer's uuid%}
        message "You got 200 balance and banked 1 diamond"
    format gui slot 14 of player with dispenser named "&4UnBank" with lore "&6UnBank your ores" to run:
      open virtual chest inventory with size 3 named "UNBANK" to player
      format gui slot 13 of player with diamond named "§b1 Diamond" with lore "§6(amount)" to run:

Link to comment
Share on other sites

Hi there!
You cannot use "event-offlineplayer" in a command, as this is not an event. 

Events are triggers which are called when a certain thing happens in game, e.g "on block break", or "on any movement"
Commands, in your case, are not events, and therefore, "event-offlineplayer" cannot be used!

Instead, try using "add 200 to {balances::%player's uuid%}"

Hope this helps!

  • Like 2

Twitch Affiliate, YouTuber and Minehut Content Creator

(100,000+ Combined Views, 1,100+ Combined Followers & Subs, 20,000+ Combined Unique Players)

IGN:
[YOUTUBE] Centrect

 Please don't DM me for support, go here or join Minehut's Discord if you need assistance.

 

Link to comment
Share on other sites

hey,

thanks for helping and commenting

i tried it and it didn't gave an error but i doesnt work for no reason.

 

command /bank:
  permission: op
  permission message: "&4This command is'nt ready yet."
  trigger:
    open virtual chest inventory with size 3 named "BANK" to player

    format gui slot 12 of player with chest named "&bBank" with lore "&6Bank your ores" to run:
      open virtual chest inventory with size 3 named "BANK" to player
      format gui slot 13 of player with diamond named "§b1 Diamond" with lore "§6(amount)" to run:
        add 200 to {balances::%player's uuid%}
    format gui slot 14 of player with dispenser named "&4UnBank" with lore "&6UnBank your ores" to run:
      open virtual chest inventory with size 3 named "UNBANK" to player
      format gui slot 13 of player with diamond named "§b1 Diamond" with lore "§6(amount)" to run:

Link to comment
Share on other sites

5 hours ago, vaczz said:

hey,

thanks for helping and commenting

i tried it and it didn't gave an error but i doesnt work for no reason.

 

command /bank:
  permission: op
  permission message: "&4This command is'nt ready yet."
  trigger:
    open virtual chest inventory with size 3 named "BANK" to player

    format gui slot 12 of player with chest named "&bBank" with lore "&6Bank your ores" to run:
      open virtual chest inventory with size 3 named "BANK" to player
      format gui slot 13 of player with diamond named "§b1 Diamond" with lore "§6(amount)" to run:
        add 200 to {balances::%player's uuid%}
    format gui slot 14 of player with dispenser named "&4UnBank" with lore "&6UnBank your ores" to run:
      open virtual chest inventory with size 3 named "UNBANK" to player
      format gui slot 13 of player with diamond named "§b1 Diamond" with lore "§6(amount)" to run:

What did you do that didn't work? Did you click on slot 12 and then slot 13? Slot 12 is supposed to open a new gui and slot 13 in that gui is supposed to add 200 to the player's balance.

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Community Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

16 hours ago, _Tarna_ said:

What did you do that didn't work? Did you click on slot 12 and then slot 13? Slot 12 is supposed to open a new gui and slot 13 in that gui is supposed to add 200 to the player's balance.

yea that works but if i do /balance it didn't add 200 to my balance

Link to comment
Share on other sites

6 hours ago, vaczz said:

yea that works but if i do /balance it didn't add 200 to my balance

Make sure you don't have essentials because it may be using the balance command from that plugin. If your balance command was a skript command, try /skript:balance and make sure you are showing the right variable in that command. 

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Community Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

Just now, vaczz said:

but i need essentials, is there an other way to do it with essentials

if you create your own economy with your own money-value and your own way of setting that value to different things, it is possible. However, it is less reliable and more prone to data leaks and breaks as plugins that are as polished, updated, fixed, and worked on by multiple people will always work better than a skript does. Also, using Java is much more efficient when it comes to this type of stuff than Skript is. Personally, I would go with EssentialsX since it not only adds the economy, but also adds a lot of other useful stuff, but that's my personal preference. Go with whatever you understand the most and is easiest for you to use. It is a matter of personal preference afterall.

If I have helped you out in your post or you liked what I posted, please upvote and react to my post! It helps me a lot!

Some Minehut Links:

Server Rules • Staff Applications • News & Updates • Reports • Appeals


Minehut: VIP (07/04/2021 --> Current)
Elestra/Versa Realms: Manager (12/04/2021 --> Current)

If you have any questions contact me!
My Discord: BanditEagle#2481
My Spigot Profile: https://www.spigotmc.org/members/banditeagle.935281/
My IGN: BanditEagle

Link to comment
Share on other sites

15 hours ago, BanditEagle said:

if you create your own economy with your own money-value and your own way of setting that value to different things, it is possible. However, it is less reliable and more prone to data leaks and breaks as plugins that are as polished, updated, fixed, and worked on by multiple people will always work better than a skript does. Also, using Java is much more efficient when it comes to this type of stuff than Skript is. Personally, I would go with EssentialsX since it not only adds the economy, but also adds a lot of other useful stuff, but that's my personal preference. Go with whatever you understand the most and is easiest for you to use. It is a matter of personal preference afterall.

yeah i have the plugin EssentialsX installed and i use it for other stuf to. but it still doesnt work

Edited by vaczz
Link to comment
Share on other sites

what specifically doesnt work? the command?

If I have helped you out in your post or you liked what I posted, please upvote and react to my post! It helps me a lot!

Some Minehut Links:

Server Rules • Staff Applications • News & Updates • Reports • Appeals


Minehut: VIP (07/04/2021 --> Current)
Elestra/Versa Realms: Manager (12/04/2021 --> Current)

If you have any questions contact me!
My Discord: BanditEagle#2481
My Spigot Profile: https://www.spigotmc.org/members/banditeagle.935281/
My IGN: BanditEagle

Link to comment
Share on other sites

On 4/28/2021 at 1:10 PM, BanditEagle said:

what specifically doesnt work? the command?

it doesnt give me an arror or some, but it doesnt add my balance

 

do i don't get errors it says it would work but it doesnt add 200 balance

Link to comment
Share on other sites

can you send your latest code?

If I have helped you out in your post or you liked what I posted, please upvote and react to my post! It helps me a lot!

Some Minehut Links:

Server Rules • Staff Applications • News & Updates • Reports • Appeals


Minehut: VIP (07/04/2021 --> Current)
Elestra/Versa Realms: Manager (12/04/2021 --> Current)

If you have any questions contact me!
My Discord: BanditEagle#2481
My Spigot Profile: https://www.spigotmc.org/members/banditeagle.935281/
My IGN: BanditEagle

Link to comment
Share on other sites

On 4/27/2021 at 2:35 PM, vaczz said:

but i need essentials, is there an other way to do it with essentials

You aren't adding the balance to the essentials eco. To add money to the essentials eco, do add 200 to player's balance. Currently you are adding 200 to a skript variable. 

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Community Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

22 hours ago, BanditEagle said:

can you send your latest code?

command /bank:
  permission: op
  permission message: "&4This command is'nt ready yet."
  trigger:
    open virtual chest inventory with size 3 named "BANK" to player
    format gui slot 0 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 1 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 2 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 3 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 4 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 5 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 6 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 7 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 8 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 9 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 10 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 11 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 13 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 15 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 16 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 17 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 18 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 19 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 20 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 21 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 22 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 23 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 24 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 25 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 26 of player with orange stained glass pane named "§6[]" with lore "§6[]"
    format gui slot 12 of player with chest named "&bBank" with lore "&6Bank your ores" to run:
      open virtual chest inventory with size 3 named "BANK" to player
      format gui slot 13 of player with diamond named "§b1 Diamond" with lore "§6(amount)" to run:
        add 200 to player's essentials balance
    format gui slot 14 of player with dispenser named "&4UnBank" with lore "&6UnBank your ores" to run:
      open virtual chest inventory with size 3 named "UNBANK" to player
      format gui slot 13 of player with diamond named "§b1 Diamond" with lore "§6(amount)" to run:

Link to comment
Share on other sites

20 hours ago, Tarnerd said:

You aren't adding the balance to the essentials eco. To add money to the essentials eco, do add 200 to player's balance. Currently you are adding 200 to a skript variable. 

so what do i have to set it to?

Link to comment
Share on other sites

41 minutes ago, vaczz said:

add 200 to player's essentials balance

This should be this:

add 200 to balance of player

Also, are you using TuSKe  as a skript addon for the gui? Or are you using something else?

If I have helped you out in your post or you liked what I posted, please upvote and react to my post! It helps me a lot!

Some Minehut Links:

Server Rules • Staff Applications • News & Updates • Reports • Appeals


Minehut: VIP (07/04/2021 --> Current)
Elestra/Versa Realms: Manager (12/04/2021 --> Current)

If you have any questions contact me!
My Discord: BanditEagle#2481
My Spigot Profile: https://www.spigotmc.org/members/banditeagle.935281/
My IGN: BanditEagle

Link to comment
Share on other sites

2 hours ago, BanditEagle said:
2 hours ago, BanditEagle said:

This should be this:



add 200 to balance of player

Also, are you using TuSKe  as a skript addon for the gui? Or are you using something else?


yeah i use TuSKe, but if i reload the skript i get an error

2021-05-01_18.16.34.png

Link to comment
Share on other sites

19 minutes ago, vaczz said:


yeah i use TuSKe, but if i reload the skript i get an error

2021-05-01_18.16.34.png

Make sure you have essentials and vault. 

Discord - tarna256

In-game name - _Tarna_

Website - https://tarna.dev
Paste Site: https://paste.tarna.dev

---------------------------------------------------------

[VIP] - 7/27/2020

Community Support - 7/8/20 | 11/3/20

Helper  - 11/3/20 - 2/21/21

Moderator - 2/21/21 - 5/17/21

❤️ - 5/17/21 - now

Moderator - 12/20/22 - now

---------------------------------------------------------

image.png.70849a9b84e0347ce107b8e3eaee312c.pngimage.png.2111009afbd8bef10966ba9ede35a199.png

Link to comment
Share on other sites

17 hours ago, Tarnerd said:

Make sure you have essentials and vault. 

can you also do it for all the players online on the server?

 

so: add 200 balance to all player's. or some

Link to comment
Share on other sites

something like that should work [in theory]. I suggest testing it out and seeing.

If I have helped you out in your post or you liked what I posted, please upvote and react to my post! It helps me a lot!

Some Minehut Links:

Server Rules • Staff Applications • News & Updates • Reports • Appeals


Minehut: VIP (07/04/2021 --> Current)
Elestra/Versa Realms: Manager (12/04/2021 --> Current)

If you have any questions contact me!
My Discord: BanditEagle#2481
My Spigot Profile: https://www.spigotmc.org/members/banditeagle.935281/
My IGN: BanditEagle

Link to comment
Share on other sites

this post fire

 

 

image.png.9af7f03bd1fb7b2dd57ffa1ea5dca2a0.png

image.png.d34b1b6ca8d6df0f6e11cd3a8d4da472.png

image.png.e696c72dc09d4de83d8d57cef5988a8d.png

image.png.0dc7cd346f3b89b2eabfe14c859a6c34.png

---------------------------------------------------------
Info:
- Skripter [Level: Basic]
- Discord: Lukes#0175
- Previous names: JoinIn, Reviser

Joined: 2017
VIP: 2019

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...