Well I haven't contributed anything in too long so here's a little something I hope you like.
If you want to change the table/levers layout all you need to change is the variables at the top of the blackjack.lua movement file.
The maximum amount a player can bet can be changed from the bet.lua movement file.
You can't play the house so you'll need at least 2 people to play but there is no limit on the number of players.
How to Play:
Face cards (Jacks, Queens and Kings) are worth 10 points. Aces are worth 1 or 11, whichever is preferable. Other cards are represented by their number.
It is far from optimal (as far as the code goes) but its working perfectly without bugs on 0.4.
I'm assuming anyone with a little sense can implement this themselves so here it is: View attachment blackjack.zip
I'll update this post with updates/improvements and, if enough people can't figure it out, how to implement it.
If you just want to play come check out https://tntopentibia.com. The table is located on the floor below where you first spawn, along with a high-low dice machine.
If you want to change the table/levers layout all you need to change is the variables at the top of the blackjack.lua movement file.
The maximum amount a player can bet can be changed from the bet.lua movement file.
You can't play the house so you'll need at least 2 people to play but there is no limit on the number of players.
How to Play:
- Step on the tile (pictured above as the grey tile) to activate the betting mechanism.
- Once activated all players will have 20 seconds to place their bet. Each player must call the initial bet to join (cannot raise) by throwing their gold in the fire. The current bet is displayed over the fire. The maximum amount of gold the initial bet allows can be changed (see above).
- After 20 seconds each player will be dealt two cards, the first one being hidden to everyone but yourself. Your cards will be displayed at the bottom of your screen.
- The goal is to keep getting more cards (hitting) in order to get as close as possible to a score of 21 without going over or you will "bust". You must pull the "stay" lever if you do not want any more cards.
- After everyone has either "stayed" or "busted" the person with the highest score less than or equal to 21 gets all the money bet by each player. If there is more than one winner the gold is split evenly.
Face cards (Jacks, Queens and Kings) are worth 10 points. Aces are worth 1 or 11, whichever is preferable. Other cards are represented by their number.
It is far from optimal (as far as the code goes) but its working perfectly without bugs on 0.4.
I'm assuming anyone with a little sense can implement this themselves so here it is: View attachment blackjack.zip
I'll update this post with updates/improvements and, if enough people can't figure it out, how to implement it.
If you just want to play come check out https://tntopentibia.com. The table is located on the floor below where you first spawn, along with a high-low dice machine.