Jump to content
  • 0

Request: Poker


gauze

Question


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  1
  • Reputation:   0
  • Joined:  06/05/12
  • Last Seen:  

It's possible to have a basic texas hold'em / 5 card draw game with betting system from players ? [sorry for my bad english]

Link to comment
Share on other sites

14 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  615
  • Reputation:   201
  • Joined:  11/09/11
  • Last Seen:  

Possible sure, anything is possible ;)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

You'll have to script an algorithm for best hand, which may prove difficult and time-consuming.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  615
  • Reputation:   201
  • Joined:  11/09/11
  • Last Seen:  

not to mention side bets... the other problem of course, is the ability to show the players their cards... BMP's aren't very useful here, since you can only show one at a time... so you would have to have an image for every possible combination... (lots o images... hooray!) and text based games, just aren't very fun...

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

not to mention side bets... the other problem of course, is the ability to show the players their cards... BMP's aren't very useful here, since you can only show one at a time... so you would have to have an image for every possible combination... (lots o images... hooray!) and text based games, just aren't very fun...

suggestion : create cutin that show multiple card / single card... it would be nicer...xD

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  198
  • Reputation:   47
  • Joined:  08/01/12
  • Last Seen:  

^ nice suggestion there lol.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  39
  • Topics Per Day:  0.01
  • Content Count:  615
  • Reputation:   201
  • Joined:  11/09/11
  • Last Seen:  

not to mention side bets... the other problem of course, is the ability to show the players their cards... BMP's aren't very useful here, since you can only show one at a time... so you would have to have an image for every possible combination... (lots o images... hooray!) and text based games, just aren't very fun...

suggestion : create cutin that show multiple card / single card... it would be nicer...xD

not to mention side bets... the other problem of course, is the ability to show the players their cards... BMP's aren't very useful here, since you can only show one at a time... so you would have to have an image for every possible combination... (lots o images... hooray!) and text based games, just aren't very fun...

suggestion : create cutin that show multiple card / single card... it would be nicer...xD

That's what I mean though, you can only show a single cutin else it gets replaced... so you would need an image for every possible card combination...

Cutins do not stack, they replace...

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

aw....Z3R0 ... >.< ......LOL ...didnt thought of that ~ haha ~

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

You would need to make a lot of if() statments and make it assign a number value for the total value of each hand. For example a pair gives 2 points, a full house give 10 points. So each players cards are rated and compared ot the other players hands based on that number value. Each card would need a specific face value and suit. I know this is posssible since I created a blackjack game that uses the same concept in detail. Again each hand would be a lot of if() statements. I might give this a go evetually against the computer, but as for multiplayer I probably won't do that. As they said it would be a crazy amount cutins. Unless I could make a varaible for each players hands that the other players could see. For example: .$P1Ace and .$P1Hearts. Then all the players can view cards and see that player 1 had had a Ace of Hearts. This gets into a lot of other issues like if two groups of people try to play at once...

Peopleperson49

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  400
  • Reputation:   5
  • Joined:  12/05/11
  • Last Seen:  

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  83
  • Topics Per Day:  0.02
  • Content Count:  243
  • Reputation:   1
  • Joined:  08/29/12
  • Last Seen:  

So......

This is the script?

From post : http://rathena.org/b...fix-poker-game/

yeah kinda working but something i can't fix.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  400
  • Reputation:   5
  • Joined:  12/05/11
  • Last Seen:  

So......

This is the script?

From post : http://rathena.org/b...fix-poker-game/

yeah kinda working but something i can't fix.

Yeah. You should post the map-server error at your post.

Edited by uDe
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

1. Anyway, when I saw the script, if a person becomes the first person ($@tex_player$[1]), then the other players have to wait this person to start the game right?

What if for a reason she/he want to ruin the script, he could idle and not start the game at all, and the NPC can't be used until the function 'tex_reset' is being called, unless there's some kind of 'timeout' timer for that scenario.

2. Is it better to have a waitingroom for this kind of script? Or even warp all the registered player to one or more rooms (table), so it can hold multiple games at once.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  83
  • Topics Per Day:  0.02
  • Content Count:  243
  • Reputation:   1
  • Joined:  08/29/12
  • Last Seen:  

yeah try the waiting room. can't wait someone fix it =D

anyone can work this script?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

the other problem of course, is the ability to show the players their cards... BMP's aren't very useful here, since you can only show one at a time... so you would have to have an image for every possible combination... (lots o images... hooray!) and text based games, just aren't very fun...

text names, rawr!

0eyWW.png

poring_w01,100,110,0	script	test	910,{
callsub C_initdeck;
callsub C_shuffledeck;
callsub N_debugdeck;
set .@card$, callsub(C_getnextcard);
mes ".@card$ = " + .@card$;
mes callsub(C_card2name,.@card$,1);
close;


// Card functions
C_card2name:
set .@suit$, substr(getarg(0), 0,0);
if (set(.@show_color, getarg(1,0)))
	set .@color$, (.@suit$=="h" || .@suit$=="d") ? "^FF0000" : "^000000";
return ((.@show_color ? .@color$ : "") + .denomination$[axtoi(substr(getarg(0), 1,1))] + " of " + getd(".suit_"+.@suit$+"$") + (.@show_color ? "^000000" : ""));

C_initdeck:
deletearray .deck$[0], 128;
setarray .deck$[0], "s2","s3","s4","s5","s6","s7","s8","s9","sA","sB","sC","sD","sE",
                    "h2","h3","h4","h5","h6","h7","h8","h9","hA","hB","hC","hD","hE",
                    "d2","d3","d4","d5","d6","d7","d8","d9","dA","dB","dC","dD","dE",
                    "c2","c3","c4","c5","c6","c7","c8","c9","cA","cB","cC","cD","cE";
return;

C_shuffledeck:
// generate the random order
for (set .@i,0; .@i < getarraysize(.deck$); set .@i,.@i+1) {
	while (set(.@rand,rand(1,getarraysize(.deck$))) == getd(".@__tmp_"+.@rand));
	setd ".@__tmp_"+.@rand, set(.@array[.@i],.@rand);
}
// arrange the cards in that order
copyarray .@deck$[0], .deck$[0],getarraysize(.deck$);
for (set .@i,0; .@i < getarraysize(.@array); set .@i,.@i+1)
	set .deck$[.@i], .@deck$[.@array[.@i]-1];
return;

C_orderbysuit:
// groups an array of cards by Suit then orders by value


C_getnextcard:
// returns the next card off the top of the deck (array element 0)
set .@card$, .deck$[0];
deletearray .deck$[0], 1;
return .@card$;


// Player functions
P_quitgame:
// npc keeps money




// NPC functions
N_debugdeck:
for (set .@i,0; .@i<getarraysize(.deck$); set .@i,.@i+1)
	set .@string$, .@string$ + .deck$[.@i]+",";
debugmes .@string$;
return;

OnInit:
set .suit_s$, "Spades";
set .suit_h$, "Hearts";
set .suit_d$, "Diamonds";
set .suit_c$, "Clubs";
setarray .denomination$[2], "2","3","4","5","6","7","8","9","10",
                            "Jack", "Queen", "King", "Ace";
set .hand_name$[10],"Royal Flush";
set .hand_name$[9], "Straight Flush";
set .hand_name$[8], "Four of a Kind";
set .hand_name$[7], "Full House";
set .hand_name$[6], "Flush";
set .hand_name$[5], "Straight";
set .hand_name$[4], "Three of a Kind";
set .hand_name$[3], "Two Pair";
set .hand_name$[2], "One Pair";
set .hand_name$[1], "High Card";
end;
}

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...