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
Tygerhart
Novice


Joined: 04 Oct 2001
Posts: 43
Location: Canada

PostPosted: Tue Nov 04, 2003 9:08 pm   

1 trigger for multiple messages
 
Hi all!

I've got a new brain teaser for you (Well at least it's teasing my brain). Very Happy

On my MUD I've got an attack command that can fire off 1 to 3 attacks. What I would like to do is make a trigger that once that attack is fired off, it will launch that same attack again, but only once, not 1 to 3 times.

EXAMPLE:

Helldagger
Your Helldagger GUTS An Ugly Rat
Your Helldagger SMASHES An Ugly Rat
Your Helldagger MUTILATES An Ugly Rat
Helldagger

Essentially I want it to fire again without sending 3 separate commands to fire it off again.

I hope that's resonably clear. Smile

Thanks in advance,
Tygerhart
Reply with quote
hatespyware
Apprentice


Joined: 16 Dec 2002
Posts: 103

PostPosted: Wed Nov 05, 2003 12:10 am   
 
a) make a multi-line trigger that matches the first line and, optionally, additional related attack lines.
or
b) set some state variable upon seeing the first attack, then clearing it and firing again after in a trigger that fires on something that you know comes after... ala your prompt.
Reply with quote
Tygerhart
Novice


Joined: 04 Oct 2001
Posts: 43
Location: Canada

PostPosted: Wed Nov 05, 2003 12:47 am   
 
I see. And how does one do that? Could you provide an example?

Thanks,

Tygerhart
Reply with quote
Cbisazza
Wanderer


Joined: 27 Feb 2003
Posts: 69
Location: Australia

PostPosted: Wed Nov 05, 2003 2:05 pm   
 
What you want to do is trigger on your prompt after you send the command.

That will ensure that you attack when you can.

If you want to make sure that you actually attacked, then you might a sequential trigger of the form:

#TRIG {^Your Helldagger} {}
#COND {>} {helldagger}

where you would substitute ">" with your prompt.

Of course, you need to flesh this out ... and enable it only while you want to attack.
Reply with quote
Tygerhart
Novice


Joined: 04 Oct 2001
Posts: 43
Location: Canada

PostPosted: Thu Nov 06, 2003 2:51 pm   
 
Thanks Much for your Expertise! :)

Tygerhart
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