|
Rugbystyle Wanderer
Joined: 07 Oct 2001 Posts: 71
|
Posted: Tue Aug 26, 2003 11:06 pm
Multiline variable length trigger |
I want a trigger that will fire on the entire pattern out put by the mud. IE "Bob slashes into you with a wickedly barbed war-axe, the blow carrying enough weight to severe your arm." I want to trigger to fire on that entire pattern and that entire pattern only.
My problem is, the wrap is at 72 characters. Now depending on WHO is attacking me like such; the length of their name can force the wrap at different places in the line. Is there an effecient and easy way to have zmud fire on "%w slashes into you with a wickedly barbed war-axe, the blow carrying enough weight to severe your arm." With the line break being in a variable location?
Any help would be appreciated. Thanks. |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Wed Aug 27, 2003 3:30 am |
No, there aren't any easy and efficient ways to do this. The easy and efficient way is to use a shorter section of the phrase which has a better chance of all appearing on the same line, but you've already rejected that.
|
|
|
|
nabob Beginner
Joined: 01 Aug 2004 Posts: 10
|
Posted: Wed Nov 22, 2006 2:13 pm |
Im trying to match 2 words:
Damage: 496
The problem is that because of variabe line lengths, I often get a line break in between damage: and the number.
I tried converting my pattern to regex and using /n but never used regexp before and don't know how to put it between.
"damage /n /d" does not work, and prevents it from firing when there is no linebreak between them.
any suggestions? |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Wed Nov 22, 2006 3:28 pm |
Probably better thread etiquette to start a new topic rather than paste over an old one.
In zScript You can use the %s to match a variable amount of space.
ie
#TRIGGER {Damage~:%s(%d)} {#PCOL orange %x1}
Could use the regex convert in zMud to see what that translates to. |
|
|
|
nabob Beginner
Joined: 01 Aug 2004 Posts: 10
|
Posted: Fri Nov 24, 2006 5:51 pm |
[quote="TonDiening"]Probably better thread etiquette to start a new topic rather than paste over an old one.
Pardon me. I thought it to be the same topic.
Thanks for the idea. I will try it. |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Fri Nov 24, 2006 5:59 pm |
#TRIGGER {Damage~:%s(%d)} {#PCOL orange %x1}
#TRIGGER {Damage~:*$(%d)} {#PCOL orange %x1}
Ah I skimmed and missed the idea that the two could be on different lines.
You probably will need two triggers to quickly process the possibilities. |
|
|
|
|
|