Autohotkey Chip-Reloader NL10

    • basst99
      basst99
      Bronze
      Dabei seit: 05.04.2007 Beiträge: 763
      Also ich habe ein Reload-Skript gefunden und es funktioniert auch, allerdings kann mir jemand sagen, wie man das Skript umschreiben kann, dass erst nachdem ich unter 1,50 Stack habe, wieder auf (und nicht UM) 2 $ erhöht wird... Hab das irgendwie nicht ganz durchblickt... :rolleyes:

      code:
      
      ;------------------------------------------------------------------------------------------------
      ; Chip Reloader v0.20
      ;------------------------------------------------------------------------------------------------
      ; Date: 2007-01-21
      ; AHK version: 1.0.44.12
      ;------------------------------------------------------------------------------------------------
      ; Author(s): Adde @ 2+2 forums
      ; Contact: HstreamPoker at gmail dot com
      ; Contributions by APerfect10
      ;------------------------------------------------------------------------------------------------
      ; Reload chips on all Partypoker and Pokerstars tables with just one click.
      ; See web page for more details.
      ;
      ; http://overcards.com/wiki/moin.cgi/ChipReloader
      ;
      ; All rights reserved. Use at your own risk.
      ;------------------------------------------------------------------------------------------------
      
      ;________________________________________________________________________________________________
      ;
      ; EDIT THESE SETTINGS
      ;________________________________________________________________________________________________
      
      ; Set what hotkeys should perform the reload. Leave blank to not use this function as a hotkey.
      ; List of available hotkeys: http://www.autohotkey.com/docs/KeyList.htm
      
      cr_hotkey_reload_all = F9
      cr_hotkey_reload_active = F10
      
      ; Set if Party and/or Stars reload should be performed (1) or not (0).
      
      cr_reload_party = 1
      cr_reload_stars = 0
      cr_reload_fulltilt = 0
      
      ; Set if sound should be turned off during reload.
      
      cr_sound_off = 0
      
      ; Set if mouse pointer should move back to original position
      
      cr_reset_mouse_pointer = 1
      
      
      ;________________________________________________________________________________________________
      ;
      ; DO NOT EDIT BELOW HERE
      ;________________________________________________________________________________________________
      
      ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; auto-execute ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      
      #NoEnv
      #SingleInstance Ignore
      #Persistent
      
      cr_scriptpad_command_header = Chip Reloader
      cr_scriptpad_command_name = Reload All Tables
      cr_scriptpad_command_label = CR_ReloadAll_Label
      cr_scriptpad_command_enabled = 1
      
      ahk_version = 1.0.44.07
      if A_AhkVersion < %ahk_version%
      {
      msgbox, 4, , This script needs AutoHotkey version %ahk_version% or newer (you are using version %A_AhkVersion%). Script will exit`n`nGo to web page and download new version now?
      IfMsgBox, Yes
      Run, http://www.autohotkey.com
      ExitApp
      }
      
      cr_web_page = http://overcards.com/wiki/moin.cgi/PokerReloader
      
      Hotkey, %cr_hotkey_reload_all%, CR_ReloadAll_Label, UseErrorLevel
      Hotkey, %cr_hotkey_reload_active%, CR_ReloadActive_Label, UseErrorLevel
      
      goto CR_Scriptpad_End
      
      ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; labels ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      
      CR_ReloadAll_Label:
      
      CR_ReloadAll()
      
      return
      
      CR_ReloadActive_Label:
      
      
      
      CR_ReloadActiveTable(1)
      
      return
      
      ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; functions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      
      
      CR_ToggleVolume(OnOff)
      {
      static af_vol
      if (OnOff = "on")
      SoundSetWaveVolume, %af_vol%, 1
      else if (OnOff = "off")
      {
      SoundGetWaveVolume, af_vol, 1
      SoundSetWaveVolume, -100, 1
      }
      }
      
      CR_ReloadAll()
      {
      global
      if (cr_reset_mouse_pointer)
      AF_SaveMousePosition()
      if (cr_sound_off)
      CR_ToggleVolume("off")
      
      if (cr_reload_party)
      
      
      
      CR_ReloadParty(1)
      
      
      if (cr_reload_stars)
      CR_ReloadStars()
      if( cr_reload_fulltilt )
      CR_ReloadFullTilt()
      
      if (cr_sound_off)
      CR_ToggleVolume("on")
      else
      SoundBeep, , 50
      if (cr_reset_mouse_pointer)
      AF_RestoreMousePosition()
      }
      
      CR_ReloadParty(1)
      
      {
      SetTitleMatchMode, 2
      WinGet, idList, list, Good Luck ahk_class #32770, , PartyPoker.com:
      Loop, %idList%
      {
      winID := idList%a_index%
      CR_ReloadPartyTable(winID)
      }
      }
      
      
      
      CR_ReloadActiveTable(1)
      
      
      {
      global cr_reset_mouse_pointer
      if (cr_reset_mouse_pointer)
      AF_SaveMousePosition()
      WinGetActiveTitle, title
      WinGet, winID, ID, %title%
      WinGetClass, class, ahk_id %winID%
      if (class = "#32770")
      CR_ReloadPartyTable(winID)
      If( class = "FTC_TableViewFull")
      CR_ReloadFullTiltTable(winID)
      ps_class = Afx:400000:b:
      IfInString, class, %ps_class%
      CR_ReloadStarsTable(winID)
      if (cr_reset_mouse_pointer)
      AF_RestoreMousePosition()
      
      }
      
      CR_ReloadPartyTable(winID)
      {
      ControlGet, result, Visible, , AfxWnd42u1, ahk_id %winID%
      if (not result)
      return
      ControlGet, result, Visible, , Button5, ahk_id %winID%
      if (not result)
      return
      ControlClick, AfxWnd42u1, ahk_id%winID%
      sleep, 300
      IfWinExist, PartyPoker.com ahk_class #32770, You can have maximum
      {
      WinClose, PartyPoker.com ahk_class #32770, You can have maximum
      return
      }
      
      WinWait, Buy-In ahk_class #32770, , 2
      if (ErrorLevel <> 0)
      return
      WinActivate, Buy-In ahk_class #32770
      ControlSetText, Edit1, "2", Buy-In ahk_class #32770
      sleep, 500
      ControlFocus, Button2, Buy-In ahk_class #32770
      SendInput {SPACE}
      sleep 300
      
      IfWinExist, PartyPoker.com ahk_class #32770, Please enter an amount
      {
      WinClose, PartyPoker.com ahk_class #32770, Please enter an amount
      WinClose, Buy-In ahk_class #32770
      return
      }
      IfWinExist, PartyPoker.com ahk_class #32770, You can bring a maximum
      {
      WinClose, PartyPoker.com ahk_class #32770, You can bring a maximum
      WinClose, Buy-In ahk_class #32770
      return
      }
      IfWinExist, PartyPoker.com ahk_class #32770, Additional chips
      {
      WinClose, PartyPoker.com ahk_class #32770, Additional chips
      WinClose, Buy-In ahk_class #32770
      return
      }
      IfWinExist, PartyPoker.com ahk_class #32770, You do not have sufficient funds
      {
      WinClose, PartyPoker.com ahk_class #32770, You do not have sufficient funds
      WinClose, Buy-In ahk_class #32770
      return
      }
      
      WinWaitClose, Buy-In ahk_class #32770, , 2
      Loop
      {
      IfWinNotExist, Buy-In ahk_class #32770
      return
      WinActivate, Buy-In ahk_class #32770
      ControlSetText, Edit1, "2", Buy-In ahk_class #32770
      sleep, 500
      ControlFocus, Button2, Buy-In ahk_class #32770
      SendInput {SPACE}
      WinWaitClose, Buy-In ahk_class #32770, , 1
      }
      
      WinWait, PartyPoker.com, Additional chips, 1
      if (ErrorLevel <> 0)
      return
      ControlFocus, Button1, PartyPoker.com, Additional chips
      SendInput {SPACE}
      WinWaitClose, PartyPoker.com, Additional chips, 2
      Loop
      {
      IfWinNotExist, PartyPoker.com, Additional chips
      return
      ControlFocus, Button1, PartyPoker.com, Additional chips
      SendInput {SPACE}
      WinWaitClose, PartyPoker.com, Additional chips, 2
      }
      }
      
      CR_ReloadStars()
      {
      SetTitleMatchMode, 2
      WinGet, idList, list, Logged In as, , PokerStars Lobby
      Loop, %idList%
      {
      winID := idList%a_index%
      CR_ReloadStarsTable(winID)
      }
      }
      
      CR_ReloadStarsTable(winID)
      {
      WinGetPos, x, y, w, h, ahk_id%winID%
      px := Floor((w/800) * 400)
      py := Floor((h/573) * 80)
      WinActivate, ahk_id %winID%
      CR_PostLeftClick(px, py, winID)
      
      SetTitleMatchMode, 2
      WinWait, Options, Add More Chips, 3
      WinGet, winID, ID, Options, Add More Chips
      if (winID = "")
      return
      if CR_ButtonDisabled(winID,"Add More Chips")
      return
      ControlFocus, Add More Chips, ahk_id %winID%
      SendInput {SPACE}
      
      stopTime := A_Now
      EnvAdd, stopTime, 5, seconds
      loop
      {
      IfWinExist, PokerStars, Your rebuy cannot be processed
      {
      WinClose, PokerStars, Your rebuy cannot be processed
      return
      }
      IfWinExist, Buy-in
      break
      if (A_Now > stopTime)
      return
      }
      
      WinGet, winID, ID, Buy-in
      if (winID = "")
      return
      
      if CR_ButtonDisabled(winID, "Button1")
      return
      ControlFocus, Button1, ahk_id %winID%
      SendInput {SPACE}
      sleep, 100
      
      if CR_ButtonDisabled(winID, "Button3")
      return
      ControlFocus, Button3, ahk_id %winID%
      SendInput {SPACE}
      sleep, 300
      
      IfWinExist, PokerStars, Your stack will be updated when the current hand is finished
      WinClose, PokerStars, Your stack will be updated when the current hand is finished
      IfWinExist, PokerStars, You are not able to rebuy
      WinClose, PokerStars, You are not able to rebuy
      IfWinExist, Buy-in, The minimum amount of chips required
      WinClose, Buy-in, The minimum amount of chips required
      }
      
      CR_ReloadFullTilt()
      {
      SetTitleMatchMode, 2
      WinGet, idList, list, Logged In As ahk_class FTC_TableViewFull
      Loop, %idList%
      {
      winID := idList%a_index%
      CR_ReloadFullTiltTable(winID)
      }
      }
      
      CR_ReloadFullTiltTable(winID)
      {
      ControlGet, result, Visible, , FTCButton29, ahk_id %winID%
      If( !result )
      return
      
      Control, Enable, , FTCButton1, ahk_id%winID%
      Control, Check, , FTCButton1, ahk_id%winID%
      
      WinWait, Get Chips,,2
      If( ErrorLevel )
      return
      
      WinGet, chipID, ID, Get Chips
      WinGetText, winTxt, ahk_id%chipID%
      WinActivate, ahk_id%chipID%
      
      ControlGet, enabled, Enabled, ,BUtton2, ahk_id%chipID%
      If( enabled )
      {
      needle = No Limit Hold'em
      if( InStr(winTxt, needle) ){
      Control, Check, , Button2, ahk_id%chipID%
      }else{
      Control, Check, , Button1, ahk_id%chipID%
      }
      }
      Send {ENTER}
      }
      
      CR_ButtonDisabled(winID, buttonName)
      {
      ControlGet, result, Enabled, , %buttonName%, ahk_id %winID%
      if (result = false)
      WinClose, ahk_id %winID%
      return (result=false)
      }
      
      CR_PostLeftClick(x, y, table_id)
      { ; ### 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!!!).
      Postmessage 0x201, 0x0001, ((y*65536)+x), , ahk_id%table_id%
      Postmessage 0x202, 0, ((y*65536)+x), , ahk_id%table_id%
      }
      
      AF_SaveMousePosition()
      {
      global AF_mouse_pos_x, AF_mouse_pos_y
      CoordMode, Mouse, Screen
      MouseGetPos, AF_mouse_pos_x, AF_mouse_pos_y
      CoordMode, Mouse, Relative
      }
      
      AF_RestoreMousePosition()
      {
      global AF_mouse_pos_x, AF_mouse_pos_y
      CoordMode, Mouse, Screen
      MouseMove, AF_mouse_pos_x, AF_mouse_pos_y, 0
      CoordMode, Mouse, Relative
      }
      
      ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; scriptpad ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      
      CR_Scriptpad_End:
      ; Do nothing. This is needed to work with Scriptpad.
      
      
  • 7 Antworten