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
blackdragon
Beginner


Joined: 07 Dec 2001
Posts: 11
Location: USA

PostPosted: Fri Dec 07, 2001 10:19 am   

reroll trigger i worked on
 
i think you guys just solved in 2 mins what i worked on for all night so let me try another one for ya simple ones i know but the hard one im gonna give 1 more shot tomorrow and if not ill post... this one is basic and shld be simple for you guys.......

its a reroll/stat thing for when you rerroll..
the mud prompts this


Str: 13 Int:13 Wis:14 Dex:11 Con:15
type 'keep' to keep stats, enter to reroll!

want to try to get it to reroll till desired number in each catagory ie....

Str: 17 Int:17 Wis:17 Dex:18 Con:18
then it would type keep.

it rerolls the whole set not each individually...

welp hope you have better luck i havent spent much time on this one more time on the other im workin on... let ya know how it works thanks

Bd
Reply with quote
Acaila
Apprentice


Joined: 30 Aug 2001
Posts: 187
Location: Netherlands

PostPosted: Fri Dec 07, 2001 3:33 pm   
 
#ONINPUT {Str (%d) Int (%d) Wis (%d) Dex (%d) Con (%d)} {@STR = %1;@Int = %2;@Wis = %3;@Dex = %4;@Con = %5}
#TRIGGER {(Str: (%d) Int:(%d) Wis:(%d) Dex:(%d) Con:(%d)} {#IF ((@Str = %1) & (@Int = %2) & (@Wis = %3) & (@Dex = %4) & (@Con = %5)) {Keep} {#CR}}

First set your target stats using the "oninput trigger":
e.g. type "str 17 int 17 wis 17 dex 18 con 18"

The output from the mud is checked against what you set as target, if they come up all the same, then the word "keep" is sent back, otherwise a newline is given (enter).

I noticed that you have a space in your mud's output between "Str: 17", but not with the other stats. Is that intentional or a typo? If it's a typo, then you need to tweak the trigger that checks that line a bit.

Acaila
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Fri Dec 07, 2001 6:27 pm   
 
Then again, since you already know the stats you want and you'll probably only be using it once (when you create the character), just go ahead and plug the numbers in yourself when you write the trigger.

#TR "roller" {Str: (%d) Int:(%d) Wis:(%d) Dex:(%d) Con(%d)} {#IF ((%1 > 16) and (%2 > 16) and (%3 > 16) and (%4 > 17) and (%5 > 17)) {keep;#UNTR roller} {reroll}}

Same comment as Acaila regarding spaces. Note that %1 > 16 is the same as %1 >= 17. Since all the stats are on the same line I didn't wait for the question (this also avoids any concern about whether to use "trigger on prompt"). And I gave the trigger a name so it could self-delete when it finished (so it wouldn't fire later when you check your score).

LightBulb
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