This is a lua version of the original casino's Blackjack game (betting not included)
The game plays in mainchat as follows:
- 1 player starts the game typing !bj_start
- Up to 7 players can join typing !bj_join
- If 7 players are reached, or otherwise 30 seconds has passed, the game starts
- The dealer shuffles the cards, and deals every player, including himself 2 cards
- All cards are shown, except for the dealers first card
- The players play in turn ( as they joined ) until they either bust, or stand
- If a player goes offline, the dealer will wait 30 seconds for return. If no return, the dealer moves on
- After all players have played, the house plays
- The house hits on 16 and lower, and stands on 17 and up
- After the house is finished, all hands are compared with the house
- Those not busted and having a higher score than the house win
- Those having the same score as the house push
- Those having a lower score loose
- If the house busts, all players not busted win
That's basically it, Enjoy ;D
Attached is the script
Just tested this script and allthought its lua 5.1.1, it works in my hub.... :) :) :)
There`s no errors in ptokax script editor and everything seems to work at this far..... :D
Thanks man for this great game, my "casino" is now ready to run...
Maybe that texas hold`em would be next... ;)
Yes it would be, although I'll have to dive some deeper into the actual scoring table for Texas Hold 'Em.
Besides that, I don't think poker is fun without betting, so you'll need a cash register as well ;)
For a complete casino hub, I think the way to go is this:
Games run in the own chat/gameroom
There's a cash register where people can "buy" chips.
And maybe some OPs running around as security so no1 cheats ;D
But thats the big picture, first to see if Blackjack runs stable like this :)
I've made a small update to the BlackJack script
It will now hide the house's points, which kinda gave away the hidden card, until the house starts to play.
Attached is the updated file.