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


Joined: 04 Nov 2001
Posts: 11
Location: USA

PostPosted: Sun Nov 04, 2001 6:56 am   

Character Roller
 
I looking to roll some characters on "Alternate Illusions", Mudd.Sinclair.Net :4000, and I was looking for a 'auto roller.' If anyone has a basic one and could email me the file or help me make one, I'd be greatful. The character creation looks like this:

Your abilities are:
Strength: 17/00
Intelligence: 3
Wisdom: 13
Dexterity: 15
Constitution: 18

Keep these statistics (y/n)?

Thanks for the help, in advance!! =)
Reply with quote
Fenster
Beginner


Joined: 04 Nov 2001
Posts: 11
Location: USA

PostPosted: Sun Nov 04, 2001 7:18 am   
 
BTW, this will be used on the trial verison of ZMUD 6.16. Thanks again.
Reply with quote
Troubadour
GURU


Joined: 14 Oct 2000
Posts: 556
Location: USA

PostPosted: Sun Nov 04, 2001 8:57 am   
 
Well, a lot of how it's written is going to depend on what criteria you want to use to determine if the stats are acceptible.
This one just checks to see if they're all greater than or equal to 15.


#TR {Your abilities are:} {#VAR accept y}
#TR {Strength: (%d)/%d} {#IF (%1 < 15) {#VAR accept n}}
#TR {Intelligence: (%d)} {#IF (%1 < 15) {#VAR accept n}}
#TR {Wisdom: (%d)} {#IF (%1 < 15) {#VAR accept n}}
#TR {Dexterity: (%d)} {#IF (%1 < 15) {#VAR accept n}}
#TR {Constitution: (%d)} {#IF (%1 < 15) {#VAR accept n}}
#TR {Keep these statistics ~(y/n~)~?} {@accept} "" "prompt"


You can also calculate an aggregate stat score or even a weighted score with a little tweaking.

Troubadour
Reply with quote
Fenster
Beginner


Joined: 04 Nov 2001
Posts: 11
Location: USA

PostPosted: Sun Nov 04, 2001 5:56 pm   
 
I tried that code. It puts out two answers instead of one. Like 'n' 'n'. Also, I could get it to roll the right stats. I'm not sure what's wrong though.
Reply with quote
Fenster
Beginner


Joined: 04 Nov 2001
Posts: 11
Location: USA

PostPosted: Sun Nov 04, 2001 6:07 pm   
 
Some how the @accept is getting assigned two 'n' So, even if it does get the required stats the second 'n' will pass it by. I checked the code and I can't figure out how to solve this. Is there a way to make the code look at the Strength and if it doesn't meet the requirements to put no, without going through the whole code? Or is it doing that already?
Reply with quote
Acaila
Apprentice


Joined: 30 Aug 2001
Posts: 187
Location: Netherlands

PostPosted: Sun Nov 04, 2001 8:52 pm   
 
You could give all stats a seperate variable, and then check at the end if any of those pass.

#TR {Your abilities are:} {}
#TR {Strength: (%d)/%d} {#IF (%1 < 15) {#VAR Strength n}}
#TR {Intelligence: (%d)} {#IF (%1 < 15) {#VAR Intelligence n}}
#TR {Wisdom: (%d)} {#IF (%1 < 15) {#VAR Wisdom n}}
#TR {Dexterity: (%d)} {#IF (%1 < 15) {#VAR Dexterity n}}
#TR {Constitution: (%d)} {#IF (%1 < 15) {#VAR Constitution n}}
#TR {Keep these statistics ~(y/n~)~?} {#IF (@Strentgh|@Intelligence|@Wisdom|@Dexterity|@Constitution = n) {n} {y}} "" "prompt"

Acaila
Reply with quote
Fenster
Beginner


Joined: 04 Nov 2001
Posts: 11
Location: USA

PostPosted: Sun Nov 04, 2001 9:44 pm   
 
I've copy and pasted your code in as a trigger. It sends back a reply of two 'no'

The address of the mud is --> Mudd.Sinclair.Net port 4000

the code rolls, but it doesn't get the proper numbers and it puts out two 'no'

Am I just putting the code in wrong? I'm only copying and pasting into the tigger.

Well, I'm giving up for today, too mad to go on.

If you want to ICQ me: 82423250
Reply with quote
bruntilda
Novice


Joined: 10 Oct 2000
Posts: 39

PostPosted: Sun Nov 04, 2001 10:02 pm   
 
I think this is because the last trigger triggers on both prompt and newline. Manually edit its options and uncheck trigger on newline.
Reply with quote
Jouster
GURU


Joined: 10 Oct 2000
Posts: 609
Location: USA

PostPosted: Thu Nov 29, 2001 2:08 pm   
 
Some corrections have been made:

#TR {Your abilities are:} {#VAR Strength 0;#VAR Intelligence 0;#VAR Wisdom 0;#VAR Dexterity 0;#VAR Constitution 0}

#TR {Strength: (%d)/(%d)} {#IF (%1 < 15) {#VAR Strength 1}}
#TR {Intelligence: (%d)} {#IF (%1 < 15) {#VAR Intelligence 1}}
#TR {Wisdom: (%d)} {#IF (%1 < 15) {#VAR Wisdom n}}
#TR {Dexterity: (%d)} {#IF (%1 < 15) {#VAR Dexterity n}}
#TR {Constitution: (%d)} {#IF (%1 < 15) {#VAR Constitution n}}
#TR {Keep these statistics ~(y/n~)~?} {#IF (@Strength+@Intelligence+@Wisdom+@Dexterity+@Constitution > 0) {n} {y}} "" "prompt"


That should do ya.

,
Jouster

Implementor/Head Coder of

coolmud.com:6658
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