Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; GENERAL SETTINGS
- debug := 0
- act_only_on_active_table := 0
- fix_blinds := 1
- deduct_rake := 1
- fold_to_any := 0
- ; IPOKER SPECIFIC
- Ipoker_miniview := 0
- Ipoker_BetBoxColor = 0xFFFFFF ;most of the iPoker skins use a white background for the bet box, if yours doesn't then you need to change this value
- Ipoker_ShowBetBoxColor := 0 ;set this to 1 to pop up a message box with the bet box color when you bet pot, replace 0xFFFFFF with this.
- ; PARTY SPECIFIC
- party_uses_commas_for_decimals := 1
- fphg_party_hh_folder := "C:\FreePHG_HandHistories\"
- ; **** SET TO 0 (zero) if using old FPHG without "live" folder, else 1 (one)
- fphg_uselive = 1
- ;FTP SPECIFIC
- ; **** SET TO 0 (zero) if using FTP official client, 1 (one) if using the Beta
- ; THERE IS NO LONGER AN NEED TO CHANGE THIS... BETA IS THE NEW OFFICIAL
- FTP_Beta := 1
- ;STARS SPECIFIC
- use_old_stars_buttons := 0
- stars_editbox = PokerStarsSliderEditorClass1
- ;Uncomment for PokerStars Client version < 2.286
- ;stars_editbox = Edit7
- ;AHK STUFF, DO NOT EDIT
- #MaxHotkeysPerInterval 300
- #SingleInstance, Force
- SendMode Input
- SetTitleMatchMode 2
- caller_hwnd := ""
- SysGet, border, 32
- SysGet, caption, 4
- caption := border + caption
- #NoEnv
- ;END OF AHK STUFF
- ;--------------- Copy / Paste --- Add other Crypto skinpas here ---------------;
- WinGet, interpoker, pid, InterPoker - Lobby
- if (interpoker)
- {
- GroupAdd, CryptoTables, ahk_pid%interpoker%,,, Lobby
- }
- WinGet, sunpoker, pid, SunPoker.com - Lobby
- if (sunpoker)
- {
- GroupAdd, CryptoTables, ahk_pid%sunpoker%,,, Lobby
- }
- WinGet, willhill, pid, William Hill Poker - Lobby
- if (willhill)
- {
- GroupAdd, CryptoTables, ahk_pid%willhill%,,, Lobby
- }
- WinGet, betsafe, pid, Betsafe Poker - Lobby
- if (betsafe)
- {
- GroupAdd, CryptoTables, ahk_pid%betsafe%,,, Lobby
- }
- WinGet, parbet, pid, Parbet.com Poker - Lobby
- if (parbet)
- {
- GroupAdd, CryptoTables, ahk_pid%parbet%,,, Lobby
- }
- WinGet, lw, pid, Littlewoods Poker - Lobby
- if (lw)
- {
- GroupAdd, CryptoTables, ahk_pid%lw%,,, Lobby
- }
- WinGet, dtd, pid, DTD Poker - Lobby
- if (dtd)
- {
- GroupAdd, CryptoTables, ahk_pid%dtd%,,, Lobby
- }
- ;----------- END OF CRYPTO SKINS --------------
- WinGet, ub, pid, UltimateBet
- if (ub)
- {
- GroupAdd, UBTables, ahk_pid%ub%,,, UltimateBet
- }
- GroupAdd, StarsTables, Logged In as ,,, PokerStars Lobby
- GroupAdd, PartyTables, ahk_class #32770,,, : Poker Lobby
- GroupAdd, FullTiltTables, ahk_class FTC_TableViewFull
- GroupAdd, PrimaTables, ahk_class POPUP_INT_DLG_WINDOW
- GroupAdd, MiniFT, MiniFT ahk_class AutoHotkeyGUI
- GroupAdd, iPokerTables, ahk_class PTIODEVICE,,, : Nickname:
- ;--------- IPOKER COORDINATES -------------------
- iPokerX := 557 + border
- iPokerY := 462 + caption
- iPokerChat := 550
- iPokerRaiseX := 554
- iPokerRaiseY := 545
- ipokerCallx := 445
- ipokerCallY:= 550
- iPokerFoldX := 300
- iPokerFoldY := 550
- if iPoker_miniview
- {
- iPokerX := 400 + border
- iPokerY := 265 + caption
- iPokerChat := 300
- iPokerRaiseX := 400
- iPokerRaiseY := 325
- ipokerCallx := 310
- ipokerCallY:= 325
- iPokerFoldX := 220
- iPokerFoldY := 325
- }
- return
- #include betpot_default_hotkeys.ahk
- Fold(id)
- {
- IfWinExist, ahk_id%id% ahk_group MiniFT
- {
- WinGetTitle, t, ahk_id%id%
- StringTrimLeft, t, t, Instr(t, "hwnd:", true, 0)+4
- id := t
- }
- IfWinExist, ahk_id%id% ahk_group StarsTables
- {
- FoldStars(id)
- }
- Else IfWinExist, ahk_id%id% ahk_group FullTiltTables
- {
- FoldFT(id)
- }
- Else IfWinExist, ahk_id%id% ahk_group PartyTables
- {
- FoldParty(id)
- }
- Else IfWinExist, ahk_id%id% ahk_group CryptoTables
- {
- FoldCrypto(id)
- }
- Else IfWinExist, ahk_id%id% ahk_group UBTables
- {
- FoldUB(id)
- }
- Else IfWinExist, ahk_id%id% ahk_group iPokerTables
- {
- FoldIPoker(id)
- }
- }
- Call(id)
- {
- IfWinExist, ahk_id%id% ahk_group MiniFT
- {
- WinGetTitle, t, ahk_id%id%
- StringTrimLeft, t, t, Instr(t, "hwnd:", true, 0)+4
- id := t
- }
- IfWinExist, ahk_id%id% ahk_group StarsTables
- {
- CallStars(id)
- }
- Else IfWinExist, ahk_id%id% ahk_group FullTiltTables
- {
- CallFT(id)
- }
- Else IfWinExist, ahk_id%id% ahk_group PartyTables
- {
- CallParty(id)
- }
- Else IfWinExist, ahk_id%id% ahk_group CryptoTables
- {
- CallCrypto(id)
- }
- Else IfWinExist, ahk_id%id% ahk_group UBTables
- {
- CallUB(id)
- }
- Else IfWinExist, ahk_id%id% ahk_group iPokerTables
- {
- CallIPoker(id)
- }
- }
- Raise(id)
- {
- IfWinExist, ahk_id%id% ahk_group MiniFT
- {
- WinGetTitle, t, ahk_id%id%
- StringTrimLeft, t, t, Instr(t, "hwnd:", true, 0)+4
- id := t
- }
- IfWinExist, ahk_id%id% ahk_group StarsTables
- {
- RaiseStars(id)
- }
- Else IfWinExist, ahk_id%id% ahk_group FullTiltTables
- {
- RaiseFT(id)
- }
- Else IfWinExist, ahk_id%id% ahk_group PartyTables
- {
- RaiseParty(id)
- }
- Else IfWinExist, ahk_id%id% ahk_group CryptoTables
- {
- RaiseCrypto(id)
- }
- Else IfWinExist, ahk_id%id% ahk_group UBTables
- {
- RaiseUB(id)
- }
- Else IfWinExist, ahk_id%id% ahk_group IPokerTables
- {
- RaiseIPoker(id)
- }
- }
- AlterAmount(id, dir="", frac=1, unit="")
- {
- global party_uses_commas_for_decimals, stars_editbox
- ;MsgBox, %id%
- IfWinExist, ahk_id%id% ahk_group MiniFT
- {
- WinGetTitle, t, ahk_id%id%
- StringTrimLeft, t, t, Instr(t, "hwnd:", true, 0)+4
- id := t
- }
- WinGetTitle, title, ahk_id%id%
- ;MsgBox, %title%
- amount := 0
- IfWinExist, ahk_id%id% ahk_group StarsTables
- {
- If ((InStr(title, "No Limit") OR InStr(title, "Pot Limit")) AND InStr(title, "Tournament") = 0)
- {
- StringMid, bb, title, InStr(title, "/") + 1, InStr(title, a_space,"", InStr(title, "/")) - InStr(title, "/") - 1
- }
- else if (InStr(title, "No Limit") <> 0 AND InStr(title, "Tournament") <> 0)
- {
- StringMid, bb, title, InStr(title, "/", "", InStr(title, "Blinds")) + 1, InStr(title, a_space, "", InStr(title, "Blinds") + 8) - InStr(title, "/", "", InStr(title, "Blinds")) - 1 ;___so we retrieve the big blind instead
- }
- }
- Else IfWinExist, ahk_id%id% ahk_group PartyTables
- {
- If (InStr(title, "NL") <> 0 AND InStr(title, "Buy-in") = 0)
- {
- ;old StringMid, bb, title, InStr(title, "/"), InStr(title, ". ", InStr(title,"/")) - InStr(title, "/") -1
- ;new
- StringMid, bb, title, InStr(title, "/")+1, 1
- ; StringMid, bb, title, InStr(title, "/") + 1, (InStr(title, "$") - InStr(title, "/"))
- ;StringMid, bb, title, InStr(title, "/"), InStr(title, ", ", InStr(title,"$")) - InStr(title, "/") -1
- ;StringMid, bb, title, InStr(title, "/"), InStr(title, ", ", InStr(title,"/")) - InStr(title, "/") -1
- ;MsgBox %bb%
- }
- else if (InStr(title, "NL") <> 0 AND InStr(title, "Buy-in") <> 0)
- {
- ControlGetText, text, Static5, ahk_id%id%
- IfNotInString, text, Blinds-Antes
- {
- StringMid, bb, text, InStr(text, "/") + 1, InStr(text, ")") - InStr(text, "/") - 1
- }
- else
- {
- StringMid, bb, text, InStr(text, "/") + 1, InStr(text, "-","",InStr(text, "/")) - InStr(text, "/") - 1
- }
- }
- if (party_uses_commas_for_decimals)
- {
- StringReplace, bb, bb, `,,., All
- }
- }
- Else IfWinExist, ahk_id%id% ahk_group CryptoTables
- {
- StringMid, bb, title, InStr(title, "/") + 1, InStr(title, a_space,"", InStr(title, "/")) - InStr(title, "/") - 1
- }
- Else IfWinExist, ahk_id%id% ahk_group FullTiltTables
- {
- StringMid, bb, title, InStr(title, "/") + 1, InStr(title, a_space,"", InStr(title, "/")) - InStr(title, "/") - 1
- }
- Else IfWinExist, ahk_id%id% ahk_group PrimaTables
- {
- StringTrimLeft, bb, title, InStr(title, "$", true, 0)
- StringMid, bb, bb, InStr(bb, " ")-1,, L
- }
- Else IfWinExist, ahk_id%id% ahk_group UBTables
- {
- StringTrimLeft, bb, title, InStr(title, "$", true, 0)-1
- StringTrimRight, bb, bb, Strlen(bb) - InStr(bb, A_Space)
- StringReplace, bb, bb, $., $0., All
- StringReplace, bb, bb, $,, All
- StringReplace, bb, bb, %A_Space%,, All
- ;StringMid, bb, bb, InStr(bb, "$")-1,, L
- ;MsgBox, %bb%
- }
- Else IfWinExist, ahk_id%id% ahk_group iPokerTables
- {
- StringTrimLeft, bb, title, InStr(title, "/$")
- }
- Else
- {
- Send {%A_ThisHotkey%}
- return
- }
- StringReplace,bb,bb,$,,1
- StringReplace,bb,bb,£,,1
- StringReplace,bb,bb,€,,1
- sb := sb(bb)
- ;MsgBox, "%sb%"
- ;MsgBox, "%bb%"
- If (unit = "" or unit = "bb")
- {
- unit := bb
- }
- Else If (unit = "sb")
- {
- unit := sb
- }
- Else If (unit = "pot")
- {
- pot := 0
- call := 0
- hero_bet := 0
- street := "pre"
- hero_position := ""
- open := 0
- max := 10000000
- IfWinExist, ahk_id%id% ahk_group StarsTables
- {
- PotSizeStars(id, pot, call, sb, bb, hero_bet, street, hero_position, open)
- }
- Else IfWinExist, ahk_id%id% ahk_group PartyTables
- {
- PotSizeParty(id, pot, call, sb, bb, hero_bet, street, hero_position, open)
- if (party_uses_commas_for_decimals)
- {
- StringReplace, call, call, `,,., All
- }
- }
- Else IfWinExist, ahk_id%id% ahk_group CryptoTables
- {
- PotSizeCrypto(id, pot, call, sb, bb, hero_bet, street, hero_position, open)
- }
- Else IfWinExist, ahk_id%id% ahk_group FullTiltTables
- {
- ControlGet, v, Visible, , Edit1, ahk_id%id%
- if (v)
- {
- PotSizeFullTilt2(id, pot, call, sb, bb, hero_bet, street, hero_position, open, max)
- }
- else
- {
- return
- }
- ;msgbox, %pot%
- }
- Else IfWinExist, ahk_id%id% ahk_group PrimaTables
- {
- PotSizePrima(id, pot, call, sb, bb, hero_bet, street, hero_position, open)
- }
- Else IfWinExist, ahk_id%id% ahk_group iPokerTables
- {
- PotSizeIPoker(id, pot, call, sb, bb, hero_bet, street, hero_position, open)
- }
- pot := ((pot + call + hero_bet) )+ call
- ;Msgbox, %pot%
- unit := pot
- }
- amount := unit * frac
- ;MsgBox, %unit%
- if (dir="down")
- {
- amount := amount - (2*amount)
- }
- ;Msgbox, %sb%/%bb%
- /*
- IfWinExist, ahk_id%id% ahk_group MiniFT
- {
- ControlGet, v, Visible, , Edit1, ahk_id%id%
- if (v)
- {
- ControlGetText, t, Edit1, ahk_id%id%
- t := t + amount
- if (t < 0)
- {
- t := 0
- }
- t := Round(t, 2)
- ControlSetText, Edit1, %t%, ahk_id%id%
- WinSet, Redraw,, ahk_id%id%
- }
- }
- */
- IfWinExist, ahk_id%id% ahk_group StarsTables
- {
- ControlGetText, t, %stars_editbox%, ahk_id%id%
- ;Msgbox, %t%
- t := t + amount
- if (t < 0)
- {
- t := 0
- }
- t := Round(t, 2)
- ControlSetText, %stars_editbox%, %t%, ahk_id%id%
- Sleep, -1
- ;ControlGetText, t, %stars_editbox%, ahk_id%id%
- WinSet, Redraw,, ahk_id%id%
- }
- Else IfWinExist, ahk_id%id% ahk_group PartyTables
- {
- ;ControlGetText, t, edit4, ahk_id%id%
- ControlGetText, t, edit2, ahk_id%id%
- if (party_uses_commas_for_decimals)
- {
- StringReplace, t, t, `,,., All
- }
- t := t + amount
- if (t < 0)
- {
- t := 0
- }
- t := Round(t, 2)
- if (party_uses_commas_for_decimals)
- {
- StringReplace, t, t, .,`,, All
- }
- ;MsgBox %t%
- ;ControlSetText, edit4, %t%, ahk_id%id%
- ControlSetText, edit2, %t%, ahk_id%id%
- ;WinSet, Redraw,, ahk_id%id%
- }
- Else IfWinExist, ahk_id%id% ahk_group CryptoTables
- {
- ControlGetText, t, edit2, ahk_id%id%
- t := t + amount
- if (t < 0)
- {
- t := 0
- }
- t := Round(t, 2)
- ControlSetText, edit2, %t%, ahk_id%id%
- WinSet, Redraw,, ahk_id%id%
- }
- Else IfWinExist, ahk_id%id% ahk_group FullTiltTables
- {
- ControlGet, v, Visible, , Edit1, ahk_id%id%
- if (v)
- {
- ControlGetText, t, Edit1, ahk_id%id%
- t := t + amount
- if (t < 0)
- {
- t := 0
- }
- t := Round(t, 2)
- ControlSetText, Edit1, %t%, ahk_id%id%
- ;WinSet, Redraw,, ahk_id%id%
- }
- }
- Else IfWinExist, ahk_id%id% ahk_group PrimaTables
- {
- ControlGetText, t, Edit1, ahk_id%id%
- t := t + amount
- if (t < 0)
- {
- t := 0
- }
- t := Round(t, 2)
- ControlSetText, Edit1, %t%, ahk_id%id%
- WinSet, Redraw,, ahk_id%id%
- }
- Else IfWinExist, ahk_id%id% ahk_group UBTables
- {
- ControlGetText, t, Edit1, ahk_id%id%
- t := t + amount
- if (t < 0)
- {
- t := 0
- }
- t := Round(t, 2)
- ControlSetText, Edit1, %t%, ahk_id%id%
- ;WinSet, Redraw,, ahk_id%id%
- }
- Else IfWinExist, ahk_id%id% ahk_group iPokerTables
- {
- t := ReadBetBoxIPoker(id)
- t := t + amount
- if (t <= 0)
- return
- t := Round(t, 2)
- WriteBetBoxIPoker(id, t)
- }
- }
- Pot(id, frac=1, round_bet=0.2, open_adjust="", autoBet=0)
- {
- global debug
- global fix_blinds
- global caller_hwnd
- global party_uses_commas_for_decimals
- global ipokerchat, iPokerRaiseX, iPokerRaiseY
- global stars_editbox
- caller_hwnd := ""
- pot := 0
- call := 0
- sb := 0
- bb := 0
- hero_bet := 0
- street := ""
- hero_position := ""
- open := 1
- max := 10000000
- IfWinExist, ahk_id%id% ahk_group MiniFT
- {
- WinGetTitle, t, ahk_id%id%
- caller_hwnd := id
- StringTrimLeft, t, t, Instr(t, "hwnd:", true, 0)+4
- id := t
- }
- IfWinExist, ahk_id%id% ahk_group StarsTables
- {
- PotSizeStars(id, pot, call, sb, bb, hero_bet, street, hero_position, open)
- }
- Else IfWinExist, ahk_id%id% ahk_group PartyTables
- {
- PotSizeParty(id, pot, call, sb, bb, hero_bet, street, hero_position, open)
- if (party_uses_commas_for_decimals)
- {
- StringReplace, call, call, `,,., All
- StringReplace, pot, pot, `,,., All
- }
- }
- Else IfWinExist, ahk_id%id% ahk_group CryptoTables
- {
- PotSizeCrypto(id, pot, call, sb, bb, hero_bet, street, hero_position, open)
- }
- Else IfWinExist, ahk_id%id% ahk_group FullTiltTables
- {
- ControlGet, v, Visible, , Edit1, ahk_id%id%
- if (v)
- {
- PotSizeFullTilt2(id, pot, call, sb, bb, hero_bet, street, hero_position, open, max)
- }
- else
- {
- return
- }
- ;msgbox, %pot%
- }
- Else IfWinExist, ahk_id%id% ahk_group PrimaTables
- {
- PotSizePrima(id, pot, call, sb, bb, hero_bet, street, hero_position, open)
- }
- Else IfWinExist, ahk_id%id% ahk_group UBTables
- {
- ControlGet, v, Visible, , Edit1, ahk_id%id%
- if (v)
- {
- PotSizeUB(id, pot, call, sb, bb, hero_bet, street, hero_position, open)
- }
- else
- {
- return
- }
- }
- Else IfWinExist, ahk_id%id% ahk_group iPokerTables
- {
- PotSizeIPoker(id, pot, call, sb, bb, hero_bet, street, hero_position, open)
- }
- Else
- {
- return
- }
- StringSplit, fr, frac, %A_SPACE%
- if (fr0 < 4)
- {
- times := 4 - fr0
- Loop, %times%
- {
- n := 5 - A_Index
- fr%n% := fr%fr0%
- }
- }
- if (street = "pre")
- {
- frac = %fr1%
- }
- else if (street = "flop")
- {
- frac = %fr2%
- }
- else if (street = "turn")
- {
- frac = %fr3%
- }
- else if (street = "river")
- {
- frac = %fr4%
- }
- if (debug)
- {
- TrayTip, BetPot, Pot:`t`t%pot%`nCall:`t`t%call%`nHero_bet:`t%hero_bet%`n`nBlinds:`t$%sb%/$%bb%`n`nStreet:`t%street%`n`n%fr0%`n%fr1% %fr2% %fr3% %fr4%`n`n%frac%,10,17
- }
- if (fix_blinds AND open AND street="pre")
- {
- if (hero_position = "sb" )
- {
- pot := pot - sb
- call := call + sb
- }
- else if (hero_position = "bb")
- {
- pot := pot - bb
- call := call + bb
- }
- }
- ;msgbox, %pot%
- pot := ((pot + call + hero_bet)* (frac) )+ call
- ;msgbox, %pot%
- if (open=1 AND open_adjust="ssnl" )
- {
- pot := pot + bb - sb
- }
- else if (open=1 AND open_adjust="tourney" )
- {
- pot := pot - bb
- }
- else if (open=1 AND open_adjust="mix" )
- {
- if (bb=2)
- {
- pot := pot + bb - sb
- }
- }
- if(round_bet = "smallblind")
- {
- pot := Round((Floor((pot / sb)) * sb),2)
- }
- else if(round_bet = "bigblind")
- {
- pot := Round((Floor((pot / bb)) * bb),2)
- }
- else if (round_bet < 1)
- {
- places := round_bet*10
- pot := Round(pot, (places))
- }
- else if (round_bet >= 1)
- {
- pot := Floor(pot / round_bet) * round_bet
- }
- ;msgbox, %pot%
- IfWinExist, ahk_id%id% ahk_group StarsTables
- {
- ControlSetText, %stars_editbox%, %pot%, ahk_id%id%
- Sleep, -1
- if (autobet)
- {
- RaiseStars(id)
- }
- }
- Else IfWinExist, ahk_id%id% ahk_group PartyTables
- {
- if (party_uses_commas_for_decimals)
- {
- StringReplace, pot, pot, .,`,, All
- }
- ;Msgbox, %pot%
- ;ControlSetText, edit4, %pot%, ahk_id%id% ;new
- ControlSetText, edit2, %pot%, ahk_id%id% ;old
- Sleep -1
- Sleep, 50
- WinSet, Redraw,, ahk_id%id%
- If(autobet)
- {
- ControlClick, AfxWnd42u19, ahk_id%id%
- }
- }
- Else IfWinExist, ahk_id%id% ahk_group CryptoTables
- {
- ControlSetText, edit2, %pot%, ahk_id%id%
- Sleep -1
- WinSet, Redraw,, ahk_id%id%
- If(autobet)
- {
- PostLeftClick(730, 540, id)
- }
- }
- Else IfWinExist, ahk_id%id% ahk_group FullTiltTables
- {
- ControlGet, v, Visible, , Edit1, ahk_id%id%
- if (v)
- {
- ;Msgbox, %pot%
- if (pot > max)
- {
- pot := max
- }
- ControlSetText, Edit1, %pot%, ahk_id%id%
- Sleep -1
- ;WinSet, Redraw,, ahk_id%id%
- If(autobet)
- {
- ab := 0
- Loop, 20
- {
- ControlGetText, t, Edit1, ahk_id%id%
- if (t < pot || t > pot)
- {
- Sleep, 100
- }
- else
- {
- ;TrayTip, , %ab% %t% %pot%
- Sleep, 200
- RaiseFT(id)
- /*
- if (FTP_Beta)
- {
- ControlFocus, FTCButton14, ahk_id%id%
- Sleep, -1
- ControlClick, FTCButton14, ahk_id%id%
- }
- else
- {
- ControlFocus, FTCButton13, ahk_id%id%
- Sleep, -1
- ControlClick, FTCButton13, ahk_id%id%
- }
- */
- break
- }
- }
- ;TrayTip, , %ab% %t% %pot%
- ;if (ab)
- ;{
- ; ControlFocus, FTCButton11, ahk_id%id%
- ; Sleep, -1
- ; ControlClick, FTCButton11, ahk_id%id%
- ;}
- }
- }
- }
- Else IfWinExist, ahk_id%id% ahk_group PrimaTables
- {
- ControlFocus, Edit1, ahk_id%id%
- ControlSetText, Edit1, %pot%, ahk_id%id%
- Sleep, -1
- WinSet, Redraw,, ahk_id%id%
- If(autobet)
- {
- WinActivate, ahk_id%id%
- WinWaitActive, ahk_id%id%, , 1
- If (errorlevel<>1)
- {
- Send, {ENTER}
- }
- }
- }
- Else IfWinExist, ahk_id%id% ahk_group UBTables
- {
- ControlSetText, Edit1, %pot%, ahk_id%id%
- Sleep -1
- WinSet, Redraw,, ahk_id%id%
- If(autobet)
- {
- RaiseUB(id)
- }
- }
- Else IfWinExist, ahk_id%id% ahk_group iPokerTables
- {
- if pot != 0
- {
- ;try to write the bet five times
- attempts := 0
- loop
- {
- if (readPot = pot OR attempts > 5)
- break
- WriteBetBoxIpoker(id, pot)
- readPot := ReadBetBoxIpoker(id)
- attempts++
- }
- If(autobet)
- {
- if (readPot = pot)
- {
- WinActivate, ahk_id%id%
- WinWaitActive, ahk_id%id%, , 1
- If (errorlevel<>1)
- {
- Send, {ENTER}
- }
- }
- }
- Click, 75, %ipokerchat%
- MouseMove, %ipokerraisex%, %ipokerraisey%
- }
- }
- }
- PotSizeFullTilt2(id, ByRef pot, ByRef call, ByRef sb, ByRef bb, ByRef hero_bet, ByRef street, ByRef hero_position, ByRef open, ByRef max)
- {
- global deduct_rake
- global FTP_Beta
- rake := 0
- notraked := 0
- maxrake := 3
- max := 7654321
- ftp_btn_max = FTCSkinButton24
- ftp_btn_max_pl = FTCSkinButton24
- ftp_btn_max_cap = FTCSkinButton28
- ftp_btn_min = FTCSkinButton23
- ftp_btn_pot = FTCSkinButton25
- ftp_btn_pot_pl = FTCSkinButton27
- WinGetTitle, title, ahk_id%id%
- StringMid, bb, title, InStr(title, "/") + 1, InStr(title, a_space,"", InStr(title, "/")) - InStr(title, "/") - 1
- StringReplace,bb,bb,$,,1
- sb := sb(bb)
- ;msgbox, %bb%`n%sb%
- ControlGetText, t, Edit1, ahk_id%id%
- min := sb
- if (InStr(title, "Pot Limit"))
- {
- ControlGet, v, Visible, , %ftp_btn_pot_pl%, ahk_id%id%
- if (v)
- {
- ;TrayTip, BetPot,`nPOT to zero,10,17
- x := ""
- ControlSetText, Edit1,%min%, ahk_id%id%
- Loop, 50
- {
- ControlGetText, x, Edit1, ahk_id%id%
- if (x = min)
- {
- break
- ;Traytip
- }
- sleep, 40
- ;Traytip
- }
- Loop, 50
- {
- ; TrayTip, BetPot,`nPOT result,10,17
- ControlFocus, %ftp_btn_pot_pl%, ahk_id%id%
- ControlClick, %ftp_btn_pot_pl%, ahk_id%id%
- Sleep, -1
- ControlGetText, pot, Edit1, ahk_id%id%
- if (pot != "")
- {
- break
- ;Traytip
- }
- sleep, 40
- ; TrayTip
- }
- }
- }
- else ;unlimited betting
- {
- ControlGet, v, Visible, , %ftp_btn_pot%, ahk_id%id%
- if (v)
- {
- ;TrayTip, BetPot,`nPOT to zero,10,17
- x := ""
- ControlSetText, Edit1,%min%, ahk_id%id%
- Loop, 50
- {
- ControlGetText, x, Edit1, ahk_id%id%
- if (x = min)
- {
- break
- ;Traytip
- }
- sleep, 40
- ;Traytip
- }
- Loop, 50
- {
- ; TrayTip, BetPot,`nPOT result,10,17
- ControlFocus, %ftp_btn_pot%, ahk_id%id%
- ControlClick, %ftp_btn_pot%, ahk_id%id%
- Sleep, -1
- ControlGetText, pot, Edit1, ahk_id%id%
- if (pot != "")
- {
- break
- ;Traytip
- }
- sleep, 40
- ; TrayTip
- }
- }
- ControlGet, v, Visible, , %ftp_btn_min%, ahk_id%id%
- if (v)
- {
- ;TrayTip, BetPot,`nMIN to zero,10,17
- x := ""
- ControlSetText, Edit1,%pot%, ahk_id%id%
- Loop, 50
- {
- ControlGetText, x, Edit1, ahk_id%id%
- if (x = pot)
- {
- break
- ;Traytip
- }
- sleep, 40
- ;Traytip
- }
- Loop, 50
- {
- ;TrayTip, BetPot,`nMIN result,10,17
- ControlFocus, %ftp_btn_min%, ahk_id%id%
- ControlClick, %ftp_btn_min%, ahk_id%id%
- Sleep, -1
- ControlGetText, min, Edit1, ahk_id%id%
- if (min != pot)
- {
- break
- ;TrayTip
- }
- sleep, 40
- ;TrayTip
- }
- }
- }
- ControlSetText, Edit1, %t%, ahk_id%id%
- street := "pre"
- street := GetStreetFT(id)
- if (min = bb)
- {
- call := 0
- }
- else if (min > bb)
- {
- call := min / 2
- }
- else if (street != "pre")
- {
- call := bb
- }
- if (call != bb || street != "pre")
- {
- open := 0
- }
- pot := pot - (2 * call)
- /*
- if (deduct_rake AND street<>"pre")
- {
- rake := Floor(pot - notraked) * 0.05
- if (rake > maxrake)
- {
- rake := maxrake
- }
- pot := pot - rake
- }
- */
- ;Msgbox, Pot: %pot%`nRake: %rake%`nNot Raked: %notraked%
- return
- }
- PotSizeFullTilt2_old(id, ByRef pot, ByRef call, ByRef sb, ByRef bb, ByRef hero_bet, ByRef street, ByRef hero_position, ByRef open, ByRef max)
- {
- global deduct_rake
- global FTP_Beta
- rake := 0
- notraked := 0
- maxrake := 3
- ftp_btn_max = FTCSkinButton24
- ftp_btn_max_pl = FTCSkinButton24
- ftp_btn_max_cap = FTCSkinButton28
- ftp_btn_min = FTCSkinButton23
- ftp_btn_pot = FTCSkinButton25
- ftp_btn_pot_pl = FTCSkinButton27
- WinGetTitle, title, ahk_id%id%
- StringMid, bb, title, InStr(title, "/") + 1, InStr(title, a_space,"", InStr(title, "/")) - InStr(title, "/") - 1
- StringReplace,bb,bb,$,,1
- sb := sb(bb)
- ;msgbox, %bb%`n%sb%
- ControlGetText, t, Edit1, ahk_id%id%
- min := sb
- if (FTP_Beta)
- {
- ControlGet, v, Visible, , %ftp_btn_max%, ahk_id%id%
- if (v)
- {
- ;TrayTip, BetPot,`nMAX,10,17
- x := ""
- ControlSetText, Edit1,, ahk_id%id%
- Loop, 50
- {
- ControlGetText, x, Edit1, ahk_id%id%
- if (x = "")
- {
- break
- }
- else
- {
- sleep, 40
- }
- }
- /* ;NOT SURE WE NEED MAX ANYMORE
- ControlClick, %ftp_btn_max%, ahk_id%id%
- Loop, 50
- {
- ControlGetText, max, Edit1, ahk_id%id%
- if (max != "")
- {
- break
- }
- else
- {
- sleep, 40
- }
- }
- ;ControlGetText, max, Edit1, ahk_id%id%
- */
- }
- else if (InStr(title, "Cap No Limit") || InStr(title, "Pot Limit"))
- {
- ControlGet, v, Visible, , %ftp_btn_max_cap%, ahk_id%id% ; CAP
- if (v)
- {
- ;TrayTip, BetPot,`nCAP MAX,10,17
- x := ""
- ControlSetText, Edit1,, ahk_id%id%
- Loop, 50
- {
- ControlGetText, x, Edit1, ahk_id%id%
- if (x = "")
- {
- break
- }
- else
- {
- sleep, 40
- }
- }
- ControlClick, %ftp_btn_max_cap%, ahk_id%id%
- Loop, 50
- {
- ControlGetText, max, Edit1, ahk_id%id%
- if (max != "")
- {
- ;if (max = "")
- ;{
- ; continue
- ;}
- break
- }
- else
- {
- sleep, 40
- }
- }
- ;ControlClick, FTCButton24, ahk_id%id%
- ; Sleep, -1
- ; ControlGetText, max, Edit1, ahk_id%id%
- }
- else
- {
- ControlGet, v, Visible, , %ftp_btn_pot_pl%, ahk_id%id%
- if (v)
- {
- ;TrayTip, BetPot,`nPL MAX,10,17
- x := ""
- ControlSetText, Edit1,, ahk_id%id%
- Loop, 50
- {
- ControlGetText, x, Edit1, ahk_id%id%
- if (x = "")
- {
- break
- }
- else
- {
- sleep, 40
- }
- }
- ControlClick, %ftp_btn_pot_pl%, ahk_id%id%
- Loop, 50
- {
- ControlGetText, max, Edit1, ahk_id%id%
- if (max != "")
- {
- ;if (max = "")
- ;{
- ; continue
- ;}
- break
- }
- else
- {
- sleep, 40
- }
- }
- }
- }
- }
- /*
- ControlGet, v, Visible, , %ftp_btn_pot%, ahk_id%id%
- if (v)
- {
- ;TrayTip, BetPot,`nPOT,10,17
- x := ""
- ControlSetText, Edit1,, ahk_id%id%
- Loop, 50
- {
- ControlGetText, x, Edit1, ahk_id%id%
- if (x = "")
- {
- break
- }
- else
- {
- sleep, 40
- }
- }
- ControlClick, %ftp_btn_pot%, ahk_id%id%
- Loop, 50
- {
- ControlGetText, pot, Edit1, ahk_id%id%
- if (pot != "")
- {
- ;MsgBox, %A_Index%
- break
- }
- else
- {
- sleep, 40
- }
- }
- ;ControlClick, FTCButton22, ahk_id%id%
- ;Sleep, -1
- ;ControlGetText, pot, Edit1, ahk_id%id%
- }
- /*
- else if (InStr(title, "Pot Limit"))
- {
- ;TrayTip, BetPot,`nPL POT,10,17
- ControlGet, v, Visible, , %ftp_btn_pot_pl%, ahk_id%id%
- if (v)
- {
- x := ""
- ControlSetText, Edit1,, ahk_id%id%
- Loop, 50
- {
- ControlGetText, x, Edit1, ahk_id%id%
- if (x = "")
- {
- break
- }
- else
- {
- sleep, 40
- }
- }
- ControlClick, %ftp_btn_pot_pl%, ahk_id%id%
- Loop, 50
- {
- ControlGetText, pot, Edit1, ahk_id%id%
- if (pot != "")
- {
- ;if (pot = "")
- ;{
- ; continue
- ;}
- break
- }
- else
- {
- sleep, 40
- }
- }
- }
- }
- */
- ; AGAIN NOT SURE
- ;else
- ;{
- ; pot := max
- ;}
- ControlGet, v, Visible, , %ftp_btn_min%, ahk_id%id%
- if (v)
- {
- ;TrayTip, BetPot,`nMIN,10,17
- x := ""
- ControlSetText, Edit1,%pot%, ahk_id%id%
- Loop, 50
- {
- ControlGetText, x, Edit1, ahk_id%id%
- if (x = pot)
- {
- ;MsgBox, %A_Index%
- break
- }
- else
- {
- sleep, 40
- }
- }
- ControlFocus, %ftp_btn_min%, ahk_id%id%
- ControlClick, %ftp_btn_min%, ahk_id%id%
- ;TrayTip, BetPot,`nWAITING MIN,10,17
- Sleep, -1
- Sleep, 40
- ;Msgbox, %min%
- min := ""
- Loop, 50
- {
- ControlGetText, min, Edit1, ahk_id%id%
- if (min != pot)
- {
- break
- }
- else
- {
- ControlFocus, %ftp_btn_min%, ahk_id%id%
- ControlClick, %ftp_btn_min%, ahk_id%id%
- sleep, 40
- ;TrayTip, BetPot,`nMIN %A_Index%,10,17
- }
- }
- ;TrayTip, BetPot,`n%min%,10,17
- ;ControlClick, FTCButton20, ahk_id%id%
- ;Sleep, -1
- ;ControlGetText, min, Edit1, ahk_id%id%
- }
- if (!min)
- {
- min := bb
- }
- ;TrayTip, BetPot,`nDONE,10,17
- }
- else ; FTP OFFICIAL
- {
- /*
- ControlGet, v, Visible, , FTCButton20, ahk_id%id%
- if (v)
- {
- ControlClick, FTCButton20, ahk_id%id%
- Sleep, -1
- ControlGetText, max, Edit1, ahk_id%id%
- }
- else
- {
- ControlGet, v, Visible, , FTCButton24, ahk_id%id%
- if (v)
- {
- ControlClick, FTCButton24, ahk_id%id%
- Sleep, -1
- ControlGetText, max, Edit1, ahk_id%id%
- }
- }
- ControlClick, FTCButton21, ahk_id%id%
- Sleep, -1
- ControlGetText, pot, Edit1, ahk_id%id%
- ControlClick, FTCButton19, ahk_id%id%
- Sleep, -1
- ControlGetText, min, Edit1, ahk_id%id%
- */
- }
- ;ControlSetText, Edit1, %t%, ahk_id%id%
- street := "pre"
- street := GetStreetFT(id)
- if (min = bb)
- {
- call := 0
- }
- else if (min > bb)
- {
- call := min / 2
- }
- ;else if (street != "pre")
- ;{
- ; call := bb
- ;}
- if (call != bb || street != "pre")
- {
- open := 0
- }
- pot := pot - (2 * call)
- /*
- if (deduct_rake AND street<>"pre")
- {
- rake := Floor(pot - notraked) * 0.05
- if (rake > maxrake)
- {
- rake := maxrake
- }
- pot := pot - rake
- }
- */
- ;Msgbox, Pot: %pot%`nRake: %rake%`nNot Raked: %notraked%
- return
- }
- PotSizePrima(id, ByRef pot, ByRef call, ByRef sb, ByRef bb, ByRef hero_bet, ByRef street, ByRef hero_position, ByRef open)
- {
- global deduct_rake
- rake := 0
- notraked := 0
- maxrake := 3
- ;Msgbox %title%
- nl_actions = called for $,raised for $,bet for $,went all-in for $,posted small blind,posted big blind
- WinGetTitle, title, ahk_id%id%
- StringMid, hero, title, InStr(title, " - Blinds ")-1, , L
- StringTrimLeft, hero, hero, InStr(hero, " - ", true, 0)+2
- ;Msgbox %hero%
- ;ControlGetText, hh, Richedit20W3, ahk_id%id%
- Loop, 10
- {
- ControlGetText, hh, Richedit20W3, ahk_id%id%
- If hh
- {
- break
- }
- Sleep, 80
- }
- StringTrimLeft, hh, hh, InStr(hh, " wins ", true, 0)
- ;Msgbox, %hh%
- Loop, Parse, hh, `n
- {
- If a_loopfield contains %nl_actions%
- {
- StringMid, amount, a_loopfield, InStr(a_loopfield, "$")+1
- StringReplace, amount, amount, )
- StringReplace, amount, amount, `,,, All
- StringReplace, amount, amount, `n
- StringReplace, amount, amount, `r
- pot += amount
- IfInString, a_loopfield, raised for $
- {
- open := 0
- }
- IfInString, a_loopfield, posted small blind
- {
- sb := amount
- If a_loopfield contains %hero%
- {
- hero_position := "sb"
- }
- }
- Else IfInString, a_loopfield, posted big blind
- {
- bb := amount
- If a_loopfield contains %hero%
- {
- hero_position := "bb"
- }
- }
- }
- }
- street := "pre"
- If InStr(hh, "> Dealing the river(")
- {
- StringTrimLeft, hh2, hh, InStr(hh, "> Dealing the river(", true, 0)
- street := "river"
- open := 0
- }
- Else If InStr(hh, "> Dealing the turn(")
- {
- StringTrimLeft, hh2, hh, InStr(hh, "> Dealing the turn(", true, 0)
- street := "turn"
- open := 0
- }
- Else If InStr(hh, "> Dealing the Flop(")
- {
- StringTrimLeft, hh2, hh, InStr(hh, "> Dealing the Flop(", true, 0)
- street := "flop"
- open := 0
- }
- Else
- {
- hh2 := hh
- }
- Loop, Parse, hh2, `n
- {
- ;Msgbox %hh2%
- If a_loopfield contains %nl_actions%
- {
- StringMid, amount, a_loopfield, InStr(a_loopfield, "$")+1
- StringReplace, amount, amount, `)
- Stringreplace, amount, amount, `n
- Stringreplace, amount, amount, `,,, All
- notraked += amount
- IfInString, a_loopfield, > %hero%
- {
- hero_bet += amount
- }
- Else
- {
- call := amount
- }
- }
- }
- if(hero_bet >= call)
- {
- call := 0
- }
- Else
- {
- call -= hero_bet
- }
- call := iif( call, call, 0 )
- if(deduct_rake AND street<>"pre")
- {
- rake := Floor(pot - notraked) * 0.05
- If (rake > maxrake)
- {
- rake := maxrake
- }
- pot := pot - rake
- }
- return
- }
- PotSizeCrypto(id, ByRef pot, ByRef call, ByRef sb, ByRef bb, ByRef hero_bet, ByRef street, ByRef hero_position, ByRef open)
- {
- global deduct_rake
- rake := 0
- notraked := 0
- maxrake := 3
- nl_actions = calls $,raises to $,bets $,posts ante $,posts small blind $,posts big blind $
- WinGetTitle, title, ahk_id%id%
- StringMid, hero, title, InStr(title, "logged in as ") + 13
- ControlGetText, hh, RICHEDIT1, ahk_id%id%
- StringTrimLeft, hh, hh, InStr(hh, "Starting new hand: #", true, 0)
- StringReplace, hh, hh, €,$, All
- StringReplace, hh, hh, £,$, All
- Loop, Parse, hh, `n
- {
- If a_loopfield contains %nl_actions%
- {
- StringMid, amount, a_loopfield, InStr(a_loopfield, "$") + 1
- StringReplace, amount, amount, `r,, All
- StringReplace, amount, amount, `n,, All
- StringReplace, amount, amount, %A_SPACE%,, All
- StringReplace, amount, amount, %A_TAB%,, All
- pot += amount
- IfInString, a_loopfield, raises to $
- {
- open := 0
- }
- IfInString, a_loopfield, posts small blind $
- {
- sb := amount
- If a_loopfield contains %hero%
- {
- hero_position := "sb"
- }
- }
- Else IfInString, a_loopfield, posts big blind $
- {
- bb := amount
- If a_loopfield contains %hero%
- {
- hero_position := "bb"
- }
- }
- }
- }
- ;Msgbox, %sb% %bb%
- hh2 := hh
- street := "pre"
- If InStr(hh2, "Dealer: Dealing River:")
- {
- StringTrimLeft, hh2, hh2, InStr(hh, "Dealer: Dealing River:", true, 0)
- open := 0
- street := "river"
- }
- Else If InStr(hh2, "Dealer: Dealing Turn:")
- {
- StringTrimLeft, hh2, hh2, InStr(hh, "Dealer: Dealing Turn:", true, 0)
- open := 0
- street := "turn"
- }
- Else If InStr(hh2, "Dealer: Dealing Flop:")
- {
- StringTrimLeft, hh2, hh2, InStr(hh, "Dealer: Dealing Flop:", true, 0)
- open := 0
- street := "flop"
- }
- ;Msgbox, %hh2%
- Loop, Parse, hh2, `n
- {
- If a_loopfield contains %nl_actions%
- {
- StringMid, amount, a_loopfield, InStr(a_loopfield, "$") + 1
- StringReplace, amount, amount, `r,, All
- StringReplace, amount, amount, `n,, All
- StringReplace, amount, amount, %A_SPACE%,, All
- StringReplace, amount, amount, %A_TAB%,, All
- notraked += amount
- If a_loopfield contains %hero%
- {
- hero_bet += amount
- }
- Else
- {
- call := amount
- }
- }
- if(hero_bet >= call)
- {
- call := 0
- }
- Else
- {
- call -= hero_bet
- }
- }
- call := iif( call, call, 0 )
- if (deduct_rake AND street<>"pre")
- {
- rake := Floor(pot - notraked) * 0.05
- if (rake > maxrake)
- {
- rake := maxrake
- }
- pot := pot - rake
- }
- return
- }
- PotSizeParty(id, ByRef pot, ByRef call, ByRef sb, ByRef bb, ByRef hero_bet, ByRef street, ByRef hero_position, ByRef open)
- {
- WinGetTitle, title, ahk_id%id%
- StringMid, bb, title, InStr(title, "/")+1,1
- sb := sb(bb)
- ControlGetText, totalpot, Total pot, ahk_id%id%
- ;MsgBox a%totalpot%a
- ;StringMid, pot, totalpot, InStr(totalpot, ":")+1, InStr(totalpot, "$")+1
- StringMid, pot, totalpot, InStr(totalpot, ":") + 2, InStr(totalpot, "$") - InStr(totalpot, ":") - 3
- ;MsgBox a%pot%a
- street = pre
- match_mode = %a_titlematchmode%
- SettitleMatchMode 2
- ControlGetText, call, Call, ahk_id%id%
- SettitleMatchMode %match_mode%
- StringMid, call, call, InStr(call, "(") + 1, InStr(call, ")") - InStr(call, "(") - 1
- StringReplace, call, call, $
- StringReplace, call, call, €
- StringReplace, call, call, £
- call := iif( call, call, 0 )
- }
- PotSizeIPoker(id, ByRef pot, ByRef call, ByRef sb, ByRef bb, ByRef hero_bet, ByRef street, ByRef hero_position, ByRef open)
- {
- global deduct_rake, IPokerX, IPokerY, IPokerChat, IPoker_BetBoxColor, IPoker_ShowBetBoxColor
- rake := 0
- notraked := 0
- maxrake := 3
- tourney := 0
- WinActivate, ahk_id %id%
- WinWaitActive, ahk_id %id%
- CoordMode, pixel, screen
- WinGetPos, x, y, , , ahk_id %id%
- X += iPokerX
- y += iPokerY
- PixelGetColor, col, x, y
- if IPoker_ShowBetBoxColor
- Msgbox Ipoker bet box color: %col%
- if (col != iPoker_BetBoxColor)
- return
- nl_actions = calls $, raises $, bets $, All-In $, posts Small Blind $, posts Big Blind $
- StringMid, tablename, title, (InStr(title, ": ")+2), (InStr(title, " - ")-(InStr(title, ": ")+2))
- ;Get hero's screen name from the lobby title
- WinGetTitle, lobby, Nickname: ahk_class PTIODEVICE
- StringTrimLeft, hero, lobby, InStr(lobby, "Nickname:") + 9
- StringLeft, hero, hero, InStr(hero, A_space)
- ;Msgbox %hero%
- ;grab HH from chat box
- hh :=
- oldClipboard = %clipboard%
- clipboard =
- attempts := 0
- loop
- {
- WinActivate, ahk_id %id%
- WinWaitActive, ahk_id %id%
- Click, 75, %ipokerchat%
- sleep, 150
- SendInput, ^a^c
- ClipWait, 0.5
- if !errorlevel or attempts > 3
- break
- attempts++
- }
- hh := clipboard
- ;msgbox %hh%
- clipboard = %oldClipBoard%
- if hh =
- {
- TrayTip, BetPot,`nError reading chat box on iPoker table: %tableName%, 10, 17
- return
- }
- StringGetPos, pos, hh, (#, R
- StringTrimLeft, hh, hh, pos
- Loop, Parse, hh, `n
- {
- If a_loopfield contains %nl_actions%
- {
- StringTrimRight, amount, a_loopfield, 2
- StringGetPos, pos, amount,%a_space%, R
- StringRight, amount, amount, StrLen(amount) - pos
- StringReplace, amount, amount, `,,, All
- StringReplace, amount, amount, %a_space%
- StringReplace, amount, amount, $,,All
- pot += amount
- ;msgbox %amount%
- IfInString, a_loopfield, posts Small Blind $
- {
- sb := amount
- If a_loopfield contains %hero%
- {
- hero_position := "sb"
- }
- }
- Else IfInString, a_loopfield, posts Big Blind $
- {
- bb := amount
- If a_loopfield contains %hero%
- {
- hero_position := "bb"
- }
- }
- Else If(open = 1 AND InStr(a_loopfield, "raises $", true, 0))
- {
- open := 0
- ;Msgbox "Pre flop Raise"
- }
- Else If(open = 1 AND InStr(a_loopfield, "All-in $", true, 0))
- {
- open := 0
- ;Msgbox "Pre flop All-In"
- }
- ;msgbox, %amount%
- ;msgbox, %pot%
- }
- }
- IfNotInString, hh, $
- tourney := 1
- ;msgbox tourney: %tourney%
- ;Msgbox, BB: %bb%
- ;Msgbox, SB: %sb%
- hh2 := hh
- street := "pre"
- If InStr(hh2, "Dealing River")
- {
- StringTrimLeft, hh2, hh2, InStr(hh, "Dealing River", true, 0)
- open := 0
- street := "river"
- }
- Else If InStr(hh2, "Dealing Turn")
- {
- StringTrimLeft, hh2, hh2, InStr(hh, "Dealing Turn", true, 0)
- open := 0
- street := "turn"
- }
- Else If InStr(hh2, "Dealing Flop")
- {
- StringTrimLeft, hh2, hh2, InStr(hh, "Dealing Flop", true, 0)
- open := 0
- street := "flop"
- }
- ;msgbox %street%
- ;Msgbox, %hero%`n`n`n%hh2%
- Loop, Parse, hh2, `n
- {
- ;Msgbox %a_loopfield%
- If a_loopfield contains %nl_actions%
- {
- StringTrimRight, amount, a_loopfield, 2
- StringGetPos, pos, amount,%a_space%, R
- StringRight, amount, amount, StrLen(amount) - pos
- StringReplace, amount, amount, `,,, All
- StringReplace, amount, amount, %a_space%
- StringReplace, amount, amount, $,,All
- notraked += amount
- If a_loopfield contains %hero%
- {
- hero_bet += amount
- }
- Else
- {
- call := amount
- }
- }
- }
- if(hero_bet >= call)
- {
- call := 0
- }
- Else
- {
- call -= hero_bet
- }
- call := iif( call, call, 0 )
- If (tourney <> 1)
- {
- If(deduct_rake AND street <>"pre")
- {
- rake := Floor(pot - notraked) * 0.05
- If (rake > maxrake)
- {
- rake := maxrake
- }
- pot := pot - rake
- }
- }
- ;Msgbox Pot: %pot%`nrake:%rake%`nhero bet:%hero_bet%`ncall:%call%
- return
- }
- ;returns the amount currently written into the ipoker bet box
- ReadBetBoxIPoker(id)
- {
- global ipokerx, ipokery
- oldClipboard = %clipboard%
- clipboard =
- WinActivate, ahk_id %id%
- WinWaitActive, ahk_id %id%
- Click, %ipokerx%, %ipokery%
- ;Sleep 50
- Send {HOME}+{END}^c
- ClipWait, 0.3
- If !ErrorLevel
- t := clipboard
- clipboard = %oldClipBoard%
- return t
- }
- ;writes the bet amount into the bet box then moves the cursor to the raise button
- WriteBetBoxIpoker(id, amount)
- {
- global iPokerX, iPokerY, iPokerRaiseX, iPokerRaiseY
- WinActivate ahk_id %id%
- WinWaitActive ahk_id %id%
- Click, %iPokerX%, %iPokerY%
- ;sleep 50
- Send {HOME}+{END}%amount%
- MouseMove, iPokerRaiseX, iPokerRaiseY
- }
- PotSizeStars(id, ByRef pot, ByRef call, ByRef sb, ByRef bb, ByRef hero_bet, ByRef street, ByRef hero_position, ByRef open)
- {
- global use_old_stars_buttons, stars_editbox
- CoordMode, Pixel, Screen
- WinGetPos, x, y, w, h, ahk_id%id%
- x1 := 700
- y1 := 440
- x2 := 770
- y2 := 450
- relStarsScreenPoint(id, x1, y1)
- relStarsScreenPoint(id, x2, y2)
- col := GetPredominateColor(x1, y1, x2, y2)
- ;Msgbox, %col%
- if (col = "0x00327F")
- {
- ;ThemeDir := "normal"
- PotThemeDir := "classic"
- CallThemeDir := "classic"
- }
- else if (col = "0xDDD7CC")
- {
- PotThemeDir := "hypersimple"
- CallThemeDir := "hypersimple"
- }
- else
- {
- if (debug)
- {
- Msgbox, Unable to match slider colour: %col% to a known theme
- }
- return
- }
- if (use_old_stars_buttons)
- {
- CallThemeDir := CallThemeDir . "\old"
- }
- street := GetStreetStars(id)
- if (w <= 526)
- {
- SizeDir := 0
- }
- else if (w <= 621)
- {
- SizeDir := 1
- }
- else if (w <= 736)
- {
- SizeDir := 2
- }
- else if (w <= 875)
- {
- SizeDir := 3
- }
- else if (w <= 1037)
- {
- SizeDir := 4
- }
- else if (w <= 1227)
- {
- SizeDir := 5
- }
- else
- {
- SizeDir := 6
- }
- PicDir := "StarsPics"
- potPicDir := PicDir . "\" . PotThemeDir . "\pot\" . SizeDir
- buttonPicDir := PicDir . "\" . CallThemeDir . "\call\" . SizeDir
- ;Msgbox, %potPicDir%`n%buttonPicDir%
- pot_x1 := 380
- pot_y1 := 8
- pot_x2 := 460
- pot_y2 := 32
- relStarsWindowPoint(id, pot_x1, pot_y1)
- relStarsWindowPoint(id, pot_x2, pot_y2)
- pot := DigitSearch(pot_x1, pot_y1, pot_x2, pot_y2, id, potPicDir, "", 50)
- call_x1 := 550
- call_y1 := 510
- call_x2 := 645
- call_y2 := 533
- relStarsWindowPoint(id, call_x1, call_y1)
- relStarsWindowPoint(id, call_x2, call_y2)
- call := DigitSearch(call_x1, call_y1, call_x2, call_y2, id, buttonPicDir, "", 50)
- call := iif( call, call, 0 )
- bb := GetBBStars(id, GameTypeStars(WinGetTitle(id)))
- sb := sb(bb)
- if (street = "pre")
- {
- ControlGetText, t, %stars_editbox%, ahk_id%id%
- ControlSetText, %stars_editbox%, 0, ahk_id%id%
- raise_x1 := 675
- raise_y1 := 510
- raise_x2 := 770
- raise_y2 := 533
- relStarsWindowPoint(id, raise_x1, raise_y1)
- relStarsWindowPoint(id, raise_x2, raise_y2)
- minraise := DigitSearch(raise_x1, raise_y1, raise_x2, raise_y2, id, buttonPicDir, "", 50)
- t := Round(t, 2)
- ControlSetText, %stars_editbox%, %t%, ahk_id%id%
- Sleep, -1
- if (minraise > (2*bb))
- {
- ;pot has been raised
- if (call = bb)
- {
- ;pot was minraised, and we are the BB
- hero_bet := bb
- hero_position := "bb"
- }
- else if (call < (bb*2))
- {
- ;pot was minraised, and we are the SB
- hero_bet := sb
- hero_position := "sb"
- }
- }
- else if (call = bb)
- {
- ;hero is not a blind, unraised pot, do nothing
- }
- else if (call = 0)
- {
- ;unraised pot, hero is the BB
- hero_bet := bb
- hero_position := "bb"
- }
- else if (call < bb)
- {
- ;unraised pot, hero is the SB
- hero_bet := sb
- hero_position := "sb"
- }
- else
- {
- ;pot has been raised, we are not opening
- open := 0
- }
- }
- else
- {
- ;not pre-flop, no need for open adjustment
- open := 0
- }
- return
- }
- PotSizeUB(id, ByRef pot, ByRef call, ByRef sb, ByRef bb, ByRef hero_bet, ByRef street, ByRef hero_position, ByRef open)
- {
- CoordMode, Pixel, Screen
- WinGetPos, x, y, w, h, ahk_id%id%
- street := GetStreetStars(id)
- PicDir := "UBPics"
- potPicDir := PicDir ;. "\" . PotThemeDir . "\pot\" . SizeDir
- buttonPicDir := PicDir ;. "\" . CallThemeDir . "\call\" . SizeDir
- ;Msgbox, %potPicDir%`n%buttonPicDir%
- pot_x1 := 580
- pot_y1 := 460
- pot_x2 := 700
- pot_y2 := 480
- relStarsWindowPoint(id, pot_x1, pot_y1)
- relStarsWindowPoint(id, pot_x2, pot_y2)
- pot := DigitSearch(pot_x1, pot_y1, pot_x2, pot_y2, id, potPicDir, "", 50)
- call_x1 := 350
- call_y1 := 460
- call_x2 := 460
- call_y2 := 480
- relStarsWindowPoint(id, call_x1, call_y1)
- relStarsWindowPoint(id, call_x2, call_y2)
- call := DigitSearch(call_x1, call_y1, call_x2, call_y2, id, buttonPicDir, "", 50)
- call := iif( call, call, 0 )
- WinGetTitle, title, ahk_id%id%
- StringTrimLeft, bb, title, InStr(title, "$", true, 0)-1
- StringTrimRight, bb, bb, Strlen(bb) - InStr(bb, A_Space)
- StringReplace, bb, bb, $., $0., All
- StringReplace, bb, bb, $,, All
- StringReplace, bb, bb, %A_Space%,, All
- ;bb := GetBBStars(id, GameTypeStars(WinGetTitle(id)))
- sb := sb(bb)
- if (street = "pre")
- {
- ControlGetText, t, Edit1, ahk_id%id%
- ControlSetText, Edit1, 0, ahk_id%id%
- raise_x1 := 460
- raise_y1 := 460
- raise_x2 := 580
- raise_y2 := 480
- relStarsWindowPoint(id, raise_x1, raise_y1)
- relStarsWindowPoint(id, raise_x2, raise_y2)
- minraise := DigitSearch(raise_x1, raise_y1, raise_x2, raise_y2, id, buttonPicDir, "", 50)
- t := Round(t, 2)
- ControlSetText, Edit1, %t%, ahk_id%id%
- Sleep, -1
- if (minraise > (2*bb))
- {
- ;pot has been raised
- if (call = bb)
- {
- ;pot was minraised, and we are the BB
- hero_bet := bb
- hero_position := "bb"
- }
- else if (call < (bb*2))
- {
- ;pot was minraised, and we are the SB
- hero_bet := sb
- hero_position := "sb"
- }
- }
- else if (call = bb)
- {
- ;hero is not a blind, unraised pot, do nothing
- }
- else if (call = 0)
- {
- ;unraised pot, hero is the BB
- hero_bet := bb
- hero_position := "bb"
- }
- else if (call < bb)
- {
- ;unraised pot, hero is the SB
- hero_bet := sb
- hero_position := "sb"
- }
- else
- {
- ;pot has been raised, we are not opening
- open := 0
- }
- }
- else
- {
- ;not pre-flop, no need for open adjustment
- open := 0
- }
- ;pot := pot - (2*hero_bet)
- pot := pot - (2 * call) - hero_bet
- return
- }
- DigitSearch(startX,startY,endX,endY,win,dir,ex="",shades=1) {
- global debug
- If ex =
- ex = bmp
- batchlines = %A_BatchLines%
- SetBatchLines -1
- ;WinGetPos,Xwin,Ywin,,,ahk_id%win%
- WinGetPos,Xwin,Ywin,w,h,ahk_id%win%
- ;Msgbox, %startX%,%startY%`n%endX% %endY%
- CoordMode, Pixel, Screen
- Loop, 11 {
- i = %a_index%
- If i = 10
- i = 0
- else if i = 11
- i = -1
- lastXpos := startX + Xwin
- Loop {
- x1 := lastXpos + 1
- y1 := startY + Ywin
- x2 := endX + Xwin
- y2 := endY + Ywin
- if (debug)
- {
- debug_gui(id, x1, y1, x2, y2, 50)
- }
- ImageSearch, lastXpos,, x1, y1, x2, y2, *%shades% %dir%\%i%.%ex%
- If ( errorLevel )
- {
- break
- }
- p++
- p%p% = %lastXpos%
- If i = -1
- t = .
- else
- t = %i%
- StringReplace, xpos, lastXpos, -, _
- c%xpos% = %t%
- }
- }
- Loop, %p%
- p_all := p_all "," p%a_index%
- Sort, p_all, N D, U
- ;Msgbox %p_all%
- Loop, Parse, p_all, `,
- {
- StringReplace, xpos, a_loopfield, -, _
- amount := amount "" c%xpos%
- ;Msgbox,%amount%
- }
- CoordMode, Pixel, Relative
- SetBatchLines %batchlines%
- return amount
- }
- ;Juks rocks
- PostLeftClick(x, y, table_id, activate=1) {
- ; ### JUK: Send the down left click, then the mouse-up messages.
- ; NOTE: This is relative to the top left of the client area and NOT the top left of the
- ; window (ie: It *doesn't* include the title-bar like AHK's MouseClick does!!!).
- If activate
- WinActivate, ahk_id%table_id%
- PostMessage, 0x201, 0x0001, ((y<<16)^x), , ahk_id%table_id%
- PostMessage, 0x202 , 0, ((y<<16)^x), , ahk_id%table_id%
- }
- PostStarsClick(x, y, id)
- {
- relStarsClientPoint(id, x, y)
- PostLeftClick(x, y, id)
- }
- GetBBStars(id, game_type) {
- WinGetTitle, title, ahk_id%id%
- game_type = NL Ring
- If (game_type = "NL Ring")
- return StrRep(StrMid(title,"/",a_space), "$")
- else if (game_type = "NL Tourney")
- return StrRep(StrMid(title,"/",a_space,InStr(title," - Blinds")),"$")
- }
- GameTypeStars(title) {
- If InStr(title, " - Limit Stud")
- return "Stud"
- else if ((InStr(title, " - No Limit Hold'em") || InStr(title, " - Pot Limit Hold'em"))
- && InStr(title, "Tournament"))
- return "NL Tourney"
- else if (InStr(title, " - No Limit Hold'em") || InStr(title, " - Pot Limit Hold'em"))
- return "NL Ring"
- else
- return "Limit"
- }
- sb(bb) {
- If bb = .25
- sb := .10
- else if bb = 15
- sb = 10
- else if bb = 0.05
- sb = 0.02
- else
- sb := bb/2
- if (sb > 1)
- {
- sb := Round(sb, 0)
- }
- else
- {
- sb := Round(sb, 2)
- }
- return sb
- }
- GetStreetStars(id)
- {
- global debug
- CoordMode, Pixel, Screen
- street := "pre"
- x1 := 490
- y1 := 155
- x2 := 525
- y2 := 205
- relStarsScreenPoint(id, x1, y1)
- relStarsScreenPoint(id, x2, y2)
- if (debug)
- {
- debug_gui(id, x1, y1, x2, y2)
- }
- If ( GetPixelCount(x1, y1, x2, y2, 0xffffff) > 5 )
- {
- street := "river"
- return street
- }
- x1 := 435
- y1 := 155
- x2 := 470
- y2 := 205
- relStarsScreenPoint(id, x1, y1)
- relStarsScreenPoint(id, x2, y2)
- if (debug)
- {
- debug_gui(id, x1, y1, x2, y2)
- }
- If ( GetPixelCount(x1, y1, x2, y2, 0xffffff) > 5 )
- {
- street := "turn"
- return street
- }
- x1 := 382
- y1 := 155
- x2 := 415
- y2 := 205
- relStarsScreenPoint(id, x1, y1)
- relStarsScreenPoint(id, x2, y2)
- if (debug)
- {
- debug_gui(id, x1, y1, x2, y2)
- }
- If ( GetPixelCount(x1, y1, x2, y2, 0xffffff) > 5 )
- {
- street := "flop"
- }
- return street
- }
- GetStreetFT(id)
- {
- global debug
- global caller_hwnd
- if (caller_hwnd != "")
- {
- id := caller_hwnd
- }
- CoordMode, Pixel, Screen
- street := "pre"
- x1 := 485
- y1 := 214
- x2 := 520
- y2 := 260
- relStarsScreenPoint(id, x1, y1)
- relStarsScreenPoint(id, x2, y2)
- if (debug)
- {
- debug_gui(id, x1, y1, x2, y2)
- }
- If ( GetPixelCount(x1, y1, x2, y2, 0xffffff) > 5 )
- {
- street := "river"
- return street
- }
- x1 := 431
- y1 := 214
- x2 := 461
- y2 := 260
- relStarsScreenPoint(id, x1, y1)
- relStarsScreenPoint(id, x2, y2)
- if (debug)
- {
- debug_gui(id, x1, y1, x2, y2)
- }
- If ( GetPixelCount(x1, y1, x2, y2, 0xffffff) > 5 )
- {
- street := "turn"
- return street
- }
- x1 := 378
- y1 := 214
- x2 := 414
- y2 := 260
- relStarsScreenPoint(id, x1, y1)
- relStarsScreenPoint(id, x2, y2)
- if (debug)
- {
- debug_gui(id, x1, y1, x2, y2)
- }
- If ( GetPixelCount(x1, y1, x2, y2, 0xffffff) > 5 )
- {
- street := "flop"
- }
- return street
- }
- StrRep(str,char,rep_char="",all=1)
- {
- StringReplace,str,str,%char%,%rep_char%,%all%
- return str
- }
- StrMid(str,str1,str2,startPos1=1,startPos2=1,caseSense=0){
- If startPos1 =
- startPos1 = 1
- If startPos2 =
- startPos2 = 1
- StringTrimLeft,o,str,InStr(str,str1,cS,startPos1) + StrLen(str1) - 1
- StringLeft,o,o,InStr(o,str2,caseSense,startPos2)-1
- return o
- }
- IIf(_boolExpr, _exprTrue, _exprFalse) {
- If _boolExpr
- Return _exprTrue
- else
- return _exprFalse
- }
- WinGetTitle(win) {
- WinGetTitle, title, ahk_id%win%
- return title
- }
- ; finds number of specified pixels in a region
- GetPixelCount(x1, y1, x2, y2, color, options="")
- {
- CoordMode, Pixel, Screen
- pixels := (x2 - x1 + 1)*(y2 - y1 + 1)
- If ( pixels <= 0 )
- {
- ErrorLevel = 1
- return
- }
- count = 0
- x = %x1%
- Loop
- {
- If ( x > x2 )
- {
- break
- }
- y = %y1%
- Loop
- {
- If ( y > y2 )
- {
- break
- }
- PixelGetColor, c, x, y, %options%
- If ( c = color )
- {
- count++
- }
- y++
- }
- x++
- }
- return count
- }
- ; finds the predomatinate color in a region
- GetPredominateColor(x1,y1,x2,y2,options="") {
- global debug
- if (debug)
- {
- debug_gui(id, x1, y1, x2, y2)
- }
- pixels := (x2 - x1 + 1)*(y2 - y1 + 1)
- If ( pixels <= 0 ) {
- ErrorLevel = -1
- return
- }
- x = %x1%
- Loop {
- If ( x > x2 )
- break
- y = %y1%
- Loop {
- If ( y > y2 )
- break
- PixelGetColor, c, x, y, %options%
- num%c%++
- all_colors = %all_colors%|%c%
- y++
- ;done++
- ;Tooltip % Floor((done/pixels)*100) "%"
- }
- x++
- }
- StringTrimLeft, all_colors, all_colors, 1
- num%pred_c% = 0
- Loop, Parse, all_colors, |
- {
- If ( num%a_loopfield% > num%pred_c% )
- pred_c = %a_loopfield%
- }
- ErrorLevel := num%pred_c%
- return pred_c
- }
- getid()
- {
- global act_only_on_active_table
- ;ut := UrgentTable()
- ;if (ut)
- ;{
- ; id := ut
- ;}
- ;else
- ;{
- tn := TableNav()
- if (tn)
- {
- id := tn
- }
- else
- {
- id := ""
- if (act_only_on_active_table = 1)
- {
- ;MsgBox, Active Table Mode
- WinGet,id,,A
- }
- else
- {
- ;MsgBox, Table Under Cursor Mode
- MouseGetPos, , , id
- }
- }
- ;}
- return id
- }
- TableNav()
- {
- If ! WinExist("blue_bar ahk_class AutoHotkeyGUI")
- return 0
- SendMessage, 0x5555
- return WinExist("ahk_id" errorLevel )
- }
- UrgentTable()
- {
- If ! WinExist("urgent_table ahk_class AutoHotkeyGUI")
- return 0
- SendMessage, 0x5555
- return WinExist("ahk_id" errorLevel )
- }
- relStarsClientPoint(id, ByRef x, ByRef y)
- {
- global border
- global caption
- rw := 792
- rh := 546
- WinGetPos, , , w, h, ahk_id%id%
- w := w - (2*border)
- h := h - (2*border) - caption
- x := Floor( (x / rw ) * w )
- y := Floor( (y / rh) * h )
- }
- relStarsWindowPoint(id, ByRef x, ByRef y)
- {
- global border
- global caption
- relStarsClientPoint(id, x, y)
- x := x + border
- y := y + border + caption
- }
- relStarsScreenPoint(id, ByRef x, ByRef y)
- {
- relStarsWindowPoint(id, x, y)
- WinGetPos, x1, y1, , , ahk_id%id%
- x += x1
- y += y1
- }
- reverse_calc_stars_client_area(cw, ByRef w, ByRef h)
- {
- global border
- global caption
- w := cw + (2*border)
- h := Floor(cw / 1.45) + (2*border) + caption
- }
- client_area(id, ByRef x, Byref y, ByRef w, Byref h)
- {
- WinGetPos, x, y, w, h, ahk_id%id%
- global border
- global caption
- x := x + border
- y := y + border + caption
- w := w - (2*border)
- h := h - (2*border) - caption
- return
- }
- debug_gui(id, x1, y1, x2, y2, delay=500)
- {
- Gui, 2: +Alwaysontop +Lastfound +Owner
- Gui, 2: Color, ffffff
- WinSet, Transparent, 200
- Gui, 2: -Caption
- w1 := x2 - x1
- h1 := y2 - y1
- Gui, 2: Show, w%w1% h%h1% x%x1% y%y1% NoActivate
- Sleep, %delay%
- Gui,2: Destroy
- }
- FoldUB(id)
- {
- ControlGet, v, Visible, , Button29, ahk_id%id%
- if (v)
- {
- ControlFocus, Button29, ahk_id%id%
- Sleep, -1
- ControlClick, Button29, ahk_id%id%
- }
- else
- {
- ControlGet, v, Visible, , Button16, ahk_id%id%
- if (v)
- {
- ControlFocus, Button16, ahk_id%id%
- Sleep, -1
- ControlClick, Button16, ahk_id%id%
- }
- else
- {
- ControlGet, v, Visible, , Button18, ahk_id%id%
- if (v)
- {
- ControlFocus, Button18, ahk_id%id%
- Sleep, -1
- ControlClick, Button18, ahk_id%id%
- }
- else
- {
- ControlGet, v, Visible, , Button13, ahk_id%id%
- if (v)
- {
- ControlFocus, Button13, ahk_id%id%
- Sleep, -1
- ControlClick, Button13, ahk_id%id%
- }
- }
- }
- }
- }
- CallUB(id)
- {
- ControlGet, v, Visible, , Button19, ahk_id%id%
- if (v)
- {
- ControlFocus, Button19, ahk_id%id%
- Sleep, -1
- ControlClick, Button19, ahk_id%id%
- }
- }
- RaiseUB(id)
- {
- ControlGet, v, Visible, , Button51, ahk_id%id%
- if (v)
- {
- ControlFocus, Button51, ahk_id%id%
- Sleep, -1
- ControlClick, Button51, ahk_id%id%
- }
- }
- FoldStars(id)
- {
- PostStarsClick(415,501,id)
- }
- CallStars(id)
- {
- PostStarsClick(600,533,id)
- }
- RaiseStars(id)
- {
- PostStarsClick(730,520,id)
- }
- FoldIPoker(id)
- {
- global iPokerFoldX, iPokerFoldY
- Click, %iPokerFoldx%, %iPokerFoldY%
- }
- CallIPoker(id)
- {
- global iPokerCallx, ipokerCally
- Click, %iPokerCallX%, %iPokerCallY%
- }
- RaiseIPoker(id)
- {
- global iPokerRaiseX, ipokerRaiseY
- Click, %ipokerRaiseX%, %iPokerRaiseY%
- }
- FoldCrypto(id)
- {
- PostStarsClick(480,500,id)
- }
- CallCrypto(id)
- {
- PostStarsClick(602,534,id)
- }
- RaiseCrypto(id)
- {
- PostStarsClick(726,534,id)
- }
- FoldFT(id)
- {
- global FTP_Beta
- global fold_to_any
- if (FTP_Beta)
- {
- if (fold_to_any)
- {
- ControlGet, v, Visible, , FTCSkinButton35, ahk_id%id%
- if (v)
- {
- ControlFocus, FTCSkinButton35, ahk_id%id%
- Sleep, -1
- ControlClick, FTCSkinButton35, ahk_id%id%
- }
- }
- else
- {
- ControlGet, v, Visible, , FTCSkinButton29, ahk_id%id%
- if (v)
- {
- ControlFocus, FTCSkinButton29, ahk_id%id%
- Sleep, -1
- ControlClick, FTCSkinButton29, ahk_id%id%
- }
- else
- {
- ControlGet, v, Visible, , FTCSkinButton11, ahk_id%id%
- if (v)
- {
- ControlFocus, FTCSkinButton11, ahk_id%id%
- Sleep, -1
- ControlClick, FTCSkinButton11, ahk_id%id%
- }
- }
- }
- }
- else
- {
- /*
- ControlGet, v, Visible, , FTCButton31, ahk_id%id%
- if (v)
- {
- ControlFocus, FTCButton31, ahk_id%id%
- Sleep, -1
- ControlClick, FTCButton31, ahk_id%id%
- }
- */
- }
- }
- CallFT(id)
- {
- global FTP_Beta
- if (FTP_Beta)
- {
- ControlGet, v, Visible, , FTCSkinButton12, ahk_id%id%
- if (v)
- {
- ControlFocus, FTCSkinButton12, ahk_id%id%
- Sleep, -1
- ControlClick, FTCSkinButton12, ahk_id%id%
- }
- }
- /*
- else
- {
- ControlGet, v, Visible, , FTCButton11, ahk_id%id%
- if (v)
- {
- ControlFocus, FTCButton11, ahk_id%id%
- Sleep, -1
- ControlClick, FTCButton11, ahk_id%id%
- }
- else
- {
- ControlGet, v, Visible, , FTCButton11, ahk_id%id%
- if (v)
- {
- ControlFocus, FTCButton11, ahk_id%id%
- Sleep, -1
- ControlClick, FTCButton11, ahk_id%id%
- }
- }
- }
- */
- }
- RaiseFT(id)
- {
- global FTP_Beta
- if (FTP_Beta)
- {
- ControlGet, v, Visible, , FTCSkinButton13, ahk_id%id%
- if (v)
- {
- ControlFocus, FTCSkinButton13, ahk_id%id%
- Sleep, -1
- ControlClick, FTCSkinButton13, ahk_id%id%
- }
- }
- /*
- else
- {
- ControlGet, v, Visible, , FTCButton13, ahk_id%id%
- if (v)
- {
- ControlFocus, FTCButton13, ahk_id%id%
- Sleep, -1
- ControlClick, FTCButton13, ahk_id%id%
- }
- }
- */
- }
- FoldParty(id)
- {
- ControlGet, v, Visible, , AfxWnd42u22, ahk_id%id%
- if (v)
- {
- ControlFocus, AfxWnd42u22, ahk_id%id%
- Sleep, -1
- ControlClick, AfxWnd42u22, ahk_id%id%
- }
- else
- {
- ControlGet, v, Visible, , AfxWnd42u17, ahk_id%id%
- if (v)
- {
- ControlFocus, AfxWnd42u17, ahk_id%id%
- Sleep, -1
- ControlClick, AfxWnd42u17, ahk_id%id%
- }
- }
- }
- CallParty(id)
- {
- ControlGet, v, Visible, , AfxWnd42u18, ahk_id%id%
- if (v)
- {
- ControlFocus, AfxWnd42u18, ahk_id%id%
- Sleep, -1
- ControlClick, AfxWnd42u18, ahk_id%id%
- }
- }
- RaiseParty(id)
- {
- ControlGet, v, Visible, , AfxWnd42u19, ahk_id%id%
- if (v)
- {
- ControlFocus, AfxWnd42u19, ahk_id%id%
- Sleep, -1
- ControlClick, AfxWnd42u19, ahk_id%id%
- }
- }
- /*
- ControlClick, AfxWnd42u19, ahk_id%id%
- }
- }
- Else IfWinExist, ahk_id%id% ahk_group CryptoTables
- {
- ControlSetText, edit2, %pot%, ahk_id%id%
- Sleep -1
- WinSet, Redraw,, ahk_id%id%
- If(autobet)
- {
- PostLeftClick(730, 540, id)
- }
- }
- Else IfWinExist, ahk_id%id% ahk_group FullTiltTables
- {
- ControlGet, v, Visible, , Edit1, ahk_id%id%
- if (v)
- {
- ;Msgbox, %pot%
- if (pot > max)
- {
- pot := max
- }
- ControlSetText, Edit1, %pot%, ahk_id%id%
- Sleep -1
- ;WinSet, Redraw,, ahk_id%id%
- If(autobet)
- {
- ab := 0
- Loop, 20
- {
- ControlGetText, t, Edit1, ahk_id%id%
- if (t < pot || t > pot)
- {
- Sleep, 100
- }
- else
- {
- ;TrayTip, , %ab% %t% %pot%
- Sleep, 200
- ControlFocus, FTCButton11, ahk_id%id%
- Sleep, -1
- ControlClick, FTCButton11, ahk_id%id%
- ;ab := 1
- break
- }
- }
- ;TrayTip, , %ab% %t% %pot%
- ;if (ab)
- ;{
- ; ControlFocus, FTCButton11, ahk_id%id%
- ; Sleep, -1
- ; ControlClick, FTCButton11, ahk_id%id%
- ;}
- }
- }
- }
- Else IfWinExist, ahk_id%id% ahk_group PrimaTables
- {
- ControlFocus, Edit1, ahk_id%id%
- ControlSetText, Edit1, %pot%, ahk_id%id%
- Sleep, -1
- WinSet, Redraw,, ahk_id%id%
- If(autobet)
- {
- WinActivate, ahk_id%id%
- WinWaitActive, ahk_id%id%, , 1
- If (errorlevel<>1)
- {
- Send, {ENTER}
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement