View Single Post
  #1617  
Old 10-14-2007, 07:50 AM
abvhi abvhi is offline
Junior Member
 
Join Date: Oct 2007
Posts: 19
Default Re: Stars problem

Fix for stars problem:
The latest stars update changed the title text on the window which causes the BB size to be miscalculated. There is now a space missing after the Blinds, ie "- No Limit Holdem - Blinds 10/20- Logged in as User". I'm guessing their programmer made a typo.

Pot() Fix:
This is changing the entire way GetBBStars() works, dave had it forced to NL ring type... I am not sure why but I'm guessing it was some sort of BUG FIX. This could technically break all of your betpot script in things not nl holdem sngs/tourneys, I have not tested this thoroughly. We'll have to wait till dave responds.

Find your GetBBStars() function and change it from:
<font class="small">Code:</font><hr /><pre>GetBBStars(id, game_type) {
WinGetTitle, title, ahk_id%id%
game_type = NL Ring
If (game_type = "NL Ring")
return StrRep(StrMid(title,"/",a_space), "$")
else if (game_type = "NL Tourney")
return StrRep(StrMid(title,"/",a_space,InStr(title," - Blinds")),"$")
}</pre><hr />
to
<font class="small">Code:</font><hr /><pre>GetBBStars(id, game_type) {
WinGetTitle, title, ahk_id%id%
If (game_type = "NL Ring")
return StrRep(StrMid(title,"/",a_space), "$")
else if (game_type = "NL Tourney")
return StrRep(StrMid(title,"/","-",InStr(title," - Blinds")),"$")
}</pre><hr />

AlterAmount() fix method #1:
Change the following in the AlterAmount() function (near line 250 or so).

<font class="small">Code:</font><hr /><pre> IfWinExist, ahk_id%id% ahk_group StarsTables
{
If ((InStr(title, "No Limit") OR InStr(title, "Pot Limit")) AND InStr(title, "Tournament") = 0)
{
StringMid, bb, title, InStr(title, "/") + 1, InStr(title, a_space,"", InStr(title, "/")) - InStr(title, "/") - 1
}
else if (InStr(title, "No Limit") &lt;&gt; 0 AND InStr(title, "Tournament") &lt;&gt; 0)
{
StringMid, bb, title, InStr(title, "/", "", InStr(title, "Blinds")) + 1, InStr(title, a_space, "", InStr(title, "Blinds") + 8) - InStr(title, "/", "", InStr(title, "Blinds")) - 1 ;___so we retrieve the big blind instead
}
</pre><hr />
to
<font class="small">Code:</font><hr /><pre> IfWinExist, ahk_id%id% ahk_group StarsTables
{
If ((InStr(title, "No Limit") OR InStr(title, "Pot Limit")) AND InStr(title, "Tournament") = 0)
{
StringMid, bb, title, InStr(title, "/") + 1, InStr(title, a_space,"", InStr(title, "/")) - InStr(title, "/") - 1
}
else if (InStr(title, "No Limit") &lt;&gt; 0 AND InStr(title, "Tournament") &lt;&gt; 0)
{
StringMid, bb, title, InStr(title, "/", "", InStr(title, "Blinds")) + 1, InStr(title, "-", "", InStr(title, "Blinds") + 8) - InStr(title, "/", "", InStr(title, "Blinds")) - 1 ;___so we retrieve the big blind instead
}</pre><hr />

You're really just changing a_space to "-" in the tourney/sng title matching line..

This blind calculation code may be used elsewhere and need to be fixed there also. It should be easy to fix wherever though.

AlterAmount() fix method #2:
Again near Line 253, change:
<font class="small">Code:</font><hr /><pre> IfWinExist, ahk_id%id% ahk_group StarsTables
{
If ((InStr(title, "No Limit") OR InStr(title, "Pot Limit")) AND InStr(title, "Tournament") = 0)
{
StringMid, bb, title, InStr(title, "/") + 1, InStr(title, a_space,"", InStr(title, "/")) - InStr(title, "/") - 1
}
else if (InStr(title, "No Limit") &lt;&gt; 0 AND InStr(title, "Tournament") &lt;&gt; 0)
{
StringMid, bb, title, InStr(title, "/", "", InStr(title, "Blinds")) + 1, InStr(title, a_space, "", InStr(title, "Blinds") + 8) - InStr(title, "/", "", InStr(title, "Blinds")) - 1 ;___so we retrieve the big blind instead
}
}</pre><hr />
to
<font class="small">Code:</font><hr /><pre> IfWinExist, ahk_id%id% ahk_group StarsTables
{
If ((InStr(title, "No Limit") OR InStr(title, "Pot Limit")) AND InStr(title, "Tournament") = 0)
{
StringMid, bb, title, InStr(title, "/") + 1, InStr(title, a_space,"", InStr(title, "/")) - InStr(title, "/") - 1
}
else if (InStr(title, "No Limit") &lt;&gt; 0 AND InStr(title, "Tournament") &lt;&gt; 0)
{
StringMid, bb, title, InStr(title, "/", "", InStr(title, "Blinds")) + 1, InStr(title, a_space, "", InStr(title, "Blinds") + 8) - InStr(title, "/", "", InStr(title, "Blinds")) - 1 ;___so we retrieve the big blind instead
}
If (Instr(bb, "-"))
StringTrimRight, bb, bb, 1
}</pre><hr />
Pay special attention to the curly braces. You want the "Instr" code in the StarsTables section still.

I'm using both AlterAmount fixes with no ill effects, but only 1 should be necessary.

I have only tested this code on $2 SnG's and $5 headsups. I am not sure if or how this would affect other games such as omaha or other weird tourney formats.

Use at your own risk and test first. Please especially test your game/format at lower limits b4 highstakes.

Thanks to dave for the fn awesome software.
Reply With Quote