Jump to content

Getting off this little Bug in this Poker-Script


Recommended Posts

Hi there,

i've got the following script. Works fine with Partypoker, but if it should fold but can check for free - it won't click check. It seems to click always fold and then there always pops off the message window "blabla its free to check, are you sure blabla".

Cant get away from this bug, any helping hint?

;
;
;
;
; Play Party Poker

; Pre-initialization : Set Name of Table
Global $tablename = "Play money 4071797"
Global $inspector = "Connected to """ & $tablename

; Initialize Buttons
; These are the button names you might have to change these for different poker clients
$FoldButton = "AfxWnd42u17";
$CheckButton = "AfxWnd42u25";
$CallButton = "AfxWnd42u25";
$BetButton = "AfxWnd42u19";
$RaiseButton = "AfxWnd42u19";

; Set Coordinate mode to relative to window client area
AutoItSetOption ( "PixelCoordMode", 2 ) 

; Wait for the window of table to become active
WinWaitActive($tablename)

; Main Loop
While WinExists($tablename)
    Sleep(300);
    
    $FoldVisible = ControlCommand($tablename, "", $FoldButton, "IsVisible", "");
    $RaiseVisible = ControlCommand($tablename, "", $RaiseButton, "IsVisible", "");
    
    if $FoldVisible = 1 then
        Sleep(Random(1500, 2500))
        $action = GetAction();
        if $action = 1 then
; Fold/Check            
; if we can check for free, then do that instead of folding
            if StringInStr(ControlGetText($tablename, "", $CheckButton), "Check") = 1 then
                ControlClick($tablename, "", $CheckButton);
            else
                ControlClick($tablename, "", $FoldButton);
            endif
        elseif $action = 2 then
; Check/Call
            ControlClick($tablename, "", $CallButton);          
        elseif $action = 3 then
; Call/Bet          
; if we can call then call otherwise bet
            if StringInStr(ControlGetText($tablename, "", $CallButton), "Call") = 1 then
                ControlClick($tablename, "", $CallButton);
            else
                ControlClick($tablename, "", $BetButton);
            endif           
        elseif $action = 4 then
; Bet/Raise or Call
            if $RaiseVisible = 1 then; Cannot raise if its capped already -- so just call in that case
                ControlClick($tablename, "", $RaiseButton);
            else
                ControlClick($tablename, "", $CallButton);              
            endif
        endif
    endif

WEnd
Edited by GermanFool
Link to comment
Share on other sites

sure, the Problem is that it clicks on fold instead of clicking on check AND if it clicks on fold but can click check, there pops a window of with "...are you sure... check is free..." on it.

The script has got the following: "; Fold/Check

; if we can check for free, then do that instead of folding"

so if the bot wants to click fold but at this time can click check, it should click check - but clicks on fold and can't handle the popup-window

solution 1 could be: let it really click on check

solution 2 could be: let it can handle the popup

question 1: why does it click on fold instead of clicking check - when there's fold and check at the same time?

question 2: how can i let it handle the popup? maybe someone (i'm sure that...) knows partypoker and this popup

need help ^^

Edited by GermanFool
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...