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
Objob
Newbie


Joined: 09 Apr 2003
Posts: 3

PostPosted: Wed Apr 09, 2003 6:55 pm   

character stat roller (NOOB)
 
I'm playing on "The Final Challenge", which when creating a character gives you something like this for output of your stats:

Str: BAVG. Int: AVG. Wis: AVG. Dex: AVG.
Con: BAVG. Chr: LOW. Luc: LOW. - Accept? (Y/N):


The values are LOW - BAVG - AVG - AAVG - HIGH - MAX, with MAX obviously being the best.

What I want to do is have it check if Luc(k) is at MAX and then if at least two other stats are too, and the rest should be at least AVG. If those conditions are not met it should say 'N', thus getting a new set of stats to check =)

If the conditions are met it would be nice if it played a lil sound or something, so I don't have to keep watch all the time (could take a while this).

I realize that I'm asking for quite a bit of work from you, but I've no idea on how to do this myself... Triggers scare me ^_^ I would be very grateful if you guys could help me out :)
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Apr 09, 2003 7:49 pm   
 
This should do it. You may need to adjust the number of spaces after each period in the patterns.
#TR {Str* (%w).  Int* (%w).  Wis* (%w).  Dex* (%w).} {#VAR Max 0;#VAR Low 0;#IF (%1 = MAX) {#ADD Max 1};#IF ((%1 = LOW) OR (%1 = BAVG)) {#ADD Low 1};#IF (%2 = MAX) {#ADD Max 1};#IF ((%2 = LOW) OR (%2 = BAVG)) {#ADD Low 1};#IF (%3 = MAX) {#ADD Max 1};#IF ((%3 = LOW) OR (%3 = BAVG)) {#ADD Low 1};#IF (%4 = MAX) {#ADD Max 1};#IF ((%4 = LOW) OR (%4 = BAVG)) {#ADD Low 1}}
#TR {Con* (%w).  Chr* (%w).  Luc* (%w).} {#IF (%1 = MAX) {#ADD Max 1};#IF ((%1 = LOW) OR (%1 = BAVG)) {#ADD Low 1};#IF (%2 = MAX) {#ADD Max 1};#IF ((%2 = LOW) OR (%2 = BAVG)) {#ADD Low 1};#IF ((%3 = MAX) AND (@Max > 1) AND (@Low = 0)) {#BEEP} {N}} {} {nocr|prompt}

LightBulb
Advanced Member
Reply with quote
Objob
Newbie


Joined: 09 Apr 2003
Posts: 3

PostPosted: Thu Apr 10, 2003 2:21 pm   
 
hmm nothing seems to happen at all I suspect it's because it doesn't send the 'N' unless the conditions are met... which is the opposite of what I want ^_^

I'll try and fix it myself (doubt that I'll succeed), but maybe one of you guys could help me out a bit? :)
Reply with quote
Objob
Newbie


Joined: 09 Apr 2003
Posts: 3

PostPosted: Thu Apr 10, 2003 2:52 pm   
 
YAY!!! I think it works :)
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Thu Apr 10, 2003 4:22 pm   
 
Actually, it sends the 'N' if the conditions are NOT met. When the conditions are met, it does the first command (#BEEP).
#IF ((%3 = MAX) AND (@Max > 1) AND (@Low = 0)) {#BEEP} {N}}

The usual problem with triggers like this, is that people sometimes choose not to paste them directly into the command line. Instead, they copy-paste the individual parts of the trigger in the editor, but forget (or don't understand and ignore) the part at the end {nocr|prompt}. These are the options which make it a "prompt" trigger, and are necessary for it to work correctly. They correspond to the editor options "Newline" off and "Prompt" on.

LightBulb
Advanced Member
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