Help with buy Armors

Started by Sekend_ on Tue, 01/05/2021 - 12:58

Topic category: Help with modding (Java Edition)

Last seen on 20:34, 20. Feb 2021
Joined Nov 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Help with buy Armors
Tue, 01/05/2021 - 12:58

My Code

 

Hello, I have a GUI connected to a block and when you click the "Buy" button this code is executed. I would like that one armor cost 100 Idamanten and that this will then be removed. Now I have the problem that if you only have 60 diamonds they are pulled off and you still get the armor. Now the code should recognize how many diamonds I have and only remove the diamonds and give out the armor if there are 100 diamonds. Can somebody help me?

Last seen on 12:57, 27. Feb 2021
Joined Aug 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Is because you only say that…
Tue, 01/05/2021 - 17:56

Is because you only say that this is supposed to happend when the player has diamonds in inventory, but you don't say that there has to be 100. When the game remove the diamonds it search 100, but if there is less than that it will remove then too because there are diamonds in player's inventory.

Last seen on 20:34, 20. Feb 2021
Joined Nov 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
can you help me to do this
Wed, 01/06/2021 - 20:05

can you help me to do this

Last seen on 12:57, 27. Feb 2021
Joined Aug 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I'll try, let me test it.
Thu, 01/07/2021 - 07:35

I'll try, let me test it.

Last seen on 12:57, 27. Feb 2021
Joined Aug 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Well, I did it, more or less…
Thu, 01/07/2021 - 08:04

Well, I did it, more or less, I don't know how to check if the player has a number of items in the inventory, so i created a GUI in a block and made that, if in the slot 0 there are 64 diamonds, it will give you the armour. If you create another slot you can make that, if in slot 0 there are 64 diamond, check if there are 36 in slot 1 the same way it check the first and then it give you the armor. Here I'll let you the procedure I used.

 

This is the procedure.

Last seen on 12:57, 27. Feb 2021
Joined Aug 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Well, the image is this, I…
Thu, 01/07/2021 - 08:05

Well, the image is this, I can't see it in my comment so I'll let the link here https://ibb.co/fSbM9h7.

Last seen on 20:34, 20. Feb 2021
Joined Nov 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Thank you, you kept me very…
Thu, 01/07/2021 - 17:11

Thank you, you kept me very busy

Last seen on 12:57, 27. Feb 2021
Joined Aug 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Well, I don't understand a…
Fri, 01/08/2021 - 08:39

Well, I don't understand a lot of english so I don't know what you arre trying to say, but your welcome I guess.