Jump to content

  • Curse Sites
Become a Premium Member! Help
Latest News Article

I need help with command blocks

shop need help secen command block

  • Please log in to reply
3 replies to this topic

#1

secen
    secen

    Tree Puncher

  • Members
  • 23 posts
  • Location: Why did you want to now??
  • Minecraft: secen1
  • Xbox:NO! PS3 ^_^

Posted 21 March 2013 - 11:59 AM

So... I want to make a shop with command blocks!... I don't want it to be with xp! I want it to be with points! You now; the points from the new /scoreboard command! I need your help because i made the list with the points but i don't now how to make it work because  if you have like 100 points and the item is 200 you can buy it! After this you will have -100 points. I now how to make it remove the points and give the item but i don't now how to make it check if you have 200 points or more and after this to remove 200 points. So... Please make a video to explain to me how to make this.
And you will be in the credits of my custom map! Here is the link of my custom map http://www.minecraft.../#entry21501560
Posted Image

Register or log in to remove.

#2

Vagossssssssss
  • Location: I live at perfect vacations map :)
  • Minecraft: Vagossssssssss

Posted 21 March 2013 - 12:59 PM

Use the testfor command :D

Place redstone near the button then place a command block /testfor @a[score_Name_min200] (Name=your objective, min...the price you have to pay). After that place a comparator that and after that a repeater, then place a commandblock that will remove the price /scoreboard players remove 200. Then the same redstone will triger a dispencer that will give them the thing you want :)

I hope I helped if yes then rep me please ;)

#3

secen
    secen

    Tree Puncher

  • Members
  • 23 posts
  • Location: Why did you want to now??
  • Minecraft: secen1
  • Xbox:NO! PS3 ^_^

Posted 21 March 2013 - 05:37 PM

View PostVagossssssssss, on 21 March 2013 - 12:59 PM, said:

Use the testfor command Posted Image

Place redstone near the button then place a command block /testfor @a[score_Name_min200] (Name=your objective, min...the price you have to pay). After that place a comparator that and after that a repeater, then place a commandblock that will remove the price /scoreboard players remove 200. Then the same redstone will triger a dispencer that will give them the thing you want Posted Image

I hope I helped if yes then rep me please Posted Image
Is only one problem, the comparator needs to reset somehow because is blocking after you turn on the first time the command block and you have the amount of points! The single way the comparator is resetting is when you don't have the amount of points! This means that if player 1 bought a sword player 2 can't bought the sword too! Player 2 can bought the sword only if player 1 has no money and activates the command block!
Posted Image

#4

Vagossssssssss
  • Location: I live at perfect vacations map :)
  • Minecraft: Vagossssssssss

Posted 21 March 2013 - 07:30 PM

Well you can do many things to fix that but I will say what I was going to do :) (Maybe isn't the best way but it will solve the problem)

Make a redstone clock (or a minecar clock) to update all the comparators then in each dispencer place this (before the dispencer):

-Place a sticky piston and a block that will block the redstone

redstone block(with the sticky piston) redstone
block       redstone                              block
                block

When you click the button the sticky piston will move the block one block further allowing the redstone to pass for only one time, the redstone will trigger a command block to take away the price and the dispencer to give the item :D. There is no way to bug or cheat if you use that way :). But be careful place only one redstone clock for all the trades and you must place a piston mechanic in each trade

I hope this will solve all your problems, report any bug and please test it a lot that will help us both :), if it's ok then tell me