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).
 
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.
 
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
2 of clubs, 3 of clubs, 4 of clubs, 5 of clubs, 6 of clubs, Jack of Clubs.

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:
		public static bool HasStraightFlush( List<Card> sortedCards, out List<Card> straightFlushCards )
		{
			straightFlushCards = new List<Card>();

			if ( sortedCards.Count < 5 )
				return false;

			List<Card> flushCards;

			if ( !HasFlush( sortedCards, out flushCards ) )
				return false;
			if ( HasStraight( flushCards, out straightFlushCards ) )
				return true;

			return false;
		}

Corrected code:
Code:
	    public static bool HasStraightFlush(List<Card> sortedCards, out List<Card> straightFlushCards)
	    {
	        straightFlushCards = new List<Card>();

	        if (sortedCards.Count < 5)
	            return false;

	        List<Card> flushCards;

	        if (!HasFlush(sortedCards, out flushCards))
	            return false;

	        var suit = flushCards[0].Suit;
	        flushCards = sortedCards.Where(x => x.Suit == suit).ToList();
	        flushCards.Sort();

	        if (HasStraight(flushCards, out straightFlushCards))
	            return true;

	        return false;
	    }

You must also insert the following using statement:
Code:
using System.Linq;
 
Last edited:
Back