 |
coldangel Newbie
Joined: 19 Jun 2002 Posts: 4 Location: USA
|
Posted: Wed Jun 19, 2002 7:49 am
Help with an Autoroller Trigger |
Ok, I'll include the whole trigger just in case anyone wants it. I basically modified an autoroller someone else made for a different mud, so I can't take real credit for it.
Anyway, the problem is that the trigger does not trip directly on text from the mud. However, if I cut and paste it into the "sample text to test trigger" field, then it matches. Here is what the input from the mud looks like:
Str Int Wis Dex Con Luck Practices Trains Hps
--- --- --- --- --- ---- --------- ------ ---
20 11 10 10 15 11 11 8 30 Keep these? : no
18 11 10 13 15 9 9 8 25 Keep these? : no
20 9 13 11 13 10 8 8 32 Keep these? :
...And here's the trigger:
#TRIGGER {%s&%d{Str_Roll}%s&%d{Int_Roll}%s&%d{Wis_Roll}%s&%d{Dex_Roll}%s&%d{Con_Roll}%s&%d{Luc_Roll}%s&%d{Pra_Roll}%s&%d{Tra_Roll}%s&%d{Hps_Roll}%sKeep these~?%s:} {
%if( @Str_Roll>=@Str_Desired, Do_Add);
%if( @Int_Roll>=@Int_Desired, Do_Add);
%if( @Wis_Roll>=@Wis_Desired, Do_Add);
%if( @Dex_Roll>=@Dex_Desired, Do_Add);
%if( @Con_Roll>=@Con_Desired, Do_Add);
%if( @Luc_Roll>=@Luc_Desired, Do_Add);
%if( @Pra_Roll>=@Pra_Desired, Do_Add);
%if( @Tra_Roll>=@Tra_Desired, Do_Add);
%if( @Hps_Roll>=@Hps_Desired, Do_Add);
#if (@count<9) {
Do_Clear;n} {
beep;Do_Clear;#mess {The Character Rolled Matched Your Minimum Desired Statistics};Do_Avg;#SAY Average Stats: @Avg_Stats}}
I don't know if it's just got too many numbers before and static words or what, but it just refuses to go off. Any help would be greatly appreciated. Thanks in advance. |
|
|
|
 |
Vijilante SubAdmin

Joined: 18 Nov 2001 Posts: 5187
|
Posted: Wed Jun 19, 2002 11:34 am |
The promplem appears to be with these lines:
%if( @Str_Roll>=@Str_Desired, Do_Add);
%if( @Int_Roll>=@Int_Desired, Do_Add);
%if( @Wis_Roll>=@Wis_Desired, Do_Add);
%if( @Dex_Roll>=@Dex_Desired, Do_Add);
%if( @Con_Roll>=@Con_Desired, Do_Add);
%if( @Luc_Roll>=@Luc_Desired, Do_Add);
%if( @Pra_Roll>=@Pra_Desired, Do_Add);
%if( @Tra_Roll>=@Tra_Desired, Do_Add);
%if( @Hps_Roll>=@Hps_Desired, Do_Add);
They should look like this:
#if( @Str_Roll>=@Str_Desired) {Do_Add} |
|
|
|
 |
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Wed Jun 19, 2002 5:18 pm |
In addition to what Vijilante suggested, you probably need to change this from trigger-on-Newline to trigger-on-Prompt. This can easily be done on the trigger's Options tab in the Settings Editor.
You could simplify this quite a bit.
#TRIGGER {%s&%d{Str_Roll}%s&%d{Int_Roll}%s&%d{Wis_Roll}%s&%d{Dex_Roll}%s&%d{Con_Roll}%s&%d{Luc_Roll}%s&%d{Pra_Roll}%s&%d{Tra_Roll}%s&%d{Hps_Roll}%sKeep these~?%s:} {#IF ((@Str_Roll>=@Str_Desired) AND (@Int_Roll>=@Int_Desired) AND (@Wis_Roll>=@Wis_Desired) AND (@Dex_Roll>=@Dex_Desired) AND (@Con_Roll>=@Con_Desired) AND (@Luc_Roll>=@Luc_Desired) AND (@Pra_Roll>=@Pra_Desired) AND (@Tra_Roll>=@Tra_Desired) AND (@Hps_Roll>=@Hps_Desired)) {Do_Clear;n} {beep;Do_Clear;#mess {The Character Rolled Matched Your Minimum Desired Statistics};Do_Avg;#SAY Average Stats: @Avg_Stats}} {} {nocr|prompt}
LightBulb
Senior Member |
|
|
|
 |
coldangel Newbie
Joined: 19 Jun 2002 Posts: 4 Location: USA
|
Posted: Wed Jun 19, 2002 5:43 pm |
OK. Vijilante, thanks a lot, but that ain't it. I gave it a try just in case, but no dice. It's not even updating the variables from their initial values.
Lightbulb, thank you too, but I tried that too with no difference.
Hmm, would it make any difference that the words are in a different color than the numbers? Is there a way for me to capture that ANSI sequence from the mud instead of just seeing the colors? |
|
|
|
 |
coldangel Newbie
Joined: 19 Jun 2002 Posts: 4 Location: USA
|
Posted: Wed Jun 19, 2002 6:27 pm |
Hmm, ok, fixed that part. It's triggering now. I just cut off the part with the words in the pattern, so it is just 9 numbers now. Only problem I'm having now is that it double sends the "n" to the mud.. I'm not sure if each line is tripping the trigger twice, or if it is stuttering for some reason.. Any ideas? Oh, and I did follow your boolean advice LightBulb, thanks for that too..
|
|
|
|
 |
Vijilante SubAdmin

Joined: 18 Nov 2001 Posts: 5187
|
Posted: Wed Jun 19, 2002 10:35 pm |
You probably checked the prompt option but didn't uncheck the newline option.
|
|
|
|
 |
coldangel Newbie
Joined: 19 Jun 2002 Posts: 4 Location: USA
|
Posted: Wed Jun 19, 2002 10:57 pm |
yup, that was it, thanks.. works perfectly now..
|
|
|
|
 |
|
|
|
|
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
|
|