Jump to content
Sign in to follow this  
fataly

How i can...

Recommended Posts

fataly

How i can calcucate best poker hand if i mine script save card numbers and countrys in .ini file. ? i m so poor in math so i dont wanna trie. first i ask here. if no1 help i m sad :D

Edited by fataly

Share this post


Link to post
Share on other sites
Aassdd

What is the "best" card? I've never played poker. Maybe if you give more details we can help you.

Share this post


Link to post
Share on other sites
fataly

i mean this:

First:

while 1

_waituntilflop()

_readcards()

_calculatebesthand()

if _notgoodhand then

_fold()

endif

if _raise then

_raise5()

elseif not _raise then

_check()

endif

wend

I got func and these working. now i want that _calculatebesthand() func.... but dont know how to make

Share this post


Link to post
Share on other sites
Aassdd

Yes, but which is the best card?! I don't know poker. And how does _readcards function stores the cards.

Share this post


Link to post
Share on other sites
fataly

spade = "xS" (black)

Cross = "xc" (black)

Heart = "xh" (Red)

Other red card dont remeber name = "xd" (red)

aces are best i thing. and 2 are lowest.

in game there are :

onepair

twopair

threekind

fourkind

fullhouse

straight

flush

and i thing these can check with this:

Func _findyourhand()
    If _checkflush() = 1 And _checkstraight() = 1 And $c[5][0] = "10" Then
        $handrecords[1][1] += 1
       $d[4][1] & " " & $d[5][0] & $d[5][1])
    ElseIf _checkflush() = 1 And _checkstraight() = 1 Then
        $handrecords[2][1] += 1
    ElseIf _checkfourkind() = 1 Then
        $handrecords[3][1] += 1
    ElseIf _checkfullhouse() = 1 Then
        $handrecords[4][1] += 1
    ElseIf _checkflush() = 1 Then
        $handrecords[5][1] += 1
    ElseIf _checkstraight() = 1 Then
        $handrecords[6][1] += 1
    ElseIf _checkthreekind() = 1 Then
        $handrecords[7][1] += 1
    ElseIf _checktwopair() = 1 Then
        $handrecords[8][1] += 1
    ElseIf _onepair() = 1 Then
        $handrecords[9][1] += 1
    ElseIf _highcard() = 1 Then
        $handrecords[10][1] += 1
    EndIf
EndFunc

$cgen[1] = "2s"

$cgen[2] = "2c"

$cgen[3] = "2h"

$cgen[4] = "2d"

$cgen[5] = "3s"

$cgen[6] = "3c"

$cgen[7] = "3h"

$cgen[8] = "3d"

$cgen[9] = "4s"

$cgen[10] = "4c"

$cgen[11] = "4h"

$cgen[12] = "4d"

$cgen[13] = "5s"

$cgen[14] = "5c"

$cgen[15] = "5h"

$cgen[16] = "5d"

$cgen[17] = "6s"

$cgen[18] = "6c"

$cgen[19] = "6h"

$cgen[20] = "6d"

$cgen[21] = "7s"

$cgen[22] = "7c"

$cgen[23] = "7h"

$cgen[24] = "7d"

$cgen[25] = "8s"

$cgen[26] = "8c"

$cgen[27] = "8h"

$cgen[28] = "8d"

$cgen[29] = "9s"

$cgen[30] = "9c"

$cgen[31] = "9h"

$cgen[32] = "9d"

$cgen[33] = "Ts"

$cgen[34] = "Tc"

$cgen[35] = "Th"

$cgen[36] = "Td"

$cgen[37] = "Js"

$cgen[38] = "Jc"

$cgen[39] = "Jh"

$cgen[40] = "Jd"

$cgen[41] = "Qs"

$cgen[42] = "Qc"

$cgen[43] = "Qh"

$cgen[44] = "Qd"

$cgen[45] = "Ks"

$cgen[46] = "Kc"

$cgen[47] = "Kh"

$cgen[48] = "Kd"

$cgen[49] = "As" ace of spade

$cgen[50] = "Ac" ace of cross

$cgen[51] = "Ah" ace of heart

$cgen[52] = "Ad" ace of ?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×