|
Noboyuki Beginner
Joined: 27 Jul 2001 Posts: 17
|
Posted: Sun Dec 29, 2002 1:33 am
Auto Roller |
Ok this may seem like a rather confusing thing I am completely lost as to where to start with this auto roller I need to have it check that the total value of all stats but app and trains is more then 490 and that cha is less the 40 and all other stats are less then 90. the mud output is like this.
Str:44 Qui:87 Dex:83 Int:99 Wis:86 Con:41 Cha:36 App:66 Trains:0
Accept these values (Y/N) ?
any help would be nice |
|
|
|
iljhar GURU
Joined: 10 Oct 2000 Posts: 1116 Location: USA
|
Posted: Sun Dec 29, 2002 4:55 am |
how about this:
#trigger {Str:(%d) Qui:(%d) Dex:(%d) Int:(%d) Wis:(%d) Con:(%d) Cha:(%d) App:%d Trains:%d$Accept these values ~(Y~/N~) ?} {#var Good 1;#if ((%1+%2+%3+%4+%5+%6+%7)<=490) {#var Good 0};#if (%1>=90) {#var Good 0};#if (%2>=90) {#var Good 0};#if (%3>=90) {#var Good 0};#if (%4>=90) {#var Good 0};#if (%5>=90) {#var Good 0};#if (%6>=90) {#var Good 0};#if (%7>=40) {#var Good 0};#if (@Good=1) {y} {n}}
A bit clumsy, but it should work.
Iljhar |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sun Dec 29, 2002 6:34 am |
Since iljhar included the question in the trigger phrase, this will probably need to be a "prompt" trigger. To make it a "prompt" trigger, go to the Options tab in the editor, and click the checkbox next to Trigger on: Prompt. It would be a good idea to uncheck Trigger on: Newline.
This can also be done at the command line using the "nocr" and "prompt" options.
#trigger {Str:(%d) Qui:(%d) Dex:(%d) Int:(%d) Wis:(%d) Con:(%d) Cha:(%d) App:%d Trains:%d$Accept these values ~(Y~/N~) ?} {#var Good 1;#if ((%1+%2+%3+%4+%5+%6+%7)<=490) {#var Good 0};#if (%1>=90) {#var Good 0};#if (%2>=90) {#var Good 0};#if (%3>=90) {#var Good 0};#if (%4>=90) {#var Good 0};#if (%5>=90) {#var Good 0};#if (%6>=90) {#var Good 0};#if (%7>=40) {#var Good 0};#if (@Good=1) {y} {n}} {} {nocr|prompt}
Another method is to use a single-line pattern using the default "Trigger on" options. This will trigger when it receives the newline before the question. Since App and Trains aren't used, I left them out of the pattern also.
#TR {Str:(%d) Qui:(%d) Dex:(%d) Int:(%d) Wis:(%d) Con:(%d) Cha:(%d)} {#IF (((%1 + %2 + %3 + %4 + %5 + %6 + %7) > 490) AND (%1 < 90) AND (%2 < 90) AND (%3 < 90) AND (%4 < 90) AND (%5 < 90) AND (%6 < 90) AND (%7 < 40)) {yes} {no}}
LightBulb
Senior Member |
|
|
|
Noboyuki Beginner
Joined: 27 Jul 2001 Posts: 17
|
Posted: Tue Dec 31, 2002 3:16 am |
It works Great Thanks now my next Question is there a way to show the output of all the numbers o I can see what the total value is
|
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Tue Dec 31, 2002 7:37 pm |
Sure. Use #MATH or %eval to add them all up, and #SAY, #SHOW, or #ECHO to display the total.
LightBulb
Senior Member |
|
|
|
|
|