Take the 2-minute tour ×
Arqade is a question and answer site for passionate videogamers on all platforms. It's 100% free, no registration required.

An Exp Shop is a button that, when pressed, will give you items in exchange for a set amount of exp. You build one by placing a button on a wall, and putting two repeaters and command blocks behind it. Here is a diagram:

 b  = button
[ ] = wall
 r  = repeater
[c] = command block

 b [ ] r [c] r [c]

In the first command block, you give the player the item if they have enough xp: give @p[lm={XP}] {ITEM ID} {QUANTITY}. In the second command block, you take xp from them: xp -{XP}L @p[lm={XP}]

The problem is that when single player commands are installed, it will take xp from the player but it won't give them the item. If single player commands are not installed, it works perfectly.

Is there a way to make it work both with and without single player commands?

share|improve this question
4  
Just a guess, but it's possible that SPC replaces the vanilla commands' code in such a way that the item-giving code isn't valid anymore, so it fails to run. (If so, that would be a bug in SPC.) –  SevenSidedDie Jan 6 '13 at 23:26
    
Thanks for clarifying the question! Aside from that, is there a reason this needs the [minecraft-redstone] tag? That tag is normally used when asking about wiring design, which doesn't seem relevant to this problem. –  SevenSidedDie Jan 8 '13 at 3:00
    
An exp shop uses redstone to work, but I see your point so I'll remove the [minecraft-redstone] tag. –  Zephlon Jan 8 '13 at 21:08
add comment

1 Answer

As pointed out by SevenSidedDie, SPC overrides a few of the default commands, one of them most likely being /give. Do /help give to view about the command.

Yeah, a lot of Adventure maps say "Don't use SPC, it stuffs up our command blocks…" I'm not sure why the SPC devs decided to edit vanilla commands.

share|improve this answer
    
The /xp command isn't the problem, it's that the /give command can't be used the the same as in vanilla Minecraft. In vanilla the format is: /give <player> <item id>, but with spc you can't include the player name. –  Zephlon Jan 20 '13 at 5:07
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.