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


Joined: 17 Apr 2007
Posts: 3

PostPosted: 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
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: 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}}
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
wrongone
Newbie


Joined: 17 Apr 2007
Posts: 3

PostPosted: 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?
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: 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.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
wrongone
Newbie


Joined: 17 Apr 2007
Posts: 3

PostPosted: Tue Apr 17, 2007 8:47 pm   
 


that how its supposed to look?[/img]
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: 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.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
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