1

Need help with Coomand Blocks

Roadkill2552's Avatar Roadkill25525/17/14 4:35 pm
1 emeralds 560 6
5/23/2014 12:11 am
AetherMaster's Avatar AetherMaster
Ok, so im making this map, you see. and i have amulti money system. im having 1 issue,
because of the location of the shop, i can only fit 1 command block, and the item that your buying costs 2 different types of money. Gold & Resources. So is there a coomand similar to the one below that will not just remove x amount from 1 time of money, but 2 different types of points.

scoreboard players remove @p[score_TeamGold_min=100] TeamGold 100

Ya see there i can take away 100$ from the Team Gold Deposit. But The Item the player buys costs 500 Resources as well. so i need to know if there is a way and a coomand that will take away 100 From Team Gold and 500 from Resources with 1 coomand block.

Ive always had problems, stringing togeather commands so im not sure about this.
IF Anyone can help and supply a valid answer, That would be super fantastic.
and Very Much Appreciated!

-TeamFuturePC
Posted by Roadkill2552's Avatar
Roadkill2552
Level 26 : Expert Engineer
28

Create an account or sign in to comment.

6

1
05/23/2014 12:11 am
Level 44 : Master Demolitionist
AetherMaster
AetherMaster's Avatar
Clicking the button will activate a setblock to the 2 command blocks BUT if the players have less than 500 resources or 100 gold than they could just click the button to get a bunch of the item and their score or money would go negative.
Therefore if your not use /testfor @p[score_scorenamehere_min=500] and let the signal it outputs go into another command block that takes away that amount of score.
That way the player can't have infinite amounts of the item that's being sold.
1
05/17/2014 9:39 pm
Level 26 : Expert Engineer
Roadkill2552
Roadkill2552's Avatar
Wicked.
1
05/17/2014 4:44 pm
Level 40 : Master Electrician
-WaffleKing-
-WaffleKing-'s Avatar
What you could do is have two command blocks somewhere else on the map. One takes off money and one takes off currency. When you press the button to buy it, the command block behind the button sets a redstone block next to the two command blocks with /setblock.
1
05/17/2014 5:41 pm
Level 26 : Expert Engineer
Roadkill2552
Roadkill2552's Avatar
This is a good idea. i never would have thought of that. and then i can just have my two currency commad blocks that take away the money, and then it will replace the redstone block with air. Thankyou so much.


THANKYOU EVERYONE FOR SUGGESTIONS AND HELP!
1
05/17/2014 5:09 pm
Level 23 : Expert Artist
furf
furf's Avatar
You could do this 2 ways:

You would need 3 command blocks, since you'd be placing a redstone block but not removing it. So, set up your command block behind the button to have /setblock and the redstone block, then have 3 command block somewhere else, with 2 having your currency things and one having another setblock, but when powered, it replaces the redstone block with air.

Or, if "/gamerule doTileDrops" is false (which will make it so you can't get any drops from blocks at all sadly) you can simply paste this code in:
/setblock x y z redstone_block 0 destroy
It will turn the old redstone block into air for a tick then replace the air with a redstone block automatically.

Either way, your choice, as I was merely expanding on WaffleKing's idea.
1
05/17/2014 5:08 pm
Level 20 : Expert Nerd
Dig03
Dig03's Avatar
Make it /fill an area with redstone blocks to activate multiple command blocks, but the above is basically right.
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome