 |
LEit Novice
Joined: 27 Jul 2002 Posts: 38 Location: USA
|
Posted: Sun Jul 28, 2002 12:38 am
Trigger on a variable |
I want to execute a trigger on a string I've collected in a variable. Is there some way to do that?
Here's an example of the string:
It improves intelligence and wisdom slightly. However, it worsens armor considerably.
Here's the trigger:
({enhances|improves|worsens|hampers}) (*) ({slightly|somewhat|considerably|strongly|incredibly})
#if ("%2" =~ "intelligence") {#ADDKEY Item {IntBonus=%1 %2}}
#if ("%2" =~ "wisdom") {#ADDKEY Item {WisBonus=%1 %2}}
#if ("%2" =~ "armor") {#ADDKEY Item {ACBonus=%1 %2}}
What I want to do is catch the amount, and direction and what it helps/hurts. |
|
|
|
 |
LEit Novice
Joined: 27 Jul 2002 Posts: 38 Location: USA
|
Posted: Sun Jul 28, 2002 12:40 am |
It's in a variable because the acutal mud output will span several lines, so I've gathered them all into one variable.
|
|
|
|
 |
LEit Novice
Joined: 27 Jul 2002 Posts: 38 Location: USA
|
Posted: Sun Jul 28, 2002 1:09 am |
I found a way to do it:
#echo @specials
I needed to make a few changes to the trigger to get it to work |
|
|
|
 |
|
|
|