Hi guys,
I want to make a command like /saldo that shows how much money you have in your inventory.
I have a couple of items that are worth something. this is the list:
Fermented spider eye: 10
Blaze powder: 20
Magma cream: 50
Rabbit foot: 100
Rabbit hide: 250
Clay: 500
Gunpowder: -50
Flint: -250
Slimeball: -250
Brick: -500
I want the command to check if the player has items of these in his inventory, if so, i want a code to do the math so that at the end, the saldo will be shown.
Like if you have 10 spider eyes, 1 magma cream, 1 blazepowder, and 2 gunpowders, that it will be:
10x10 = 100
1x50 = 50
1x 20
2x -50
Total (the message to the player): Saldo: 120
Can someone help me with this?
I want to make a command like /saldo that shows how much money you have in your inventory.
I have a couple of items that are worth something. this is the list:
Fermented spider eye: 10
Blaze powder: 20
Magma cream: 50
Rabbit foot: 100
Rabbit hide: 250
Clay: 500
Gunpowder: -50
Flint: -250
Slimeball: -250
Brick: -500
I want the command to check if the player has items of these in his inventory, if so, i want a code to do the math so that at the end, the saldo will be shown.
Like if you have 10 spider eyes, 1 magma cream, 1 blazepowder, and 2 gunpowders, that it will be:
10x10 = 100
1x50 = 50
1x 20
2x -50
Total (the message to the player): Saldo: 120
Can someone help me with this?