|
Dumpen Newbie
Joined: 20 Jul 2004 Posts: 2
|
Posted: Tue Jul 20, 2004 9:06 pm
Autoroller question |
How do i do a autoroller for this mud if it looks like this
Str: excellent Int: good
Wis: average Dex: excellent
Con: excellent Agi: excellent
Cha: average Luk: average
Pow: average
Do you want to keep these stats? |
|
|
|
Zener Wanderer
Joined: 31 May 2004 Posts: 54 Location: USA
|
Posted: Wed Jul 21, 2004 2:28 pm Re: Autoroller question |
Dumpen wrote: |
How do i do a autoroller for this mud if it looks like this
Str: excellent Int: good
Wis: average Dex: excellent
Con: excellent Agi: excellent
Cha: average Luk: average
Pow: average
Do you want to keep these stats? |
As you may have noticed, this forum doesn't allow more than 1 blank spaces, instead it ignores them. But don't worry, zMUD doesn't do this.
It took some time but this will hopefully work.
Note: Make sure to enable spam protection
#CLASS "StrInt"
#TRIGGER {Str: {%1}*Int: {%2}} #IF (%1=={excellent|good|average} AND %2=={excellent|good|average}) {#T- "StrInt";#T+ "WisDex"}{NO}
#CLASS "WisDex"
#TRIGGER {Wis: {%1}*Dex: {%2}} #IF (%1=={excellent|good|average} AND %2=={excellent|good|average}) {#T- "WisDex";#T+ "ConAgi"}{NO}
#CLASS "ConAgi"
#TRIGGER {Con: {%1}*Agi: {%2}} #IF (%1=={excellent|good|average} AND %2=={excellent|good|average}) {#T- "ConAgi";#T+ "ChaLuk"}{NO}
#CLASS "ChaLuk"
#TRIGGER {Cha: {%1}*Luk: {%2}} #IF (%1=={excellent|good|average} AND %2=={excellent|good|average}) {#T- "ChaLuk";#T+ "Pow"}{NO}
#CLASS "Pow"
#TRIGGER {Pow: {%1}} #IF (%1=={excellent|good|average} {#T- "Pow";YES}{#T+ "StrInt";NO}
Note: Make SURE that BEFORE you get to the Rolling part of character creation that !!ONLY!! StrInt class in ENABLED, the other 4 MUST be DISABLED or else it will work incorrectly.
~Zener |
|
_________________ |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Wed Jul 21, 2004 5:53 pm Re: Autoroller question |
Dumpen:
This can easily be done with one Class, or even none, by simply using a Variable to track the results. For each stat, decide which values are acceptable and put them in the stringlist for that value. I've used {excellent|good|average} but that might not be what you want. If any of the possible values are more than one word, change %w to *. You may also need to remove the spaces on either side of %s if there are ever less than 3 spaces between columns.
You should delete this script whenever you are finished rolling.
#CLASS AutoRoller
#TR {Str: (%w) %s Int: (%w)} {
#IF (%ismember( %1, {excellent|good|average})) {#VAR Autoroll 1} {#VAR Autoroll 0}
#IF (%ismember( %2, {excellent|good|average})) {#ADD Autoroll 1}
}
#TR {Wis: (%w) %s Dex: (%w)} {
#IF (%ismember( %1, {excellent|good|average})) {#ADD Autoroll 1}
#IF (%ismember( %2, {excellent|good|average})) {#ADD Autoroll 1}
}
#TR {Con: (%w) %s Agi: (%w)} {
#IF (%ismember( %1, {excellent|good|average})) {#ADD Autoroll 1}
#IF (%ismember( %2, {excellent|good|average})) {#ADD Autoroll 1}
}
#TR {Cha: (%w) %s Luk: (%w)} {
#IF (%ismember( %1, {excellent|good|average})) {#ADD Autoroll 1}
#IF (%ismember( %2, {excellent|good|average})) {#ADD Autoroll 1}
}
#TR {Pow: (%w)} {
#IF (%ismember( %1, {excellent|good|average})) {#ADD Autoroll 1}
#IF (@Autoroll = 9) {YES} {NO}
}
#CLASS 0
Zener:
Please don't recommend the use of %1 through %99 in trigger patterns. They are not in the documented list of pattern wildcards.
Please test your scripts. The one you posted doesn't work. It has numerous errors in syntax. |
|
_________________ LightBulb
Senior member
Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious. |
|
|
|
Zener Wanderer
Joined: 31 May 2004 Posts: 54 Location: USA
|
Posted: Wed Jul 21, 2004 6:12 pm |
Quote: |
Zener:
Please don't recommend the use of %1 through %99 in trigger patterns. They are not in the documented list of pattern wildcards.
Please test your scripts. The one you posted doesn't work. It has numerous errors in syntax.
|
Please do not assume I merely slapped this up on the forum without testing it, my mistake was that I simply forgot a pair of Braces around the #IF statement.
#CLASS "StrInt"
#TRIGGER {Str: {%1}*Int: {%2}} {#IF (%1=={excellent|good|average} AND %2=={excellent|good|average}) {#T- "StrInt";#T+ "WisDex"}{NO}}
#CLASS "WisDex"
#TRIGGER {Wis: {%1}*Dex: {%2}} {#IF (%1=={excellent|good|average} AND %2=={excellent|good|average}) {#T- "WisDex";#T+ "ConAgi"}{NO}}
#CLASS "ConAgi"
#TRIGGER {Con: {%1}*Agi: {%2}} {#IF (%1=={excellent|good|average} AND %2=={excellent|good|average}) {#T- "ConAgi";#T+ "ChaLuk"}{NO}}
#CLASS "ChaLuk"
#TRIGGER {Cha: {%1}*Luk: {%2}} {#IF (%1=={excellent|good|average} AND %2=={excellent|good|average}) {#T- "ChaLuk";#T+ "Pow"}{NO}}
#CLASS "Pow"
#TRIGGER {Pow: {%1}} {#IF (%1=={excellent|good|average} {#T- "Pow";YES}{#T+ "StrInt";NO}}
There is the fixed version...
Try it out if you'd like, I know, LightBulb's is better, in it's own ways. But you didn't ask for the best, now did you? Enjoy...
~Zener |
|
_________________ |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Wed Jul 21, 2004 6:58 pm |
No, I didn't assume anything. I fixed the obvious syntax errors and tested it. It doesn't work.
Obvious syntax errors:
Missing {} around trigger values (this is the one you fixed).
Missing ) at end of "Pow" #IF condition.
Missing space between 'true' commands and 'false' commands.
{} around %1 and %2 in trigger patterns.
Use of %1 and %2 in trigger patterns.
The result, once I fixed enough errors for it to work at all, was to always respond NO, even when all values were 'excellent'.
Your approach is okay (it's very similar to the one I used), it's the script which is flawed. |
|
_________________ LightBulb
Senior member
Most scripts in this forum are written for Command Line entry.
Don't even open the Settings Editor unless its use is specified or obvious. |
|
|
|
Dumpen Newbie
Joined: 20 Jul 2004 Posts: 2
|
Posted: Fri Jul 23, 2004 12:10 am |
Thanks for the help.
|
|
|
|
|
|