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, you do not have permission to post/reply in this forum.

Online Users

Guests: 104
Record Number of Users: 5 November 04, 2022
Record Number of Guests: 358 August 31, 2022