1
Need help with Coomand Blocks
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
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
Create an account or sign in to comment.
6
1
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.
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
Wicked.
1
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
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!
THANKYOU EVERYONE FOR SUGGESTIONS AND HELP!
1
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.
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
Make it /fill an area with redstone blocks to activate multiple command blocks, but the above is basically right.