|
webalchemy Newbie
Joined: 25 Jan 2015 Posts: 2
|
Posted: Sun Jan 25, 2015 7:42 am
Multiple lines in a trigger |
Hi all -
I'm trying to write a trigger to capture item info and write to a database. When the item info is displayed on screen, the actual item detail begins on line 4 of the output, and I can't figure out how to get CMUD to correctly obtain the data. Here's an example of output:
Melizar the Sage tells you 'Ahhh... a long black cape...'
Melizar the Sage tells you 'Hrmm... YES, I know of this item... '
Item Keywords: cape black
Size: Normal, Composition: Silk, Weight: 6
Min Level: 20, Cost: 114000, Rent/day: 22800
This item is classified as ARMOR, with the following modifiers:
Equip Positions: TAKE NECK
Additional Modifiers: MAGIC
I'm trying to get my trigger to read the data immediately after the words "Item Keywords:" on line 4. I've tried several attempts at using regex to skip down (some below)... but none work, as no data ever gets assigned in #ADDKEY.
#TRIGGER {*Item Keywords: (*)} {#ADDKEY Item {Name="%1"}}
#TRIGGER {*$*$*$Item Keywords: (*)} {#ADDKEY Item {Name="%1"}}
etc...
How can I tell CMUD to skip the first 3 lines? Thank you!
Doug |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4671 Location: Pensacola, FL, USA
|
Posted: Sun Jan 25, 2015 8:49 am |
Don't worry about how many lines come between.
#TR {Item Keywords: (*)} {#ADDKEY Item Name %1} |
|
_________________ Discord: Shalimarwildcat |
|
|
|
webalchemy Newbie
Joined: 25 Jan 2015 Posts: 2
|
Posted: Sun Jan 25, 2015 9:17 pm |
Hi Shalimar - yes, tried that too... nothing.
It's weird, from the example above, if I use:
#TR {Melizar (*)} {#ADDKEY Item Name %1} melizar
then it works fine, and returns the string: the Sage tells you 'Hrmm... YES, I know of this item... '
so it does work (though notice it pulls the second occurrence of the work Melizar). I just can't get it to find the string match on the 4th line. Very frustrating. |
|
|
|
|
|
|
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
|
|