Scripts OnGame

21 respuestas
07/06/2008 12:10
1

Visto la gran cantidad de jugadores de la red OnGame que pululan por el foro preguntando por scripts para OnGame me he decidido a abrir este post recopilatorio para tenerlos todos recogiditos.

07/06/2008 12:18
Re: Scripts OnGame

Empezamos con el mejor y más útil para mi.

OnGame BetPot:

#NoEnv

#SingleInstance force

SendMode Input

SetWorkingDir %a_scriptDir%

SetBatchLines -1

; BetPot: [email]mbeess@gmail.com[/email]

; Reload + fixes: [email]TCEgor@gmail.com[/email]

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

~MButton::

handlebetting(1/1, 1) ; pot, auto bet

return

~XButton1::

handlebetting(1/2, 1) ; pot, auto bet

return

~RButton::

handlebetting(3/4, 1) ; pot, auto bet

return

~XButton2::

reload()

return

;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

; VERSION 0.3

;#### reload

reload()

{

rep1 := ","

rep2 := "."

bb := getbb(win)

; MsgBox, %bb%

buyin := bb * 100

stringreplace, buyin, buyin, %rep2% , %rep1%

; MsgBox, %buyin%

Wingetactivetitle, title

DetectHiddenText, Off

Ifinstring, title, Money

{

SitOut:

ControlClick Button7, %title%

Sleep 100

IfWinNotExist %title%, Click on SIT IN to be dealt in.

{

GoTo, SitOut

}

Cashier:

ControlClick Button10, %title%

Sleep 500

IfWinNotExist %title%, How much of your

{

GoTo, Cashier

}

; ControlClick, RichEdit20W2, %title%

ControlSetText, RichEdit20W2, %buyin%, %title%

; SendPlay % buyin

; Sleep 100

SitIn:

ControlClick Button12, %title%

Sleep 100

IfWinNotExist %title%, Please wait to be dealt in

{

GoTo, SitIn

}

}

}

;#### handlebetting

handlebetting(size = 1, autobet = 0)

{

amount := fullamount(win) * size + callamount(win)

transform, amount, round, amount, 1

Wingetactivetitle, title

Ifinstring, title, Money

{

bet(win, amount, autobet)

}

}

;#### bet

bet(win, amount, autobet)

{

rep1 := ","

rep2 := "."

Wingetactivetitle, title

stringreplace, amount, amount, %rep2% , %rep1%

WinActivate

ControlClick, RichEdit20W3, %title%

ControlSetText, RichEdit20W3, , %title%

SendPlay % amount

Sleep 100

if autobet = 1

{

send {f3}

}

}

;#### get big blind

getbb(win)

{

rep1 := ","

rep2 := "."

Wingetactivetitle, title

StringTrimLeft, title, title, InStr(title, "$", 0, 0)

StringLeft, bb, title, InStr(title, a_space) - 1

stringreplace, bb, bb, %rep1% , %rep2%

return bb

}

;#### get pot

getpot(win)

{

rep1 := ","

rep2 := "."

Wingetactivetitle, title

ControlGetText, pot, AfxWnd70u54, %title%

StringTrimLeft, pot, pot, InStr(pot, "$")

stringreplace, pot, pot, %rep1% , %rep2%

return pot

}

;#### get obet

getobet(win)

{

rep1 := ","

rep2 := "."

Wingetactivetitle, title

ControlGetText, obet, AfxWnd70u53, %title%

StringTrimLeft, obet, obet, InStr(obet, "$")

stringreplace, obet, obet, %rep1% , %rep2%

return obet

}

;#### get cost

getcost(win)

{

rep1 := ","

rep2 := "."

Wingetactivetitle, title

ControlGetText, cost, AfxWnd70u58, %title%

if (ErrorLevel)

{

cost := 0

return

}

StringTrimLeft, cost, cost, InStr(cost, "$")

stringreplace, cost, cost, %rep1% , %rep2%

return cost

}

;#### fullamount

fullamount(win)

{

Wingetactivetitle, title

pot := getpot(win)

tocall := callamount(win)

Setformat, float, 0.2

fullamount := pot + tocall

return fullamount

}

;#### callamount

callamount(win)

{

cost := getcost(win)

Setformat, float, 0.2

Wingetactivetitle, title

DetectHiddenText, Off

IfWinNotExist %title%, Cost:

{

callamount:=0

return callamount

}

callamount:=cost

return callamount

}

Esta parte del script es la que determina los botones que utilizamos para realizar las acciones, las acciones a realizar y si se hace de forma automática, es decir, por ejemplo, que al pulsar el botón para apostar el bote entero, el programa apueste el bote directamente o simplemente elija esa cantidad en la barra de apuestas pero esperando nuestra confirmación.

~MButton:: ---> Este es el botón que realiza la acción (en este caso es el botón central del ratón)

handlebetting(1/1, 1) ; pot, auto bet ---> La parte azul es la cantidad del bote a apostar (en este caso es todo el bote)

return

~XButton1::

handlebetting(1/2, 1) ; pot, auto bet ---> Ese 1 es el que activa el modo automático (cambiar a 0 para desactivar)

return

~RButton::

handlebetting(3/4, 1) ; pot, auto bet

return

~XButton2::

reload()

return

Cualquier pregunta, ya sabeis...

07/06/2008 12:38
Re: Scripts OnGame

Lo malo del BetPot es que si no seleccionas la mesa en la que quieres realizar la acción pues realiza la acción en la mesa que tuvieras seleccionada, lo cual, a veces es muy caro (lo digo por experiencia). Así que para eso tenemos el TableNavigator.

Para usarlo en OnGame necesitáis ir al directorio de casinos y copiar el archivo llamado PokerRoom.ahk en ese mismo directorio pero con el nombre de vuestro skin de la red OnGame tambien acabado en .ahk.

Una vez hecho esto, pinchamos con el botón derecho y damos a edit script. Nos aparece el notepad con esto:

lobbyPokerRoom() {

SetTitleMatchMode 1

WinGet, id, id, PokerRoom.com - Welcome

return id

}

tablesPokerRoom(lobby) {

SetTitleMatchMode 2

WinGet, pid, PID, ahk_id%lobby%

WinGet, list, list, [ID= ahk_pid%pid%

Loop % list

tables := list%a_index%!=lobby

? addToList(tables, list%a_index%)

: tables

return tables

}

GameTypePokerRoom(id) {

title := WinGetTitle(id)

If InStr(title, "No-limit Texas Hold'em")

return "NL Ring"

else if InStr(title, ", Texas Hold'em")

return "Limit"

}

FoldPokerRoom(id) {

str_list = Button24|Button42|Button26|Button41

match_list = 3|3|3|3

clickList(str_list,match_list, id)

}

CallPokerRoom(id) {

str_list = Button24|Button25|Button43

match_list =3|3|3

clickList(str_list,match_list, id)

}

RaisePokerRoom(id) {

str_list = Button45|Button23|Button27

match_list = 3|3|3

clickList(str_list,match_list, id)

}

RaiseAnyPokerRoom(id) {

local game_Type,str_list,match_list

game_type := GameType(id)

casino := Casino(id)

If IsIn(game_type,"NL Ring,NL Tourney") {

ControlFocus, AfxWnd70u45, ahk_id%id%

SendInput {WheelUp}

return

}

str_list = Button46

match_list = 3

clickList(str_list,match_list, id)

RaisePokerRoom(id)

}

ClearBetBoxPokerRoom(id) {

WinActivate, ahk_id%id%

ControlSetText, RichEdit20W1,, ahk_id%id%

ControlFocus, RichEdit20W1, ahk_id%id%

}

PostPokerRoom(id) {

}

WaitToPostPokerRoom(id) {

str_list = Button19

match_list = 3

clickList(str_list,match_list, id)

}

DontPostPokerRoom(id) {

}

FoldToAnyBetPokerRoom(id) {

}

IsTableWaitingPokerRoom(id) {

}

IsTableWaitingExPokerRoom(id) {

}

En este archivo sustituiremos en todos los lugares en que aparece "PokerRoom" (sin comillas) por el nombre del archivo que copiamos anteriormente (sin.ahk) excepto en la línea en rojo. En esta, sustituiremos "PokerRoom.com - Welcome" por el título de la ventana del lobby de nuestro cliente de OnGame (lo de Welcome no se toca)

Ejemplo para Tower Gaming:

Creo una copia del PokerRoom.ahk llamado TowerPoker.ahk y lo edito así:

lobbyTowerPoker() {

SetTitleMatchMode 1

WinGet, id, id, Tower Gaming Poker Room - Welcome

return id

}

tablesTowerPoker(lobby) {

SetTitleMatchMode 2

WinGet, pid, PID, ahk_id%lobby%

WinGet, list, list, [ID= ahk_pid%pid%

Loop % list

tables := list%a_index%!=lobby

? addToList(tables, list%a_index%)

: tables

return tables

}

GameTypeTowerPoker(id) {

title := WinGetTitle(id)

If InStr(title, "No-limit Texas Hold'em")

return "NL Ring"

else if InStr(title, ", Texas Hold'em")

return "Limit"

}

FoldTowerPoker(id) {

str_list = Button24|Button42|Button26|Button41

match_list = 3|3|3|3

clickList(str_list,match_list, id)

}

CallTowerPoker(id) {

str_list = Button24|Button25|Button43

match_list =3|3|3

clickList(str_list,match_list, id)

}

RaiseTowerPoker(id) {

str_list = Button45|Button23|Button27

match_list = 3|3|3

clickList(str_list,match_list, id)

}

RaiseAnyTowerPoker(id) {

local game_Type,str_list,match_list

game_type := GameType(id)

casino := Casino(id)

If IsIn(game_type,"NL Ring,NL Tourney") {

ControlFocus, AfxWnd70u45, ahk_id%id%

SendInput {WheelUp}

return

}

str_list = Button46

match_list = 3

clickList(str_list,match_list, id)

RaiseTowerPoker(id)

}

ClearBetBoxTowerPoker(id) {

WinActivate, ahk_id%id%

ControlSetText, RichEdit20W1,, ahk_id%id%

ControlFocus, RichEdit20W1, ahk_id%id%

}

PostTowerPoker(id) {

}

WaitToPostTowerPoker(id) {

str_list = Button19

match_list = 3

clickList(str_list,match_list, id)

}

DontPostTowerPoker(id) {

}

FoldToAnyBetTowerPoker(id) {

}

IsTableWaitingTowerPoker(id) {

}

IsTableWaitingExTowerPoker(id) {

}

Listo. Después de esto sólo quedará ejecutar el archivo que aparece en la carpeta principal del programa para ejecutar el script, nos aparecerá un icono en la barra de tareas, junto al reloj y pinchando con el botón derecho sobre él y eligiendo "Preferences" configuraremos así:

De esta manera no será necesario seleccionar la mesa ya que se seleccionará automáticamente al pasar el ratón por encima de ellas. 😉

07/06/2008 14:48
Re: Scripts OnGame

estos son los que uso yo, para mi el mas util es el 2do y el 3ro

OngameMODStarter

Cita:
; OngameMODStarter v0.95a

; Autor: Chris

; contributions by Roland ('s Functions)

; Contact: Chris228 @ 2+2 forum

#NoEnv

#SingleInstance force

SetWorkingDir %a_scriptDir%

;=====================================================================

;=================== Autoexec ========================================

;=====================================================================

Settings()

if ( Client = 0 ) {

CreateSettings(ini)

sleep, 500

Settings()

}

wdir:=""

StringGetPos, pos, client, \, r1

if (pos > 0)

StringLeft, wdir, client, pos+1

FileCreateDir, %wdir%\resources\graphics\originals\

FileCreateDir, %wdir%\resources\graphics\mod\

ClientOK:=CheckClient(client)

ModOK:=CheckMod(wdir)

if ( ClientOK = 1 && ModOK = 1 ) {

FileCopy, %wdir%resources\graphics\originals\*.*, %wdir%resources\graphics\, 1

Sleep, 500

FileList:=""

Loop %wdir%resources\graphics\mod\*.*

FileList = %FileList%%A_LoopFileName%`n

sleep, 500

Run, %client%, %wdir%

sleep, 500

IfWinExist, Fehler ahk_class #32770

{

ControlGetText, text, Static2

if ( text = "Error: There can only be one instance of the application running at once, exiting ..." )

exitApp

}

BackupOrgFiles(wdir, FileList, copymsg)

sleep, 500

CopyModFiles(wdir, FileList, copymsg)

if ( CloseWelcomeMsg = 1)

CloseNews()

}

return

;=====================================================================

;=================== Prim. Functions =================================

;=====================================================================

BackupOrgFiles(wdir, FileList, copymsg) {

stopTimer:=CreateStopTimer(120)

Loop {

id:=Ongame_LoginID()

if ( id != "" ) {

Loop, parse, FileList, `n

{

if ( A_LoopField = "" )

break

FileCopy, %wdir%resources\graphics\%A_LoopField%, %wdir%\resources\graphics\originals\, 1

}

if ( CopyMsg = 1)

msgbox, 0, OngameMOD Starter, Original graphic files backuped., 5

break

}

if (A_Now > stopTimer) {

msgbox, 4, OngameMOD Starter, Original graphic files not backuped. Backup now?, 120

IfMsgBox Yes

{

Loop, parse, FileList, `n

{

if ( A_LoopField = "" )

break

FileCopy, %wdir%resources\graphics\%A_LoopField%, %wdir%resources\graphics\originals\, 1

}

}

break

}

sleep, 50

}

}



CopyModFiles(wdir, FileList, copymsg) {

stopTimer := CreateStopTimer(120)

Loop {

id:=Ongame_LobbyID()

if ( id != "" ) {

Loop, parse, FileList, `n

{

if ( A_LoopField = "" )

break

FileCopy, %wdir%resources\graphics\mod\%A_LoopField%, %wdir%\resources\graphics\, 1

}

if ( CopyMsg = 1)

msgbox, 0, OngameMOD Starter, Tablemod copied., 5

break

}

if (A_Now > stopTimer) {

msgbox, 4, OngameMOD Starter, Tablemod not copied. Copy now?, 120

IfMsgBox Yes

{

Loop, parse, FileList, `n

{

if ( A_LoopField = "" )

break

FileCopy, %wdir%resources\graphics\mod\%A_LoopField%, %wdir%\resources\graphics\, 1

}

}

break

}

sleep, 50

}

}



CloseNews() {

stopTimer := CreateStopTimer(30)

Loop {

id:=Ongame_MsgID()

if ( id != "" ) {

WinClose, ahk_id %id%

break

}

if (A_Now > stopTimer) {

msgbox, 0, OngameMOD Starter, Can't find News/welcome message., 20

break

}

sleep, 50

}

}

;=====================================================================

;=================== Sec. Functions ==================================

;=====================================================================

CreateSettings(ini) {

loop {

FileSelectFile, client, 3, , Select "StartXXX.exe" of your Ongame client, *.exe

if client !=

break

}

Msgbox, 4, OngameMOD Starter, Do you want to get a message if the backup/mod files are copied?

IfMsgBox Yes

CopyMsg:=1

IfMsgbox No

CopyMsg:=0

Msgbox, 4, OngameMOD Starter, Do you want that the Welcome/News window from your Ongame client gets automaticly closed?

IfMsgBox Yes

CloseWelcomeMsg:=1

IfMsgbox No

CloseWelcomeMsg:=0

IniWrite, % Client, % ini, Client, Client

IniWrite, % CopyMsg, % ini, Prefs, CopyMsg

IniWrite, % CloseWelcomeMsg, % ini, Prefs, CloseWelcomeMsg

Msgbox, 0, OngameMOD Starter, OngameMOD Starter is now ready. If you want to change the settings modify or delete the "OngameMODStarter.ini".

}

Settings() {

global

StringTrimRight, ininame, A_ScriptName, 4

ini=%ininame%.ini

iniRead, Client, %ini%, Client, Client, 0

iniRead, Copymsg, %ini%, Prefs, Copymsg, 0

iniRead, CloseWelcomeMsg, %ini%, Prefs, CloseWelcomeMsg, 0

}

CheckClient(client) {

IfExist, %client%

{

return 1

}

else {

FileDelete, %a_workingdir%\OngameMODStarter.ini

Run, %a_workingdir%\%A_ScriptName%

}

}

CheckMod(wdir) {

FileList =

Loop %wdir%resources\graphics\mod\*.*

FileList = %FileList%%A_LoopFileName%`n

if ( FileList = "" ) {

msgbox, 4, OngameMOD Starter, Found no file(s) in the %wdir%resources\graphics\mod\ folder.`n`nCopy your modded your table/card mod in this folder. Copy now?, 60

IfMsgbox Yes

{

InstallMod(wdir)

sleep, 1000

return 1

}

IfMsgbox No

return 0

}

return 1

}

InstallMod(wdir) {

FileSelectFile, files, M3

StringLeft, dir, files, InStr(files, "`n")-1

StringTrimLeft, files, files, InStr(files, "`n")

Loop, parse, files, `n

{

FileCopy, %dir%\%A_LoopField%, %wdir%resources\graphics\mod\, 1

}

}

CreateStopTimer(seconds)

{

stopTime := A_Now

EnvAdd, stopTime, %seconds%, seconds

return (stopTime)

}

;=====================================================================

;=================== Client Functions ===============================

;=====================================================================

Ongame_LobbyID() {

SetTitleMatchMode 1

WinGet, id, id, PokerRoom.com - Welcome

If ! id

WinGet, id, id, HollywoodPoker.com - Welcome

If ! id

WinGet, id, id, EurobetPoker - Welcome

If ! id

WinGet, id, id, Tower Gaming Poker Room - Welcome

If ! id

WinGet, id, id, Betsson - Welcome

If ! id

WinGet, id, id, EuroPoker - Welcome

If ! id

WinGet, id, id, Prime Poker - Welcome

If ! id

WinGet, id, id, MANSION Poker - Welcome

If ! id

WinGet, id, id, Winamax Poker - Welcome

If ! id

WinGet, id, id, Chan Poker - Welcome

If ! id

WinGet, id, id, Scandic Bookmakers Poker - Welcome

If ! id

WinGet, id, id, bwin Poker - Welcome

If ! id

WinGet, id, id, HeyPoker - Welcome

If ! id

WinGet, id, id, Red Kings Poker - Welcome

If ! id

WinGet, id, id, NextPoker - Welcome

If ! id

WinGet, id, id, Whitebet - Welcome

If ! id

WinGet, id, id, Stryyke Poker - Welcome

If ! id

WinGet, id, id, PokerLoco - Welcome

return id

}

Ongame_LoginID() {

SetTitleMatchMode 1

WinGet, id, id, PokerRoom.com Login

If ! id

WinGet, id, id, HollywoodPoker.com Login

If ! id

WinGet, id, id, EurobetPoker Login

If ! id

WinGet, id, id, Tower Gaming Poker Room Login

If ! id

WinGet, id, id, Betsson Login

If ! id

WinGet, id, id, EuroPoker Login

If ! id

WinGet, id, id, Prime Poker Login

If ! id

WinGet, id, id, MANSION Poker Login

If ! id

WinGet, id, id, Winamax Poker Login

If ! id

WinGet, id, id, Chan Poker Login

If ! id

WinGet, id, id, Scandic Bookmakers.com

If ! id

WinGet, id, id, bwin Poker Login

If ! id

WinGet, id, id, HeyPoker Login

If ! id

WinGet, id, id, Red Kings Poker Login

If ! id

WinGet, id, id, NextPoker Login

If ! id

WinGet, id, id, Whitebet Login

If ! id

WinGet, id, id, Stryyke Poker Login

If ! id

WinGet, id, id, PokerLoco Login

return id

}

Ongame_MsgID() {

SetTitleMatchMode 3

WinGet, id, id, News

return id

}

AutoOngamev6

Cita:
;

; AutoTableActive for Ongame skins

; Press Win+H to toggle automatic table activation

; Author: Zaphod2000

;

;

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.

SendMode Input ; Recommended for new scripts due to its superior speed and reliability.

; =================================================================

; = Use the settings in this section to configure the script to

; = match your monitor resolution and preferences

; =================================================================

; These two values determine how many tables across and down you want

; Since Ongame tables are 800x600 you can fit 2x2 tables on a 1600x1200

; screen with no overlap. If you set the values higher, you will just get

; mote overlap

TablesAcross := 3

TablesDown := 2

; If you want the active table to always move to a certain spot on the screen

; you can reserve one of the table 'slots' for that purpose

; Set this variable to 1 to enable this feature

ArrangeTables := 1

MoveActiveTable := 1

AnimateTableMoves := 1

; Set these two variables to specify the row and column that you want the active

; table to be moved to

ActiveTableSlotRow := 1

ActiveTableSlotCol := 1

; These two variables are currently not used - they are reserved for when we get true resizeable tables on Ongame

ActiveTableSlotsAcross :=1

ActiveTableSlotsDown := 1

; The script can automatically sit you back in if you time out - set this variable to enable that

AutomaticSitIn := 1

; AnimationSteps controls how fast and smooth tables are animated across screen - Higher values means smoother animation and more steps, but slower moves

AnimationSteps := 3

; =================================================================

; = Read values from INI file and then prompt user to change them

; =================================================================

inifile := "AutoOngameV6.ini"

FileGetSize, inipresent, %inifile%

if (ErrorLevel)

{

str := "[Defaults]`nTablesAcross=3`nTablesDown=2`nArrangeTables=1`nMoveActiveTable=1`nAnimateTableMoves=1`nActiveTableRow=1`nActiveTableCol=1"

FileAppend, %str%, %inifile%

}

else

{

IniRead, TablesAcross, %inifile%, Defaults, TablesAcross

IniRead, TablesDown, %inifile%, Defaults, TablesDown

IniRead, ArrangeTables, %inifile%, Defaults, ArrangeTables

IniRead, MoveActiveTable, %inifile%, Defaults, MoveActiveTable

IniRead, AnimateTableMoves, %inifile%, Defaults, AnimateTableMoves

IniRead, ActiveTableSlotRow, %inifile%, Defaults, ActiveTableSlotRow

IniRead, ActiveTableSlotCol, %inifile%, Defaults, ActiveTableSlotCol

IniRead, AnimationSteps, %inifile%, Defaults, AnimationSteps

IniRead, AutomaticSitIn, %inifile%, Defaults, AutomaticSitIn

}

Gui, Add, Text,, Tables across screen

Gui, Add, Edit

Gui, Add, UpDown, vTablesAcross Range1-10, %TablesAcross%

Gui, Add, Text,, Tables down screen

Gui, Add, Edit

Gui, Add, UpDown, vTablesDown Range1-10, %TablesDown%

Gui, Add, Checkbox, vArrangeTables, Enable Arrange Tables

Gui, Add, Checkbox, vMoveActiveTable, Move Active Table

Gui, Add, Checkbox, vAnimateTableMoves, Use Animated Table Moves

Gui, Add, Checkbox, vAutomaticSitIn, Automatically Sit Back In

;Gui, Add, Edit, vFirstName ym ; The ym option starts a new column of controls.

;Gui, Add, Edit, vLastName

Gui, Add, Button, default, OK ; The label ButtonOK (if it exists) will be run when the button is pressed.

GuiControl,,ArrangeTables,%ArrangeTables%

GuiControl,,MoveActiveTable,%MoveActiveTable%

GuiControl,,AnimateTableMoves,%AnimateTableMoves%

GuiControl,,AutomaticSitIn,%AutomaticSitIn%

Gui, Show,, Auto Ongame

return ; End of auto-execute section. The script is idle until the user does something.

GuiClose:

ButtonOK:

Gui, Submit ; Save the input from the user to each control's associated variable.

IniDelete, %inifile%, Defaults

IniWrite, %TablesAcross%, %inifile%, Defaults, TablesAcross

IniWrite, %TablesDown%, %inifile%, Defaults, TablesDown

IniWrite, %ArrangeTables%, %inifile%, Defaults, ArrangeTables

IniWrite, %MoveActiveTable%, %inifile%, Defaults, MoveActiveTable

IniWrite, %AnimateTableMoves%, %inifile%, Defaults, AnimateTableMoves

IniWrite, %ActiveTableSlotRow%, %inifile%, Defaults, ActiveTableSlotRow

IniWrite, %ActiveTableSlotCol%, %inifile%, Defaults, ActiveTableSlotCol

IniWrite, %AnimationSteps%, %inifile%, Defaults, AnimationSteps

IniWrite, %AutomaticSitIn%, %inifile%, Defaults, AutomaticSitIn

OutputDebug AnimationSteps = %AnimationSteps%

; =================================================================

maxTableSlots := tablesAcross * tablesDown

slotHeight := (A_ScreenHeight-30) // tablesDown

slotWidth := A_ScreenWidth // tablesAcross

GroupAdd, OnGameWindows, ahk_class AfxFrameOrView70u

IfWinNotExist, ahk_group OnGameWindows

WinWait, ahk_group OnGameWindows

; Calculate table positions

loop, %tablesDown%

{

row := A_index

loop, %tablesAcross%

{

col := A_Index

slot := ((row-1) * tablesAcross)+col



tableSlot%slot% := 0

if (MoveActiveTable != 0)

{

if ((col >= ActiveTableSlotCol) && (col ActiveTableSlotCol+ActiveTableSlotsAcross)

&&(row >= ActiveTableSlotRow) && (row ActiveTableSlotRow+ActiveTableSlotsDown))

{

tableSlot%slot% := -1

}

}



tableSlot_X%slot% := 1+(col-1)*slotWidth

tableSlot_Y%slot% := 1+(row-1)*slotHeight



OutputDebug Slot: %slot% =

OutputDebug % tableSlot%slot%

}

}

slot := ((ActiveTableSlotRow-1) * tablesAcross)+ActiveTableSlotCol

ActiveTable_X := tableSlot_X%slot%

ActiveTable_Y := tableSlot_Y%slot%

ActiveTable_H := slotHeight * ActiveTableSlotsDown

ActiveTable_W := slotWidth * ActiveTableSlotsAcross

ActiveSlot := 0

AutoTableActive=1

loop

{

WinGet, OpenTables, List, ahk_group OnGameWindows

tableNumber := 0

loop, %OpenTables%

{

tableNumber += 1

if (AutoTableActive = 1)

{

this_id := OpenTables%A_Index%

; This check is to filter out the lobby

ControlGet ChatEditFldVisible,Visible,,RichEdit20W1,ahk_id %this_id%

ControlGet Edit1Visible,Visible,,Edit1,ahk_id %this_id%

ControlGet LobbyLogo,Visible,,AfxWnd70u4,ahk_id %this_id%

ControlGet TableSizeButtonVisible,Visible,,Button5,ahk_id %this_id%

; WinGetTitle, Title, ahk_id %this_id%

; OutputDebug Found Ongame Window %Title% Edit1=%Edit1Visible% LobbyLogo=%LobbyLogo% TableSizeButtonVisible=%TableSizeButtonVisible% - ChatVisible=%ChatEditFldVisible%

if ((ChatEditFldVisible = 1) && (TableSizeButtonVisible =1) && (Edit1Visible != 1) && (LobbyLogo != 1))

{

slot := FindTableSlot(this_id)

ControlGet FoldButtonVisible,Visible,,Button29,ahk_id %this_id%

if (FoldButtonVisible = 1)

{

; OutputDebug Fold Button is Visible

IfWinNotActive, ahk_id %this_id%

{

; OutputDebug Make window in slot : %slot% Active

WinActivate, ahk_id %this_id%

}

if (MoveActiveTable != 0)

{

; OutputDebug Move previous active Window back to its slot : %ActiveSlot%

; Move the previous active window back

if (slot != ActiveSlot)

AnimatedMove(tableSlot%ActiveSlot%,tableSlot_X%ActiveSlot%,tableSlot_Y%ActiveSlot%,slotWidth,slotheight)

; Now Move the Active window in place

AnimatedMove(this_id,ActiveTable_X,ActiveTable_Y,ActiveTable_W,ActiveTable_H)

}

ActiveSlot := slot

; OutputDebug New Active Slot is : %ActiveSlot%

; OutputDebug Wait for action

loop

{

ControlGet FoldButtonVisible,Visible,,Button29,ahk_id %this_id%

if (FoldButtonVisible = 0)

break

sleep, 100

}

; OutputDebug Player Acted

}

else

{

ControlGet SitInButtonVisible,Visible,,Button6,ahk_id %this_id%

if ((SitInButtonVisible == 1) && (AutomaticSitIn))

{

ControlClick, Button6,ahk_id %this_id%

}

else

{

ControlGet ImBackButtonVisible,Visible,,Button8,ahk_id %this_id%

if ((ImBackButtonVisible == 1) && (AutomaticSitIn))

{

ControlClick, Button8,ahk_id %this_id%

}

}

; if (MoveActiveTable == 0) ; Make sure the Inactive window is in place

}

}

Sleep, 50

}

}

sleep, 100

}

AnimatedMove(WinId,X,Y,W,H)

{

global

WinGetTitle, Title, ahk_id %this_id%

; OutputDebug Move table : %title%

if (ArrangeTables == 0)

return

WinGetPos, curX, curY, curW, curH, ahk_id %WinId%

if ((curX = X) && (curY = Y))

return

; Ongame tables dont resize so leave the size for now

steps := 1

W := curW

H := curH

if (AnimateTableMoves != 0)

{

; OutputDebug Move from : %curX%,%curY%

; OutputDebug Move to: %X%,%Y%

; OutputDebug AnimationSteps = %AnimationSteps%

steps := AnimationSteps

OutputDebug Move in %steps% Steps

deltaX := (curX-X) / steps

deltaY := (curY-Y) / steps

deltaW := (curW-W) / steps

deltaH := (curH-H) / steps

steps -= 1

Loop, %steps%

{

curX -= deltaX

curY -= deltaY

curW -= deltaW

curH -= deltaH

WinMove ahk_id %WinId%,,%curX%,%curY%,%curW%,%curH%

}

}

WinMove ahk_id %WinId%,,%X%,%Y%,%W%,%H%

}

FindTableSlot(winId)

{

global

Loop, %maxTableSlots%

{

if (tableSlot%A_Index% = winId)

{

return %A_Index%

}

}

; No Active slot for window found

; Look for closed Windows

; Outputdebug Looking for closed windows

Loop, %maxTableSlots%

{

if ((tableSlot%A_Index% != -1) && (tableSlot%A_Index% != 0))

{

id := tableSlot%A_Index%

IfWinNotExist, ahk_id %id%

{

tableSlot%A_Index% := 0

}

}

}



Loop, %maxTableSlots%

{

if (tableSlot%A_Index% = 0)

{

tableSlot%A_Index% := winId

; OutputDebug New Table placed in slot %A_Index%

AnimatedMove(winId,tableSlot_X%A_Index%,tableSlot_Y%A_Index%,slotWidth,slotheight)

return %A_Index%

}

}

return 0

}

#h::

AutoTableActive:=1-AutoTableActive

if (AutoTableActive = 1)

TrayTip, Auto Ongame, Active

else

TrayTip, Auto Ongame, Inactive

SetTimer, RemoveToolTip, 1500

return

RemoveToolTip:

SetTimer, RemoveToolTip, Off

TrayTip

return

recargar

Cita:
; Disable disappearing tables on the Ongame network and don't sit out to reload

; v1.0 by bluffingguus (01-05-2008)

;

; WARNING: This script modifies the behaviour of Ongame software in some circumstances.

; The cashier button was not originally meant to be enabled when not sitting out.

; DO NOT press the cashier button when it's your turn, because you will not be able click your buttons after that.

;

; Of course the usage of this script is at your own risk.

;

; Open one Ongame table and press F11 to start the script. It should be automatically enabled on all other Ongame tables you open. Sit out will become active

; once you're dealt in the first time, but will disable again when you click the table.

;

; You can't reload when you have cards, the buttons are active, but it just doesn't work. Further, after you reload, you can hit cancel to return, or just leave

; it, because it will return to normal, once you're dealt cards or buttons appear.

;

; Hold down F12 at a table to restore the buttons (hold it down until all buttons are as they should be).

;

; When you press the left control key, the field where you can enter the amount to raise becomes active and empty (normally sometimes the chat is the active field)

~F11::

IfWinActive, ahk_class AfxFrameOrView70u

{

Loop ; the loop is here to prevent Ongame software from changing the states back (i.e. when you have reloaded)

{

Control, Disable, , Button7, ahk_class AfxFrameOrView70u ; disable sit out

Control, Disable, , Button9, ahk_class AfxFrameOrView70u ; disable leave

Control, Enable, , Button10, ahk_class AfxFrameOrView70u ; enable cashier

GetKeyState, state, F12

if state = D ; F12 is pressed so break out of the loop.

break

}

}

return

~F12::

IfWinActive, ahk_class AfxFrameOrView70u

{

Control, Enable, , Button7, ahk_class AfxFrameOrView70u ; enable sit out

Control, Enable, , Button9, ahk_class AfxFrameOrView70u ; enable leave

Control, Disable, , Button10, ahk_class AfxFrameOrView70u ; disable cashier

}

return

~LControl::

IfWinActive, ahk_class AfxFrameOrView70u

{

ControlFocus, RichEdit20W3, ahk_class AfxFrameOrView70u ; focus on the amount input field

ControlSetText, RichEdit20W3, , ahk_class AfxFrameOrView70u ; clear it

}

07/06/2008 15:29
Re: Scripts OnGame

¿Podrías explicar cómo funcionan y que hacen?

18/06/2008 18:09
Re: Scripts OnGame

Sandro al configurar el tablenavigator como dices me pone el siguiente error:

El archivo que edito quedo así:

Cita:

lobbyPokerLoco() {

SetTitleMatchMode 1

WinGet, id, id, PokerLoco - Welcome

return id

}

tablesPokerLoco(lobby) {

SetTitleMatchMode 2

WinGet, pid, PID, ahk_id%lobby%

WinGet, list, list, [ID= ahk_pid%pid%

Loop % list

tables := list%a_index%!=lobby

? addToList(tables, list%a_index%)

: tables

return tables

}

GameTypePokerLoco(id) {

title := WinGetTitle(id)

If InStr(title, "No-limit Texas Hold'em")

return "NL Ring"

else if InStr(title, ", Texas Hold'em")

return "Limit"

}

FoldPokerLoco(id) {

str_list = Button24|Button42|Button26|Button41

match_list = 3|3|3|3

clickList(str_list,match_list, id)

}

CallPokerLoco(id) {

str_list = Button24|Button25|Button43

match_list =3|3|3

clickList(str_list,match_list, id)

}

RaisePokerLoco(id) {

str_list = Button45|Button23|Button27

match_list = 3|3|3

clickList(str_list,match_list, id)

}

RaiseAnyPokerLoco(id) {

local game_Type,str_list,match_list

game_type := GameType(id)

casino := Casino(id)

If IsIn(game_type,"NL Ring,NL Tourney") {

ControlFocus, AfxWnd70u45, ahk_id%id%

SendInput {WheelUp}

return

}

str_list = Button46

match_list = 3

clickList(str_list,match_list, id)

RaisePokerLoco(id)

}

ClearBetBoxPokerLoco(id) {

WinActivate, ahk_id%id%

ControlSetText, RichEdit20W1,, ahk_id%id%

ControlFocus, RichEdit20W1, ahk_id%id%

}

PostPokerLoco(id) {

}

WaitToPostPokerLoco(id) {

str_list = Button19

match_list = 3

clickList(str_list,match_list, id)

}

DontPostPokerLoco(id) {

}

FoldToAnyBetPokerLoco(id) {

}

IsTableWaitingPokerLoco(id) {

}

IsTableWaitingExPokerLoco(id) {

}

18/06/2008 23:47
Re: Scripts OnGame

lobbyPokerLoco() {

SetTitleMatchMode 1

WinGet, id, id, PokerLoco - Welcome

return id

}

Creo que ahí esta el error. En esa línea es en la única en la que no hay que poner el nombre del archivo (que en tu caso debería llamarse PokerLoco.ahk para que funcione) si no el título de la ventana principal del lobby de Poker Loco.

En el título vendrá algo del estilo:

Poker Loco (quizás separado por un espacio) xxx - Welcome

Así es como debe figurar en el script.

Ya me cuentas que tal.

Un saludo.

19/06/2008 00:34
Re: Scripts OnGame

Te cuento xD

19/06/2008 00:42
Re: Scripts OnGame

¿El archivo que has guardado en la carpeta de casinos del TableNavigator se llama PokerLoco.ahk?

19/06/2008 00:43
Re: Scripts OnGame

Si, tal cual.

19/06/2008 00:52
Re: Scripts OnGame

Creo que ya se lo que es.

Borra el .ahk del nombre de archivo y prueba.

19/06/2008 00:53
Re: Scripts OnGame

Biiingoo!!!! Gracias 😉

19/06/2008 00:58
Re: Scripts OnGame

Claro tío, tú archivo se llamaba PokerLoco.ahk.ahk porque tienes activa la opción de windows de ocultar formatos de archivos conocidos...

Venga anda, un saludo.

19/06/2008 01:01
Re: Scripts OnGame

Te daría reputación pero no me deja :P

19/06/2008 01:07
Re: Scripts OnGame

¿Qué dices? Ahora tengo 69. Está perfecta. :P

Por cierto, he visto en tu blog que utilizas estos scripts. ¿También utilizas el layout de mi página? ¿Qué te parece?

19/06/2008 01:16
Re: Scripts OnGame

El layout que estoy usando lo pusiste en un topic en el foro, esta perfecto, el unico dato que hecho en falta es el raise flop, pero como nose meterlo en el bloque de estadisticas me las apaño sin él jajaja

09/07/2008 01:25
Re: Scripts OnGame

Otro útil script para OnGame, en este caso os servirá para desactivar los botones de "Sit Out" y "Leave" y así evitar pulsaciones involuntarias que cierren la mesa en cuestión.

También activará el botón "Add Chips" para poder recargar en cualquier momento (excepto cuando tengamos cartas en la mano) sin necesidad de estar sit out.

Para utilizarlo tan sólo debéis descargarlo y una vez abierto, tan pronto como estéis en una mesa, pulsad F11 para activarlo y funcionará automáticamente en el resto de mesas. Para desactivarlo, bastará con mantener pulsado F12 un instante en cualquier mesa mientras se desactiva.

Podéis descargarlo aquí:

OnGame NoSitOut

16/08/2008 13:37
Re: Scripts OnGame

Hola

Acabo de empezar a jugar en Tower y buscando info en el foro he encontrado esto, pero sinceramente no tengo ni idea de como usarlo, me podeis echar una mano?

Un saludo y gracias de antemano

17/08/2008 04:26
Re: Scripts OnGame

Son scripts, agarras todo el montón de comandos del que cumpla la función que más te interesa, le das copy/paste en el bloque de notas (notepad) y te aseguras que en vez de guardarlo con la extensión .txt, lo salves con la extensión .ahk.

Te bajas un programa llamado Autohotkey desde aquí, lo instalas, le das doble click al script que guardaste antes y listo.

Slds.

18/08/2008 21:06
Re: Scripts OnGame

Gracias Panamanian

05/09/2008 11:10
Re: Scripts OnGame

Comentar que el ongame betpot se ha actualizado bastante las ultimas semanas y trae unas mejores muy importantes, a mi las que mas me estan ayudando son estas:

1. Planner ahora guarda la situacion de las mesas predefinida.

2. Autojoin, abro la mesa, me pongo en lista y la cierro, al aparecer la mesa de cuando ha llegado mi turno me sienta y recarga el stack. Tb al abrir una mesa con 9 jugadores me sienta automatico.

3. F1 reload, hace todo el proceso de reload en tiempo record, puedo hacer fold en la misma mano en la que he entrado para antes del reparto de la siguiente mano tener mi stack recargado.

Tiene otras muchas funciones como pot odds y % en la mesa y más cosas interesantes, pero estas son las mas utiles para poder jugar muchas mesas comodo.

11/04/2012 09:10
Re: Scripts OnGame

Alguien tiene el ahk de para sentarse automaticamente? autoseat! graicas!

Responder

¿Quieres participar?

Inicia sesión o crea tu cuenta gratis para formar parte de la comunidad de Poker-Red.