 |
morgair Beginner
Joined: 10 Nov 2000 Posts: 24 Location: USA
|
Posted: Mon Oct 24, 2005 11:02 am
#CW command and counting occurances |
Ive got a relatively simple script to count hits on a slot machine bot so that i can calculate approximate odds of winning the various payouts. I also colorize the hits so that its easier to see the different slots. Only problem i have is that my script isnt accurately counting double occurances of the same thing on one line. for instance a line might be
Blank Cherry Blank Cherry
My script would count one blank and one cherry. All im doing to count it is #TR {Blank} {#CW 7;#AD aablankcount 1}
more or less the same thing for the other things too just different colors. Anyone know how i can get it to count the second or third or even fourt occurance on that line |
|
_________________ Morgair, Master of the Obvious |
|
|
 |
Insomniac Wanderer
Joined: 25 Mar 2004 Posts: 78 Location: United Kingdom
|
Posted: Mon Oct 24, 2005 1:03 pm |
How many possible combinations are there for each 'dial'?
I'd be tempted to do something like this if there wasn't too many...
#TRIGGER {^({Blank|Cherry|Other}) ({Blank|Cherry|Other}) ({Blank|Cherry|Other}) ({Blank|Cherry|Other})} {#VAR AddBlankCount 0;#IF (%1 = "Blank") {#ADD AddBlankCount 1};#IF (%2 = "Blank") {#ADD AddBlankCount 1};#IF (%3 = "Blank") {#ADD AddBlankCount 1};#IF (%4 = "Blank") {#ADD AddBlankCount 1};#ECHO @AddBlankCount}
And then work with the value of AddBlankCount from there. |
|
_________________
No-one ever gets flamed for posting too much information. Conform to the PPP (Preferred Posting Protocol) and give as much information as possible, including MUD output where needed. |
|
|
 |
Slaem Apprentice
Joined: 20 Sep 2005 Posts: 135
|
Posted: Wed Oct 26, 2005 5:41 am |
#CW is the only command that works more than once on a line. All other commands, IIRC, only work once per line. Never have seen why...
|
|
|
 |
Vitae Enchanter

Joined: 17 Jun 2005 Posts: 673 Location: New York
|
Posted: Wed Oct 26, 2005 3:21 pm |
I'm a lil confused.
are you coloring them, counting individual reels, or entire spins?
can u explain better and give examples of mud output and what your output looks like? (or how you'd LIKE it to look?) |
|
|
 |
|
|