Results 1 to 4 of 4

Thread: MMG - Taking Bets Issue

  1. #1

    Default MMG - Taking Bets Issue

    Sorry guys, I know KoL hates the MMG... But...

    For years, the MMG code has been broken and unable to find bets to take. This is because several years ago, Jick (I assume) changed the text at the top of the page from "Last 20 Bets" to "Last 20 Fools and their Money."

    The result is that ASH function mmg_offered_bets() always returns an empty list. It's expected to return actual bets that exist.

    Here is a patch I've had sitting in my source tree for too long to justify not contributing it back.

    I have it just check for "Last 20" instead of bothering to change it to "Fools and their Money" because who knows if he'll change it again.

    I'm not sure what the actual procedure is for contributing code to KoLMafia, but I'm hoping someone with more experience will fold this in.

    Code:
    Index: net/sourceforge/kolmafia/session/MoneyMakingGameManager.java
    ===================================================================
    --- net/sourceforge/kolmafia/session/MoneyMakingGameManager.java	(revision 19133)
    +++ net/sourceforge/kolmafia/session/MoneyMakingGameManager.java	(working copy)
    @@ -56,7 +56,7 @@
     	private static final Pattern PENDING_BETS_PATTERN = Pattern.compile( "Your Pending Bets:.*?<table>(.*?)</table>" );
     	private static final Pattern MY_BET_PATTERN = Pattern.compile( "<tr>.*?([0123456789,]+) Meat.*?betid value='(\\d*)'.*?</tr>" );
     
    -	private static final Pattern RECENT_BETS_PATTERN = Pattern.compile( "(Last 20 Bets|Bets Found).*?<table.*?>(.*?)</table>" );
    +	private static final Pattern RECENT_BETS_PATTERN = Pattern.compile( "(Last 20|Bets Found).*?<table.*?>(.*?)</table>" );
     	private static final Pattern OFFERED_BET_PATTERN = Pattern.compile( "<tr>.*?showplayer.*?<b>(.*?)</b> \\(#(\\d*)\\).*?([0123456789,]+) Meat.*?whichbet value='(\\d*)'.*?</tr>" );
     
     	// Babycakes (#311877) took your 1,000 Meat bet, and you lost. Better luck next time.
    Last edited by PlasticLobster; 03-10-2019 at 01:02 AM. Reason: functions? it's one function.

  2. #2
    Senior Member zarqon's Avatar
    Join Date
    Nov 2007
    Location
    Seoul, Korea
    Posts
    3,641

    Default

    Maybe this is why people keep using my old Martingale script from a decade ago, even though Veracity put out a script that used the shiny new ASH functions and ostensibly obsoleted it. To my confusion, I still get notifications from people using it (or some renamed variant of it) nearly every day.
    Sig by JakAtk
    My scripts: Prefref Plus | Skillref Plus | One-Click Wossna | Om*****st (??) | Psychose-a-Matic | RandBot
    Combat suite: Best Between Battle | Mercenary Mood | SmartStasis | BatMan | BatMan RE
    For script authors: ASH Wiki | ZLib | BatBrain | CLI Links | Drag-n-Drop Inventories | CanAdv | Script Registry | Map Manager
    If you appreciate my work, help me become BAT KING OF THE WORLD! Thanks to all donators!

  3. #3
    Developer Veracity's Avatar
    Join Date
    Mar 2006
    Location
    The Unseelie Court
    Posts
    11,579

    Default

    Why not. Revision 19134

  4. #4

    Default

    Why not. Revision 19134
    Originally Posted by Veracity View Post
    Thanks, Veracity. Works great, I uh... hear.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •