1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Poker?

Discussion in 'General Discussion' started by +Qwerty, Apr 30, 2014.

  1. +Qwerty
    Offline

    +Qwerty Member

    Joined:
    Feb 22, 2014
    Messages:
    56
    Likes Received:
    4
    I was playing Destiny UO™ with some friends and he asked if I wanted to play poker. Out of curiosity I said,"sure." So we actually played a game of poker on UO, and I would like to know if anyone knows where to get the poker script(s).
     
  2. Milva
    Offline

    Admin Moderator

    Joined:
    Mar 3, 2013
    Messages:
    3,420
    Likes Received:
    385
    There was a Texas Hold script released on runuo in the past-their search is not working "again" but if you do a search online for Runuo Texas Hold script it should show up.
     
  3. jase giffin
    Offline

    jase giffin Active Member

    Joined:
    Sep 14, 2013
    Messages:
    253
    Likes Received:
    72

    Attached Files:

    • Two Thumbs Up Two Thumbs Up x 1
  4. +Qwerty
    Offline

    +Qwerty Member

    Joined:
    Feb 22, 2014
    Messages:
    56
    Likes Received:
    4
    Wow thanks guys
     
    • Like Like x 1
  5. Jack
    Offline

    Jack Active Member

    Joined:
    Sep 23, 2014
    Messages:
    160
    Likes Received:
    31
    Old post but I think Milt's Poker will always be popular so I will post a fairly major bugfix here.

    Problem:
    Milt's poker sees the following hand as a Flush, Jack High rather than a Straight Flush
    Solution:
    The problem stems from the fact that in order to determine a straight flush, Milt's poker first checks for a flush (correct), and then checks for a straight using the best 5 flush cards (incorrect).

    The solution is that a straight should be checked for using ALL cards of that suit rather than the best 5 cards of that suit.

    Original code (HandRanker.cs):
    Code (C#):
    1.  
    2.         public static bool HasStraightFlush( List<Card> sortedCards, out List<Card> straightFlushCards )
    3.         {
    4.             straightFlushCards = new List<Card>();
    5.  
    6.             if ( sortedCards.Count < 5 )
    7.                 return false;
    8.  
    9.             List<Card> flushCards;
    10.  
    11.             if ( !HasFlush( sortedCards, out flushCards ) )
    12.                 return false;
    13.             if ( HasStraight( flushCards, out straightFlushCards ) )
    14.                 return true;
    15.  
    16.             return false;
    17.         }
    18.  
    Corrected code:
    Code (C#):
    1.  
    2.         public static bool HasStraightFlush(List<Card> sortedCards, out List<Card> straightFlushCards)
    3.         {
    4.             straightFlushCards = new List<Card>();
    5.  
    6.             if (sortedCards.Count < 5)
    7.                 return false;
    8.  
    9.             List<Card> flushCards;
    10.  
    11.             if (!HasFlush(sortedCards, out flushCards))
    12.                 return false;
    13.  
    14.             var suit = flushCards[0].Suit;
    15.             flushCards = sortedCards.Where(x => x.Suit == suit).ToList();
    16.             flushCards.Sort();
    17.  
    18.             if (HasStraight(flushCards, out straightFlushCards))
    19.                 return true;
    20.  
    21.             return false;
    22.         }
    23.  
    You must also insert the following using statement:
    Code (C#):
    1.  
    2. using System.Linq;
    3.  
     
    #5 Jack, Apr 27, 2016
    Last edited: Apr 27, 2016
    • Two Thumbs Up Two Thumbs Up x 2
    • Like Like x 1
    • Helpful Helpful x 1
Similar Threads: Poker
Forum Title Date
Script Support Poker Game Scripts? May 25, 2017
General Discussion Poker game script from UOGAMERS Jul 8, 2016