Solved Diamond Balance

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

iMinePixels

Member
Mar 12, 2024
22
1
1
22
Looking for someone to create me a Skript that will allow players to deposit + withdraw diamonds from their inventory to a virtual balance. As well as a leaderboard for the top 10 balances.

Edit 1:
Some how, I actually managed to do probably 90% of this myself(clip at the bottom), like I said, somehow. This is literally the most advanced thing i've created with Skript. However, the more I test with it, the more issues I find. The current issue I need to deal with is prevent players from withdrawing diamonds if their inventory cannot hold the amount they're withdrawing. I cannot figure out a way to do this.
I tried something like
Code:
set {_availableSpace} to amount of diamond that player's inventory can hold
, but Skript errors out and tells me "Can't understand this expression: 'amount of diamond that player's inventory can hold'". So if anyone can help me out on what the actual check for this is, i'd appreciate it.

Edit 2(Most Recent):

Alright, I figured it out!!!! Just need to remove the command and add it into the withdraw command.
Code:
command /testdiamonds [<player>] [<integer>]:
    trigger:
        set {_Player} to arg-1
        set {_diamondAmount} to arg-2
        if player has enough space for {_diamondAmount} of diamond:
            give {_Player} {_diamondAmount} of diamond
            message "&bDiamonds have been given!"
            stop
        else:
            message "&cYou do not have enough inventory space for &e%arg-2% Diamonds&c."




 
Last edited: