Jump to content

Need more advice


Recommended Posts

Hello

What I am trying to do here is count the number of

opened seats. Then execute an action.

So I wrote this request code

if $Count < 3 Then

WinActivate($tablename);

return 5;

endif

To trigger the #5 instruction in the main loop.

Code as is now

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Func OccupiedSeats()
    
    Local $Count = 0 
    
    
;Seat 1
    If (PixelGetColor(529,58 ) == 8261908 ) Then
        $Count = $Count + 1;
    EndIf
;Seat 2
    If (PixelGetColor(672, 122) == 6360079) Then
        $Count = $Count + 1;
    EndIf
;Seat 3
    If (PixelGetColor(757,215 ) == 8000019) Then
        $Count = $Count + 1;
    EndIf
; Seat 4
    If (PixelGetColor(681,372 ) == 9639705) Then
        $Count = $Count + 1;
    EndIf

return $Count;
    
EndFunc

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Question

Where should I insert the code I wrote?

if $Count < 3 Then
    WinActivate($tablename);
    return 5;
    endif

And does this look right?

Thank You Mike :lmao:

Edited by mike1212
Link to comment
Share on other sites

if $Count < 3 Then

  WinActivate($tablename);

  return 5;

endif 

return $Count;

Where should I insert the code I wrote?

And does this look right?

Thank You Mike :lmao:

<{POST_SNAPBACK}>

Yes, your code looks okay. If I understand correctly, I think this is what you are looking for:

Func OccupiedSeats()
   Local $Count = 0
  ;Seat 1
   If (PixelGetColor(529, 58) == 8261908) Then
      $Count = $Count + 1;
   EndIf
  ;Seat 2
   If (PixelGetColor(672, 122) == 6360079) Then
      $Count = $Count + 1;
   EndIf
  ;Seat 3
   If (PixelGetColor(757, 215) == 8000019) Then
      $Count = $Count + 1;
   EndIf
  ; Seat 4
   If (PixelGetColor(681, 372) == 9639705) Then
      $Count = $Count + 1;
   EndIf
   
   If $Count < 3 Then
      WinActivate($tablename);
      Return 5;
   Else
      Return $Count;
   EndIf
EndFunc  ;==>OccupiedSeats

BTW, when you post code, if you place it within "CODE" and "/code" (square brackets could not be shown) it makes it much easier for everyone to read and work with it. Althouth if it's only a few lines it doesn't much matter.

Phillip

Link to comment
Share on other sites

  • Moderators

Ut oh David, your script is out in the open!!, better get admin to delete it...lol, hey look the script would work, if it had a function do do something other than look for pixels and return a count. Once it finds the pixels, where does it return the count to? Just sit manually, and watch your bot play.

By the way, if you'd like to test it in "Real Money", I'll play it.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Ut oh David, your script is out in the open!!, better get admin to delete it...lol, hey look the script would work, if it had a function do do something other than look for pixels and return a count.  Once it finds the pixels, where does it return the count to?  Just sit manually, and watch your bot play.

By the way, if you'd like to test it in "Real Money", I'll play it.

<{POST_SNAPBACK}>

Hi Ron

What do you think about vex and sparbot ?

I play them and the program does ok.

Poker Academy claim they are the best.

I think there better then most winholdem programs.

Mike :lmao:

Link to comment
Share on other sites

  • Moderators

Hi Ron

What do you think about vex and sparbot ?

I play them and the program does ok.

Poker Academy claim they are the best.

I think there better then most winholdem programs.

Mike :lmao:

<{POST_SNAPBACK}>

I've read about both, both from same company. Also POKI bot (sounds most impressive if integration is possible"), I was unaware that "vex" or "sparbot" were able to be integrated into pokersites currently for actual bot play.

So, I can only say that the literature was ineresting, for I don't have either.

Ron

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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...