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
Sylmannemo
Beginner


Joined: 20 Oct 2006
Posts: 18

PostPosted: Sun Mar 25, 2007 4:48 am   

Anti-Illusion Setup with %line2\%line3
 
Alright, so I'm having a problem with the %line2 and %line3 commands and utilizing them for an appropriate anti-illusioning system. Specifically, triggers whose lines exceed one line, and more importantly, vary with which words land on which line depending on the name of the person utilizing the skill.

The specific ability right here for the example is backbreaker (BBT) for those familiar with the IRE MUDs. No matter what combination of %line2 configuration I string together it doesn't seem to want to work for me and always registers as an illusion, am I doing something wrong and just am missing it, or is it not possible to %line2 things like this as the lines don't fall within the variable confines for %line2?

Theres moves in towards you in a grabbing posture.
Theres lifts you triumphantly into the air, then yanks you down into his raised
knee with back breaking force.
You hear your spine breaking under the strain.


#if (@weapons>=3) {
#if (@shieldabsorb=1 and @wardancer=1 and %line2="Your shield absorbs some of the damage.") {
#add backdamage 1
#if {@stun=0 and @aeon=0 and @unconscious=0 and @sleep=0} {#if (@backdamage>=1) {#if {@slickness=0 and @salvebalance=0} {apply restoration to back}}}
}
} {
#noop
#echo " ---Illusion--- "
}
#if {@shieldabsorb=0 and %line3="%w lifts you triumphantly into the air, then yanks you down into his raised" or %line2="his raised knee with back breaking force." or %line2="her raised knee with back breaking force." or %line2="knee with back breaking force."} {
#add backdamage 1
#if {@stun=0 and @aeon=0 and @unconscious=0 and @sleep=0} {
#if (@backdamage>=1) {
#if {@slickness=0 and @salvebalance=0} {
apply restoration to back
#if {@stupidity=0} {#var salvebalance 1}
}
}
}
} {
#noop
#echo " ---Illusion--- "
}
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Sun Mar 25, 2007 5:12 am   
 
The easiest way to avoid this multi-line problem is to set your MUD's line length either off or to a huge number. Then you can set zMUD's word wrapping (wrap on, autowrap off, wrap column 80, indent column 0 or whatever) to mimic your MUD's word wrapping and you'll never notice the difference. zMUD runs triggers BEFORE it word wraps, though, which makes creating this kind of trigger much easier.

One thing you might want to take a look at with your many %line2 options there is the %match function and its companion %regex, too.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Josiah.Bruns
Apprentice


Joined: 04 Mar 2007
Posts: 103

PostPosted: Sun Mar 25, 2007 6:49 pm   
 
As the last step in your trigger do a #show %line;#show %line2;#show %line3
this will probably show you why your trigger isn't doing what you expect.
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