Author |
Message |
Jonus Novice
Age:52 Gender: Joined: May 23 2006 Posts: 35 Location: Illinois Offline
|
Posted: Mon Sep 17, 2007 2:11 pm Post subject: <py> Subspace Casino |
|
|
|
|
This is a gambling module Ive been working on. It consists of 2 games right now -> Slots and Blackjack. Both games also have a progressive jackpot that can be won. Players can gamble points to pass time in spec, or maybe do a slot tourney?
Anyway, some stuff can be edited at the top of the file such as table minimum at blackjack and coin values in slots. This file also has the option to write the progressive jackpots to a file. If set to 1 it saves the progressive after each spin/deal. If set to 0, it just keeps the progressives in memory for as long as the server is up, reset when the server is restarted.
Installation instructions at the top of the file.
The commands to start playing:
Blackjack:
?deal <amount>
?hit
?double
?stand
?bjprogressive -> Messages you progressive
Slots:
?spin <amount>
?slotsprogressive -> Messages you progressive
This has been tested on windows, if you find some bugs, please report them to me so I can work them out. thanks
casino.zip - 5.96 KB
File downloaded or viewed 41 time(s)
Last edited by Jonus on Mon Sep 17, 2007 8:34 pm, edited 2 times in total |
|
Back to top |
|
|
Chambahs Power attack
Joined: Jun 19 2005 Posts: 820 Offline
|
Posted: Mon Sep 17, 2007 3:08 pm Post subject: |
|
|
|
|
(remembers his first failure at blackjack module)
|
|
Back to top |
|
|
Mine GO BOOM Hunch Hunch What What
Age:40 Gender: Joined: Aug 01 2002 Posts: 3614 Location: Las Vegas Offline
|
Posted: Mon Sep 17, 2007 5:09 pm Post subject: |
|
|
|
|
- If a user bets an odd amount at Blackjack and gets a Blackjack, they are paid less than they should. For integer math, do multiplications before division.
- I don't see anything that would prevent a user from better more than they have.
- Technically, anyone playing this casino will always win money. Blackjack is pretty close to an even game, and you are adding 10% of all loses to the progressive. In fact, if someone macros to just stand on everything, they should have a positive return with the progressive, and make unlimited money without any complex logic.
- You say you have a 4 deck shoe, but technically you have an unlimited shoe. Drawing a card doesn't remove it from the deck, so your deck might as well have just 13 cards. I see you have this as a note up top, just letting you know that your array could be simplified.
There are a bunch of Python coding suggestions I could make, as well a lot of grammatical corrections. If you'd like some tips, feel free to ask.
|
|
Back to top |
|
|
Jonus Novice
Age:52 Gender: Joined: May 23 2006 Posts: 35 Location: Illinois Offline
|
Posted: Mon Sep 17, 2007 5:57 pm Post subject: |
|
|
|
|
I've fixed the being able to bet in slots with out enough money and the blackjack payout ( I think ).
As far as the blackjack progressive, if you dont want people winning it, set the min/max to win it high, you may have a lucky winner sometime. This is just an added feature to keep people intrested.
How big of an impact on odds is it when you are leaving cards in the deck but shuffling after every game? I added 4 decks of cards so it would be more random, but I guess it doesn't matter. I guess since its only you against the dealer you both have an equal chance of drawing good/bad cards.
I guess the good think about python is you cant edit whatever you want and make it say whatever you want
New zip uploaded.
|
|
Back to top |
|
|
Mine GO BOOM Hunch Hunch What What
Age:40 Gender: Joined: Aug 01 2002 Posts: 3614 Location: Las Vegas Offline
|
Posted: Mon Sep 17, 2007 7:17 pm Post subject: |
|
|
|
|
Jonus wrote: | How big of an impact on odds is it when you are leaving cards in the deck but shuffling after every game? I added 4 decks of cards so it would be more random, but I guess it doesn't matter. I guess since its only you against the dealer you both have an equal chance of drawing good/bad cards. |
If you want to be like the casino electronic games that are one on one, you'd just use a 52 card deck. As a card is drawn, it is removed from the deck. Every new deal is a new 52 card deck.
|
|
Back to top |
|
|
Jonus Novice
Age:52 Gender: Joined: May 23 2006 Posts: 35 Location: Illinois Offline
|
Posted: Mon Sep 17, 2007 8:35 pm Post subject: |
|
|
|
|
forgot to fix the blackjack game being able to bet without money. Fixed
Updated zip... again
|
|
Back to top |
|
|
|