Chris867 Posted March 14, 2008 Share Posted March 14, 2008 hi, i know that this script is here for lot of months, now i have and try it *lol* the best thing: it works so long...that´s good but, that´s bad: it always folds :-D and when its free to check, it also wants to folds...grrr (popup message from party poker, and the script pauses) i guess, that this script doesnt get the right colours from poker inspector, or it just get the red one, means fold... i read that there have to be a GUI or so for the correct colours? or maybe the script is wrong? :-( anyone know how to fix? please dont say that´s scum or anything else like that... thank u very much :-) CODE; Play Party Poker ; Pre-initialization : Set Name of Table Global $tablename = "Play money 4072045" 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 ; Poker Inspector Actions Func GetAction() WinActivate ("Connected to """ & $tablename); ; red - fold $color = PixelGetColor (338, 62); if $color = 16711680 then ;MsgBox(0, "Debug", "Red Fold") WinActivate($tablename); return 1; endif ;yellow $color = PixelGetColor (338, 74); if $color = 16776960 then ;MsgBox(0, "Debug", "Yellow Check") WinActivate($tablename); return 2; endif ; blue $color = PixelGetColor (338, 86); if $color = 65535 then ;MsgBox(0, "Debug", "Blue Check") WinActivate($tablename); return 3; endif ; green $color = PixelGetColor (338, 97); if $color = 65280 then ;MsgBox(0, "Debug", "Green Raise") WinActivate($tablename); return 4; endif ;MsgBox(0, "Debug", "Got None") WinActivate($tablename); return 1; EndFunc Link to comment Share on other sites More sharing options...
Chris867 Posted March 15, 2008 Author Share Posted March 15, 2008 no one can help me?? Link to comment Share on other sites More sharing options...
zzpot Posted March 17, 2008 Share Posted March 17, 2008 no one can help me?? Hlo ChrisThats is a pretty old copy of a script that you are working with there..........Just breezzed it and it looks like your using opi for the brains. Please give me alittle time to look thru my back ups and see if I cannot pull you something out alittle newer than thatscript.I stopped playing that site after they put a ban on U.S. Citizens.Will look here in a bit and post when I find it.P.S.I think you will find that most are very helpful here! (when you are building something yourself)In a script like you are wanting to build and run you have to think of everything that includes any pop up windows, (do you really want to fold) (y/n)That would mean scripting for such a event in your script.Yes it can be fun !!!!!It takes learning one command at a time for me that is...Get back with you today....zz Link to comment Share on other sites More sharing options...
zzpot Posted March 18, 2008 Share Posted March 18, 2008 hlo chris here is a old script that use to work well at party poker you may have to find if they have changed the keys.....Using your info tool Like i said its probably not as old as the one your working with but may get you started in a new direction. TrayTip("Single Table", "Limited Holdem Only", 5, 1) Sleep(3000) TrayTip("clears any tray tip","",0) Sleep(300) AutoItSetOption ("PixelCoordMode", 2) AutoItSetOption ("MouseCoordMode", 2) AutoItSetOption ("WinTextMatchMode", 1) AutoItSetOption ("TrayIconHide", 1) AutoItSetOption ("ColorMode", 0) WinSetState("PartyPoker.com: Poker Lobby -", "", @SW_SHOW ) WinActivate("PartyPoker.com: Poker Lobby -") sleep(500) $lobby = WinGetTitle("","");Rem goes to the lobby and reads how long the title is ! Global $lobby WinSetState ( "PartyPoker.com: Poker Lobby -", "", @SW_MINIMIZE ) sleep(200) ;----------------------------------------------------------------------------------- ;Rem We should be right back at the table after that flash of the lobby $static1 = StringTrimLeft( $lobby , 40 ) ;Rem Static1 is the users name from the lobby no ;----------------------------------------------------------------------------------- $static2 = $static1 + 2 ;Rem this should add the space and ! point ;----------------------------------------------------------------------------------- ;Rem get title of the table your setting at $title = WinGetTitle("", "") $gl = 13 $len1 = StringLen($static2) $cut = ($gl + $len1) $tablename = StringTrimRight($title, $cut) Global $tablename Global $inspector WinActive($tablename) $Button5 = "Button5" Sleep(500) FileChangeDir("c:\Program Files\HoldemInspector2\") Run("HoldemInspector2.exe") Sleep(1000) WinWaitActive ("Online Hold'em Inspector" , "") WinSetState( "Online Hold'em Inspector", "", @SW_SHOW ) WinActive("Online Hold'em Inspector ", "") sleep(500) ControlClick("Online Hold'em Inspector ", "", $Button5) Sleep(500) ;Rem new drop down window appears WinExists("Select Table") Send("{DOWN}") Send("{ENTER}") ControlClick("Select Table", "", 1059) Sleep(200) ControlClick("Select Table", "", 1);Rem this close window and your opi is set sleep(500) $inspector = WinGetTitle("","") Global $inspector ; Initialize Buttons ; Chris these buttons may have to be upgraded.....!!!! Global $FoldButton = "AfxWnd4217"; Global $CheckButton = "AfxWnd4218"; Global $CallButton = "AfxWnd4218"; Global $BetButton = "AfxWnd4219"; Global $RaiseButton = "AfxWnd4219"; ;Rem New -----------------------------------------------------Activation Switch........... While WinExists($tablename) $FoldVisible = ControlCommand($tablename, "", $FoldButton, "IsVisible", ""); if $FoldVisible = 0 Then Sleep(random(1500,2500)) Endif if $FoldVisible = 1 then Sleep(Random(300,3500)) $action = GetAction() if $action = 6 then ControlClick( $tablename, "", $FoldButton ) endif if $action = 3 then ControlClick( $tablename, "", $CallButton ) endif if $action = 2 then ControlClick( $tablename, "", $CheckButton ) endif if $action = 4 then ControlClick( $tablename, "", $BetButton ) endif ;Rem All In or Capped Bet Call here if $action = 4 Then ControlClick( $tablename, "", $CallButton ) endif if $action = 5 then ControlClick( $tablename, "", $RaiseButton ) endif ;Rem All In or Capped Bet Call here if $action = 5 Then ControlClick( $tablename, "", $CallButton ) endif endif WEnd ; Poker Inspector Actions Func GetAction() WinActive($inspector) Sleep(500) $hard = ControlGetText($inspector, "", 1012) if $hard = "Raise" then return 5; endif if $hard = "Bet" then return 4; endif if $hard = "Call" then return 3; endif if $hard = "Check" then return 2; endif if $hard = "Fold" then return 6; endif EndFunc Let me know if you need any mor help this thing could use a major upgrade ps you would launch you poker client and have this compiled on your desktop as a icon..... find a table you would like to play at and buy in..... then dbbl click the icon and the script should start.....with a tool tip at the bottom.......to show you it did start. it should then open opi and sync up with table name...... how to kill leave the table...... any thoughts get back with me Link to comment Share on other sites More sharing options...
Chris867 Posted March 19, 2008 Author Share Posted March 19, 2008 thx so long do i have to put in the table name or so? and it only works with holdem limit? TrayTip("Single Table", "Limited Holdem Only", 5, 1) ? do i have to sit down at a table? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now