Sign in to follow this  
Followers 0
alan666

Problem with my poker script

8 posts in this topic

I have poker inspector and party poker and want to link the 2 together but I am having problems with the script.

Here it is

thanks in advance.....

; ----------------------------------------------------------------------------

;

; AutoIt Version: 3.1.0

; Author: A.N.Other <myemail@nowhere.com>

;

; Script Function:

; Template AutoIt script.

;

; ----------------------------------------------------------------------------

; Script Start - Add your code below here

; Pre-initialization : Set Name of Table

Global $tablename = "play money 4071223 holdem- 5/10."

; Initialize Buttons

; These are the button names you might have to change these for different poker clients

$FoldButton = "AfxWnd42u22"

$CheckButton = "AfxWnd42u25"

$CallButton = "AfxWnd42u25"

$BetButton = "AfxWnd42u27"

$RaiseButton = "AfxWnd42u27"

; Set Coordinate mode to relative to window

AutoItSetOption ( "PixelCoordMode", 0 )

; Wait for the window of table to become active

Winwait($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

;Sleep(Random(0, 2000));

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

;Sleep(Random(0, 2000));

ControlClick($tablename, "", $RaiseButton);

endif

WEnd

; Poker Inspector Actions

Func GetAction()

WinActivate ("Connected to """ & $tablename);

; red - fold

$color = PixelGetColor (338, 65);

if $color = 255 then

WinActivate($tablename);

return 1;

endif

;yellow

$color = PixelGetColor (337, 74);

if $color = 65535 then

WinActivate($tablename);

return 2;

endif

; blue

$color = PixelGetColor (337, 84);

if $color = 16776960 then

; sometimes bet or just call 50% of the time

WinActivate($tablename);

return 3;

endif

; green

$color = PixelGetColor (337, 97);

if $color = 65280 then

; If we've got the nuts or close to then sometimes just check 20% of the time

; otherwise raise or reraise

WinActivate($tablename);

return 4;

endif

WinActivate($tablename);

return 1;

EndFunc

; Checks how many empty seats there are

Func OccupiedSeats()

Local $Count = 0

Local $SeatOpenColor = 3246765

;Seat 1

If (PixelGetColor(517, 96) == $SeatOpenColor) Then

$Count = $Count + 1;

EndIf

;Seat 2

If (PixelGetColor(665, 133) == $SeatOpenColor) Then

$Count = $Count + 1;

EndIf

;Seat 3

If (PixelGetColor(735, 251) == $SeatOpenColor) Then

$Count = $Count + 1;

EndIf

; Seat 4

If (PixelGetColor(660, 378) == $SeatOpenColor) Then

$Count = $Count + 1;

EndIf

; Seat 5

If (PixelGetColor(493, 413) == $SeatOpenColor) Then

$Count = $Count + 1;

EndIf

; Seat 6

If (PixelGetColor(262, 413) == $SeatOpenColor) Then

$Count = $Count + 1;

EndIf

; Seat 7

If (PixelGetColor(108, 378) == $SeatOpenColor) Then

$Count = $Count + 1;

EndIf

; Seat 8

If (PixelGetColor(53, 247) == $SeatOpenColor) Then

$Count = $Count + 1;

EndIf

; Seat 9

If (PixelGetColor(126, 133) == $SeatOpenColor) Then

$Count = $Count + 1;

EndIf

; Seat 10

If (PixelGetColor(264, 96) == $SeatOpenColor) Then

$Count = $Count + 1;

EndIf

return $Count;

EndFunc

Share this post


Link to post
Share on other sites



Don't be scared to actually say what the problem is...

When I start the script .. nothing happens. when i click the icon it flashes an X and says script paused.

Thanks

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Global $tablename = "play money 4071223 holdem- 5/10."oÝ÷ Ùh^:.iÇ.j°j{Z½êâi¹^¶!£ bæ­i¹^jëh×6#Region ### START Koda GUI section ### Form=
Global $Form1 = GUICreate("AForm1", 633, 454, 193, 115)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
a really dont know what im doing. I want the program to check the colour in holdem inspector then hit the relevent button in the poker window. got the code from someone else. Think it just needs a few fixes.

But Im completely stuck

Edited by alan666

Share this post


Link to post
Share on other sites

a really dont know what im doing. I want the program to check the colour in holdem inspector then hit the relevent button in the poker window. got the code from someone else. Think it just needs a few fixes.

But Im completely stuck

First for starters i have no clue about this code, but it is missing a gui to look at the colors....

Hard to follow on the code but it checks colors from where again?

Share this post


Link to post
Share on other sites

a really dont know what im doing. I want the program to check the colour in holdem inspector then hit the relevent button in the poker window. got the code from someone else. Think it just needs a few fixes.

But Im completely stuck

First off, I don't know what you're talking about when you say "check the color"

in hold'em inspector, but you can scan the hold'em inspector window, for the

words, "Fold" "Check" "Raise" etc. then depending on what it says take a certain

action.

Share this post


Link to post
Share on other sites

Hey! You're getting better Ozi, this one is only 6 MONTHS old.


Agreement is not necessary - thinking for one's self is!

My-Colors.jpg

cuniform2.gif

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  
Followers 0