Results 1 to 3 of 3

Thread: [Patch] mmg_take_bet cannot recognize wins

  1. #1
    Senior Member
    Join Date
    Apr 2018
    Posts
    133

    Default [Patch] mmg_take_bet cannot recognize wins

    Due to a change in the win message for the MMG, mmg_take_bet currently interprets all results as a loss. This is because it determines the outcome of a taken bet by doing a regex search for a substring (previously) specific to winning, and assumes a loss if it cannot find it. The current win message does not match the regex pattern used, so every outcome is thought to be a loss.

    I’ve fixed this by changing the regex pattern to recognize the new result text. I’ve tested it on both macOS and Ubuntu, and it works flawlessly. If this could be merged soon, I’d appreciate it.

    MMG_take.patch
    Last edited by Saklad5; 08-04-2018 at 11:32 PM.

  2. #2
    Developer
    Join Date
    Apr 2010
    Posts
    4,810

    Default

    Um, just took one of your bets (as it was lowest one to test), and got text recognised by the old regex but not yours:
    Code:
    <center><table><tr><td>You take the 200,000 bet from Saklad5.<center><table><tr><td><img src="/images/itemimages/meat.gif" height=30 width=30 alt="Meat"></td><td valign=center>You bet 200,000 Meat.</td></tr></table></center><br>You wipe cold sweat from your brow.  Nausea twists in your guts.  The game begins. &quot;The coin doesn't matter,&quot; says the old man. &quot;your stupid lizard brain will do what it has been programmed by evolution to do.&quot;<p>The coin is nonsense.  Fake, meaningless nonsense.  Stop doing this.<br><br>MEANINGLESS<center><table><tr><td><img src="/images/itemimages/meat.gif" height=30 width=30 alt="Meat"></td><td valign=center>You gain 399,600 Meat.</td></tr></table></center>
    That was out of Ronin, in Ronin I got:
    Code:
    <center><table  width=95%  cellspacing=0 cellpadding=0><tr><td style="color: white;" align=center bgcolor=blue><b>Results:</b></td></tr><tr><td style="padding: 5px; border: 1px solid blue;"><center><table><tr><td>You take the 400,000 bet from Saklad5. You look nervously at the wrinkled, decrepit old man, and he nods at you, indicating that Hagnk's has cleared you for an expenditure of 400,000 Meat.<br><br>You wipe cold sweat from your brow.  Nausea twists in your guts.  The game begins. &quot;The coin doesn't matter,&quot; says the old man. &quot;your stupid lizard brain will do what it has been programmed by evolution to do.&quot;<p>The coin is nonsense.  Fake, meaningless nonsense.  Stop doing this.<br><br>MEANINGLESS<br><br>&quot;Congratulations,&quot; says the old man. &quot;I'll pretend that this 799,200 Meat is worth being happy about.&quot;</td></tr></table></center>
    So perhaps only the In-Ronin message has changed.
    Last edited by Darzil; 08-05-2018 at 09:52 AM.

  3. #3
    Developer
    Join Date
    Apr 2010
    Posts
    4,810

    Default

    r18735 adds the new message for in Ronin, without removing the old. I really want to test to see if message is different when betting In Ronin with money in Ronin, but no one is better low enough for that.

    Ironically, as I never play the MMG, in my 8 tests, I only saw the win message !

Posting Permissions

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