SphereCommunity
Texas Hold'em Poker - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Requests (/Forum-Script-Requests)
+--- Thread: Texas Hold'em Poker (/Thread-Texas-Hold-em-Poker)

Pages: 1 2 3


Texas Hold'em Poker - RanXerox - 07-11-2012 12:21 PM

Attached are a set of BETA scripts for a Texas Hold'em poker game... The basic system seems to be working, but I need a lot more people to use it and tell me about the bugs so I can fix them. When you submit a bug report, make sure you include the logging!

Here are some notes:

Quote:A running poker game is based on a specific in-game card ITEMDEF.
The state of the game is entirely stored as TAGs on this object and
in server VAR and LIST arrays related to that item by it's UID.
The game loop is based on the TIMER for the card item. To start a
game, just create the item and double-click it to join:

.add i_cards_poker

DEPENDENCIES:

This system depends on some generic functions, uncomment them at
the end of this file if you don't have them already in another
script. Specifically they are:

f_sizeof
f_getargv
f_clearglobals
f_ListToString

URGENT IMPROVEMENTS:

- FIX CUSTOM BETTING (currently commented out)
- PLAY TIMER (show countdown timer above the cards every 10 or 20 seconds)
- force a fold if players don't play in time (currently if a player chooses not to play, the game is stuck indefinitely)
- Implement proper 'who scores first' logic
- Implement side-pot calculations (currently there is no side-pot)

LONG TERM IMPROVEMENTS:

- unicode poker symbols (currently using letters for suits)
- add disclaimer click-through
- let table owner modify table limits
- player limits (currently 2-8)
- blind limits (currently 50/100)
- buyin amount (currently 5000-10000)
- the code has a 8 player max assumption (could be 10)
- allow for multiple table owners
- dynamic dialog element positions instead of DEFNAME based (i.e. origin)
- allow players to play simultaneous games (currently only one allowed)
- alternate table layouts
- tournament play (blinds increase over time)
- improved messages
- individual card names
- flop names
- hand names

LICENSE:

Most source code should be Free!
Code I have lawful authority over is and shall be!
Copyleft : This software is licensed under the GNU General Public
License (version 2), and as such comes with NO WARRANTY. Please
consult the Free Software Foundation (http://FSF.Org) for
important information about your freedom.

Here is a screenshot:

[Image: Poker.png?1341106984]

Updates:
07-11-2012 08:12 AM - Fixes for "f_getargv" bug.
07-14-2012, 01:10 PM - Fixes for "pot raise" bug.
07-14-2012, 02:15 PM - Fixes for "pot raise" bug (again).
07-15-2012, 03:42 PM - Other betting logic repairs.


RE: Texas Hold'em Poker - Alias - 07-11-2012 09:23 PM

Didnt work for me got error when poker start --> :ERROR:(Poker_CardFunctions.scp,48)Can't resolve <getargv 6 A,K,Q,J,T,9,8,7,6,5,4,3,2>


RE: Texas Hold'em Poker - RanXerox - 07-12-2012 12:12 AM

I replaced all occurrences of getargv with f_getargv in the Poker_CardFunctions.scp file... you can do the same or you can download the new zip.


RE: Texas Hold'em Poker - Alias - 07-12-2012 12:28 AM

(07-12-2012 12:12 AM)RanXerox Wrote:  I replaced all occurrences of getargv with f_getargv in the Poker_CardFunctions.scp file... you can do the same or you can download the new zip.
Ok ty i will try when i will be home


RE: Texas Hold'em Poker - Alias - 07-12-2012 09:59 PM

Found bug, keep Pot Raising , even if you dont have money you still be able to raise pot ... here pic becouse my english isnt so good Big Grin
[Image: dqrykhgiyw34p4tyl1.jpg]


RE: Texas Hold'em Poker - RanXerox - 07-12-2012 11:14 PM

LOL, ok I will fix that later today. thanks for your help.


RE: Texas Hold'em Poker - Alias - 07-13-2012 12:15 AM

(07-12-2012 11:14 PM)RanXerox Wrote:  LOL, ok I will fix that later today. thanks for your help.
np Veryhappy


RE: Texas Hold'em Poker - RanXerox - 07-15-2012 05:17 AM

I updated the zip file... the fix for this required fairly significant changes so you need to stop all running poker games, delete all existing i_cards_poker items, replace all the changed scp files, then resync.


RE: Texas Hold'em Poker - Skul - 07-15-2012 07:55 AM

Just a suggestion, have you tried making a script to halt all poker games and delete all i_cards_poker? Maybe to make it easier for anyone updating as you progress this script?


RE: Texas Hold'em Poker - RanXerox - 07-15-2012 08:03 AM

Good idea... especially since there will be another patch coming soon because my previous one didn't solve all the over-betting problems ;-)