|
karthic Wanderer
Joined: 28 Aug 2001 Posts: 86 Location: USA
|
Posted: Mon Jan 07, 2002 1:14 pm
finnishin up a gamblin script |
ok..i've got a complete gamblin script.. except at the end.. checkin what kind of hand they have...
i figure i could do this in thousands of lines of code.. but i also figure.. there should be a much easier way to do this...
the cards are currently set up, under a player record... first card, then first card suit.. then second card second card suit.. blah blah..
i can port it to any way(string list, variables) as needed...
but does anyone have a trigger to test for such things as royal flush, and stright flush, flush.. blah blah..?
thanks
karthic
ps.. anytother thing.. is .. is there a way to test how many times a certain number shows up in a string list?
thanks
karthic |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Mon Jan 07, 2002 2:05 pm |
I think the best way would be to set up independent aliases and/or functions that each do one of the functions you would need. One could check how many of a particular suit the player has in their hand and returns each suit the player has with the number of that suit the the player has (from 1 to 5), another one looks at how many of a particular number the player has in their hand and, like the previous one returns each number that the player has and how many fo that number (from 1 to 4), another will check consecutive numbers and return the number at which it starts, etc.
Then to check the hand of the player, combine these functions as needed to figure out what the player has.
To test how many times a number appears in a list, you can use the %countlist function. Take a look at it's help file entry for syntax and what it specifically does.
Kjata |
|
|
|
PrestoPimp Apprentice
Joined: 18 Sep 2001 Posts: 175 Location: USA
|
Posted: Sun Jan 13, 2002 4:48 am |
Hey Karthic, when you get your script done send me a copy or post it in finished forum please :)
For tomarrow is another day, and other days come but 6 times a week. |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|