Command Headache - money system /w command blocks

Command Headache - money system /w command blocks - Crop hacker silhouette typing on computer keyboard while hacking system

I have set up a monetary system on my server using command blocks. I have set up a store to buy and sell item. However, you can only do 1 item at a time. I need to figure out how to sell a specified number or a stack of items at time. Any ideas?



Best Answer

It depends how you're doing it. Let's say for the sake of example that a player has just paid 1 emerald and is now expecting 16 gravel in return.

If you're using /give, it's as simple as including the amount:

/give PlayerNameHere minecraft:gravel 16

If you're putting the items in a chest or having a villager trade them or something, you can change the number of items in a stack by using its NBT data:

/... {...{id:minecraft:gravel,Count:16b...}...}

That's also how you'd test for the expected amount of currency. Sorry if this is unhelpful, I'd really need to see your commands to know how this would fit in.




Pictures about "Command Headache - money system /w command blocks"

Command Headache - money system /w command blocks - From above of crop anonymous male hacker typing on netbook with data on screen while sitting at desk
Command Headache - money system /w command blocks - From below of ethnic boy in hoodie controlling robot using panel while standing in light room
Command Headache - money system /w command blocks - Unrecognizable woman holding paw of dog



How do you get money in Minecraft with command blocks?

Basic Minecraft commands
  • 1. /help. Use the /help command to learn about other commands. ...
  • 2. /time.
  • 3. /gamerule. Use the /gamerule command to toggle different rules in the world. ...
  • 4. /tell. Use the /tell command to send a chat message only to a specific player or players. ...
  • 5. /kill. ...
  • 6. /give. ...
  • 7. /clear. ...
  • 8. /effect.


What are good commands for command block?

Command blocks and functions can be used, among many other things, to change the difficulty, change the state of the weather, or give a player predesignated items. They are particularly useful for the /weather and /time set commands, as they are only available in cheat mode otherwise.



Minecraft Money Scoreboard Tutorial - Working Currency system and Shop




More answers regarding command Headache - money system /w command blocks

Answer 2

I personally would create a custom villager, using an excellent generator such as this, then summoning it at the shop location in your world.

Link:https://minecraftcommand.science/shop-generator

Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Anete Lusina, Sora Shimazaki, Vanessa Loring, Ivan Babydov