1

2 commands in 1 command block

bmmccarty 11/5/14 6:27 pm
953
11/6/2014 7:03 pm
is there a way to remove someones levels and say something in one command block? havent quite been able to figure it out.

making a store with command blocks and have limited space

command block 1:
/give @p[lm=20] minecraft:diamond_sword
command block 2:
/xp -20l @p[lm=20]

is there a way to throw in a say command on the second command block?
Posted by
bmmccarty
Level 1 : New Miner
1

  Have something to say?

JoinSign in

9

bmmccarty
11/06/2014 7:03 pm
Level 1 : New Miner
I got something worked out, thank you all for your comments!
1
anonpmc1494372
11/06/2014 5:01 pm
Level 7 : Apprentice Miner
[deleted]
1
n8mo
11/06/2014 4:27 pm
Level 37 : Artisan Prince
Personally I'd use a 20 hertz clock and assign a scoreboard objective to any player with that number of levels, then I'd remove that many levels from the player with one command block, and use another command block to /tellraw a message to the player with that objective, and /give the player with that score the item. Then I'd remove the objective from the player after it ran that loop.

It takes about 5 command blocks but it is very reliable, instant, seamless, and multiplayer friendly. You really should use 20 hertz clocks for any command block purposes now, it decreases redstone lag and works more efficiently and reliably.
1
Johnanater
11/05/2014 8:55 pm
Level 15 : Journeyman Taco
1
Snowyfox
11/06/2014 4:19 pm
Level 26 : Expert Princess
Using a pretty unknown mod is a bit overkill for this purpose.
1
bmmccarty
11/05/2014 8:00 pm
Level 1 : New Miner
i got something kinda worked out,used pistons to send a pulse down where i have mass amounts of room. now i just need to get the command block to say something only if the player has the lvl removed
1
Snowyfox
11/05/2014 7:12 pm
Level 26 : Expert Princess
Use redstone logic to trigger them both with one charge. One thing I liked to do was use repeaters aiming into a command block, which then also triggered the one below at the same time.

*EDIT* If you need space, your only option is to bury them downwards. (Charge the second one which is under the first and above the third "say" block)
1
DiomondBlock
11/05/2014 7:08 pm
Level 49 : Master Architect
just have 2 with a repeater or something between
1
TheMrzombie2
11/05/2014 6:52 pm
Level 15 : Journeyman Network
Not possible.
1

Welcome