0

I am building a gambling machine on a Bukkit server with the Vault plugin, and I would like to do an error check. When the player wants to play the game, they need to have X dollars in their bank account. If they have less than the amount they want to bet, they should not be able to place a bet.

Is there any way to get a Redstone flag to be true if the player has enough money in their account to place the bet they want to place (or false if they don't)?

3
  • 4
    There is no money in Minecraft. Please add "mods" or "bukkit" to tags, and clarify.
    – Orc JMR
    Apr 15, 2013 at 4:36
  • @OrcJMR The OP could be using XP or Scoreboard to keep track of money though.
    – tomb
    Apr 15, 2013 at 8:21
  • @mrfishie Damm, scoreboards, right. Still, nothing can be said until clarified.
    – Orc JMR
    Apr 15, 2013 at 8:23

2 Answers 2

3

You sound like you're making a whole new mini-game for a minecraft bukkit server, with a vault compatible economy plugin. For something like this, I'd recommend using http://dev.bukkit.org/server-mods/variabletriggers/ to make scripts to complete your desired action.

If you're coding a plugin by hand, and need some help making it, post here.

1
  • I am making a game within a game. It is a bukkit server and we do have some kind of vault plugin. You are the second person that has mentioned these variable triggers and scripting. I am not coding a plugin. I thank you for linking me.
    – rmarenda
    Apr 15, 2013 at 11:38
3

If you are using a players XP as money, the following command in a command block will output a signal if the nearest player has no XP to a comparator:

/testfor @p[l=0]

Alternatively, if you are using the new Scoreboard to keep track of money, you can find if the nearest player has a score of zero in the objective money with this command:

/testfor @p[money=0]

You can replace the text money with the internal name of the objective you are using to keep track of money.

If you are using something else, like a Bukkit plugin or a mod, please clarify this in your question, including the plugin/mod that you are using.

2
  • I apologize, I was not very specific. It's a bukkit server with a vault plugin. I am going to have to explore the /testfor command.
    – rmarenda
    Apr 15, 2013 at 11:40
  • @rmarenda You will probably not have any luck with the /testfor command if you are using a plugins. I haven't seen any plugins that add arguments to be used with command blocks.
    – tomb
    Apr 16, 2013 at 7:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .