Advertisement
Guest User

BetPotOhneFPHG

a guest
Jul 24th, 2011
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 63.65 KB | None | 0 0
  1. ; GENERAL SETTINGS
  2. debug := 0
  3. act_only_on_active_table := 0
  4. fix_blinds := 1
  5. deduct_rake := 1
  6. fold_to_any := 0
  7.  
  8. ; IPOKER SPECIFIC
  9. Ipoker_miniview := 0
  10. 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
  11. 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.
  12.  
  13. ; PARTY SPECIFIC
  14. party_uses_commas_for_decimals := 1
  15. fphg_party_hh_folder := "C:\FreePHG_HandHistories\"
  16. ; **** SET TO 0 (zero) if using old FPHG without "live" folder, else 1 (one)
  17. fphg_uselive = 1
  18.  
  19. ;FTP SPECIFIC
  20. ; **** SET TO 0 (zero) if using FTP official client, 1 (one) if using the Beta
  21. ; THERE IS NO LONGER AN NEED TO CHANGE THIS... BETA IS THE NEW OFFICIAL
  22. FTP_Beta := 1
  23.  
  24. ;STARS SPECIFIC
  25. use_old_stars_buttons := 0
  26. stars_editbox = PokerStarsSliderEditorClass1
  27. ;Uncomment for PokerStars Client version < 2.286
  28. ;stars_editbox = Edit7
  29.  
  30. ;AHK STUFF, DO NOT EDIT
  31. #MaxHotkeysPerInterval 300
  32. #SingleInstance, Force
  33. SendMode Input
  34. SetTitleMatchMode 2
  35. caller_hwnd := ""
  36. SysGet, border, 32
  37. SysGet, caption, 4
  38. caption := border + caption
  39. #NoEnv
  40. ;END OF AHK STUFF
  41.  
  42. ;--------------- Copy / Paste --- Add other Crypto skinpas here ---------------;
  43. WinGet, interpoker, pid, InterPoker - Lobby
  44. if (interpoker)
  45. {
  46. GroupAdd, CryptoTables, ahk_pid%interpoker%,,, Lobby
  47. }
  48.  
  49. WinGet, sunpoker, pid, SunPoker.com - Lobby
  50. if (sunpoker)
  51. {
  52. GroupAdd, CryptoTables, ahk_pid%sunpoker%,,, Lobby
  53. }
  54.  
  55. WinGet, willhill, pid, William Hill Poker - Lobby
  56. if (willhill)
  57. {
  58. GroupAdd, CryptoTables, ahk_pid%willhill%,,, Lobby
  59. }
  60.  
  61. WinGet, betsafe, pid, Betsafe Poker - Lobby
  62. if (betsafe)
  63. {
  64. GroupAdd, CryptoTables, ahk_pid%betsafe%,,, Lobby
  65. }
  66.  
  67. WinGet, parbet, pid, Parbet.com Poker - Lobby
  68. if (parbet)
  69. {
  70. GroupAdd, CryptoTables, ahk_pid%parbet%,,, Lobby
  71. }
  72.  
  73.  
  74. WinGet, lw, pid, Littlewoods Poker - Lobby
  75. if (lw)
  76. {
  77. GroupAdd, CryptoTables, ahk_pid%lw%,,, Lobby
  78. }
  79.  
  80. WinGet, dtd, pid, DTD Poker - Lobby
  81. if (dtd)
  82. {
  83. GroupAdd, CryptoTables, ahk_pid%dtd%,,, Lobby
  84. }
  85.  
  86. ;----------- END OF CRYPTO SKINS --------------
  87.  
  88.  
  89. WinGet, ub, pid, UltimateBet
  90. if (ub)
  91. {
  92. GroupAdd, UBTables, ahk_pid%ub%,,, UltimateBet
  93. }
  94.  
  95.  
  96. GroupAdd, StarsTables, Logged In as ,,, PokerStars Lobby
  97. GroupAdd, PartyTables, ahk_class #32770,,, : Poker Lobby
  98. GroupAdd, FullTiltTables, ahk_class FTC_TableViewFull
  99. GroupAdd, PrimaTables, ahk_class POPUP_INT_DLG_WINDOW
  100. GroupAdd, MiniFT, MiniFT ahk_class AutoHotkeyGUI
  101. GroupAdd, iPokerTables, ahk_class PTIODEVICE,,, : Nickname:
  102.  
  103. ;--------- IPOKER COORDINATES -------------------
  104. iPokerX := 557 + border
  105. iPokerY := 462 + caption
  106.  
  107. iPokerChat := 550
  108. iPokerRaiseX := 554
  109. iPokerRaiseY := 545
  110. ipokerCallx := 445
  111. ipokerCallY:= 550
  112. iPokerFoldX := 300
  113. iPokerFoldY := 550
  114.  
  115. if iPoker_miniview
  116. {
  117. iPokerX := 400 + border
  118. iPokerY := 265 + caption
  119.  
  120. iPokerChat := 300
  121. iPokerRaiseX := 400
  122. iPokerRaiseY := 325
  123. ipokerCallx := 310
  124. ipokerCallY:= 325
  125. iPokerFoldX := 220
  126. iPokerFoldY := 325
  127. }
  128.  
  129. return
  130.  
  131. #include betpot_default_hotkeys.ahk
  132.  
  133.  
  134.  
  135.  
  136. Fold(id)
  137. {
  138. IfWinExist, ahk_id%id% ahk_group MiniFT
  139. {
  140. WinGetTitle, t, ahk_id%id%
  141. StringTrimLeft, t, t, Instr(t, "hwnd:", true, 0)+4
  142. id := t
  143. }
  144.  
  145. IfWinExist, ahk_id%id% ahk_group StarsTables
  146. {
  147. FoldStars(id)
  148. }
  149. Else IfWinExist, ahk_id%id% ahk_group FullTiltTables
  150. {
  151. FoldFT(id)
  152. }
  153. Else IfWinExist, ahk_id%id% ahk_group PartyTables
  154. {
  155. FoldParty(id)
  156. }
  157. Else IfWinExist, ahk_id%id% ahk_group CryptoTables
  158. {
  159. FoldCrypto(id)
  160. }
  161. Else IfWinExist, ahk_id%id% ahk_group UBTables
  162. {
  163. FoldUB(id)
  164. }
  165. Else IfWinExist, ahk_id%id% ahk_group iPokerTables
  166. {
  167. FoldIPoker(id)
  168. }
  169. }
  170.  
  171. Call(id)
  172. {
  173. IfWinExist, ahk_id%id% ahk_group MiniFT
  174. {
  175. WinGetTitle, t, ahk_id%id%
  176. StringTrimLeft, t, t, Instr(t, "hwnd:", true, 0)+4
  177. id := t
  178. }
  179.  
  180. IfWinExist, ahk_id%id% ahk_group StarsTables
  181. {
  182. CallStars(id)
  183. }
  184. Else IfWinExist, ahk_id%id% ahk_group FullTiltTables
  185. {
  186. CallFT(id)
  187. }
  188. Else IfWinExist, ahk_id%id% ahk_group PartyTables
  189. {
  190. CallParty(id)
  191. }
  192. Else IfWinExist, ahk_id%id% ahk_group CryptoTables
  193. {
  194. CallCrypto(id)
  195. }
  196. Else IfWinExist, ahk_id%id% ahk_group UBTables
  197. {
  198. CallUB(id)
  199. }
  200. Else IfWinExist, ahk_id%id% ahk_group iPokerTables
  201. {
  202. CallIPoker(id)
  203. }
  204. }
  205.  
  206. Raise(id)
  207. {
  208. IfWinExist, ahk_id%id% ahk_group MiniFT
  209. {
  210. WinGetTitle, t, ahk_id%id%
  211. StringTrimLeft, t, t, Instr(t, "hwnd:", true, 0)+4
  212. id := t
  213. }
  214.  
  215. IfWinExist, ahk_id%id% ahk_group StarsTables
  216. {
  217. RaiseStars(id)
  218. }
  219. Else IfWinExist, ahk_id%id% ahk_group FullTiltTables
  220. {
  221. RaiseFT(id)
  222. }
  223. Else IfWinExist, ahk_id%id% ahk_group PartyTables
  224. {
  225. RaiseParty(id)
  226. }
  227. Else IfWinExist, ahk_id%id% ahk_group CryptoTables
  228. {
  229. RaiseCrypto(id)
  230. }
  231. Else IfWinExist, ahk_id%id% ahk_group UBTables
  232. {
  233. RaiseUB(id)
  234. }
  235. Else IfWinExist, ahk_id%id% ahk_group IPokerTables
  236. {
  237. RaiseIPoker(id)
  238. }
  239. }
  240.  
  241.  
  242. AlterAmount(id, dir="", frac=1, unit="")
  243. {
  244. global party_uses_commas_for_decimals, stars_editbox
  245.  
  246. ;MsgBox, %id%
  247.  
  248. IfWinExist, ahk_id%id% ahk_group MiniFT
  249. {
  250. WinGetTitle, t, ahk_id%id%
  251. StringTrimLeft, t, t, Instr(t, "hwnd:", true, 0)+4
  252. id := t
  253. }
  254.  
  255. WinGetTitle, title, ahk_id%id%
  256. ;MsgBox, %title%
  257. amount := 0
  258.  
  259. IfWinExist, ahk_id%id% ahk_group StarsTables
  260. {
  261. If ((InStr(title, "No Limit") OR InStr(title, "Pot Limit")) AND InStr(title, "Tournament") = 0)
  262. {
  263. StringMid, bb, title, InStr(title, "/") + 1, InStr(title, a_space,"", InStr(title, "/")) - InStr(title, "/") - 1
  264. }
  265. else if (InStr(title, "No Limit") <> 0 AND InStr(title, "Tournament") <> 0)
  266. {
  267. 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
  268. }
  269.  
  270. }
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280. Else IfWinExist, ahk_id%id% ahk_group PartyTables
  281. {
  282.  
  283. If (InStr(title, "NL") <> 0 AND InStr(title, "Buy-in") = 0)
  284. {
  285. ;old StringMid, bb, title, InStr(title, "/"), InStr(title, ". ", InStr(title,"/")) - InStr(title, "/") -1
  286.  
  287. ;new
  288.  
  289. StringMid, bb, title, InStr(title, "/")+1, 1
  290.  
  291.  
  292. ; StringMid, bb, title, InStr(title, "/") + 1, (InStr(title, "$") - InStr(title, "/"))
  293. ;StringMid, bb, title, InStr(title, "/"), InStr(title, ", ", InStr(title,"$")) - InStr(title, "/") -1
  294. ;StringMid, bb, title, InStr(title, "/"), InStr(title, ", ", InStr(title,"/")) - InStr(title, "/") -1
  295.  
  296. ;MsgBox %bb%
  297.  
  298. }
  299. else if (InStr(title, "NL") <> 0 AND InStr(title, "Buy-in") <> 0)
  300. {
  301. ControlGetText, text, Static5, ahk_id%id%
  302. IfNotInString, text, Blinds-Antes
  303. {
  304. StringMid, bb, text, InStr(text, "/") + 1, InStr(text, ")") - InStr(text, "/") - 1
  305. }
  306. else
  307. {
  308. StringMid, bb, text, InStr(text, "/") + 1, InStr(text, "-","",InStr(text, "/")) - InStr(text, "/") - 1
  309. }
  310. }
  311. if (party_uses_commas_for_decimals)
  312. {
  313. StringReplace, bb, bb, `,,., All
  314. }
  315. }
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329. Else IfWinExist, ahk_id%id% ahk_group CryptoTables
  330. {
  331. StringMid, bb, title, InStr(title, "/") + 1, InStr(title, a_space,"", InStr(title, "/")) - InStr(title, "/") - 1
  332.  
  333. }
  334.  
  335. Else IfWinExist, ahk_id%id% ahk_group FullTiltTables
  336. {
  337. StringMid, bb, title, InStr(title, "/") + 1, InStr(title, a_space,"", InStr(title, "/")) - InStr(title, "/") - 1
  338. }
  339.  
  340. Else IfWinExist, ahk_id%id% ahk_group PrimaTables
  341. {
  342. StringTrimLeft, bb, title, InStr(title, "$", true, 0)
  343. StringMid, bb, bb, InStr(bb, " ")-1,, L
  344. }
  345.  
  346. Else IfWinExist, ahk_id%id% ahk_group UBTables
  347. {
  348. StringTrimLeft, bb, title, InStr(title, "$", true, 0)-1
  349. StringTrimRight, bb, bb, Strlen(bb) - InStr(bb, A_Space)
  350. StringReplace, bb, bb, $., $0., All
  351. StringReplace, bb, bb, $,, All
  352. StringReplace, bb, bb, %A_Space%,, All
  353.  
  354. ;StringMid, bb, bb, InStr(bb, "$")-1,, L
  355. ;MsgBox, %bb%
  356. }
  357.  
  358. Else IfWinExist, ahk_id%id% ahk_group iPokerTables
  359. {
  360. StringTrimLeft, bb, title, InStr(title, "/$")
  361. }
  362.  
  363. Else
  364. {
  365. Send {%A_ThisHotkey%}
  366. return
  367. }
  368.  
  369. StringReplace,bb,bb,$,,1
  370. StringReplace,bb,bb,£,,1
  371. StringReplace,bb,bb,€,,1
  372.  
  373. sb := sb(bb)
  374. ;MsgBox, "%sb%"
  375. ;MsgBox, "%bb%"
  376.  
  377. If (unit = "" or unit = "bb")
  378. {
  379. unit := bb
  380. }
  381. Else If (unit = "sb")
  382. {
  383. unit := sb
  384. }
  385. Else If (unit = "pot")
  386. {
  387. pot := 0
  388. call := 0
  389. hero_bet := 0
  390. street := "pre"
  391. hero_position := ""
  392. open := 0
  393. max := 10000000
  394. IfWinExist, ahk_id%id% ahk_group StarsTables
  395. {
  396. PotSizeStars(id, pot, call, sb, bb, hero_bet, street, hero_position, open)
  397. }
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406. Else IfWinExist, ahk_id%id% ahk_group PartyTables
  407. {
  408. PotSizeParty(id, pot, call, sb, bb, hero_bet, street, hero_position, open)
  409. if (party_uses_commas_for_decimals)
  410. {
  411. StringReplace, call, call, `,,., All
  412. }
  413. }
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422. Else IfWinExist, ahk_id%id% ahk_group CryptoTables
  423. {
  424. PotSizeCrypto(id, pot, call, sb, bb, hero_bet, street, hero_position, open)
  425. }
  426. Else IfWinExist, ahk_id%id% ahk_group FullTiltTables
  427. {
  428. ControlGet, v, Visible, , Edit1, ahk_id%id%
  429. if (v)
  430. {
  431. PotSizeFullTilt2(id, pot, call, sb, bb, hero_bet, street, hero_position, open, max)
  432. }
  433. else
  434. {
  435. return
  436. }
  437. ;msgbox, %pot%
  438. }
  439. Else IfWinExist, ahk_id%id% ahk_group PrimaTables
  440. {
  441. PotSizePrima(id, pot, call, sb, bb, hero_bet, street, hero_position, open)
  442. }
  443. Else IfWinExist, ahk_id%id% ahk_group iPokerTables
  444. {
  445. PotSizeIPoker(id, pot, call, sb, bb, hero_bet, street, hero_position, open)
  446. }
  447.  
  448. pot := ((pot + call + hero_bet) )+ call
  449.  
  450. ;Msgbox, %pot%
  451. unit := pot
  452. }
  453. amount := unit * frac
  454. ;MsgBox, %unit%
  455.  
  456. if (dir="down")
  457. {
  458. amount := amount - (2*amount)
  459. }
  460.  
  461.  
  462.  
  463. ;Msgbox, %sb%/%bb%
  464. /*
  465. IfWinExist, ahk_id%id% ahk_group MiniFT
  466. {
  467. ControlGet, v, Visible, , Edit1, ahk_id%id%
  468. if (v)
  469. {
  470. ControlGetText, t, Edit1, ahk_id%id%
  471. t := t + amount
  472. if (t < 0)
  473. {
  474. t := 0
  475. }
  476. t := Round(t, 2)
  477. ControlSetText, Edit1, %t%, ahk_id%id%
  478. WinSet, Redraw,, ahk_id%id%
  479. }
  480. }
  481. */
  482.  
  483. IfWinExist, ahk_id%id% ahk_group StarsTables
  484. {
  485. ControlGetText, t, %stars_editbox%, ahk_id%id%
  486. ;Msgbox, %t%
  487. t := t + amount
  488. if (t < 0)
  489. {
  490. t := 0
  491. }
  492. t := Round(t, 2)
  493. ControlSetText, %stars_editbox%, %t%, ahk_id%id%
  494. Sleep, -1
  495. ;ControlGetText, t, %stars_editbox%, ahk_id%id%
  496. WinSet, Redraw,, ahk_id%id%
  497. }
  498. Else IfWinExist, ahk_id%id% ahk_group PartyTables
  499. {
  500. ;ControlGetText, t, edit4, ahk_id%id%
  501. ControlGetText, t, edit2, ahk_id%id%
  502. if (party_uses_commas_for_decimals)
  503. {
  504. StringReplace, t, t, `,,., All
  505. }
  506. t := t + amount
  507. if (t < 0)
  508. {
  509. t := 0
  510. }
  511. t := Round(t, 2)
  512. if (party_uses_commas_for_decimals)
  513. {
  514. StringReplace, t, t, .,`,, All
  515. }
  516. ;MsgBox %t%
  517. ;ControlSetText, edit4, %t%, ahk_id%id%
  518. ControlSetText, edit2, %t%, ahk_id%id%
  519. ;WinSet, Redraw,, ahk_id%id%
  520. }
  521. Else IfWinExist, ahk_id%id% ahk_group CryptoTables
  522. {
  523. ControlGetText, t, edit2, ahk_id%id%
  524. t := t + amount
  525. if (t < 0)
  526. {
  527. t := 0
  528. }
  529. t := Round(t, 2)
  530. ControlSetText, edit2, %t%, ahk_id%id%
  531. WinSet, Redraw,, ahk_id%id%
  532. }
  533. Else IfWinExist, ahk_id%id% ahk_group FullTiltTables
  534. {
  535. ControlGet, v, Visible, , Edit1, ahk_id%id%
  536. if (v)
  537. {
  538. ControlGetText, t, Edit1, ahk_id%id%
  539. t := t + amount
  540. if (t < 0)
  541. {
  542. t := 0
  543. }
  544. t := Round(t, 2)
  545. ControlSetText, Edit1, %t%, ahk_id%id%
  546. ;WinSet, Redraw,, ahk_id%id%
  547. }
  548. }
  549. Else IfWinExist, ahk_id%id% ahk_group PrimaTables
  550. {
  551. ControlGetText, t, Edit1, ahk_id%id%
  552. t := t + amount
  553. if (t < 0)
  554. {
  555. t := 0
  556. }
  557. t := Round(t, 2)
  558. ControlSetText, Edit1, %t%, ahk_id%id%
  559. WinSet, Redraw,, ahk_id%id%
  560. }
  561. Else IfWinExist, ahk_id%id% ahk_group UBTables
  562. {
  563. ControlGetText, t, Edit1, ahk_id%id%
  564. t := t + amount
  565. if (t < 0)
  566. {
  567. t := 0
  568. }
  569. t := Round(t, 2)
  570. ControlSetText, Edit1, %t%, ahk_id%id%
  571. ;WinSet, Redraw,, ahk_id%id%
  572. }
  573.  
  574. Else IfWinExist, ahk_id%id% ahk_group iPokerTables
  575. {
  576. t := ReadBetBoxIPoker(id)
  577. t := t + amount
  578.  
  579. if (t <= 0)
  580. return
  581.  
  582. t := Round(t, 2)
  583.  
  584. WriteBetBoxIPoker(id, t)
  585. }
  586. }
  587.  
  588. Pot(id, frac=1, round_bet=0.2, open_adjust="", autoBet=0)
  589. {
  590. global debug
  591. global fix_blinds
  592. global caller_hwnd
  593. global party_uses_commas_for_decimals
  594. global ipokerchat, iPokerRaiseX, iPokerRaiseY
  595. global stars_editbox
  596. caller_hwnd := ""
  597. pot := 0
  598. call := 0
  599. sb := 0
  600. bb := 0
  601. hero_bet := 0
  602. street := ""
  603. hero_position := ""
  604. open := 1
  605. max := 10000000
  606.  
  607. IfWinExist, ahk_id%id% ahk_group MiniFT
  608. {
  609. WinGetTitle, t, ahk_id%id%
  610. caller_hwnd := id
  611. StringTrimLeft, t, t, Instr(t, "hwnd:", true, 0)+4
  612. id := t
  613. }
  614.  
  615. IfWinExist, ahk_id%id% ahk_group StarsTables
  616. {
  617. PotSizeStars(id, pot, call, sb, bb, hero_bet, street, hero_position, open)
  618. }
  619.  
  620.  
  621.  
  622.  
  623. Else IfWinExist, ahk_id%id% ahk_group PartyTables
  624. {
  625. PotSizeParty(id, pot, call, sb, bb, hero_bet, street, hero_position, open)
  626. if (party_uses_commas_for_decimals)
  627. {
  628. StringReplace, call, call, `,,., All
  629. StringReplace, pot, pot, `,,., All
  630. }
  631. }
  632.  
  633.  
  634.  
  635.  
  636.  
  637. Else IfWinExist, ahk_id%id% ahk_group CryptoTables
  638. {
  639. PotSizeCrypto(id, pot, call, sb, bb, hero_bet, street, hero_position, open)
  640. }
  641. Else IfWinExist, ahk_id%id% ahk_group FullTiltTables
  642. {
  643. ControlGet, v, Visible, , Edit1, ahk_id%id%
  644. if (v)
  645. {
  646. PotSizeFullTilt2(id, pot, call, sb, bb, hero_bet, street, hero_position, open, max)
  647. }
  648. else
  649. {
  650. return
  651. }
  652. ;msgbox, %pot%
  653. }
  654. Else IfWinExist, ahk_id%id% ahk_group PrimaTables
  655. {
  656. PotSizePrima(id, pot, call, sb, bb, hero_bet, street, hero_position, open)
  657. }
  658. Else IfWinExist, ahk_id%id% ahk_group UBTables
  659. {
  660. ControlGet, v, Visible, , Edit1, ahk_id%id%
  661. if (v)
  662. {
  663. PotSizeUB(id, pot, call, sb, bb, hero_bet, street, hero_position, open)
  664. }
  665. else
  666. {
  667. return
  668. }
  669. }
  670.  
  671. Else IfWinExist, ahk_id%id% ahk_group iPokerTables
  672. {
  673. PotSizeIPoker(id, pot, call, sb, bb, hero_bet, street, hero_position, open)
  674. }
  675.  
  676. Else
  677. {
  678. return
  679. }
  680.  
  681. StringSplit, fr, frac, %A_SPACE%
  682. if (fr0 < 4)
  683. {
  684. times := 4 - fr0
  685. Loop, %times%
  686. {
  687. n := 5 - A_Index
  688. fr%n% := fr%fr0%
  689. }
  690. }
  691.  
  692. if (street = "pre")
  693. {
  694. frac = %fr1%
  695. }
  696. else if (street = "flop")
  697. {
  698. frac = %fr2%
  699. }
  700. else if (street = "turn")
  701. {
  702. frac = %fr3%
  703. }
  704. else if (street = "river")
  705. {
  706. frac = %fr4%
  707. }
  708.  
  709. if (debug)
  710. {
  711. 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
  712. }
  713.  
  714. if (fix_blinds AND open AND street="pre")
  715. {
  716. if (hero_position = "sb" )
  717. {
  718. pot := pot - sb
  719. call := call + sb
  720. }
  721. else if (hero_position = "bb")
  722. {
  723. pot := pot - bb
  724. call := call + bb
  725. }
  726. }
  727.  
  728. ;msgbox, %pot%
  729. pot := ((pot + call + hero_bet)* (frac) )+ call
  730.  
  731. ;msgbox, %pot%
  732.  
  733. if (open=1 AND open_adjust="ssnl" )
  734. {
  735. pot := pot + bb - sb
  736. }
  737. else if (open=1 AND open_adjust="tourney" )
  738. {
  739. pot := pot - bb
  740. }
  741. else if (open=1 AND open_adjust="mix" )
  742. {
  743. if (bb=2)
  744. {
  745. pot := pot + bb - sb
  746. }
  747. }
  748.  
  749. if(round_bet = "smallblind")
  750. {
  751. pot := Round((Floor((pot / sb)) * sb),2)
  752. }
  753. else if(round_bet = "bigblind")
  754. {
  755. pot := Round((Floor((pot / bb)) * bb),2)
  756. }
  757. else if (round_bet < 1)
  758. {
  759. places := round_bet*10
  760. pot := Round(pot, (places))
  761. }
  762. else if (round_bet >= 1)
  763. {
  764. pot := Floor(pot / round_bet) * round_bet
  765. }
  766. ;msgbox, %pot%
  767.  
  768.  
  769.  
  770. IfWinExist, ahk_id%id% ahk_group StarsTables
  771. {
  772. ControlSetText, %stars_editbox%, %pot%, ahk_id%id%
  773. Sleep, -1
  774. if (autobet)
  775. {
  776. RaiseStars(id)
  777. }
  778. }
  779. Else IfWinExist, ahk_id%id% ahk_group PartyTables
  780. {
  781. if (party_uses_commas_for_decimals)
  782. {
  783. StringReplace, pot, pot, .,`,, All
  784. }
  785. ;Msgbox, %pot%
  786. ;ControlSetText, edit4, %pot%, ahk_id%id% ;new
  787. ControlSetText, edit2, %pot%, ahk_id%id% ;old
  788. Sleep -1
  789. Sleep, 50
  790. WinSet, Redraw,, ahk_id%id%
  791. If(autobet)
  792. {
  793. ControlClick, AfxWnd42u19, ahk_id%id%
  794. }
  795. }
  796. Else IfWinExist, ahk_id%id% ahk_group CryptoTables
  797. {
  798. ControlSetText, edit2, %pot%, ahk_id%id%
  799. Sleep -1
  800. WinSet, Redraw,, ahk_id%id%
  801. If(autobet)
  802. {
  803. PostLeftClick(730, 540, id)
  804. }
  805. }
  806. Else IfWinExist, ahk_id%id% ahk_group FullTiltTables
  807. {
  808. ControlGet, v, Visible, , Edit1, ahk_id%id%
  809. if (v)
  810. {
  811. ;Msgbox, %pot%
  812. if (pot > max)
  813. {
  814. pot := max
  815. }
  816. ControlSetText, Edit1, %pot%, ahk_id%id%
  817. Sleep -1
  818. ;WinSet, Redraw,, ahk_id%id%
  819. If(autobet)
  820. {
  821. ab := 0
  822. Loop, 20
  823. {
  824. ControlGetText, t, Edit1, ahk_id%id%
  825. if (t < pot || t > pot)
  826. {
  827. Sleep, 100
  828. }
  829. else
  830. {
  831. ;TrayTip, , %ab% %t% %pot%
  832. Sleep, 200
  833.  
  834. RaiseFT(id)
  835.  
  836. /*
  837. if (FTP_Beta)
  838. {
  839. ControlFocus, FTCButton14, ahk_id%id%
  840. Sleep, -1
  841. ControlClick, FTCButton14, ahk_id%id%
  842. }
  843. else
  844. {
  845. ControlFocus, FTCButton13, ahk_id%id%
  846. Sleep, -1
  847. ControlClick, FTCButton13, ahk_id%id%
  848. }
  849. */
  850.  
  851. break
  852. }
  853. }
  854. ;TrayTip, , %ab% %t% %pot%
  855. ;if (ab)
  856. ;{
  857. ; ControlFocus, FTCButton11, ahk_id%id%
  858. ; Sleep, -1
  859. ; ControlClick, FTCButton11, ahk_id%id%
  860. ;}
  861. }
  862. }
  863. }
  864. Else IfWinExist, ahk_id%id% ahk_group PrimaTables
  865. {
  866. ControlFocus, Edit1, ahk_id%id%
  867. ControlSetText, Edit1, %pot%, ahk_id%id%
  868. Sleep, -1
  869. WinSet, Redraw,, ahk_id%id%
  870. If(autobet)
  871. {
  872. WinActivate, ahk_id%id%
  873. WinWaitActive, ahk_id%id%, , 1
  874. If (errorlevel<>1)
  875. {
  876. Send, {ENTER}
  877. }
  878.  
  879. }
  880. }
  881. Else IfWinExist, ahk_id%id% ahk_group UBTables
  882. {
  883. ControlSetText, Edit1, %pot%, ahk_id%id%
  884. Sleep -1
  885. WinSet, Redraw,, ahk_id%id%
  886. If(autobet)
  887. {
  888. RaiseUB(id)
  889. }
  890. }
  891.  
  892. Else IfWinExist, ahk_id%id% ahk_group iPokerTables
  893. {
  894. if pot != 0
  895. {
  896. ;try to write the bet five times
  897. attempts := 0
  898.  
  899. loop
  900. {
  901. if (readPot = pot OR attempts > 5)
  902. break
  903.  
  904. WriteBetBoxIpoker(id, pot)
  905. readPot := ReadBetBoxIpoker(id)
  906. attempts++
  907. }
  908.  
  909. If(autobet)
  910. {
  911. if (readPot = pot)
  912. {
  913. WinActivate, ahk_id%id%
  914. WinWaitActive, ahk_id%id%, , 1
  915. If (errorlevel<>1)
  916. {
  917. Send, {ENTER}
  918. }
  919. }
  920. }
  921.  
  922. Click, 75, %ipokerchat%
  923. MouseMove, %ipokerraisex%, %ipokerraisey%
  924. }
  925. }
  926. }
  927.  
  928.  
  929. PotSizeFullTilt2(id, ByRef pot, ByRef call, ByRef sb, ByRef bb, ByRef hero_bet, ByRef street, ByRef hero_position, ByRef open, ByRef max)
  930. {
  931. global deduct_rake
  932. global FTP_Beta
  933. rake := 0
  934. notraked := 0
  935. maxrake := 3
  936. max := 7654321
  937.  
  938. ftp_btn_max = FTCSkinButton24
  939. ftp_btn_max_pl = FTCSkinButton24
  940. ftp_btn_max_cap = FTCSkinButton28
  941. ftp_btn_min = FTCSkinButton23
  942. ftp_btn_pot = FTCSkinButton25
  943. ftp_btn_pot_pl = FTCSkinButton27
  944.  
  945. WinGetTitle, title, ahk_id%id%
  946. StringMid, bb, title, InStr(title, "/") + 1, InStr(title, a_space,"", InStr(title, "/")) - InStr(title, "/") - 1
  947. StringReplace,bb,bb,$,,1
  948. sb := sb(bb)
  949. ;msgbox, %bb%`n%sb%
  950. ControlGetText, t, Edit1, ahk_id%id%
  951.  
  952. min := sb
  953.  
  954.  
  955. if (InStr(title, "Pot Limit"))
  956. {
  957. ControlGet, v, Visible, , %ftp_btn_pot_pl%, ahk_id%id%
  958. if (v)
  959. {
  960. ;TrayTip, BetPot,`nPOT to zero,10,17
  961. x := ""
  962. ControlSetText, Edit1,%min%, ahk_id%id%
  963. Loop, 50
  964. {
  965. ControlGetText, x, Edit1, ahk_id%id%
  966. if (x = min)
  967. {
  968. break
  969. ;Traytip
  970. }
  971. sleep, 40
  972. ;Traytip
  973. }
  974.  
  975.  
  976. Loop, 50
  977. {
  978. ; TrayTip, BetPot,`nPOT result,10,17
  979. ControlFocus, %ftp_btn_pot_pl%, ahk_id%id%
  980. ControlClick, %ftp_btn_pot_pl%, ahk_id%id%
  981. Sleep, -1
  982. ControlGetText, pot, Edit1, ahk_id%id%
  983. if (pot != "")
  984. {
  985. break
  986. ;Traytip
  987. }
  988. sleep, 40
  989. ; TrayTip
  990. }
  991. }
  992. }
  993. else ;unlimited betting
  994. {
  995. ControlGet, v, Visible, , %ftp_btn_pot%, ahk_id%id%
  996. if (v)
  997. {
  998. ;TrayTip, BetPot,`nPOT to zero,10,17
  999. x := ""
  1000. ControlSetText, Edit1,%min%, ahk_id%id%
  1001. Loop, 50
  1002. {
  1003. ControlGetText, x, Edit1, ahk_id%id%
  1004. if (x = min)
  1005. {
  1006. break
  1007. ;Traytip
  1008. }
  1009. sleep, 40
  1010. ;Traytip
  1011. }
  1012.  
  1013.  
  1014. Loop, 50
  1015. {
  1016. ; TrayTip, BetPot,`nPOT result,10,17
  1017. ControlFocus, %ftp_btn_pot%, ahk_id%id%
  1018. ControlClick, %ftp_btn_pot%, ahk_id%id%
  1019. Sleep, -1
  1020. ControlGetText, pot, Edit1, ahk_id%id%
  1021. if (pot != "")
  1022. {
  1023. break
  1024. ;Traytip
  1025. }
  1026. sleep, 40
  1027. ; TrayTip
  1028. }
  1029. }
  1030.  
  1031.  
  1032. ControlGet, v, Visible, , %ftp_btn_min%, ahk_id%id%
  1033. if (v)
  1034. {
  1035. ;TrayTip, BetPot,`nMIN to zero,10,17
  1036. x := ""
  1037. ControlSetText, Edit1,%pot%, ahk_id%id%
  1038. Loop, 50
  1039. {
  1040. ControlGetText, x, Edit1, ahk_id%id%
  1041. if (x = pot)
  1042. {
  1043. break
  1044. ;Traytip
  1045. }
  1046. sleep, 40
  1047. ;Traytip
  1048. }
  1049.  
  1050.  
  1051. Loop, 50
  1052. {
  1053. ;TrayTip, BetPot,`nMIN result,10,17
  1054. ControlFocus, %ftp_btn_min%, ahk_id%id%
  1055. ControlClick, %ftp_btn_min%, ahk_id%id%
  1056. Sleep, -1
  1057. ControlGetText, min, Edit1, ahk_id%id%
  1058. if (min != pot)
  1059. {
  1060. break
  1061. ;TrayTip
  1062. }
  1063. sleep, 40
  1064. ;TrayTip
  1065. }
  1066. }
  1067. }
  1068.  
  1069.  
  1070.  
  1071.  
  1072. ControlSetText, Edit1, %t%, ahk_id%id%
  1073.  
  1074.  
  1075. street := "pre"
  1076.  
  1077. street := GetStreetFT(id)
  1078.  
  1079.  
  1080. if (min = bb)
  1081. {
  1082. call := 0
  1083. }
  1084. else if (min > bb)
  1085. {
  1086. call := min / 2
  1087. }
  1088. else if (street != "pre")
  1089. {
  1090. call := bb
  1091. }
  1092.  
  1093. if (call != bb || street != "pre")
  1094. {
  1095. open := 0
  1096. }
  1097.  
  1098. pot := pot - (2 * call)
  1099.  
  1100.  
  1101.  
  1102. /*
  1103. if (deduct_rake AND street<>"pre")
  1104. {
  1105. rake := Floor(pot - notraked) * 0.05
  1106. if (rake > maxrake)
  1107. {
  1108. rake := maxrake
  1109. }
  1110. pot := pot - rake
  1111. }
  1112. */
  1113.  
  1114. ;Msgbox, Pot: %pot%`nRake: %rake%`nNot Raked: %notraked%
  1115.  
  1116.  
  1117. return
  1118. }
  1119.  
  1120.  
  1121.  
  1122. PotSizeFullTilt2_old(id, ByRef pot, ByRef call, ByRef sb, ByRef bb, ByRef hero_bet, ByRef street, ByRef hero_position, ByRef open, ByRef max)
  1123. {
  1124. global deduct_rake
  1125. global FTP_Beta
  1126. rake := 0
  1127. notraked := 0
  1128. maxrake := 3
  1129.  
  1130. ftp_btn_max = FTCSkinButton24
  1131. ftp_btn_max_pl = FTCSkinButton24
  1132. ftp_btn_max_cap = FTCSkinButton28
  1133. ftp_btn_min = FTCSkinButton23
  1134. ftp_btn_pot = FTCSkinButton25
  1135. ftp_btn_pot_pl = FTCSkinButton27
  1136.  
  1137. WinGetTitle, title, ahk_id%id%
  1138. StringMid, bb, title, InStr(title, "/") + 1, InStr(title, a_space,"", InStr(title, "/")) - InStr(title, "/") - 1
  1139. StringReplace,bb,bb,$,,1
  1140. sb := sb(bb)
  1141. ;msgbox, %bb%`n%sb%
  1142. ControlGetText, t, Edit1, ahk_id%id%
  1143.  
  1144. min := sb
  1145.  
  1146.  
  1147. if (FTP_Beta)
  1148. {
  1149. ControlGet, v, Visible, , %ftp_btn_max%, ahk_id%id%
  1150. if (v)
  1151. {
  1152. ;TrayTip, BetPot,`nMAX,10,17
  1153. x := ""
  1154. ControlSetText, Edit1,, ahk_id%id%
  1155. Loop, 50
  1156. {
  1157. ControlGetText, x, Edit1, ahk_id%id%
  1158. if (x = "")
  1159. {
  1160. break
  1161. }
  1162. else
  1163. {
  1164. sleep, 40
  1165. }
  1166. }
  1167. /* ;NOT SURE WE NEED MAX ANYMORE
  1168. ControlClick, %ftp_btn_max%, ahk_id%id%
  1169. Loop, 50
  1170. {
  1171. ControlGetText, max, Edit1, ahk_id%id%
  1172. if (max != "")
  1173. {
  1174.  
  1175. break
  1176. }
  1177. else
  1178. {
  1179. sleep, 40
  1180. }
  1181. }
  1182. ;ControlGetText, max, Edit1, ahk_id%id%
  1183. */
  1184. }
  1185. else if (InStr(title, "Cap No Limit") || InStr(title, "Pot Limit"))
  1186. {
  1187. ControlGet, v, Visible, , %ftp_btn_max_cap%, ahk_id%id% ; CAP
  1188. if (v)
  1189. {
  1190. ;TrayTip, BetPot,`nCAP MAX,10,17
  1191. x := ""
  1192. ControlSetText, Edit1,, ahk_id%id%
  1193. Loop, 50
  1194. {
  1195. ControlGetText, x, Edit1, ahk_id%id%
  1196. if (x = "")
  1197. {
  1198. break
  1199. }
  1200. else
  1201. {
  1202. sleep, 40
  1203. }
  1204. }
  1205. ControlClick, %ftp_btn_max_cap%, ahk_id%id%
  1206. Loop, 50
  1207. {
  1208. ControlGetText, max, Edit1, ahk_id%id%
  1209. if (max != "")
  1210. {
  1211. ;if (max = "")
  1212. ;{
  1213. ; continue
  1214. ;}
  1215. break
  1216. }
  1217. else
  1218. {
  1219. sleep, 40
  1220. }
  1221. }
  1222.  
  1223. ;ControlClick, FTCButton24, ahk_id%id%
  1224. ; Sleep, -1
  1225. ; ControlGetText, max, Edit1, ahk_id%id%
  1226. }
  1227. else
  1228. {
  1229. ControlGet, v, Visible, , %ftp_btn_pot_pl%, ahk_id%id%
  1230. if (v)
  1231. {
  1232. ;TrayTip, BetPot,`nPL MAX,10,17
  1233. x := ""
  1234. ControlSetText, Edit1,, ahk_id%id%
  1235. Loop, 50
  1236. {
  1237. ControlGetText, x, Edit1, ahk_id%id%
  1238. if (x = "")
  1239. {
  1240. break
  1241. }
  1242. else
  1243. {
  1244. sleep, 40
  1245. }
  1246. }
  1247. ControlClick, %ftp_btn_pot_pl%, ahk_id%id%
  1248. Loop, 50
  1249. {
  1250. ControlGetText, max, Edit1, ahk_id%id%
  1251. if (max != "")
  1252. {
  1253. ;if (max = "")
  1254. ;{
  1255. ; continue
  1256. ;}
  1257. break
  1258. }
  1259. else
  1260. {
  1261. sleep, 40
  1262. }
  1263. }
  1264. }
  1265. }
  1266. }
  1267. /*
  1268.  
  1269. ControlGet, v, Visible, , %ftp_btn_pot%, ahk_id%id%
  1270. if (v)
  1271. {
  1272. ;TrayTip, BetPot,`nPOT,10,17
  1273. x := ""
  1274. ControlSetText, Edit1,, ahk_id%id%
  1275. Loop, 50
  1276. {
  1277. ControlGetText, x, Edit1, ahk_id%id%
  1278. if (x = "")
  1279. {
  1280. break
  1281. }
  1282. else
  1283. {
  1284. sleep, 40
  1285. }
  1286. }
  1287.  
  1288. ControlClick, %ftp_btn_pot%, ahk_id%id%
  1289.  
  1290. Loop, 50
  1291. {
  1292. ControlGetText, pot, Edit1, ahk_id%id%
  1293. if (pot != "")
  1294. {
  1295.  
  1296. ;MsgBox, %A_Index%
  1297. break
  1298. }
  1299. else
  1300. {
  1301. sleep, 40
  1302. }
  1303. }
  1304. ;ControlClick, FTCButton22, ahk_id%id%
  1305. ;Sleep, -1
  1306. ;ControlGetText, pot, Edit1, ahk_id%id%
  1307. }
  1308.  
  1309. /*
  1310. else if (InStr(title, "Pot Limit"))
  1311. {
  1312. ;TrayTip, BetPot,`nPL POT,10,17
  1313. ControlGet, v, Visible, , %ftp_btn_pot_pl%, ahk_id%id%
  1314. if (v)
  1315. {
  1316. x := ""
  1317. ControlSetText, Edit1,, ahk_id%id%
  1318. Loop, 50
  1319. {
  1320. ControlGetText, x, Edit1, ahk_id%id%
  1321. if (x = "")
  1322. {
  1323. break
  1324. }
  1325. else
  1326. {
  1327. sleep, 40
  1328. }
  1329. }
  1330. ControlClick, %ftp_btn_pot_pl%, ahk_id%id%
  1331. Loop, 50
  1332. {
  1333. ControlGetText, pot, Edit1, ahk_id%id%
  1334. if (pot != "")
  1335. {
  1336. ;if (pot = "")
  1337. ;{
  1338. ; continue
  1339. ;}
  1340. break
  1341. }
  1342. else
  1343. {
  1344. sleep, 40
  1345. }
  1346. }
  1347. }
  1348. }
  1349. */
  1350.  
  1351. ; AGAIN NOT SURE
  1352. ;else
  1353. ;{
  1354. ; pot := max
  1355. ;}
  1356.  
  1357. ControlGet, v, Visible, , %ftp_btn_min%, ahk_id%id%
  1358. if (v)
  1359. {
  1360. ;TrayTip, BetPot,`nMIN,10,17
  1361. x := ""
  1362. ControlSetText, Edit1,%pot%, ahk_id%id%
  1363. Loop, 50
  1364. {
  1365. ControlGetText, x, Edit1, ahk_id%id%
  1366. if (x = pot)
  1367. {
  1368. ;MsgBox, %A_Index%
  1369. break
  1370. }
  1371. else
  1372. {
  1373. sleep, 40
  1374. }
  1375. }
  1376.  
  1377. ControlFocus, %ftp_btn_min%, ahk_id%id%
  1378. ControlClick, %ftp_btn_min%, ahk_id%id%
  1379. ;TrayTip, BetPot,`nWAITING MIN,10,17
  1380. Sleep, -1
  1381. Sleep, 40
  1382. ;Msgbox, %min%
  1383. min := ""
  1384. Loop, 50
  1385. {
  1386. ControlGetText, min, Edit1, ahk_id%id%
  1387. if (min != pot)
  1388. {
  1389. break
  1390. }
  1391. else
  1392. {
  1393. ControlFocus, %ftp_btn_min%, ahk_id%id%
  1394. ControlClick, %ftp_btn_min%, ahk_id%id%
  1395. sleep, 40
  1396. ;TrayTip, BetPot,`nMIN %A_Index%,10,17
  1397.  
  1398. }
  1399. }
  1400. ;TrayTip, BetPot,`n%min%,10,17
  1401.  
  1402. ;ControlClick, FTCButton20, ahk_id%id%
  1403. ;Sleep, -1
  1404. ;ControlGetText, min, Edit1, ahk_id%id%
  1405. }
  1406. if (!min)
  1407. {
  1408. min := bb
  1409. }
  1410. ;TrayTip, BetPot,`nDONE,10,17
  1411.  
  1412.  
  1413. }
  1414. else ; FTP OFFICIAL
  1415. {
  1416. /*
  1417. ControlGet, v, Visible, , FTCButton20, ahk_id%id%
  1418. if (v)
  1419. {
  1420. ControlClick, FTCButton20, ahk_id%id%
  1421. Sleep, -1
  1422. ControlGetText, max, Edit1, ahk_id%id%
  1423. }
  1424. else
  1425. {
  1426. ControlGet, v, Visible, , FTCButton24, ahk_id%id%
  1427. if (v)
  1428. {
  1429. ControlClick, FTCButton24, ahk_id%id%
  1430. Sleep, -1
  1431. ControlGetText, max, Edit1, ahk_id%id%
  1432. }
  1433. }
  1434.  
  1435.  
  1436. ControlClick, FTCButton21, ahk_id%id%
  1437. Sleep, -1
  1438. ControlGetText, pot, Edit1, ahk_id%id%
  1439.  
  1440. ControlClick, FTCButton19, ahk_id%id%
  1441. Sleep, -1
  1442. ControlGetText, min, Edit1, ahk_id%id%
  1443. */
  1444. }
  1445.  
  1446. ;ControlSetText, Edit1, %t%, ahk_id%id%
  1447. street := "pre"
  1448.  
  1449. street := GetStreetFT(id)
  1450.  
  1451.  
  1452. if (min = bb)
  1453. {
  1454. call := 0
  1455. }
  1456. else if (min > bb)
  1457. {
  1458. call := min / 2
  1459. }
  1460. ;else if (street != "pre")
  1461. ;{
  1462. ; call := bb
  1463. ;}
  1464.  
  1465. if (call != bb || street != "pre")
  1466. {
  1467. open := 0
  1468. }
  1469.  
  1470. pot := pot - (2 * call)
  1471.  
  1472.  
  1473.  
  1474. /*
  1475. if (deduct_rake AND street<>"pre")
  1476. {
  1477. rake := Floor(pot - notraked) * 0.05
  1478. if (rake > maxrake)
  1479. {
  1480. rake := maxrake
  1481. }
  1482. pot := pot - rake
  1483. }
  1484. */
  1485.  
  1486. ;Msgbox, Pot: %pot%`nRake: %rake%`nNot Raked: %notraked%
  1487.  
  1488.  
  1489. return
  1490. }
  1491.  
  1492.  
  1493.  
  1494. PotSizePrima(id, ByRef pot, ByRef call, ByRef sb, ByRef bb, ByRef hero_bet, ByRef street, ByRef hero_position, ByRef open)
  1495. {
  1496. global deduct_rake
  1497. rake := 0
  1498. notraked := 0
  1499. maxrake := 3
  1500.  
  1501.  
  1502.  
  1503. ;Msgbox %title%
  1504. nl_actions = called for $,raised for $,bet for $,went all-in for $,posted small blind,posted big blind
  1505.  
  1506.  
  1507. WinGetTitle, title, ahk_id%id%
  1508. StringMid, hero, title, InStr(title, " - Blinds ")-1, , L
  1509. StringTrimLeft, hero, hero, InStr(hero, " - ", true, 0)+2
  1510. ;Msgbox %hero%
  1511.  
  1512. ;ControlGetText, hh, Richedit20W3, ahk_id%id%
  1513. Loop, 10
  1514. {
  1515. ControlGetText, hh, Richedit20W3, ahk_id%id%
  1516. If hh
  1517. {
  1518. break
  1519. }
  1520. Sleep, 80
  1521. }
  1522. StringTrimLeft, hh, hh, InStr(hh, " wins ", true, 0)
  1523.  
  1524. ;Msgbox, %hh%
  1525.  
  1526. Loop, Parse, hh, `n
  1527. {
  1528. If a_loopfield contains %nl_actions%
  1529. {
  1530. StringMid, amount, a_loopfield, InStr(a_loopfield, "$")+1
  1531. StringReplace, amount, amount, )
  1532. StringReplace, amount, amount, `,,, All
  1533. StringReplace, amount, amount, `n
  1534. StringReplace, amount, amount, `r
  1535. pot += amount
  1536.  
  1537. IfInString, a_loopfield, raised for $
  1538. {
  1539. open := 0
  1540. }
  1541.  
  1542. IfInString, a_loopfield, posted small blind
  1543. {
  1544. sb := amount
  1545. If a_loopfield contains %hero%
  1546. {
  1547. hero_position := "sb"
  1548. }
  1549. }
  1550. Else IfInString, a_loopfield, posted big blind
  1551. {
  1552. bb := amount
  1553. If a_loopfield contains %hero%
  1554. {
  1555. hero_position := "bb"
  1556. }
  1557. }
  1558.  
  1559. }
  1560. }
  1561.  
  1562. street := "pre"
  1563.  
  1564. If InStr(hh, "> Dealing the river(")
  1565. {
  1566. StringTrimLeft, hh2, hh, InStr(hh, "> Dealing the river(", true, 0)
  1567. street := "river"
  1568. open := 0
  1569. }
  1570. Else If InStr(hh, "> Dealing the turn(")
  1571. {
  1572. StringTrimLeft, hh2, hh, InStr(hh, "> Dealing the turn(", true, 0)
  1573. street := "turn"
  1574. open := 0
  1575. }
  1576. Else If InStr(hh, "> Dealing the Flop(")
  1577. {
  1578. StringTrimLeft, hh2, hh, InStr(hh, "> Dealing the Flop(", true, 0)
  1579. street := "flop"
  1580. open := 0
  1581. }
  1582. Else
  1583. {
  1584. hh2 := hh
  1585. }
  1586.  
  1587. Loop, Parse, hh2, `n
  1588. {
  1589. ;Msgbox %hh2%
  1590. If a_loopfield contains %nl_actions%
  1591. {
  1592. StringMid, amount, a_loopfield, InStr(a_loopfield, "$")+1
  1593. StringReplace, amount, amount, `)
  1594. Stringreplace, amount, amount, `n
  1595. Stringreplace, amount, amount, `,,, All
  1596.  
  1597. notraked += amount
  1598.  
  1599. IfInString, a_loopfield, > %hero%
  1600. {
  1601. hero_bet += amount
  1602. }
  1603. Else
  1604. {
  1605. call := amount
  1606. }
  1607.  
  1608. }
  1609. }
  1610.  
  1611. if(hero_bet >= call)
  1612. {
  1613. call := 0
  1614. }
  1615. Else
  1616. {
  1617. call -= hero_bet
  1618. }
  1619. call := iif( call, call, 0 )
  1620.  
  1621.  
  1622. if(deduct_rake AND street<>"pre")
  1623. {
  1624. rake := Floor(pot - notraked) * 0.05
  1625. If (rake > maxrake)
  1626. {
  1627. rake := maxrake
  1628. }
  1629. pot := pot - rake
  1630. }
  1631. return
  1632. }
  1633.  
  1634.  
  1635. PotSizeCrypto(id, ByRef pot, ByRef call, ByRef sb, ByRef bb, ByRef hero_bet, ByRef street, ByRef hero_position, ByRef open)
  1636. {
  1637. global deduct_rake
  1638. rake := 0
  1639. notraked := 0
  1640. maxrake := 3
  1641.  
  1642. nl_actions = calls $,raises to $,bets $,posts ante $,posts small blind $,posts big blind $
  1643. WinGetTitle, title, ahk_id%id%
  1644. StringMid, hero, title, InStr(title, "logged in as ") + 13
  1645.  
  1646. ControlGetText, hh, RICHEDIT1, ahk_id%id%
  1647. StringTrimLeft, hh, hh, InStr(hh, "Starting new hand: #", true, 0)
  1648. StringReplace, hh, hh, €,$, All
  1649. StringReplace, hh, hh, £,$, All
  1650. Loop, Parse, hh, `n
  1651. {
  1652. If a_loopfield contains %nl_actions%
  1653. {
  1654. StringMid, amount, a_loopfield, InStr(a_loopfield, "$") + 1
  1655. StringReplace, amount, amount, `r,, All
  1656. StringReplace, amount, amount, `n,, All
  1657. StringReplace, amount, amount, %A_SPACE%,, All
  1658. StringReplace, amount, amount, %A_TAB%,, All
  1659.  
  1660. pot += amount
  1661.  
  1662. IfInString, a_loopfield, raises to $
  1663. {
  1664. open := 0
  1665. }
  1666.  
  1667. IfInString, a_loopfield, posts small blind $
  1668. {
  1669. sb := amount
  1670. If a_loopfield contains %hero%
  1671. {
  1672. hero_position := "sb"
  1673. }
  1674. }
  1675. Else IfInString, a_loopfield, posts big blind $
  1676. {
  1677. bb := amount
  1678. If a_loopfield contains %hero%
  1679. {
  1680. hero_position := "bb"
  1681. }
  1682. }
  1683. }
  1684. }
  1685. ;Msgbox, %sb% %bb%
  1686. hh2 := hh
  1687. street := "pre"
  1688. If InStr(hh2, "Dealer: Dealing River:")
  1689. {
  1690. StringTrimLeft, hh2, hh2, InStr(hh, "Dealer: Dealing River:", true, 0)
  1691. open := 0
  1692. street := "river"
  1693. }
  1694. Else If InStr(hh2, "Dealer: Dealing Turn:")
  1695. {
  1696. StringTrimLeft, hh2, hh2, InStr(hh, "Dealer: Dealing Turn:", true, 0)
  1697. open := 0
  1698. street := "turn"
  1699. }
  1700. Else If InStr(hh2, "Dealer: Dealing Flop:")
  1701. {
  1702. StringTrimLeft, hh2, hh2, InStr(hh, "Dealer: Dealing Flop:", true, 0)
  1703. open := 0
  1704. street := "flop"
  1705. }
  1706.  
  1707. ;Msgbox, %hh2%
  1708. Loop, Parse, hh2, `n
  1709. {
  1710. If a_loopfield contains %nl_actions%
  1711. {
  1712. StringMid, amount, a_loopfield, InStr(a_loopfield, "$") + 1
  1713. StringReplace, amount, amount, `r,, All
  1714. StringReplace, amount, amount, `n,, All
  1715. StringReplace, amount, amount, %A_SPACE%,, All
  1716. StringReplace, amount, amount, %A_TAB%,, All
  1717. notraked += amount
  1718. If a_loopfield contains %hero%
  1719. {
  1720. hero_bet += amount
  1721. }
  1722. Else
  1723. {
  1724. call := amount
  1725. }
  1726. }
  1727.  
  1728. if(hero_bet >= call)
  1729. {
  1730. call := 0
  1731. }
  1732. Else
  1733. {
  1734. call -= hero_bet
  1735. }
  1736. }
  1737. call := iif( call, call, 0 )
  1738.  
  1739. if (deduct_rake AND street<>"pre")
  1740. {
  1741. rake := Floor(pot - notraked) * 0.05
  1742. if (rake > maxrake)
  1743. {
  1744. rake := maxrake
  1745. }
  1746. pot := pot - rake
  1747. }
  1748.  
  1749. return
  1750. }
  1751.  
  1752.  
  1753. PotSizeParty(id, ByRef pot, ByRef call, ByRef sb, ByRef bb, ByRef hero_bet, ByRef street, ByRef hero_position, ByRef open)
  1754. {
  1755. WinGetTitle, title, ahk_id%id%
  1756. StringMid, bb, title, InStr(title, "/")+1,1
  1757. sb := sb(bb)
  1758. ControlGetText, totalpot, Total pot, ahk_id%id%
  1759. ;MsgBox a%totalpot%a
  1760. ;StringMid, pot, totalpot, InStr(totalpot, ":")+1, InStr(totalpot, "$")+1
  1761. StringMid, pot, totalpot, InStr(totalpot, ":") + 2, InStr(totalpot, "$") - InStr(totalpot, ":") - 3
  1762. ;MsgBox a%pot%a
  1763. street = pre
  1764.  
  1765. match_mode = %a_titlematchmode%
  1766. SettitleMatchMode 2
  1767. ControlGetText, call, Call, ahk_id%id%
  1768. SettitleMatchMode %match_mode%
  1769. StringMid, call, call, InStr(call, "(") + 1, InStr(call, ")") - InStr(call, "(") - 1
  1770. StringReplace, call, call, $
  1771. StringReplace, call, call, €
  1772. StringReplace, call, call, £
  1773. call := iif( call, call, 0 )
  1774.  
  1775. }
  1776.  
  1777. PotSizeIPoker(id, ByRef pot, ByRef call, ByRef sb, ByRef bb, ByRef hero_bet, ByRef street, ByRef hero_position, ByRef open)
  1778. {
  1779. global deduct_rake, IPokerX, IPokerY, IPokerChat, IPoker_BetBoxColor, IPoker_ShowBetBoxColor
  1780.  
  1781. rake := 0
  1782. notraked := 0
  1783. maxrake := 3
  1784. tourney := 0
  1785.  
  1786. WinActivate, ahk_id %id%
  1787. WinWaitActive, ahk_id %id%
  1788.  
  1789. CoordMode, pixel, screen
  1790. WinGetPos, x, y, , , ahk_id %id%
  1791. X += iPokerX
  1792. y += iPokerY
  1793.  
  1794. PixelGetColor, col, x, y
  1795.  
  1796. if IPoker_ShowBetBoxColor
  1797. Msgbox Ipoker bet box color: %col%
  1798.  
  1799. if (col != iPoker_BetBoxColor)
  1800. return
  1801.  
  1802. nl_actions = calls $, raises $, bets $, All-In $, posts Small Blind $, posts Big Blind $
  1803.  
  1804. StringMid, tablename, title, (InStr(title, ": ")+2), (InStr(title, " - ")-(InStr(title, ": ")+2))
  1805.  
  1806. ;Get hero's screen name from the lobby title
  1807. WinGetTitle, lobby, Nickname: ahk_class PTIODEVICE
  1808. StringTrimLeft, hero, lobby, InStr(lobby, "Nickname:") + 9
  1809. StringLeft, hero, hero, InStr(hero, A_space)
  1810. ;Msgbox %hero%
  1811.  
  1812. ;grab HH from chat box
  1813. hh :=
  1814. oldClipboard = %clipboard%
  1815. clipboard =
  1816.  
  1817. attempts := 0
  1818.  
  1819. loop
  1820. {
  1821. WinActivate, ahk_id %id%
  1822. WinWaitActive, ahk_id %id%
  1823.  
  1824. Click, 75, %ipokerchat%
  1825. sleep, 150
  1826. SendInput, ^a^c
  1827. ClipWait, 0.5
  1828. if !errorlevel or attempts > 3
  1829. break
  1830. attempts++
  1831. }
  1832.  
  1833. hh := clipboard
  1834. ;msgbox %hh%
  1835. clipboard = %oldClipBoard%
  1836.  
  1837. if hh =
  1838. {
  1839. TrayTip, BetPot,`nError reading chat box on iPoker table: %tableName%, 10, 17
  1840. return
  1841. }
  1842.  
  1843. StringGetPos, pos, hh, (#, R
  1844. StringTrimLeft, hh, hh, pos
  1845.  
  1846. Loop, Parse, hh, `n
  1847. {
  1848. If a_loopfield contains %nl_actions%
  1849. {
  1850. StringTrimRight, amount, a_loopfield, 2
  1851. StringGetPos, pos, amount,%a_space%, R
  1852. StringRight, amount, amount, StrLen(amount) - pos
  1853. StringReplace, amount, amount, `,,, All
  1854. StringReplace, amount, amount, %a_space%
  1855. StringReplace, amount, amount, $,,All
  1856. pot += amount
  1857. ;msgbox %amount%
  1858. IfInString, a_loopfield, posts Small Blind $
  1859. {
  1860. sb := amount
  1861. If a_loopfield contains %hero%
  1862. {
  1863. hero_position := "sb"
  1864. }
  1865. }
  1866. Else IfInString, a_loopfield, posts Big Blind $
  1867. {
  1868. bb := amount
  1869. If a_loopfield contains %hero%
  1870. {
  1871. hero_position := "bb"
  1872. }
  1873. }
  1874. Else If(open = 1 AND InStr(a_loopfield, "raises $", true, 0))
  1875. {
  1876. open := 0
  1877. ;Msgbox "Pre flop Raise"
  1878. }
  1879. Else If(open = 1 AND InStr(a_loopfield, "All-in $", true, 0))
  1880. {
  1881. open := 0
  1882. ;Msgbox "Pre flop All-In"
  1883. }
  1884. ;msgbox, %amount%
  1885. ;msgbox, %pot%
  1886. }
  1887. }
  1888.  
  1889. IfNotInString, hh, $
  1890. tourney := 1
  1891.  
  1892. ;msgbox tourney: %tourney%
  1893.  
  1894. ;Msgbox, BB: %bb%
  1895. ;Msgbox, SB: %sb%
  1896.  
  1897. hh2 := hh
  1898. street := "pre"
  1899. If InStr(hh2, "Dealing River")
  1900. {
  1901. StringTrimLeft, hh2, hh2, InStr(hh, "Dealing River", true, 0)
  1902. open := 0
  1903. street := "river"
  1904. }
  1905. Else If InStr(hh2, "Dealing Turn")
  1906. {
  1907. StringTrimLeft, hh2, hh2, InStr(hh, "Dealing Turn", true, 0)
  1908. open := 0
  1909. street := "turn"
  1910. }
  1911. Else If InStr(hh2, "Dealing Flop")
  1912. {
  1913. StringTrimLeft, hh2, hh2, InStr(hh, "Dealing Flop", true, 0)
  1914. open := 0
  1915. street := "flop"
  1916. }
  1917. ;msgbox %street%
  1918. ;Msgbox, %hero%`n`n`n%hh2%
  1919. Loop, Parse, hh2, `n
  1920. {
  1921. ;Msgbox %a_loopfield%
  1922. If a_loopfield contains %nl_actions%
  1923. {
  1924. StringTrimRight, amount, a_loopfield, 2
  1925. StringGetPos, pos, amount,%a_space%, R
  1926. StringRight, amount, amount, StrLen(amount) - pos
  1927. StringReplace, amount, amount, `,,, All
  1928. StringReplace, amount, amount, %a_space%
  1929. StringReplace, amount, amount, $,,All
  1930. notraked += amount
  1931.  
  1932. If a_loopfield contains %hero%
  1933. {
  1934. hero_bet += amount
  1935. }
  1936. Else
  1937. {
  1938. call := amount
  1939. }
  1940. }
  1941. }
  1942. if(hero_bet >= call)
  1943. {
  1944. call := 0
  1945. }
  1946. Else
  1947. {
  1948. call -= hero_bet
  1949. }
  1950.  
  1951. call := iif( call, call, 0 )
  1952.  
  1953. If (tourney <> 1)
  1954. {
  1955. If(deduct_rake AND street <>"pre")
  1956. {
  1957.  
  1958. rake := Floor(pot - notraked) * 0.05
  1959. If (rake > maxrake)
  1960. {
  1961. rake := maxrake
  1962. }
  1963. pot := pot - rake
  1964. }
  1965. }
  1966. ;Msgbox Pot: %pot%`nrake:%rake%`nhero bet:%hero_bet%`ncall:%call%
  1967. return
  1968. }
  1969.  
  1970. ;returns the amount currently written into the ipoker bet box
  1971. ReadBetBoxIPoker(id)
  1972. {
  1973. global ipokerx, ipokery
  1974. oldClipboard = %clipboard%
  1975. clipboard =
  1976.  
  1977. WinActivate, ahk_id %id%
  1978. WinWaitActive, ahk_id %id%
  1979. Click, %ipokerx%, %ipokery%
  1980. ;Sleep 50
  1981. Send {HOME}+{END}^c
  1982.  
  1983. ClipWait, 0.3
  1984. If !ErrorLevel
  1985. t := clipboard
  1986.  
  1987. clipboard = %oldClipBoard%
  1988. return t
  1989. }
  1990.  
  1991. ;writes the bet amount into the bet box then moves the cursor to the raise button
  1992. WriteBetBoxIpoker(id, amount)
  1993. {
  1994. global iPokerX, iPokerY, iPokerRaiseX, iPokerRaiseY
  1995.  
  1996. WinActivate ahk_id %id%
  1997. WinWaitActive ahk_id %id%
  1998. Click, %iPokerX%, %iPokerY%
  1999. ;sleep 50
  2000. Send {HOME}+{END}%amount%
  2001. MouseMove, iPokerRaiseX, iPokerRaiseY
  2002. }
  2003.  
  2004. PotSizeStars(id, ByRef pot, ByRef call, ByRef sb, ByRef bb, ByRef hero_bet, ByRef street, ByRef hero_position, ByRef open)
  2005. {
  2006. global use_old_stars_buttons, stars_editbox
  2007. CoordMode, Pixel, Screen
  2008. WinGetPos, x, y, w, h, ahk_id%id%
  2009.  
  2010. x1 := 700
  2011. y1 := 440
  2012. x2 := 770
  2013. y2 := 450
  2014. relStarsScreenPoint(id, x1, y1)
  2015. relStarsScreenPoint(id, x2, y2)
  2016.  
  2017. col := GetPredominateColor(x1, y1, x2, y2)
  2018. ;Msgbox, %col%
  2019. if (col = "0x00327F")
  2020. {
  2021. ;ThemeDir := "normal"
  2022. PotThemeDir := "classic"
  2023. CallThemeDir := "classic"
  2024.  
  2025. }
  2026. else if (col = "0xDDD7CC")
  2027. {
  2028. PotThemeDir := "hypersimple"
  2029. CallThemeDir := "hypersimple"
  2030.  
  2031. }
  2032. else
  2033. {
  2034. if (debug)
  2035. {
  2036. Msgbox, Unable to match slider colour: %col% to a known theme
  2037. }
  2038. return
  2039. }
  2040. if (use_old_stars_buttons)
  2041. {
  2042. CallThemeDir := CallThemeDir . "\old"
  2043. }
  2044.  
  2045. street := GetStreetStars(id)
  2046.  
  2047. if (w <= 526)
  2048. {
  2049. SizeDir := 0
  2050. }
  2051. else if (w <= 621)
  2052. {
  2053. SizeDir := 1
  2054. }
  2055. else if (w <= 736)
  2056. {
  2057. SizeDir := 2
  2058. }
  2059. else if (w <= 875)
  2060. {
  2061. SizeDir := 3
  2062. }
  2063. else if (w <= 1037)
  2064. {
  2065. SizeDir := 4
  2066. }
  2067. else if (w <= 1227)
  2068. {
  2069. SizeDir := 5
  2070. }
  2071. else
  2072. {
  2073. SizeDir := 6
  2074. }
  2075.  
  2076.  
  2077. PicDir := "StarsPics"
  2078. potPicDir := PicDir . "\" . PotThemeDir . "\pot\" . SizeDir
  2079. buttonPicDir := PicDir . "\" . CallThemeDir . "\call\" . SizeDir
  2080. ;Msgbox, %potPicDir%`n%buttonPicDir%
  2081.  
  2082. pot_x1 := 380
  2083. pot_y1 := 8
  2084. pot_x2 := 460
  2085. pot_y2 := 32
  2086. relStarsWindowPoint(id, pot_x1, pot_y1)
  2087. relStarsWindowPoint(id, pot_x2, pot_y2)
  2088. pot := DigitSearch(pot_x1, pot_y1, pot_x2, pot_y2, id, potPicDir, "", 50)
  2089.  
  2090. call_x1 := 550
  2091. call_y1 := 510
  2092. call_x2 := 645
  2093. call_y2 := 533
  2094. relStarsWindowPoint(id, call_x1, call_y1)
  2095. relStarsWindowPoint(id, call_x2, call_y2)
  2096. call := DigitSearch(call_x1, call_y1, call_x2, call_y2, id, buttonPicDir, "", 50)
  2097. call := iif( call, call, 0 )
  2098.  
  2099. bb := GetBBStars(id, GameTypeStars(WinGetTitle(id)))
  2100. sb := sb(bb)
  2101.  
  2102.  
  2103. if (street = "pre")
  2104. {
  2105. ControlGetText, t, %stars_editbox%, ahk_id%id%
  2106. ControlSetText, %stars_editbox%, 0, ahk_id%id%
  2107. raise_x1 := 675
  2108. raise_y1 := 510
  2109. raise_x2 := 770
  2110. raise_y2 := 533
  2111. relStarsWindowPoint(id, raise_x1, raise_y1)
  2112. relStarsWindowPoint(id, raise_x2, raise_y2)
  2113. minraise := DigitSearch(raise_x1, raise_y1, raise_x2, raise_y2, id, buttonPicDir, "", 50)
  2114. t := Round(t, 2)
  2115. ControlSetText, %stars_editbox%, %t%, ahk_id%id%
  2116. Sleep, -1
  2117.  
  2118. if (minraise > (2*bb))
  2119. {
  2120. ;pot has been raised
  2121. if (call = bb)
  2122. {
  2123. ;pot was minraised, and we are the BB
  2124. hero_bet := bb
  2125. hero_position := "bb"
  2126. }
  2127. else if (call < (bb*2))
  2128. {
  2129. ;pot was minraised, and we are the SB
  2130. hero_bet := sb
  2131. hero_position := "sb"
  2132. }
  2133. }
  2134. else if (call = bb)
  2135. {
  2136. ;hero is not a blind, unraised pot, do nothing
  2137. }
  2138. else if (call = 0)
  2139. {
  2140. ;unraised pot, hero is the BB
  2141. hero_bet := bb
  2142. hero_position := "bb"
  2143. }
  2144. else if (call < bb)
  2145. {
  2146. ;unraised pot, hero is the SB
  2147. hero_bet := sb
  2148. hero_position := "sb"
  2149. }
  2150. else
  2151. {
  2152. ;pot has been raised, we are not opening
  2153. open := 0
  2154. }
  2155. }
  2156. else
  2157. {
  2158. ;not pre-flop, no need for open adjustment
  2159. open := 0
  2160. }
  2161.  
  2162. return
  2163. }
  2164.  
  2165.  
  2166. PotSizeUB(id, ByRef pot, ByRef call, ByRef sb, ByRef bb, ByRef hero_bet, ByRef street, ByRef hero_position, ByRef open)
  2167. {
  2168.  
  2169.  
  2170. CoordMode, Pixel, Screen
  2171. WinGetPos, x, y, w, h, ahk_id%id%
  2172.  
  2173.  
  2174. street := GetStreetStars(id)
  2175.  
  2176.  
  2177.  
  2178. PicDir := "UBPics"
  2179. potPicDir := PicDir ;. "\" . PotThemeDir . "\pot\" . SizeDir
  2180. buttonPicDir := PicDir ;. "\" . CallThemeDir . "\call\" . SizeDir
  2181. ;Msgbox, %potPicDir%`n%buttonPicDir%
  2182.  
  2183. pot_x1 := 580
  2184. pot_y1 := 460
  2185. pot_x2 := 700
  2186. pot_y2 := 480
  2187. relStarsWindowPoint(id, pot_x1, pot_y1)
  2188. relStarsWindowPoint(id, pot_x2, pot_y2)
  2189. pot := DigitSearch(pot_x1, pot_y1, pot_x2, pot_y2, id, potPicDir, "", 50)
  2190.  
  2191. call_x1 := 350
  2192. call_y1 := 460
  2193. call_x2 := 460
  2194. call_y2 := 480
  2195. relStarsWindowPoint(id, call_x1, call_y1)
  2196. relStarsWindowPoint(id, call_x2, call_y2)
  2197. call := DigitSearch(call_x1, call_y1, call_x2, call_y2, id, buttonPicDir, "", 50)
  2198. call := iif( call, call, 0 )
  2199.  
  2200.  
  2201. WinGetTitle, title, ahk_id%id%
  2202.  
  2203. StringTrimLeft, bb, title, InStr(title, "$", true, 0)-1
  2204. StringTrimRight, bb, bb, Strlen(bb) - InStr(bb, A_Space)
  2205. StringReplace, bb, bb, $., $0., All
  2206. StringReplace, bb, bb, $,, All
  2207. StringReplace, bb, bb, %A_Space%,, All
  2208.  
  2209. ;bb := GetBBStars(id, GameTypeStars(WinGetTitle(id)))
  2210. sb := sb(bb)
  2211.  
  2212.  
  2213. if (street = "pre")
  2214. {
  2215. ControlGetText, t, Edit1, ahk_id%id%
  2216. ControlSetText, Edit1, 0, ahk_id%id%
  2217. raise_x1 := 460
  2218. raise_y1 := 460
  2219. raise_x2 := 580
  2220. raise_y2 := 480
  2221. relStarsWindowPoint(id, raise_x1, raise_y1)
  2222. relStarsWindowPoint(id, raise_x2, raise_y2)
  2223. minraise := DigitSearch(raise_x1, raise_y1, raise_x2, raise_y2, id, buttonPicDir, "", 50)
  2224. t := Round(t, 2)
  2225. ControlSetText, Edit1, %t%, ahk_id%id%
  2226. Sleep, -1
  2227.  
  2228. if (minraise > (2*bb))
  2229. {
  2230. ;pot has been raised
  2231. if (call = bb)
  2232. {
  2233. ;pot was minraised, and we are the BB
  2234. hero_bet := bb
  2235. hero_position := "bb"
  2236. }
  2237. else if (call < (bb*2))
  2238. {
  2239. ;pot was minraised, and we are the SB
  2240. hero_bet := sb
  2241. hero_position := "sb"
  2242. }
  2243. }
  2244. else if (call = bb)
  2245. {
  2246. ;hero is not a blind, unraised pot, do nothing
  2247. }
  2248. else if (call = 0)
  2249. {
  2250. ;unraised pot, hero is the BB
  2251. hero_bet := bb
  2252. hero_position := "bb"
  2253. }
  2254. else if (call < bb)
  2255. {
  2256. ;unraised pot, hero is the SB
  2257. hero_bet := sb
  2258. hero_position := "sb"
  2259. }
  2260. else
  2261. {
  2262. ;pot has been raised, we are not opening
  2263. open := 0
  2264. }
  2265. }
  2266. else
  2267. {
  2268. ;not pre-flop, no need for open adjustment
  2269. open := 0
  2270. }
  2271. ;pot := pot - (2*hero_bet)
  2272. pot := pot - (2 * call) - hero_bet
  2273. return
  2274. }
  2275.  
  2276.  
  2277.  
  2278. DigitSearch(startX,startY,endX,endY,win,dir,ex="",shades=1) {
  2279.  
  2280. global debug
  2281.  
  2282. If ex =
  2283. ex = bmp
  2284. batchlines = %A_BatchLines%
  2285. SetBatchLines -1
  2286. ;WinGetPos,Xwin,Ywin,,,ahk_id%win%
  2287. WinGetPos,Xwin,Ywin,w,h,ahk_id%win%
  2288.  
  2289. ;Msgbox, %startX%,%startY%`n%endX% %endY%
  2290.  
  2291.  
  2292. CoordMode, Pixel, Screen
  2293. Loop, 11 {
  2294. i = %a_index%
  2295. If i = 10
  2296. i = 0
  2297. else if i = 11
  2298. i = -1
  2299. lastXpos := startX + Xwin
  2300. Loop {
  2301.  
  2302.  
  2303.  
  2304.  
  2305. x1 := lastXpos + 1
  2306. y1 := startY + Ywin
  2307. x2 := endX + Xwin
  2308. y2 := endY + Ywin
  2309.  
  2310. if (debug)
  2311. {
  2312. debug_gui(id, x1, y1, x2, y2, 50)
  2313. }
  2314.  
  2315. ImageSearch, lastXpos,, x1, y1, x2, y2, *%shades% %dir%\%i%.%ex%
  2316.  
  2317.  
  2318. If ( errorLevel )
  2319. {
  2320. break
  2321. }
  2322. p++
  2323. p%p% = %lastXpos%
  2324. If i = -1
  2325. t = .
  2326. else
  2327. t = %i%
  2328. StringReplace, xpos, lastXpos, -, _
  2329. c%xpos% = %t%
  2330. }
  2331. }
  2332.  
  2333. Loop, %p%
  2334. p_all := p_all "," p%a_index%
  2335.  
  2336. Sort, p_all, N D, U
  2337. ;Msgbox %p_all%
  2338. Loop, Parse, p_all, `,
  2339. {
  2340. StringReplace, xpos, a_loopfield, -, _
  2341.  
  2342. amount := amount "" c%xpos%
  2343. ;Msgbox,%amount%
  2344. }
  2345. CoordMode, Pixel, Relative
  2346. SetBatchLines %batchlines%
  2347. return amount
  2348. }
  2349.  
  2350.  
  2351.  
  2352. ;Juks rocks
  2353. PostLeftClick(x, y, table_id, activate=1) {
  2354. ; ### JUK: Send the down left click, then the mouse-up messages.
  2355. ; NOTE: This is relative to the top left of the client area and NOT the top left of the
  2356. ; window (ie: It *doesn't* include the title-bar like AHK's MouseClick does!!!).
  2357. If activate
  2358. WinActivate, ahk_id%table_id%
  2359. PostMessage, 0x201, 0x0001, ((y<<16)^x), , ahk_id%table_id%
  2360. PostMessage, 0x202 , 0, ((y<<16)^x), , ahk_id%table_id%
  2361. }
  2362.  
  2363. PostStarsClick(x, y, id)
  2364. {
  2365. relStarsClientPoint(id, x, y)
  2366. PostLeftClick(x, y, id)
  2367. }
  2368.  
  2369.  
  2370.  
  2371.  
  2372. GetBBStars(id, game_type) {
  2373. WinGetTitle, title, ahk_id%id%
  2374. game_type = NL Ring
  2375. If (game_type = "NL Ring")
  2376. return StrRep(StrMid(title,"/",a_space), "$")
  2377. else if (game_type = "NL Tourney")
  2378. return StrRep(StrMid(title,"/",a_space,InStr(title," - Blinds")),"$")
  2379. }
  2380.  
  2381.  
  2382. GameTypeStars(title) {
  2383. If InStr(title, " - Limit Stud")
  2384. return "Stud"
  2385. else if ((InStr(title, " - No Limit Hold'em") || InStr(title, " - Pot Limit Hold'em"))
  2386. && InStr(title, "Tournament"))
  2387. return "NL Tourney"
  2388. else if (InStr(title, " - No Limit Hold'em") || InStr(title, " - Pot Limit Hold'em"))
  2389. return "NL Ring"
  2390. else
  2391. return "Limit"
  2392. }
  2393.  
  2394. sb(bb) {
  2395. If bb = .25
  2396. sb := .10
  2397. else if bb = 15
  2398. sb = 10
  2399. else if bb = 0.05
  2400. sb = 0.02
  2401. else
  2402. sb := bb/2
  2403.  
  2404. if (sb > 1)
  2405. {
  2406. sb := Round(sb, 0)
  2407. }
  2408. else
  2409. {
  2410. sb := Round(sb, 2)
  2411. }
  2412. return sb
  2413. }
  2414.  
  2415.  
  2416.  
  2417.  
  2418.  
  2419.  
  2420. GetStreetStars(id)
  2421. {
  2422. global debug
  2423. CoordMode, Pixel, Screen
  2424.  
  2425. street := "pre"
  2426.  
  2427. x1 := 490
  2428. y1 := 155
  2429. x2 := 525
  2430. y2 := 205
  2431. relStarsScreenPoint(id, x1, y1)
  2432. relStarsScreenPoint(id, x2, y2)
  2433.  
  2434.  
  2435.  
  2436.  
  2437. if (debug)
  2438. {
  2439. debug_gui(id, x1, y1, x2, y2)
  2440. }
  2441. If ( GetPixelCount(x1, y1, x2, y2, 0xffffff) > 5 )
  2442. {
  2443. street := "river"
  2444. return street
  2445. }
  2446.  
  2447. x1 := 435
  2448. y1 := 155
  2449. x2 := 470
  2450. y2 := 205
  2451. relStarsScreenPoint(id, x1, y1)
  2452. relStarsScreenPoint(id, x2, y2)
  2453. if (debug)
  2454. {
  2455. debug_gui(id, x1, y1, x2, y2)
  2456. }
  2457. If ( GetPixelCount(x1, y1, x2, y2, 0xffffff) > 5 )
  2458. {
  2459. street := "turn"
  2460. return street
  2461. }
  2462.  
  2463.  
  2464.  
  2465. x1 := 382
  2466. y1 := 155
  2467. x2 := 415
  2468. y2 := 205
  2469. relStarsScreenPoint(id, x1, y1)
  2470. relStarsScreenPoint(id, x2, y2)
  2471. if (debug)
  2472. {
  2473. debug_gui(id, x1, y1, x2, y2)
  2474. }
  2475. If ( GetPixelCount(x1, y1, x2, y2, 0xffffff) > 5 )
  2476. {
  2477. street := "flop"
  2478. }
  2479.  
  2480. return street
  2481. }
  2482.  
  2483. GetStreetFT(id)
  2484. {
  2485. global debug
  2486. global caller_hwnd
  2487. if (caller_hwnd != "")
  2488. {
  2489. id := caller_hwnd
  2490. }
  2491. CoordMode, Pixel, Screen
  2492.  
  2493. street := "pre"
  2494.  
  2495. x1 := 485
  2496. y1 := 214
  2497. x2 := 520
  2498. y2 := 260
  2499. relStarsScreenPoint(id, x1, y1)
  2500. relStarsScreenPoint(id, x2, y2)
  2501.  
  2502.  
  2503.  
  2504.  
  2505. if (debug)
  2506. {
  2507. debug_gui(id, x1, y1, x2, y2)
  2508. }
  2509. If ( GetPixelCount(x1, y1, x2, y2, 0xffffff) > 5 )
  2510. {
  2511. street := "river"
  2512. return street
  2513. }
  2514.  
  2515. x1 := 431
  2516. y1 := 214
  2517. x2 := 461
  2518. y2 := 260
  2519. relStarsScreenPoint(id, x1, y1)
  2520. relStarsScreenPoint(id, x2, y2)
  2521. if (debug)
  2522. {
  2523. debug_gui(id, x1, y1, x2, y2)
  2524. }
  2525. If ( GetPixelCount(x1, y1, x2, y2, 0xffffff) > 5 )
  2526. {
  2527. street := "turn"
  2528. return street
  2529. }
  2530.  
  2531.  
  2532.  
  2533. x1 := 378
  2534. y1 := 214
  2535. x2 := 414
  2536. y2 := 260
  2537. relStarsScreenPoint(id, x1, y1)
  2538. relStarsScreenPoint(id, x2, y2)
  2539. if (debug)
  2540. {
  2541. debug_gui(id, x1, y1, x2, y2)
  2542. }
  2543. If ( GetPixelCount(x1, y1, x2, y2, 0xffffff) > 5 )
  2544. {
  2545. street := "flop"
  2546. }
  2547.  
  2548. return street
  2549. }
  2550.  
  2551.  
  2552.  
  2553.  
  2554.  
  2555. StrRep(str,char,rep_char="",all=1)
  2556. {
  2557. StringReplace,str,str,%char%,%rep_char%,%all%
  2558. return str
  2559. }
  2560.  
  2561. StrMid(str,str1,str2,startPos1=1,startPos2=1,caseSense=0){
  2562. If startPos1 =
  2563. startPos1 = 1
  2564. If startPos2 =
  2565. startPos2 = 1
  2566. StringTrimLeft,o,str,InStr(str,str1,cS,startPos1) + StrLen(str1) - 1
  2567. StringLeft,o,o,InStr(o,str2,caseSense,startPos2)-1
  2568. return o
  2569. }
  2570.  
  2571. IIf(_boolExpr, _exprTrue, _exprFalse) {
  2572. If _boolExpr
  2573. Return _exprTrue
  2574. else
  2575. return _exprFalse
  2576. }
  2577.  
  2578.  
  2579. WinGetTitle(win) {
  2580. WinGetTitle, title, ahk_id%win%
  2581. return title
  2582. }
  2583.  
  2584. ; finds number of specified pixels in a region
  2585. GetPixelCount(x1, y1, x2, y2, color, options="")
  2586. {
  2587. CoordMode, Pixel, Screen
  2588. pixels := (x2 - x1 + 1)*(y2 - y1 + 1)
  2589. If ( pixels <= 0 )
  2590. {
  2591. ErrorLevel = 1
  2592. return
  2593. }
  2594. count = 0
  2595. x = %x1%
  2596. Loop
  2597. {
  2598. If ( x > x2 )
  2599. {
  2600. break
  2601. }
  2602. y = %y1%
  2603. Loop
  2604. {
  2605. If ( y > y2 )
  2606. {
  2607. break
  2608. }
  2609. PixelGetColor, c, x, y, %options%
  2610. If ( c = color )
  2611. {
  2612. count++
  2613. }
  2614. y++
  2615. }
  2616. x++
  2617. }
  2618. return count
  2619. }
  2620. ; finds the predomatinate color in a region
  2621. GetPredominateColor(x1,y1,x2,y2,options="") {
  2622. global debug
  2623.  
  2624. if (debug)
  2625. {
  2626. debug_gui(id, x1, y1, x2, y2)
  2627. }
  2628. pixels := (x2 - x1 + 1)*(y2 - y1 + 1)
  2629. If ( pixels <= 0 ) {
  2630. ErrorLevel = -1
  2631. return
  2632. }
  2633. x = %x1%
  2634. Loop {
  2635. If ( x > x2 )
  2636. break
  2637. y = %y1%
  2638. Loop {
  2639. If ( y > y2 )
  2640. break
  2641. PixelGetColor, c, x, y, %options%
  2642. num%c%++
  2643. all_colors = %all_colors%|%c%
  2644. y++
  2645. ;done++
  2646. ;Tooltip % Floor((done/pixels)*100) "%"
  2647. }
  2648. x++
  2649. }
  2650. StringTrimLeft, all_colors, all_colors, 1
  2651. num%pred_c% = 0
  2652. Loop, Parse, all_colors, |
  2653. {
  2654. If ( num%a_loopfield% > num%pred_c% )
  2655. pred_c = %a_loopfield%
  2656. }
  2657. ErrorLevel := num%pred_c%
  2658. return pred_c
  2659. }
  2660.  
  2661.  
  2662.  
  2663. getid()
  2664. {
  2665. global act_only_on_active_table
  2666. ;ut := UrgentTable()
  2667. ;if (ut)
  2668. ;{
  2669. ; id := ut
  2670. ;}
  2671. ;else
  2672. ;{
  2673. tn := TableNav()
  2674. if (tn)
  2675. {
  2676. id := tn
  2677. }
  2678. else
  2679. {
  2680. id := ""
  2681. if (act_only_on_active_table = 1)
  2682. {
  2683. ;MsgBox, Active Table Mode
  2684. WinGet,id,,A
  2685. }
  2686. else
  2687. {
  2688. ;MsgBox, Table Under Cursor Mode
  2689. MouseGetPos, , , id
  2690. }
  2691. }
  2692. ;}
  2693. return id
  2694. }
  2695.  
  2696. TableNav()
  2697. {
  2698. If ! WinExist("blue_bar ahk_class AutoHotkeyGUI")
  2699. return 0
  2700. SendMessage, 0x5555
  2701. return WinExist("ahk_id" errorLevel )
  2702. }
  2703.  
  2704. UrgentTable()
  2705. {
  2706. If ! WinExist("urgent_table ahk_class AutoHotkeyGUI")
  2707. return 0
  2708. SendMessage, 0x5555
  2709. return WinExist("ahk_id" errorLevel )
  2710. }
  2711.  
  2712.  
  2713. relStarsClientPoint(id, ByRef x, ByRef y)
  2714. {
  2715. global border
  2716. global caption
  2717. rw := 792
  2718. rh := 546
  2719. WinGetPos, , , w, h, ahk_id%id%
  2720. w := w - (2*border)
  2721. h := h - (2*border) - caption
  2722.  
  2723. x := Floor( (x / rw ) * w )
  2724. y := Floor( (y / rh) * h )
  2725.  
  2726. }
  2727.  
  2728. relStarsWindowPoint(id, ByRef x, ByRef y)
  2729. {
  2730. global border
  2731. global caption
  2732. relStarsClientPoint(id, x, y)
  2733. x := x + border
  2734. y := y + border + caption
  2735. }
  2736.  
  2737. relStarsScreenPoint(id, ByRef x, ByRef y)
  2738. {
  2739. relStarsWindowPoint(id, x, y)
  2740. WinGetPos, x1, y1, , , ahk_id%id%
  2741. x += x1
  2742. y += y1
  2743. }
  2744.  
  2745.  
  2746. reverse_calc_stars_client_area(cw, ByRef w, ByRef h)
  2747. {
  2748. global border
  2749. global caption
  2750. w := cw + (2*border)
  2751. h := Floor(cw / 1.45) + (2*border) + caption
  2752. }
  2753.  
  2754. client_area(id, ByRef x, Byref y, ByRef w, Byref h)
  2755. {
  2756. WinGetPos, x, y, w, h, ahk_id%id%
  2757. global border
  2758. global caption
  2759. x := x + border
  2760. y := y + border + caption
  2761. w := w - (2*border)
  2762. h := h - (2*border) - caption
  2763. return
  2764. }
  2765.  
  2766.  
  2767. debug_gui(id, x1, y1, x2, y2, delay=500)
  2768. {
  2769. Gui, 2: +Alwaysontop +Lastfound +Owner
  2770. Gui, 2: Color, ffffff
  2771. WinSet, Transparent, 200
  2772. Gui, 2: -Caption
  2773. w1 := x2 - x1
  2774. h1 := y2 - y1
  2775. Gui, 2: Show, w%w1% h%h1% x%x1% y%y1% NoActivate
  2776. Sleep, %delay%
  2777. Gui,2: Destroy
  2778. }
  2779.  
  2780. FoldUB(id)
  2781. {
  2782. ControlGet, v, Visible, , Button29, ahk_id%id%
  2783. if (v)
  2784. {
  2785. ControlFocus, Button29, ahk_id%id%
  2786. Sleep, -1
  2787. ControlClick, Button29, ahk_id%id%
  2788. }
  2789. else
  2790. {
  2791. ControlGet, v, Visible, , Button16, ahk_id%id%
  2792. if (v)
  2793. {
  2794. ControlFocus, Button16, ahk_id%id%
  2795. Sleep, -1
  2796. ControlClick, Button16, ahk_id%id%
  2797. }
  2798. else
  2799. {
  2800. ControlGet, v, Visible, , Button18, ahk_id%id%
  2801. if (v)
  2802. {
  2803. ControlFocus, Button18, ahk_id%id%
  2804. Sleep, -1
  2805. ControlClick, Button18, ahk_id%id%
  2806. }
  2807. else
  2808. {
  2809. ControlGet, v, Visible, , Button13, ahk_id%id%
  2810. if (v)
  2811. {
  2812. ControlFocus, Button13, ahk_id%id%
  2813. Sleep, -1
  2814. ControlClick, Button13, ahk_id%id%
  2815. }
  2816. }
  2817. }
  2818. }
  2819. }
  2820.  
  2821. CallUB(id)
  2822. {
  2823. ControlGet, v, Visible, , Button19, ahk_id%id%
  2824. if (v)
  2825. {
  2826. ControlFocus, Button19, ahk_id%id%
  2827. Sleep, -1
  2828. ControlClick, Button19, ahk_id%id%
  2829. }
  2830. }
  2831.  
  2832. RaiseUB(id)
  2833. {
  2834. ControlGet, v, Visible, , Button51, ahk_id%id%
  2835. if (v)
  2836. {
  2837. ControlFocus, Button51, ahk_id%id%
  2838. Sleep, -1
  2839. ControlClick, Button51, ahk_id%id%
  2840. }
  2841. }
  2842.  
  2843. FoldStars(id)
  2844. {
  2845. PostStarsClick(415,501,id)
  2846. }
  2847.  
  2848. CallStars(id)
  2849. {
  2850. PostStarsClick(600,533,id)
  2851. }
  2852. RaiseStars(id)
  2853. {
  2854. PostStarsClick(730,520,id)
  2855. }
  2856.  
  2857. FoldIPoker(id)
  2858. {
  2859. global iPokerFoldX, iPokerFoldY
  2860. Click, %iPokerFoldx%, %iPokerFoldY%
  2861. }
  2862.  
  2863. CallIPoker(id)
  2864. {
  2865. global iPokerCallx, ipokerCally
  2866. Click, %iPokerCallX%, %iPokerCallY%
  2867. }
  2868.  
  2869. RaiseIPoker(id)
  2870. {
  2871. global iPokerRaiseX, ipokerRaiseY
  2872. Click, %ipokerRaiseX%, %iPokerRaiseY%
  2873. }
  2874.  
  2875. FoldCrypto(id)
  2876. {
  2877. PostStarsClick(480,500,id)
  2878. }
  2879.  
  2880. CallCrypto(id)
  2881. {
  2882. PostStarsClick(602,534,id)
  2883. }
  2884. RaiseCrypto(id)
  2885. {
  2886. PostStarsClick(726,534,id)
  2887. }
  2888.  
  2889.  
  2890. FoldFT(id)
  2891. {
  2892. global FTP_Beta
  2893. global fold_to_any
  2894.  
  2895. if (FTP_Beta)
  2896. {
  2897. if (fold_to_any)
  2898. {
  2899. ControlGet, v, Visible, , FTCSkinButton35, ahk_id%id%
  2900. if (v)
  2901. {
  2902. ControlFocus, FTCSkinButton35, ahk_id%id%
  2903. Sleep, -1
  2904. ControlClick, FTCSkinButton35, ahk_id%id%
  2905. }
  2906. }
  2907.  
  2908. else
  2909. {
  2910. ControlGet, v, Visible, , FTCSkinButton29, ahk_id%id%
  2911. if (v)
  2912. {
  2913. ControlFocus, FTCSkinButton29, ahk_id%id%
  2914. Sleep, -1
  2915. ControlClick, FTCSkinButton29, ahk_id%id%
  2916. }
  2917. else
  2918. {
  2919. ControlGet, v, Visible, , FTCSkinButton11, ahk_id%id%
  2920. if (v)
  2921. {
  2922. ControlFocus, FTCSkinButton11, ahk_id%id%
  2923. Sleep, -1
  2924. ControlClick, FTCSkinButton11, ahk_id%id%
  2925. }
  2926. }
  2927. }
  2928. }
  2929. else
  2930. {
  2931. /*
  2932. ControlGet, v, Visible, , FTCButton31, ahk_id%id%
  2933. if (v)
  2934. {
  2935. ControlFocus, FTCButton31, ahk_id%id%
  2936. Sleep, -1
  2937. ControlClick, FTCButton31, ahk_id%id%
  2938. }
  2939. */
  2940. }
  2941. }
  2942.  
  2943. CallFT(id)
  2944. {
  2945. global FTP_Beta
  2946. if (FTP_Beta)
  2947. {
  2948. ControlGet, v, Visible, , FTCSkinButton12, ahk_id%id%
  2949. if (v)
  2950. {
  2951. ControlFocus, FTCSkinButton12, ahk_id%id%
  2952. Sleep, -1
  2953. ControlClick, FTCSkinButton12, ahk_id%id%
  2954. }
  2955. }
  2956. /*
  2957. else
  2958. {
  2959. ControlGet, v, Visible, , FTCButton11, ahk_id%id%
  2960. if (v)
  2961. {
  2962. ControlFocus, FTCButton11, ahk_id%id%
  2963. Sleep, -1
  2964. ControlClick, FTCButton11, ahk_id%id%
  2965. }
  2966. else
  2967. {
  2968. ControlGet, v, Visible, , FTCButton11, ahk_id%id%
  2969. if (v)
  2970. {
  2971. ControlFocus, FTCButton11, ahk_id%id%
  2972. Sleep, -1
  2973. ControlClick, FTCButton11, ahk_id%id%
  2974. }
  2975. }
  2976. }
  2977. */
  2978. }
  2979.  
  2980. RaiseFT(id)
  2981. {
  2982. global FTP_Beta
  2983. if (FTP_Beta)
  2984. {
  2985. ControlGet, v, Visible, , FTCSkinButton13, ahk_id%id%
  2986. if (v)
  2987. {
  2988. ControlFocus, FTCSkinButton13, ahk_id%id%
  2989. Sleep, -1
  2990. ControlClick, FTCSkinButton13, ahk_id%id%
  2991. }
  2992. }
  2993. /*
  2994. else
  2995. {
  2996. ControlGet, v, Visible, , FTCButton13, ahk_id%id%
  2997. if (v)
  2998. {
  2999. ControlFocus, FTCButton13, ahk_id%id%
  3000. Sleep, -1
  3001. ControlClick, FTCButton13, ahk_id%id%
  3002. }
  3003. }
  3004. */
  3005. }
  3006.  
  3007.  
  3008. FoldParty(id)
  3009. {
  3010. ControlGet, v, Visible, , AfxWnd42u22, ahk_id%id%
  3011. if (v)
  3012. {
  3013. ControlFocus, AfxWnd42u22, ahk_id%id%
  3014. Sleep, -1
  3015. ControlClick, AfxWnd42u22, ahk_id%id%
  3016. }
  3017. else
  3018. {
  3019. ControlGet, v, Visible, , AfxWnd42u17, ahk_id%id%
  3020. if (v)
  3021. {
  3022. ControlFocus, AfxWnd42u17, ahk_id%id%
  3023. Sleep, -1
  3024. ControlClick, AfxWnd42u17, ahk_id%id%
  3025. }
  3026. }
  3027. }
  3028.  
  3029. CallParty(id)
  3030. {
  3031. ControlGet, v, Visible, , AfxWnd42u18, ahk_id%id%
  3032. if (v)
  3033. {
  3034. ControlFocus, AfxWnd42u18, ahk_id%id%
  3035. Sleep, -1
  3036. ControlClick, AfxWnd42u18, ahk_id%id%
  3037. }
  3038. }
  3039.  
  3040. RaiseParty(id)
  3041. {
  3042. ControlGet, v, Visible, , AfxWnd42u19, ahk_id%id%
  3043. if (v)
  3044. {
  3045. ControlFocus, AfxWnd42u19, ahk_id%id%
  3046. Sleep, -1
  3047. ControlClick, AfxWnd42u19, ahk_id%id%
  3048. }
  3049. }
  3050.  
  3051. /*
  3052.  
  3053. ControlClick, AfxWnd42u19, ahk_id%id%
  3054. }
  3055. }
  3056. Else IfWinExist, ahk_id%id% ahk_group CryptoTables
  3057. {
  3058. ControlSetText, edit2, %pot%, ahk_id%id%
  3059. Sleep -1
  3060. WinSet, Redraw,, ahk_id%id%
  3061. If(autobet)
  3062. {
  3063. PostLeftClick(730, 540, id)
  3064. }
  3065. }
  3066. Else IfWinExist, ahk_id%id% ahk_group FullTiltTables
  3067. {
  3068. ControlGet, v, Visible, , Edit1, ahk_id%id%
  3069. if (v)
  3070. {
  3071. ;Msgbox, %pot%
  3072. if (pot > max)
  3073. {
  3074. pot := max
  3075. }
  3076. ControlSetText, Edit1, %pot%, ahk_id%id%
  3077. Sleep -1
  3078. ;WinSet, Redraw,, ahk_id%id%
  3079. If(autobet)
  3080. {
  3081. ab := 0
  3082. Loop, 20
  3083. {
  3084. ControlGetText, t, Edit1, ahk_id%id%
  3085. if (t < pot || t > pot)
  3086. {
  3087. Sleep, 100
  3088. }
  3089. else
  3090. {
  3091. ;TrayTip, , %ab% %t% %pot%
  3092. Sleep, 200
  3093. ControlFocus, FTCButton11, ahk_id%id%
  3094. Sleep, -1
  3095. ControlClick, FTCButton11, ahk_id%id%
  3096. ;ab := 1
  3097. break
  3098. }
  3099. }
  3100. ;TrayTip, , %ab% %t% %pot%
  3101. ;if (ab)
  3102. ;{
  3103. ; ControlFocus, FTCButton11, ahk_id%id%
  3104. ; Sleep, -1
  3105. ; ControlClick, FTCButton11, ahk_id%id%
  3106. ;}
  3107. }
  3108. }
  3109. }
  3110. Else IfWinExist, ahk_id%id% ahk_group PrimaTables
  3111. {
  3112. ControlFocus, Edit1, ahk_id%id%
  3113. ControlSetText, Edit1, %pot%, ahk_id%id%
  3114. Sleep, -1
  3115. WinSet, Redraw,, ahk_id%id%
  3116. If(autobet)
  3117. {
  3118. WinActivate, ahk_id%id%
  3119. WinWaitActive, ahk_id%id%, , 1
  3120. If (errorlevel<>1)
  3121. {
  3122. Send, {ENTER}
  3123. }
  3124. }
  3125. }
  3126. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement