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


Joined: 23 Aug 2006
Posts: 1

PostPosted: Wed Aug 23, 2006 2:59 am   

Help with Achaean trigger
 
If there is a line that comes as:

You suddenly perceive the vague outline of an aura of rebounding around <name>.

Usually, if the name is a normal length name, it will appear on the same line and there won't be a problem. I'd set the trigger as;

#TRIGGER {You suddenly perceive the vague outline of an aura of rebounding around (%w).} {#if (@enemy=%1) {#var rebound 1}}

But sometimes the names are long and this makes it appear on the next line. So it would have "You suddenly perceive the vague outline of an aura of rebound around" on the first line and "<name>" on the line right after that.

How do I make it so that the trigger checks if the name is the same as the variable @enemy and if so, set #var rebound 1?

Thanks for help
Reply with quote
shalimar
GURU


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

PostPosted: Wed Aug 23, 2006 3:29 am   
 
#TRIGGER {You suddenly perceive the vague outline of an aura of rebounding around$(%w).} {#if (@enemy=%1) {#var rebound 1}}

might need to just have two triggers for it
_________________
Discord: Shalimarwildcat
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Wed Aug 23, 2006 12:04 pm   
 
#TRIGGER {You suddenly perceive the vague outline of an aura of rebounding around {(%w)|$(%w)}.} {#if (@enemy=%1) {#var rebound 1}}
_________________
http://www.Aardwolf.com
Reply with quote
Rolly
Wanderer


Joined: 16 Oct 2006
Posts: 62

PostPosted: Sun Oct 22, 2006 10:16 pm   
 
I tried this and it seems to work in testing:

#TRIGGER {You suddenly perceive the vague outline of an aura of rebounding around @Enemy.}
and also:
#TRIGGER {@Enemy's aura of weapons rebounding disappears.}

This seems too simple to be true so maybe there are other issues with it I haven't seen yet.

Rolly
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: Tue Oct 24, 2006 8:26 pm   
 
I know this is old new now, but maybe this will help?

Code:
#REGEX {^You suddenly perceive the vague outline of an aura of rebounding around} {}
#COND {@enemy\.$} {rebound = 1} {regex|reparse}
#COND {@enemy\.$} {rebound = 1} {regex|within|param=1}


The reparse state should catch the enemy's name at the end of the single line version and the within|param=1 state should catch it at the beginning of the second line.
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