|
wrongone Newbie
Joined: 17 Apr 2007 Posts: 3
|
Posted: Tue Apr 17, 2007 5:35 am
Cant get word based auto roller to work.... |
trying to get an auto roller going for ravenmud.com 6060
OUTPUT:
====================================
Ok.. re-rolling.
Your abilities are:
Str [ Average] Int [ Exceptnl] Wis [ Astute]
Dex [ Above Avg] Con [ Anemic] Cha [Appealing]
Roll again?(y/n):
====================================
Strength i would want: lowest to highest (racial maximum):
Muscular
Potent
Strong
Powerful
Int i would want: lowest to highest(racial maximum):
Brilliant
Gifted
Genius
Dex i would want: lowest to highest (racial maximum):
Agile
Graceful
Con/Wis/Cha dont matter enough to sacrifice rolling time, as long as they are decent, but the above stats are what id like to filter for, any combination of any of them, but i dont want it to sent "n" to the mud if it gets a combination of these catagories, i want it to do nothing, just let me say yes or no
I cant figure this out for the life of me |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Tue Apr 17, 2007 3:22 pm |
So you want it to send "y" if none of those words appear, but not to say no if they do?
#trig RollTrig {Str ~[(*)~] Int ~[(*)~] Wis ~[*~]} {#if (%ismember(%1,muscular|potent|strong|powerful) OR %ismember(%2,brilliant|gifted|genius)) {#state rolltrig 0}}
#cond {Dex ~[(*)~] Con ~[(*)~] Cha ~[(*)~]} {#if (!%ismember(%1,agile|graceful)) {y}} |
|
|
|
wrongone Newbie
Joined: 17 Apr 2007 Posts: 3
|
Posted: Tue Apr 17, 2007 5:55 pm |
I think you have the request down, ill try to clarify. If the mud returns any combination of the str's int's or dex's i want, i would like it to do nothing so that i may decide if i would to keep the roll, however if it doesnt have one of my requested values in ALL 3 sections (str int and dex) i would like it to say "y"
I put the trigger in as you listed it but,
It isnt triggering, do i make the trigger via the first line you gave me? that sets the pattern to : Str ~[(*)~] Int ~[(*)~] Wis ~[*~]
and it sets the value to: #if (%ismember( %1, muscular|potent|strong|powerful) OR %ismember( %2, brilliant|gifted|genius)) {#state rolltrig 0}
do i put the #cond {Dex ~[(*)~] Con ~[(*)~] Cha ~[(*)~]} {#if (!%ismember( %1, agile|graceful)) {y}} in the value section too?
I think it may be due to the spacing? is that what the ~ are? |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Tue Apr 17, 2007 7:17 pm |
I forget how strict zMUD is about spaces and lists in functions. Possibly you need quotes around the %n's because they may contain spaces. Change them to "%1" and so on. Might also need quotes around the lists like "brilliant|gifted|genius".
The #cond command needs to be run on the command line after the #trig command. To do it with the GUI, you need to go to the States tab of the trigger and double-click on the second line there to change to the second state. Then you go back to the first tab to enter the pattern and the script. Then back to states tab to set it back to the first state so it's ready to go.
EDIT: Make sure you also give the trigger the RollTrig ID.
Checking if all three stats are as high as you want will make this script more complicated. You have to store the values of each stat (Str and Int in the first trigger) and postpone the processing until afterwards. Then it could check if all three are high enough, and then check each individually if one is too low. |
|
|
|
wrongone Newbie
Joined: 17 Apr 2007 Posts: 3
|
Posted: Tue Apr 17, 2007 8:47 pm |
that how its supposed to look?[/img] |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Tue Apr 17, 2007 10:18 pm |
The Dex ~[...Cha ~[(*)~] part of the #cond command goes in the first column of the second row. The #if (!ismember) part goes in the third column of the second row.
The #cond command is basically there to fill those fields in for you. |
|
|
|
|
|