Wednesday, July 3, 2013

Race Track Map - Lottery w/Auto Payment

Welcome to the Lucky Seven Lottery! I tried kind of in vain to get a working roulette table, and after racking my brain for a solution, I decided a lottery system would do the same AND provide some other unique features.

For starters, any amount of people can play, and people can pick the same number with no issues. Using the scoreboard system and command blocks, payout is automatic, no matter where they are in the game!

I have it set to automatically pick a random number between 1 and 7 (thus the name 'Lucky Seven'), as well as a null value (which simply delays choosing a number until the next drawing but lets players keep their bets - that could be changed, though) every five minutes.

How did I do that? I took a random number generator (made by CodeCrafted and improved by emeraldFyr3 on YouTube) and hooked it up to a decoder (also by CodeCrafted). The decoder outputs are then wired to command blocks.

As for the 5-minute delay, I come up with something of my own (though I'm probably not the first to think of it). The device pictured here drops a piece of dirt onto a wooden pressure plate, which triggers the RNG to pick a number. It also snakes upwards turning OFF the redstone torch in the picture.

Exactly 5 minutes later, the dirt despawns and the pressure plate pops back up. This turns the torch back ON, telling the dropper to drop another piece of dirt... and the cycle begins anew!

I'll not explain the remaining pictures in detail as they are pretty much in-stage shots of the redstone nightmare required to make the magic happen. In order - a glimpse at the random number generator, a behind the scenes shot of the lotto selection room, and what the lotto room would look like if you cut away some of the decorations and the floor.

I still have the vending machines/store to build, and I haven't really put a lot of thought into how they will be achieved. I have a few ideas floating around, but I'll be sure to look online to see what others have already come up with.

I'd much rather give credit to someone that truly knows what they're doing than sit here for hours trying to get something to work in a compact and aesthetically-pleasing manner!

No comments:

Post a Comment