Play BlackJack against your bot!
!bj (resets)
!freeze (stop/hold)
!hm (hitme)
I created a different version of this script that uses card values 1-13 (including aces and face cards) - here it is http://pastebin.com/hLrxeFxs
NOTE: This version does include personalized hash table commands that you will need to remove.
However, parts of the script may be useful. PM for questions if you are new to editing scripts.
@cptpan It runs off of a CasinoChips.txt text file - to start this off you can type /write CasinoChips.txt NICKNAME 500
/write CasinoChips.txt NICKNAME2 500
etc.
Do i even want to get started on this?....
First off blackjack HAS WAY! WAY! MORE THINGS then just "Hit me". Second $rand(1,9)...? in blackjack Ace can be 1 or 11 and there is no "1" card unless you make a ace 1, also there is more then one card that is ten making the odds of getting a ten are greater then getting say a 5 or 6. What is with the freeze? it's called stand.
Now for your scripting, there is no need for all the unsets like that you can use:
unset %cards %bcards %ctotal %btotal
same for all the global vars by using:
var -g %cards = w/e, %bcards = w/e, %ctotal = w/e
For your if statements you use halt at the end when putting in the second if elseif making it not check the elseif unless the if was = to $false.
Overall this script could be a lot better and have more of the blackjack options like really blackjack does.
How do I make this work? How do I get players to have chips so they can actually play?