[MudWalker] MudWalker triggers

Kevin Reid kpreid at mac.com
Thu Aug 27 08:15:54 PDT 2009


On Aug 27, 2009, at 3:36, Taylor Telford wrote:

> Thanks for the list of helpful ideas.  So I've been toying with it  
> while playing and having issues getting it to work.  I do understand  
> that one of my problems is that some of the spells are two words  
> (sense life, detect good, etc.) so that I'm not sure how I will have  
> to compensate for that when writing the script.  EVERY Fumbling of a  
> spell will start with "You fumble over the correct inflection to  
> cast" and then the spell name.  Now under the assumption that the  
> spell is one word I tried writing something like:
>
> Match patterns:
>
> You fumble over the correct inflection to cast (.*)$
>
> Script:
>
> cast $$arg[1]
>
> This has not worked for me and I guess I'm at a loss for what to do.

If there's a period at the end of the line, e.g.

   You fumble over the correct inflection to cast sense life.

then that pattern will match it too, and produce a command:

   cast sense life.

which I would imagine might be rejected. You need to match the period  
at the end as *not* part of the text captured as arg[1], and while  
you're at it it would be a good idea to anchor the pattern to the  
beginning of the line:

   ^You fumble over the correct inflection to cast (.*)\.$

> -----Original Message-----
> From: mudwalker-bounces at cubik.org on behalf of Ryan
> Sent: Wed 8/26/2009 11:13 AM
> To: mudwalker at cubik.org
> Subject: Re: [MudWalker] MudWalker triggers

Please place *relevant* portions of quotes only at the *top* of the  
message. Do not include the entirety of the original message.

-- 
Kevin Reid                                  <http://switchb.org/kpreid/>






More information about the MudWalker mailing list