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
Dagnimaer
Wanderer


Joined: 05 Apr 2003
Posts: 60
Location: USA

PostPosted: Sun Feb 22, 2004 9:07 pm   

Illusions in Imperian
 
Ok, my basic anti-illusion system works ok, stops about 1/2 the illusions that assassins through at me. I realize that to get one that is pretty much 100% foolproof is well beyond my talents, but one problem I am now running with is something like this in a recent FFA...

** Illusion **
Adonis slashes into your skin, exposing your lifeblood to his toxic poisons.
Your thoughts become jumbled and you have trouble thinking.
H:286 M:370 W:1637 <eb>

I have been using #IF (("%1" <> "** Illusion **") and ("%2" <> "** Illusion **")) to catch the ** Illusion ** text, but it seems not to be capturing it just right and causing the trigger to fire. Any and all help will be greatly appreciate.

thanks
Reply with quote
Serentus
Apprentice


Joined: 28 Sep 2001
Posts: 103
Location: USA

PostPosted: Tue Feb 24, 2004 5:58 am   
 
The %1 and %2 are ment to contain the information captured using wildcards (%w), (%d), (*), etc.
It looks like you may be wanting %line, %line2, %line3. You can find more about them under "predefined variables" in the help files.

if that's not what your looking for then post all the relevent information about the trigger, such as the pattern that uses the wildcards.
Reply with quote
Dagnimaer
Wanderer


Joined: 05 Apr 2003
Posts: 60
Location: USA

PostPosted: Tue Feb 24, 2004 11:58 am   
 
ok, I am trying to figure out eactly how to use %line, %line2 %line3 and am having troubles.

here is an example of how I got the trigger set up

Pattern:

(*)$The idea of eating or drinking is repulsive to you.$(*)



Value:

#IF (("%1" <> "** Illusion **") AND ("%2" <> "** Illusion **")) {
#color 1044
anorexia = 1
anorexicaffliction
epi
}


Normally this works, but for somereason its having a hard time picking it up.


thanks
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Tue Feb 24, 2004 1:41 pm   
 
I seems to work for me. Here is the basic test trigger I set up:
#TRIGGER {(*)$The idea of eating or drinking is repulsive to you.$(*)} {#IF (("%1" <> "** Illusion **") AND ("%2" <> "** Illusion **")) {#SAY not illusion} {#SAY illusion}}

and here are my three test cases:
#SH "** Illusion **"
#SH "The idea of eating or drinking is repulsive to you."
#SH "some normal text"

#SH "some normal text"
#SH "The idea of eating or drinking is repulsive to you."
#SH "some normal text"

#SH "some normal text"
#SH "The idea of eating or drinking is repulsive to you."
#SH "** Illusion **"

The outputs were respectively:
illusion
not illusion
illusion

Am I doing something different from you?
Reply with quote
Dagnimaer
Wanderer


Joined: 05 Apr 2003
Posts: 60
Location: USA

PostPosted: Tue Feb 24, 2004 8:42 pm   
 
ok, what I'm having trouble with is the

** Illusion **
Adonis slashes into your skin, exposing your lifeblood to his toxic poisons.
Your thoughts become jumbled and you have trouble thinking.


its not picking up the 2nd message and discarding it because its an illusion. it works with all the others
Reply with quote
Dagnimaer
Wanderer


Joined: 05 Apr 2003
Posts: 60
Location: USA

PostPosted: Tue May 04, 2004 6:57 am   
 
ok, right now going to attempt to upgrade my anti-illusion script to using %line and such. With the way illusions are used, the class in question sends it out as one giant line of text, but it appears to us as 2 lines of text.

My guess is that you check %line to have it for the attack while the next %line for the affliction, am I right on this or wayyyyyyyyy off base. I got a feeling I'm off base on this thought.
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: Tue May 04, 2004 1:56 pm   
 
What I recommend for this is putting your affliction in a temporary holding variable and on a prompt moving it to a real affliction variable if you have not set an illusion flag. Then, set your illusion flag when you see the ** Illusion ** and it won't matter if the message comes before or after the affliction or how many other characters/lines come in between. I believe your current problem is that your opponent illusions the attack with the affliction, so using the (*)$blah$(*) won't go back two lines and catch the illusion message. Make sense?
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue May 04, 2004 4:21 pm   
 
What is the pattern for the trigger which is giving you trouble? (Why did you give us a pattern for a trigger which does work instead of the one that doesn't?) It looks to me as though you need a four-line trigger for this particular illusion.

I don't recommend using the %line variables, since they aren't under your control. If another line comes in (or goes out) before your trigger is processed, they might not contain the lines you thought they would.
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