Palimax Sceleris
06-11-2005, 06:54 PM
Ok, this is an ultra-rough preview version, but about 90% of the meat is there. There's some TERRIBLE scripting in this, as I wrote most of it while playing either $10-$20 games for fun, or .50/$1 games to add features to the script. So telling me how grossly inefficient all of my CASE statements are will do you no good. This isn't my best work. I do fully intend to give it a GUI and more automated functions, but that's just not the plan.
There are about a billion programs out there now that watch the logs of online poker programs and provide you with realtime hand advice based on pot odds, implied odds, hand strength, etc. This isn't *exactly* another one of those programs.
Most of the programs out there are for Hold'em. There are a FEW that work for Omaha, even fewer still work for Omaha/8 (high-low 8 or better) and one, in particular that I actually tried, I was very disappointed in. This script makes NO attempt to suggest how to play your hand. It doesn't even look at the cards beyond what's dealt to you (yet). To be honest, I think Omaha/8 is played 90% after the flop anyway.]
The *only* thing this script does is (a) Tail your log file, and (b) give you the LOW value for the Hutchinson hand scoring system (http://www.homestead.com/ehutchison/OmahaSystem.html). It currently doesn't deduct points for having 3-flush cards or 4-flush cards. That's about where I fell asleep last night, and I foolishly didn't leave a couple bucks online when I cashed out to add that feature while sitting at a $.50 table today. You'll also need to note that it doesn't identify your hand as a possible HIGH ONLY hand; only calculating the value of low hands for you. One rule at a time :)
If you want to try this script you need the following:
The script below, saved to a file on your machine.
A copy of the Kixscript executables (http://www.kixstart.org/downloads/):
A real-money account at Party Poker
And to be seated at an Omaha-8 game with a log file created and running.
To edit line 17 of the script to point to your current table log. (Note the double-spaces in the table name.)
;================================================= ==============================================
;**** Created with KiXscripts Editor | http://KiXscripts.com (http://kixscripts.com/) ****
;**** Last Modified on 6/11/2005 at 3:29:31 AM by Matt ****
;================================================= ==============================================
;Important lines to process on.
;Table Closed
Break on
$file = "C:\Program Files\PartyPoker\HandHistory\ThePalimax\20050611\T able 27467.txt"
$fso = CreateObject("Scripting.FileSystemObject")
$f = $fso.getfile($file)
$oldsize = $f.size
$cursize = $oldsize
While NOT @error
If $oldsize <> $cursize
$skip = $cursize - ($cursize - $oldsize)
For Each $line In tail($file,-1,$skip)
If $line <> ""
; Process Lines
Select
Case InStr($line,"Dealt to")
$cards=Left(Right($line,13),11)
$card=Split(Left(Right($line,13),11)," ")
CLS
? "New Hand Detected"
? "Your cards are "+$cards
? "0 is "+$Card[0]
? "1 is "+$Card[1]
? "2 is "+$Card[2]
? "3 is "+$Card[3]
EvaluateCardsForPoints
? "Total Value (Low, Pairs - flushes partially implemented) is "+$Points
Case 1
EndSelect
; ? $line
EndIf
Next
$oldsize = $cursize
EndIf
$cursize = $f.size
Sleep 0.1
Loop
Function Tail($file,optional $lines, optional $skip)
Dim $fso, $f,$fs,$i,$all
If NOT $lines $lines = 1 EndIf
If NOT $skip $skip = 0 EndIf
$fso = CreateObject("Scripting.FileSystemObject")
$f = $fso.GetFile($file)
If @error Exit(2) EndIf
$fs = $f.OpenAsTextStream(1)
If $skip $fs.Skip($skip) EndIf
$all = Split($fs.Read($f.size-$skip),@crlf)
If $lines = -1
$tail = $all
Exit(0)
EndIf
Dim $out[$lines]
For $i = Ubound($all)-$lines to Ubound($all)
$out[$i-(Ubound($all)-$lines)] = $all[$i]
Next
ReDim preserve $out[Ubound($out)-1]
$tail=$out Exit(0)
EndFunction
Function EvaluateCardsForPoints
$Points=0
; Start with the lows and kickers.
Select
; Do we have the A combos...
Case InStr($Cards,"A")
; We have an A, lets look for the other combos.
? "Ace was lowest card in hand, processing for A-Low's + Kicker"
Select
; A2
Case InStr($Cards,"2")
$Points=$Points+20
If InStr($Cards,"3")
$Points=$Points+9
EndIf
If InStr($Cards,"4")
$Points=$Points+6
EndIf
If InStr($Cards,"5")
$Points=$Points+4
EndIf
If InStr($Cards,"6")
$Points=$Points+1
EndIf
If InStr($Cards,"T")
$Points=$Points+1
EndIf
If InStr($Cards,"J")
$Points=$Points+2
EndIf
If InStr($Cards,"Q")
$Points=$Points+2
EndIf
If InStr($Cards,"K")
$Points=$Points+2
EndIf
; A3
Case InStr($Cards,"3")
$Points=$Points+17
If InStr($Cards,"4")
$Points=$Points+6
EndIf
If InStr($Cards,"5")
$Points=$Points+4
EndIf
If InStr($Cards,"6")
$Points=$Points+1
EndIf
If InStr($Cards,"T")
$Points=$Points+1
EndIf
If InStr($Cards,"J")
$Points=$Points+2
EndIf
If InStr($Cards,"Q")
$Points=$Points+2
EndIf
If InStr($Cards,"K")
$Points=$Points+2
EndIf
; A4 Combos
Case InStr($Cards,"4")
$Points=$Points+13
If InStr($Cards,"5")
$Points=$Points+4
EndIf
If InStr($Cards,"6")
$Points=$Points+1
EndIf
If InStr($Cards,"T")
$Points=$Points+1
EndIf
If InStr($Cards,"J")
$Points=$Points+2
EndIf
If InStr($Cards,"Q")
$Points=$Points+2
EndIf
If InStr($Cards,"K")
$Points=$Points+2
EndIf
; A5 combos
Case InStr($Cards,"4")
$Points=$Points+13
If InStr($Cards,"6")
$Points=$Points+1
EndIf
If InStr($Cards,"T")
$Points=$Points+1
EndIf
If InStr($Cards,"J")
$Points=$Points+2
EndIf
If InStr($Cards,"Q")
$Points=$Points+2
EndIf
If InStr($Cards,"K")
$Points=$Points+2
EndIf
; No A-low combos
Case 1
EndSelect
; Ok, there was no A in our hand, lets see if there was a 2, and do the combos and kickers.
Case InStr($Cards,"2")
; We have an 2, lets look for the other combos.
? "TWO was lowest card in hand, processing for 2-Low's + Kicker"
Select
; 23
Case InStr($Cards,"3")
$Points=$Points+15
If InStr($Cards,"4")
$Points=$Points+6
EndIf
If InStr($Cards,"5")
$Points=$Points+4
EndIf
If InStr($Cards,"6")
$Points=$Points+1
EndIf
If InStr($Cards,"T")
$Points=$Points+1
EndIf
If InStr($Cards,"J")
$Points=$Points+2
EndIf
If InStr($Cards,"Q")
$Points=$Points+2
EndIf
If InStr($Cards,"K")
$Points=$Points+2
EndIf
; 24
Case InStr($Cards,"4")
$Points=$Points+12
If InStr($Cards,"5")
$Points=$Points+4
EndIf
If InStr($Cards,"6")
$Points=$Points+1
EndIf
If InStr($Cards,"T")
$Points=$Points+1
EndIf
If InStr($Cards,"J")
$Points=$Points+2
EndIf
If InStr($Cards,"Q")
$Points=$Points+2
EndIf
If InStr($Cards,"K")
$Points=$Points+2
EndIf
Case 1
EndSelect
; Ok, there was no A or 2 in our hand, lets see if there was a 3
Case InStr($Cards,"3")
; We have an 3, lets look for the other combos.
? "THREE was lowest card in hand, processing for 3-Low's + Kicker"
Select
; 34
Case InStr($Cards,"4")
$Points=$Points+11
If InStr($Cards,"5")
$Points=$Points+4
EndIf
If InStr($Cards,"6")
$Points=$Points+1
EndIf
If InStr($Cards,"T")
$Points=$Points+1
EndIf
If InStr($Cards,"J")
$Points=$Points+2
EndIf
If InStr($Cards,"Q")
$Points=$Points+2
EndIf
If InStr($Cards,"K")
$Points=$Points+2
EndIf
Case 1
EndSelect
; Ok, there was no A23 in our hand.
Case InStr($Cards,"4")
; We have an 4, lets look for the other combos.
? "FOUR was lowest card in hand, processing for 4-Low's + Kicker"
Select
; 45
Case InStr($Cards,"5")
$Points=$Points+8
If InStr($Cards,"6")
$Points=$Points+1
EndIf
If InStr($Cards,"T")
$Points=$Points+1
EndIf
If InStr($Cards,"J")
$Points=$Points+2
EndIf
If InStr($Cards,"Q")
$Points=$Points+2
EndIf
If InStr($Cards,"K")
$Points=$Points+2
EndIf
Case 1
EndSelect
Case 1
; No Low combos
? "There were no low points scored in your hand"
EndSelect
; Add points for pairs.
; Clear the SET warnings.
$HavePair=0
$FirstPair=""
$SecondPair=""
$ThirdPair=""
; First Card Paired
If
Left($Card[0],1)=Left($Card[1],1)
OR
Left($Card[0],1)=Left($Card[2],1)
OR
Left($Card[0],1)=Left($Card[3],1)
; Left($card[0],1) = Paired
? "Hey, I have a pair of "+Left($Card[0],1)+"'s Process me!"
$HavePair=1
Select
Case Left($Card[0],1)="A"
$FirstPair="A"
$Points=$Points+8
Case Left($Card[0],1)="K"
$FirstPair="K"
$Points=$Points+6
Case Left($Card[0],1)="Q"
$FirstPair="Q"
$Points=$Points+5
Case Left($Card[0],1)="J"
$FirstPair="J"
$Points=$Points+2
Case Left($Card[0],1)="T"
$FirstPair="T"
$Points=$Points+1
Case Left($Card[0],1)="4"
$FirstPair="4"
$Points=$Points+1
Case Left($Card[0],1)="3"
$FirstPair="3"
$Points=$Points+1
Case Left($Card[0],1)="2"
$FirstPair="2"
$Points=$Points+3
Case 1
$FirstPair=Left($Card[0],1)
EndSelect
EndIf
; Second Card Paired
If
Left($Card[1],1)=Left($Card[2],1)
OR
Left($Card[1],1)=Left($Card[3],1)
; Left($card[0],1) = Paired
? "Hey, I have a pair of "+Left($Card[1],1)+"'s Process me!"
$HavePair=1
Select
Case Left($Card[1],1)="A"
$SecondPair="A"
$Points=$Points+8
Case Left($Card[1],1)="K"
$SecondPair="K"
$Points=$Points+6
Case Left($Card[1],1)="Q"
$SecondPair="Q"
$Points=$Points+5
Case Left($Card[1],1)="J"
$SecondPair="J"
$Points=$Points+2
Case Left($Card[1],1)="T"
$SecondPair="T"
$Points=$Points+1
Case Left($Card[1],1)="4"
$SecondPair="4"
$Points=$Points+1
Case Left($Card[1],1)="3"
$SecondPair="3"
$Points=$Points+1
Case Left($Card[1],1)="2"
$SecondPair="2"
$Points=$Points+3
Case 1
$SecondPair=Left($Card[1],1)
EndSelect
EndIf
; Third Card Paired
If
Left($Card[2],1)=Left($Card[3],1)
? "Hey, I have a pair of "+Left($Card[2],1)+"'s Process me!"
$HavePair=1
Select
Case Left($Card[2],1)="A"
$ThirdPair="A"
$Points=$Points+8
Case Left($Card[2],1)="K"
$ThirdPair="K"
$Points=$Points+6
Case Left($Card[2],1)="Q"
$ThirdPair="Q"
$Points=$Points+5
Case Left($Card[2],1)="J"
$ThirdPair="J"
$Points=$Points+2
Case Left($Card[2],1)="T"
$ThirdPair="T"
$Points=$Points+1
Case Left($Card[2],1)="4"
$ThirdPair="4"
$Points=$Points+1
Case Left($Card[2],1)="3"
$ThirdPair="3"
$Points=$Points+1
Case Left($Card[2],1)="2"
$ThirdPair="2"
$Points=$Points+3
Case 1
$ThirdPair=Left($Card[2],1)
EndSelect
EndIf
; Ok, make sure we don't accidentally have a set.
; And take away half if we do -- and ALL if we have quads.
If $HavePair
If $FirstPair=$SecondPair
If $Firstpair<>""
? "Opps, set, deducting"
Select
Case $FirstPair="A" $Points=$Points-4
Case $FirstPair="K" $Points=$Points-3
Case $FirstPair="Q" $Points=$Points-2.5
Case $FirstPair="J" $Points=$Points-1
Case $FirstPair="T" $Points=$Points-.5
Case $FirstPair="4" $Points=$Points-.5
Case $FirstPair="3" $Points=$Points-.5
Case $FirstPair="2" $Points=$Points-1.6
Case 1
EndSelect
EndIf
EndIf
If $FirstPair=$ThirdPair
If $FirstPair<>""
? "Opps, set, deducting"
Select
Case $FirstPair="A" $Points=$Points-4
Case $FirstPair="K" $Points=$Points-3
Case $FirstPair="Q" $Points=$Points-2.5
Case $FirstPair="J" $Points=$Points-1
Case $FirstPair="T" $Points=$Points-.5
Case $FirstPair="4" $Points=$Points-.5
Case $FirstPair="3" $Points=$Points-.5
Case $FirstPair="2" $Points=$Points-1.6
Case 1
EndSelect
EndIf
EndIf
If $SecondPair=$ThirdPair
If $SecondPair<>""
? "Opps, set, deducting"
Select
Case $SecondPair="A" $Points=$Points-4
Case $SecondPair="K" $Points=$Points-3
Case $SecondPair="Q" $Points=$Points-2.5
Case $SecondPair="J" $Points=$Points-1
Case $SecondPair="T" $Points=$Points-.5
Case $SecondPair="4" $Points=$Points-.5
Case $SecondPair="3" $Points=$Points-.5
Case $SecondPair="2" $Points=$Points-1.6
Case 1
EndSelect
EndIf
EndIf
EndIf
; Ok, now it's time for phase four.
; Do I have a flush.
; Lets check the ones we care about, mostly by brute force.
$SpadeFlush=0
$DiamondFlush=0
$HeartFlush=0
$ClubFlush=0
$Suites="s","h","d","c"
; Check the first card for flushes.
For Each $Suite In $Suites
If Right($Card[0],1)="$Suite"
AND
(
Right($Card[1],1)="$Suite"
OR
Right($Card[2],1)="$Suite"
OR
Right($Card[3],1)="$Suite"
)
If $Suite="s" $SpadeFlush=1 EndIf
If $Suite="h" $HeartFlush=1 EndIf
If $Suite="d" $DiamondFlush=1 EndIf
If $Suite="c" $ClubFlush=1 EndIf
EndIf
Next
; And the second card.
For Each $Suite In $Suites
If Right($Card[1],1)="$Suite"
AND
(
Right($Card[2],1)="$Suite"
OR
Right($Card[3],1)="$Suite"
)
If $Suite="s" $SpadeFlush=1 EndIf
If $Suite="h" $HeartFlush=1 EndIf
If $Suite="d" $DiamondFlush=1 EndIf
If $Suite="c" $ClubFlush=1 EndIf
EndIf
Next
; And the second card.
For Each $Suite In $Suites
If Right($Card[2],1)="$Suite"
AND
Right($Card[3],1)="$Suite"
If $Suite="s" $SpadeFlush=1 EndIf
If $Suite="h" $HeartFlush=1 EndIf
If $Suite="d" $DiamondFlush=1 EndIf
If $Suite="c" $ClubFlush=1 EndIf
EndIf
Next
; Ok, we know what flushes we have, how high are they?
; an Ace, add 4 pts.
; a King, add 3 pts.
; a Queen OR Jack, add 2 pts.
; an 8, 9, OR Ten, one pt.
If $SpadeFlush
Select
Case InStr($cards,"As")
$Points=$Points+4
? "Ace High Spades Found"
Case InStr($cards,"Ks")
$Points=$Points+3
? "King High Spades Found"
Case InStr($cards,"Qs")
$Points=$Points+2
? "Queen High Spades Found"
Case InStr($cards,"Js")
$Points=$Points+2
? "Jack High Spades Found"
Case InStr($cards,"Ts")
$Points=$Points+1
? "Ten High Spades Found"
Case InStr($cards,"9s")
$Points=$Points+1
? "Nine High Spades Found"
Case InStr($cards,"8s")
$Points=$Points+1
? "Eight High Spades Found"
Case 1
? "Spades found, but too low to count."
EndSelect
EndIf
If $HeartFlush
Select
Case InStr($cards,"Ah")
$Points=$Points+4
? "Ace High Hearts Found"
Case InStr($cards,"Kh")
$Points=$Points+3
? "King High Hearts Found"
Case InStr($cards,"Qh")
$Points=$Points+2
? "Queen High Hearts Found"
Case InStr($cards,"Jh")
$Points=$Points+2
? "Jack High Hearts Found"
Case InStr($cards,"Th")
$Points=$Points+1
? "Ten High Hearts Found"
Case InStr($cards,"9h")
$Points=$Points+1
? "Nine High Hearts Found"
Case InStr($cards,"8h")
$Points=$Points+1
? "Eight High Hearts Found"
Case 1
? "Hearts found, but too low to count."
EndSelect
EndIf
If $DiamondFlush
Select
Case InStr($cards,"Ad")
$Points=$Points+4
? "Ace High Diamonds Found"
Case InStr($cards,"Kd")
$Points=$Points+3
? "King High Diamonds Found"
Case InStr($cards,"Qd")
$Points=$Points+2
? "Queen High Diamonds Found"
Case InStr($cards,"Jd")
$Points=$Points+2
? "Jack High Diamonds Found"
Case InStr($cards,"Td")
$Points=$Points+1
? "Ten High Diamonds Found"
Case InStr($cards,"9d")
$Points=$Points+1
? "Nine High Diamonds Found"
Case InStr($cards,"8d")
$Points=$Points+1
? "Eight High Diamonds Found"
Case 1
? "Diamonds found, but too low to count."
EndSelect
EndIf
If $ClubFlush
Select
Case InStr($cards,"Ac")
$Points=$Points+4
? "Ace High Clubs Found"
Case InStr($cards,"Kc")
$Points=$Points+3
? "King High Clubs Found"
Case InStr($cards,"Qc")
$Points=$Points+2
? "Queen High Clubs Found"
Case InStr($cards,"Jc")
$Points=$Points+2
? "Jack High Clubs Found"
Case InStr($cards,"Tc")
$Points=$Points+1
? "Ten High Clubs Found"
Case InStr($cards,"9c")
$Points=$Points+1
? "Nine High Clubs Found"
Case InStr($cards,"8c")
$Points=$Points+1
? "Eight High Clubs Found"
Case 1
? "Clubs found, but too low to count."
EndSelect
EndIf
EndFunction
There are about a billion programs out there now that watch the logs of online poker programs and provide you with realtime hand advice based on pot odds, implied odds, hand strength, etc. This isn't *exactly* another one of those programs.
Most of the programs out there are for Hold'em. There are a FEW that work for Omaha, even fewer still work for Omaha/8 (high-low 8 or better) and one, in particular that I actually tried, I was very disappointed in. This script makes NO attempt to suggest how to play your hand. It doesn't even look at the cards beyond what's dealt to you (yet). To be honest, I think Omaha/8 is played 90% after the flop anyway.]
The *only* thing this script does is (a) Tail your log file, and (b) give you the LOW value for the Hutchinson hand scoring system (http://www.homestead.com/ehutchison/OmahaSystem.html). It currently doesn't deduct points for having 3-flush cards or 4-flush cards. That's about where I fell asleep last night, and I foolishly didn't leave a couple bucks online when I cashed out to add that feature while sitting at a $.50 table today. You'll also need to note that it doesn't identify your hand as a possible HIGH ONLY hand; only calculating the value of low hands for you. One rule at a time :)
If you want to try this script you need the following:
The script below, saved to a file on your machine.
A copy of the Kixscript executables (http://www.kixstart.org/downloads/):
A real-money account at Party Poker
And to be seated at an Omaha-8 game with a log file created and running.
To edit line 17 of the script to point to your current table log. (Note the double-spaces in the table name.)
;================================================= ==============================================
;**** Created with KiXscripts Editor | http://KiXscripts.com (http://kixscripts.com/) ****
;**** Last Modified on 6/11/2005 at 3:29:31 AM by Matt ****
;================================================= ==============================================
;Important lines to process on.
;Table Closed
Break on
$file = "C:\Program Files\PartyPoker\HandHistory\ThePalimax\20050611\T able 27467.txt"
$fso = CreateObject("Scripting.FileSystemObject")
$f = $fso.getfile($file)
$oldsize = $f.size
$cursize = $oldsize
While NOT @error
If $oldsize <> $cursize
$skip = $cursize - ($cursize - $oldsize)
For Each $line In tail($file,-1,$skip)
If $line <> ""
; Process Lines
Select
Case InStr($line,"Dealt to")
$cards=Left(Right($line,13),11)
$card=Split(Left(Right($line,13),11)," ")
CLS
? "New Hand Detected"
? "Your cards are "+$cards
? "0 is "+$Card[0]
? "1 is "+$Card[1]
? "2 is "+$Card[2]
? "3 is "+$Card[3]
EvaluateCardsForPoints
? "Total Value (Low, Pairs - flushes partially implemented) is "+$Points
Case 1
EndSelect
; ? $line
EndIf
Next
$oldsize = $cursize
EndIf
$cursize = $f.size
Sleep 0.1
Loop
Function Tail($file,optional $lines, optional $skip)
Dim $fso, $f,$fs,$i,$all
If NOT $lines $lines = 1 EndIf
If NOT $skip $skip = 0 EndIf
$fso = CreateObject("Scripting.FileSystemObject")
$f = $fso.GetFile($file)
If @error Exit(2) EndIf
$fs = $f.OpenAsTextStream(1)
If $skip $fs.Skip($skip) EndIf
$all = Split($fs.Read($f.size-$skip),@crlf)
If $lines = -1
$tail = $all
Exit(0)
EndIf
Dim $out[$lines]
For $i = Ubound($all)-$lines to Ubound($all)
$out[$i-(Ubound($all)-$lines)] = $all[$i]
Next
ReDim preserve $out[Ubound($out)-1]
$tail=$out Exit(0)
EndFunction
Function EvaluateCardsForPoints
$Points=0
; Start with the lows and kickers.
Select
; Do we have the A combos...
Case InStr($Cards,"A")
; We have an A, lets look for the other combos.
? "Ace was lowest card in hand, processing for A-Low's + Kicker"
Select
; A2
Case InStr($Cards,"2")
$Points=$Points+20
If InStr($Cards,"3")
$Points=$Points+9
EndIf
If InStr($Cards,"4")
$Points=$Points+6
EndIf
If InStr($Cards,"5")
$Points=$Points+4
EndIf
If InStr($Cards,"6")
$Points=$Points+1
EndIf
If InStr($Cards,"T")
$Points=$Points+1
EndIf
If InStr($Cards,"J")
$Points=$Points+2
EndIf
If InStr($Cards,"Q")
$Points=$Points+2
EndIf
If InStr($Cards,"K")
$Points=$Points+2
EndIf
; A3
Case InStr($Cards,"3")
$Points=$Points+17
If InStr($Cards,"4")
$Points=$Points+6
EndIf
If InStr($Cards,"5")
$Points=$Points+4
EndIf
If InStr($Cards,"6")
$Points=$Points+1
EndIf
If InStr($Cards,"T")
$Points=$Points+1
EndIf
If InStr($Cards,"J")
$Points=$Points+2
EndIf
If InStr($Cards,"Q")
$Points=$Points+2
EndIf
If InStr($Cards,"K")
$Points=$Points+2
EndIf
; A4 Combos
Case InStr($Cards,"4")
$Points=$Points+13
If InStr($Cards,"5")
$Points=$Points+4
EndIf
If InStr($Cards,"6")
$Points=$Points+1
EndIf
If InStr($Cards,"T")
$Points=$Points+1
EndIf
If InStr($Cards,"J")
$Points=$Points+2
EndIf
If InStr($Cards,"Q")
$Points=$Points+2
EndIf
If InStr($Cards,"K")
$Points=$Points+2
EndIf
; A5 combos
Case InStr($Cards,"4")
$Points=$Points+13
If InStr($Cards,"6")
$Points=$Points+1
EndIf
If InStr($Cards,"T")
$Points=$Points+1
EndIf
If InStr($Cards,"J")
$Points=$Points+2
EndIf
If InStr($Cards,"Q")
$Points=$Points+2
EndIf
If InStr($Cards,"K")
$Points=$Points+2
EndIf
; No A-low combos
Case 1
EndSelect
; Ok, there was no A in our hand, lets see if there was a 2, and do the combos and kickers.
Case InStr($Cards,"2")
; We have an 2, lets look for the other combos.
? "TWO was lowest card in hand, processing for 2-Low's + Kicker"
Select
; 23
Case InStr($Cards,"3")
$Points=$Points+15
If InStr($Cards,"4")
$Points=$Points+6
EndIf
If InStr($Cards,"5")
$Points=$Points+4
EndIf
If InStr($Cards,"6")
$Points=$Points+1
EndIf
If InStr($Cards,"T")
$Points=$Points+1
EndIf
If InStr($Cards,"J")
$Points=$Points+2
EndIf
If InStr($Cards,"Q")
$Points=$Points+2
EndIf
If InStr($Cards,"K")
$Points=$Points+2
EndIf
; 24
Case InStr($Cards,"4")
$Points=$Points+12
If InStr($Cards,"5")
$Points=$Points+4
EndIf
If InStr($Cards,"6")
$Points=$Points+1
EndIf
If InStr($Cards,"T")
$Points=$Points+1
EndIf
If InStr($Cards,"J")
$Points=$Points+2
EndIf
If InStr($Cards,"Q")
$Points=$Points+2
EndIf
If InStr($Cards,"K")
$Points=$Points+2
EndIf
Case 1
EndSelect
; Ok, there was no A or 2 in our hand, lets see if there was a 3
Case InStr($Cards,"3")
; We have an 3, lets look for the other combos.
? "THREE was lowest card in hand, processing for 3-Low's + Kicker"
Select
; 34
Case InStr($Cards,"4")
$Points=$Points+11
If InStr($Cards,"5")
$Points=$Points+4
EndIf
If InStr($Cards,"6")
$Points=$Points+1
EndIf
If InStr($Cards,"T")
$Points=$Points+1
EndIf
If InStr($Cards,"J")
$Points=$Points+2
EndIf
If InStr($Cards,"Q")
$Points=$Points+2
EndIf
If InStr($Cards,"K")
$Points=$Points+2
EndIf
Case 1
EndSelect
; Ok, there was no A23 in our hand.
Case InStr($Cards,"4")
; We have an 4, lets look for the other combos.
? "FOUR was lowest card in hand, processing for 4-Low's + Kicker"
Select
; 45
Case InStr($Cards,"5")
$Points=$Points+8
If InStr($Cards,"6")
$Points=$Points+1
EndIf
If InStr($Cards,"T")
$Points=$Points+1
EndIf
If InStr($Cards,"J")
$Points=$Points+2
EndIf
If InStr($Cards,"Q")
$Points=$Points+2
EndIf
If InStr($Cards,"K")
$Points=$Points+2
EndIf
Case 1
EndSelect
Case 1
; No Low combos
? "There were no low points scored in your hand"
EndSelect
; Add points for pairs.
; Clear the SET warnings.
$HavePair=0
$FirstPair=""
$SecondPair=""
$ThirdPair=""
; First Card Paired
If
Left($Card[0],1)=Left($Card[1],1)
OR
Left($Card[0],1)=Left($Card[2],1)
OR
Left($Card[0],1)=Left($Card[3],1)
; Left($card[0],1) = Paired
? "Hey, I have a pair of "+Left($Card[0],1)+"'s Process me!"
$HavePair=1
Select
Case Left($Card[0],1)="A"
$FirstPair="A"
$Points=$Points+8
Case Left($Card[0],1)="K"
$FirstPair="K"
$Points=$Points+6
Case Left($Card[0],1)="Q"
$FirstPair="Q"
$Points=$Points+5
Case Left($Card[0],1)="J"
$FirstPair="J"
$Points=$Points+2
Case Left($Card[0],1)="T"
$FirstPair="T"
$Points=$Points+1
Case Left($Card[0],1)="4"
$FirstPair="4"
$Points=$Points+1
Case Left($Card[0],1)="3"
$FirstPair="3"
$Points=$Points+1
Case Left($Card[0],1)="2"
$FirstPair="2"
$Points=$Points+3
Case 1
$FirstPair=Left($Card[0],1)
EndSelect
EndIf
; Second Card Paired
If
Left($Card[1],1)=Left($Card[2],1)
OR
Left($Card[1],1)=Left($Card[3],1)
; Left($card[0],1) = Paired
? "Hey, I have a pair of "+Left($Card[1],1)+"'s Process me!"
$HavePair=1
Select
Case Left($Card[1],1)="A"
$SecondPair="A"
$Points=$Points+8
Case Left($Card[1],1)="K"
$SecondPair="K"
$Points=$Points+6
Case Left($Card[1],1)="Q"
$SecondPair="Q"
$Points=$Points+5
Case Left($Card[1],1)="J"
$SecondPair="J"
$Points=$Points+2
Case Left($Card[1],1)="T"
$SecondPair="T"
$Points=$Points+1
Case Left($Card[1],1)="4"
$SecondPair="4"
$Points=$Points+1
Case Left($Card[1],1)="3"
$SecondPair="3"
$Points=$Points+1
Case Left($Card[1],1)="2"
$SecondPair="2"
$Points=$Points+3
Case 1
$SecondPair=Left($Card[1],1)
EndSelect
EndIf
; Third Card Paired
If
Left($Card[2],1)=Left($Card[3],1)
? "Hey, I have a pair of "+Left($Card[2],1)+"'s Process me!"
$HavePair=1
Select
Case Left($Card[2],1)="A"
$ThirdPair="A"
$Points=$Points+8
Case Left($Card[2],1)="K"
$ThirdPair="K"
$Points=$Points+6
Case Left($Card[2],1)="Q"
$ThirdPair="Q"
$Points=$Points+5
Case Left($Card[2],1)="J"
$ThirdPair="J"
$Points=$Points+2
Case Left($Card[2],1)="T"
$ThirdPair="T"
$Points=$Points+1
Case Left($Card[2],1)="4"
$ThirdPair="4"
$Points=$Points+1
Case Left($Card[2],1)="3"
$ThirdPair="3"
$Points=$Points+1
Case Left($Card[2],1)="2"
$ThirdPair="2"
$Points=$Points+3
Case 1
$ThirdPair=Left($Card[2],1)
EndSelect
EndIf
; Ok, make sure we don't accidentally have a set.
; And take away half if we do -- and ALL if we have quads.
If $HavePair
If $FirstPair=$SecondPair
If $Firstpair<>""
? "Opps, set, deducting"
Select
Case $FirstPair="A" $Points=$Points-4
Case $FirstPair="K" $Points=$Points-3
Case $FirstPair="Q" $Points=$Points-2.5
Case $FirstPair="J" $Points=$Points-1
Case $FirstPair="T" $Points=$Points-.5
Case $FirstPair="4" $Points=$Points-.5
Case $FirstPair="3" $Points=$Points-.5
Case $FirstPair="2" $Points=$Points-1.6
Case 1
EndSelect
EndIf
EndIf
If $FirstPair=$ThirdPair
If $FirstPair<>""
? "Opps, set, deducting"
Select
Case $FirstPair="A" $Points=$Points-4
Case $FirstPair="K" $Points=$Points-3
Case $FirstPair="Q" $Points=$Points-2.5
Case $FirstPair="J" $Points=$Points-1
Case $FirstPair="T" $Points=$Points-.5
Case $FirstPair="4" $Points=$Points-.5
Case $FirstPair="3" $Points=$Points-.5
Case $FirstPair="2" $Points=$Points-1.6
Case 1
EndSelect
EndIf
EndIf
If $SecondPair=$ThirdPair
If $SecondPair<>""
? "Opps, set, deducting"
Select
Case $SecondPair="A" $Points=$Points-4
Case $SecondPair="K" $Points=$Points-3
Case $SecondPair="Q" $Points=$Points-2.5
Case $SecondPair="J" $Points=$Points-1
Case $SecondPair="T" $Points=$Points-.5
Case $SecondPair="4" $Points=$Points-.5
Case $SecondPair="3" $Points=$Points-.5
Case $SecondPair="2" $Points=$Points-1.6
Case 1
EndSelect
EndIf
EndIf
EndIf
; Ok, now it's time for phase four.
; Do I have a flush.
; Lets check the ones we care about, mostly by brute force.
$SpadeFlush=0
$DiamondFlush=0
$HeartFlush=0
$ClubFlush=0
$Suites="s","h","d","c"
; Check the first card for flushes.
For Each $Suite In $Suites
If Right($Card[0],1)="$Suite"
AND
(
Right($Card[1],1)="$Suite"
OR
Right($Card[2],1)="$Suite"
OR
Right($Card[3],1)="$Suite"
)
If $Suite="s" $SpadeFlush=1 EndIf
If $Suite="h" $HeartFlush=1 EndIf
If $Suite="d" $DiamondFlush=1 EndIf
If $Suite="c" $ClubFlush=1 EndIf
EndIf
Next
; And the second card.
For Each $Suite In $Suites
If Right($Card[1],1)="$Suite"
AND
(
Right($Card[2],1)="$Suite"
OR
Right($Card[3],1)="$Suite"
)
If $Suite="s" $SpadeFlush=1 EndIf
If $Suite="h" $HeartFlush=1 EndIf
If $Suite="d" $DiamondFlush=1 EndIf
If $Suite="c" $ClubFlush=1 EndIf
EndIf
Next
; And the second card.
For Each $Suite In $Suites
If Right($Card[2],1)="$Suite"
AND
Right($Card[3],1)="$Suite"
If $Suite="s" $SpadeFlush=1 EndIf
If $Suite="h" $HeartFlush=1 EndIf
If $Suite="d" $DiamondFlush=1 EndIf
If $Suite="c" $ClubFlush=1 EndIf
EndIf
Next
; Ok, we know what flushes we have, how high are they?
; an Ace, add 4 pts.
; a King, add 3 pts.
; a Queen OR Jack, add 2 pts.
; an 8, 9, OR Ten, one pt.
If $SpadeFlush
Select
Case InStr($cards,"As")
$Points=$Points+4
? "Ace High Spades Found"
Case InStr($cards,"Ks")
$Points=$Points+3
? "King High Spades Found"
Case InStr($cards,"Qs")
$Points=$Points+2
? "Queen High Spades Found"
Case InStr($cards,"Js")
$Points=$Points+2
? "Jack High Spades Found"
Case InStr($cards,"Ts")
$Points=$Points+1
? "Ten High Spades Found"
Case InStr($cards,"9s")
$Points=$Points+1
? "Nine High Spades Found"
Case InStr($cards,"8s")
$Points=$Points+1
? "Eight High Spades Found"
Case 1
? "Spades found, but too low to count."
EndSelect
EndIf
If $HeartFlush
Select
Case InStr($cards,"Ah")
$Points=$Points+4
? "Ace High Hearts Found"
Case InStr($cards,"Kh")
$Points=$Points+3
? "King High Hearts Found"
Case InStr($cards,"Qh")
$Points=$Points+2
? "Queen High Hearts Found"
Case InStr($cards,"Jh")
$Points=$Points+2
? "Jack High Hearts Found"
Case InStr($cards,"Th")
$Points=$Points+1
? "Ten High Hearts Found"
Case InStr($cards,"9h")
$Points=$Points+1
? "Nine High Hearts Found"
Case InStr($cards,"8h")
$Points=$Points+1
? "Eight High Hearts Found"
Case 1
? "Hearts found, but too low to count."
EndSelect
EndIf
If $DiamondFlush
Select
Case InStr($cards,"Ad")
$Points=$Points+4
? "Ace High Diamonds Found"
Case InStr($cards,"Kd")
$Points=$Points+3
? "King High Diamonds Found"
Case InStr($cards,"Qd")
$Points=$Points+2
? "Queen High Diamonds Found"
Case InStr($cards,"Jd")
$Points=$Points+2
? "Jack High Diamonds Found"
Case InStr($cards,"Td")
$Points=$Points+1
? "Ten High Diamonds Found"
Case InStr($cards,"9d")
$Points=$Points+1
? "Nine High Diamonds Found"
Case InStr($cards,"8d")
$Points=$Points+1
? "Eight High Diamonds Found"
Case 1
? "Diamonds found, but too low to count."
EndSelect
EndIf
If $ClubFlush
Select
Case InStr($cards,"Ac")
$Points=$Points+4
? "Ace High Clubs Found"
Case InStr($cards,"Kc")
$Points=$Points+3
? "King High Clubs Found"
Case InStr($cards,"Qc")
$Points=$Points+2
? "Queen High Clubs Found"
Case InStr($cards,"Jc")
$Points=$Points+2
? "Jack High Clubs Found"
Case InStr($cards,"Tc")
$Points=$Points+1
? "Ten High Clubs Found"
Case InStr($cards,"9c")
$Points=$Points+1
? "Nine High Clubs Found"
Case InStr($cards,"8c")
$Points=$Points+1
? "Eight High Clubs Found"
Case 1
? "Clubs found, but too low to count."
EndSelect
EndIf
EndFunction