Re:Regular Expressions

May 23, 2015 01:49AM
To specify exactly "di" and match only that string, you must use the regex "^di$", where the caret ^ indicates start of line and $ indicates end of line.

If you want to specify a single di that is with and without a target, there are multiple ways to do it depending on your needs.

For example if you want di to target someone when you have a target variable set, but not target anyone when not, then you need to put in an IF condition in the script box. Something like (in pseudocode):

if ( not exist target ) then
send ( "c 'dispel magic'" )
else
send ( "c 'dispel magic' " .. target )
endif
Subject Author Posted

Basic Mudlet/Lua alias setup questions

Unnamed_ May 22, 2015 11:48AM

Re:Regular Expressions

starbright May 23, 2015 01:49AM

More scripting

starbright May 23, 2015 08:23AM

Re: More scripting

Unnamed_ May 24, 2015 07:07AM

Re: More scripting

starbright May 24, 2015 11:12AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 33
Record Number of Users: 59 October 25, 2015
Record Number of Guests: 341 February 12, 2018