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


Joined: 27 May 2016
Posts: 5

PostPosted: Fri May 27, 2016 11:24 pm   

Advanced Trigger Help
 
I know this is possible, and I have searched google and this website and found solutions that do not work.

What I want is a multiple pattern recognizing trigger that only executes ONE command if any of the patterns are recognized.

{{Charisma: above average|Charisma: good|Constitution: above average|Constitution: good|Intelligence: good|Intelligence: average|Intelligence: above average}}

Here are the situations where I want a command to be issued, the problem is the above trigger parameters are executing multiple commands, just want one command issued for any of the variables.

When I was young I had the patience and stupidity to sit for hours rolling stats (I know this can work because, well I made a trigger for this very purpose 10 years ago), now I just want to go cook dinner while this trigger set gets me a attribute set that is worth investing in for this given mud.

Thanks in advance,

PoB
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Sat May 28, 2016 12:19 am   
 
Something about like this. You will have to correct the text and commands to send for the second trigger.
Code:
#CLASS AutoRoller
#VAR KeepRoll {0} {0}
#TRIGGER "GoodRoll" {{Charisma: above average|Charisma: good|Constitution: above average|Constitution: good|Intelligence: good|Intelligence: average|Intelligence: above average}} {KeepRoll=1}
#TRIGGER "AutoRollPrompt" {keep this roll or reroll} {#IF (KeepRoll=1) {keep;KeepRoll=0;#T- AutoRoller} {reroll}} {} "prompt"
#CLASS 0
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
pintofbass
Newbie


Joined: 27 May 2016
Posts: 5

PostPosted: Sat May 28, 2016 9:09 pm   
 
Quote:
Your basic stats:
Strength: very good Power: above average
Dexterity: above average Intelligence: good
Agility: good Wisdom: above average
Constitution: good Charisma: above average

Luck: above average Unused: good


Do you want to reroll this char (y/n) [y]:


Thank you for the reply I thought I understood what you made should do and how I should plug in the commands to make this work. But I think I'v been away from this program for to long because its not working. Above is the text from the mud that I want a trigger set for. Screening three stats and issuing one Yes of any of the three stats are not very good, and issuing nothing if all three stat lines are very good.

Sorry for being dense and to think people came to me in the 1990's to create complicated targeting alias vars and the works. Don't get old people.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4715
Location: Pensacola, FL, USA

PostPosted: Sat May 28, 2016 9:56 pm   
 
you need to make a list of the known values

#VAR stats {Strength|Power|Dexterity|Intelligence|Agility|Wisdom|Constitution|Charisma}
#VAR statValues {very good|above average|good|etc}

#TR {({@stats}): ({@statValues})} {#IF (%2!="very good") {#ALARM "keepRolling" +3 {y}}}

Make sure the repeat within line option of the trigger is checked.
_________________
Discord: Shalimarwildcat
Reply with quote
pintofbass
Newbie


Joined: 27 May 2016
Posts: 5

PostPosted: Sat May 28, 2016 10:38 pm   
 
Thanks Shalimar and Vij,

Between the two of you I think i got this working, but I put in all the stats like Shalimar typed out, I'm guessing if I wanted to limit to just three stats it would still work. Little odd though there is a good deal of lag between the mud posting the results of the new roll and zmud issuing the yes command to reroll. But this will work just fine
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4715
Location: Pensacola, FL, USA

PostPosted: Sun May 29, 2016 1:39 am   
 
Its a three second delay due to the alarm, it could be shortened, but i wanted to make sure it would only send one 'y' per iteration.
_________________
Discord: Shalimarwildcat
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