Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
morgair
Beginner


Joined: 10 Nov 2000
Posts: 24
Location: USA

PostPosted: 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
Reply with quote
Insomniac
Wanderer


Joined: 25 Mar 2004
Posts: 78
Location: United Kingdom

PostPosted: 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.
Reply with quote
Slaem
Apprentice


Joined: 20 Sep 2005
Posts: 135

PostPosted: 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...
_________________
Show your love.
Support Zugg Software!
Donate to zugg@zuggsoft.com with PayPal Send Money.
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: 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?)
_________________
http://www.Aardwolf.com
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net