Page 1 of 1
Release: Poker Table
Posted: Fri Apr 03, 2009 10:07 pm
by *Edwards
[Under construction]
Well, my actual project for a shard is definitively dead. But I got bored this weekend and went to the conclusion that I could transform my lazyness into some kind of great new feature for POL ( if not already built for any other private pol shard ). I know RunUO has it on atleast their main shards and shall now be available for POL soon!
I'm starting it right now so if you got any special feature requests for a poker table post it here. ( achievments, ranking, term of use, ... anything else? ).
If you believe it's a really bad idea you can also comment here. Oh and if you already made the game working for your own shard just warn me so I'm not losing my time

and then SHARE IT!
See ya soon!
damn I'm going to add the beer license in-game

Re: Release: Poker Table
Posted: Fri Apr 03, 2009 10:46 pm
by OldnGrey
The WoD scripts has several games on it, all very simple - place a bet and lose when your cards don't work out.
What sort of features does the RunUO version have?
Re: Release: Poker Table
Posted: Sat Apr 04, 2009 12:59 am
by *Edwards
I'm talking about an automated multiplayer poker table that you can play against reel players. I once dreamed to get the time to build it and then I saw it on the main RunUO shard. Not really a feature since I don't think admin will take it for the distro but atleast it will be a small addon if you ever wanted your players playing poker on your shard.

. I started it few hours ago already and it's going well for now. It is not blackjack in WoD?
Re: Release: Poker Table
Posted: Sat Apr 04, 2009 3:49 am
by OldnGrey
WoD has the chessboard and pieces (gumps). No multiplayer games with enforced rules though.
The RunUO chess game is brilliant though.
Re: Release: Poker Table
Posted: Tue Apr 07, 2009 11:12 am
by Pierce
*Edwards wrote:
Oh and if you already made the game working for your own shard just warn me so I'm not losing my time

and then SHARE IT!
I've written such a script nearly 2 years ago. I never looked at it until now cause our players are not very good in describing bugs or testing

and it's hard to find all running 3 or more clients on your own
The main things should work but it surely will contain bugs cause poker isn't that easy to script. The script isn't optimized yet nor does it contain all features it should cause i first wanted to get it to work completly and then add more options/features.
To use this script you'll have to patch the bitmaps i drawed into the gumpart.mul and art.mul cause the script uses them.
To play there must be of course at least 2 Players and they must have 500 gp in their backpacks. To start the game someone has to press the gump button with the people on it. To update one has to press the update button (the one with the parchment roll on it). The X button leaves the game if you are not in the middle of the game.
If i forgot something, tell me

Re: Release: Poker Table
Posted: Tue Apr 07, 2009 11:27 am
by *Edwards
Alright, let me re-organize these functions tonight and re-optimize the codes... Maybe next weekend I'll release it.
Thank you Pierce!
Re: Release: Poker Table
Posted: Tue Apr 07, 2009 5:38 pm
by *Edwards
Well, I might consider to use your system and fix it so it works with datafile, without bugs and with 10 places without using any special gumps or arts that complicate for anyone who would like to use it. Thanks a lot for distributing this. If you see any problems feel free to stop me.

Re: Release: Poker Table
Posted: Thu Apr 16, 2009 12:32 pm
by Pierce
You're welcome. I usually don't stop people to do anything they want

Re: Release: Poker Table
Posted: Wed Apr 22, 2009 10:33 am
by Grem
How path files? What programs are necessary? Or where to download ready to look?
Update: find! mulEditor. *ok* *test script*
Re: Release: Poker Table
Posted: Wed Apr 22, 2009 2:52 pm
by *Edwards
Hehe as Pierce said ''poker isn't that easy to script'' but I am still on it in the weekends. The next steps before being completed:
- separate the flop/turn/river
- get money a variable

. Right now I can check, bet, raise or calls but there is no money on the table...
- define the winning hands
- and release!
Requirments: gump package distro097, pol097, client v.4
Re: Release: Poker Table
Posted: Fri Apr 24, 2009 12:40 pm
by Pierce
@grem:
How path files? What programs are necessary? Or where to download ready to look?
If you mean my version. I suggest mulpatcher to add the pics to the .mul files. It's very simple and I named the pics where they belong as gump id or art id. There shouldn't be a conflict with original EA numbers.
Mulpatcher you can find here:
http://varan.uodev.de/
Re: Release: Poker Table
Posted: Fri Apr 24, 2009 11:45 pm
by Turley
Pierce wrote:
I suggest mulpatcher to add the pics to the .mul files.
tztztz
Re: Release: Poker Table
Posted: Sat Apr 25, 2009 2:39 am
by Pierce
Re: Release: Poker Table
Posted: Sat Apr 25, 2009 9:08 am
by Turley
Re: Release: Poker Table
Posted: Sat Apr 25, 2009 9:15 am
by MuadDib
Dang skippy you recommend UOF. Best product on the market today for working with client files.

Re: Release: Poker Table
Posted: Sat Apr 25, 2009 4:10 pm
by *Edwards
Damn Pierce, winning hands are shame to script!!! I don't even see all the logic behind this... I could create tons of "if" statement but it wouldn't help anyone at all. Anyways....
Notice to Pierce if you ever read this again: I tested it with my system and I get errors few times. I'm just not sure of the answer.
If anyone helps I will of course appreciate but I just posted the references to my situation...
I'm actually stuck... lol and out of beers!
Code: Select all
function ValidateCards( data_elem, player_cards )
//Main Hand
var check_royalFlush := 0,
check_straightFlush := 0,
check_fourOfAKind := 0,
check_fullHouse := 0,
check_flush := 0,
check_straight := 0,
check_treeOfAKind := 0,
check_twoPairs := 0,
check_pair := 0,
check_highCard;
//The cards
var first_card := data_elem.GetProp( "TCard1" ),
second_card := data_elem.GetProp( "TCard2" ),
third_cards := data_elem.GetProp( "TCard3" ),
fourth_card := data_elem.GetProp( "TCard4" ),
fifth_card := data_elem.GetProp( "TCard5" ),
playerCard1 := player_cards[1],
playerCard2 := player_cards[2];
//Right now I'm testing with all the 7cards on the table for each players. I might fix later to read
//the process flop-turn & || river to append in var the_cards
var the_cards := {first_card, second_card, third_cards, fourth_card, fifth_card, playerCard1, playerCard2};
var clubs := 0,
diamonds := 0,
hearts := 0,
spades := 0;
foreach card in the_cards
if( card[1] == "clubs" )
clubs += 1;
if( clubs >= 5 )
check_flush := 1;
break;
endif
elseif( card[1] == "diamonds" )
diamonds += 1;
if( diamonds >= 5 )
check_flush := 1;
break;
endif
elseif( card[1] == "hearts" )
hearts += 1;
if( hearts >= 5 )
check_flush := 1;
break;
endif
elseif( card[1] == "spades" )
spades += 1;
if( spades >= 5 )
check_flush := 1;
break;
endif
endif
SleepMS(2);
endforeach
var cardValue := array{},
i;
for( i:=1; i<=the_cards.Size(); i+=1 )
var tempCard := the_cards[i],
the_card := tempCard[2];
cardValue.Append( the_card );
SleepMS(2);
endfor
//stuff to identify Straight, HighCard, Pairs, here...
if( check_royalFlush )
Broadcast( "check_royalFlush oh and by the way YOU SUCK! ..." ); //To be removed
return 1;
elseif( check_straightFlush )
Broadcast( "check_straightFlush" );
return 1;
elseif( check_fourOfAKind )
Broadcast( "check_fourOfAKind" );
return 1;
elseif( check_fullHouse )
Broadcast( "check_fullHouse" );
return 1;
elseif( check_flush )
Broadcast( "check_flush" );
return 1;
elseif( check_straight )
Broadcast( "check_straight" );
return 1;
elseif( check_treeOfAKind )
Broadcast( "check_treeOfAKind" );
return 1;
elseif( check_twoPairs )
Broadcast( "check_twoPairs" );
return 1;
elseif( check_pair )
Broadcast( "check_pair" );
return 1;
else
Broadcast( "check_highCard" );
return 1;
endif
return 1;
endfunction
Data_elem is the reference to the datafile pokertable element ( You can use different poker tables with different settings ).
Property of each TableCards & PlayersCards are array. First param is the string color name ( clubs, diamonds, hearts, spades ) and the second param is the card value ( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, J, Q ,K , A ).
Re: Release: Poker Table
Posted: Sun Apr 26, 2009 8:07 am
by CWO
What errors are you getting?
There is no such card as 1.. The ace is 1 and 13...
We can all work together on code changes here
http://www.cwo333.com/pastebin/index.php?show=52
just submit the changes and post the new link here.
Re: Release: Poker Table
Posted: Sun Apr 26, 2009 8:29 am
by *Edwards
I posted a code that I barely understand from Pierce's pkg. It's supose to determine pair, 2pairs, 3of a kind, 4for of a kind, fullhouse. If you want to test on a live shard you can work with the var cardValue := array{}. Set as many cards you want inside this array and call it after the for loop who uses it.
Ex.: cardValue := { 2, 4, 4, 2, 7. 8, 8, A, A, A J, Q};
http://www.cwo333.com/pastebin/index.php?show=53
The code itself seems to work but only a few times. I mean, sometimes he won't read anything from the cardValue. He should tells 2 pairs but finally he didn't found anything...
Re: Release: Poker Table
Posted: Sun Apr 26, 2009 10:17 am
by CWO
http://www.cwo333.com/pastebin/index.php?show=61
hopefully its kinda easy...
the main things to know here:
variable besthand contains the constant number for the best combination of that player's hand.
If (player1's besthand > player2's besthand)
player 1 wins.
end
now in ties of best hand the variable handvalues which is an array comes in.
Code: Select all
if (player1's besthand == player2's besthand)
if (player1's handvalues[1] > player2's handvalues[1])
player 1 wins
endif
if (player1's handvalues[1] == player2's handvalues[1])
evaluate if handvalues[2] is different.
then handvalues[3] and so on...
until handvalues == 0. In this case, its a complete tie.
endif
endif
Re: Release: Poker Table
Posted: Wed Aug 19, 2009 9:49 am
by Grem
no new versions ?
Re: Release: Poker Table
Posted: Fri Sep 11, 2009 7:30 pm
by Daichi
i would love new versions

Re: Release: Poker Table
Posted: Sat Aug 14, 2010 6:59 pm
by Joram
Hello,
Is this project died? please i need more info. Thanks