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


Joined: 01 Dec 2005
Posts: 1

PostPosted: Thu Dec 01, 2005 9:07 pm   

Autoroller problems.
 
I created this autoroller based on another I found on here credit to odinfan for the original:

#al {stop} {n;#t- rollin}
#al {chkstr} {#IF (@Str > 15) {#ad total 1}}
#al {chkint} {#IF (@Int > 15) {#ad total 1}}
#al {chkwis} {#IF (@Wis > 10) {#ad total 1}}
#al {chkdex} {#IF (@Dex > 8) {#ad total 1}}
#al {chkcon} {#IF (@Con > 15) {#ad total 1}}
#al {chkcha} {#IF (@Cha > 10) {#ad total 1}}
#al {chkluc} {#IF (@Luc > 10) {#ad total 1}}
#ac {Strength:%s&Str} {chkstr} {rollin}
#ac {Intelligence: %s&Int} {chkint} {rollin}
#ac {Wisdom:%s&Wis} {chkwis} {rollin}
#ac {Dexterity:%s&Dex} {chkdex} {rollin}
#ac {Constitution:%s&Con} {chkcon} {rollin}
#ac {Charisma:%s&Cha} {chkcha} {rollin}
#ac {Luck:%s&Luc} {chkluc} {rollin}
#ac {Would you like to keep these stats?} {%if(@total=7,stop,y)} {rollin}
#ac {Your choices are:} {#say value of total=@total;#var total 0}

I am having the following problems:
Total is not being incremented correctly, sometimes there will be 4 stats that pass, but total will only be 3.
Total has reached 7 in the past, but failed to stop at that point. Not only that, it should never have reached total.

The mud output looks like this:

Strength: 12 (Str)
Intelligence: 14 (Int)
Wisdom: 11 (Wis)
Dexterity: 11 (Dex)
Constitution: 12 (Con)
Charisma: 14 (Cha)
Luck: 13 (Lck)

Would you like to keep these stats?

Your choices are: (Y/N/H/?):

But appear like this after the autoroller begins running:

Your choices are: (Y/N/H/?):Strength: 15 (Str)

Intelligence: 10 (Int)
Wisdom: 14 (Wis)
Dexterity: 13 (Dex)
Constitution: 17 (Con)
Charisma: 9 (Cha)
Luck: 16 (Lck)

Would you like to keep these stats?

Your choices are: (Y/N/H/?):Strength: 12 (Str)

Thanks to anyone who can help.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Thu Dec 01, 2005 11:44 pm   
 
What about changing your triggers to prompt triggers to catch the case our choices are: (Y/N/H/?):Strength: 15 (Str)

#ac {Luck:%s&Luc} {chkluc} {rollin} {nocr|prompt}
or in the settings editor, edit the trigger, go to options, uncheck newline and check prompt.

Should the following action trigger be a newline or prompt triggerÉ
Your choices are: (Y/N/H/?):

I would do it with a multi-line trigger.
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Fri Dec 02, 2005 1:21 am   
 
Remove your old triggers alias' etc and this should work for you

#CLASS autoroll
#TRIGGER "autorollertrig" {Strength:%s(%d)} {total=0;#IF (%1 > 15) {#ADD total 1}}
#COND {Intelligence: %s(%d)} {#IF (%1 > 15) {#ADD total 1}} {within|param=1}
#COND {Wisdom:%s(%d)} {#IF (%1 > 10) {#ADD total 1}} {within|param=1}
#COND {Dexterity:%s(%d)} {#IF (%1 > 8) {#ADD total 1}} {within|param=1}
#COND {Constitution:%s(%d)} {#IF (%1 > 15) {#ADD total 1}} {within|param=1}
#COND {Charisma:%s(%d)} {#IF (%1 > 10) {#ADD total 1}} {within|param=1}
#COND {Luck:%s(%d)} {#IF (%1 > 10) {#ADD total 1}} {within|param=1}
#COND {Would you like to keep these stats?} {#IF (@total=7) {Y} {N}}
#CLASS 0
_________________
Zmud Support Library
Zmud Knowledge Base
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