After watching the Lotto Tutorial made by desiassassin, I learned more about the redstone machine and I've decided to create a new kind of machine which may be used by staff and/or players. With n-stock being hot in sales these days, I've thought about making an Item trade machine.
For example You, the machine owner, want to buy n-stocks in exchange for about 14 diamonds. Just create a shop chest with these text on
and when another player sells their n-stock, the seller will be given 14 diamonds from the dropper.
How do you make this machine and how does the contraption work?
Watch this video first then the explanation will follow.
The base contraption is the lotto machine.
wouldn't bother explaining this anymore since it's already explained in desi's post. Only thing that's change is that the end of the piston has a slime block and redstone block (also replaced the block next to the chest on the left with obsidian)
I attached a repeater(which will send a redstone signal to the second sticky piston) to where the slime block's initial position is because when the "lotto machine" is activated, it makes the first piston do a quick pull and push which can give off a pulse quick enough to the repeater to move the second redstone block without retracting it as shown in the video below.
Next is connecting the moved redstone block to a simple redstone clock. Simple enough.
Now the next step is creating a way to retrieve the redstone block back in place in order to stop a clock so I made a delayed pulse to follow up a trigger to the second sticky piston to retract the redstone block. The duration of the delayed pulse depends on how many items should be dropped by the hopper.
N= max ticked repeaters
N+1 = items dropped by the dropper
In this specific design that I showed, it has 13 max ticked repeaters in the pulse delayer, therefore the dropper will drop 14 items.
Item drops may be decreased or increased depending on how you want it. Reply down on how many items you want the machine to drop and I may send attach a screenshot of a design in this post.
Last step is just connecting the redstone clock to the dropper. (I made the dropper at that height because I experienced the machine breaking when spammed so you might need to do a lot of testings when you change something from the design that I use)
In what ways will the machine be useful?
-Item trades will now be possible(like 1 diamond in exchange of 7 iron ingots)
-staff and player currencies can now be exchanged with items without manual player trades
-multi drop lottos can be made using this machine
Note* This machine cannot be broken in this design. Dropper gives off less items when shop sign is spammed.
If you have any questions, feel free to ask below. Feedback will be appreciated because this is my first tutorial