Zmud - Saving a pattern into a variable.

... A place to ask for help on any topic whether it be starting out to player killing to IT issues.
Taziar
Posts: 961
Joined: Sat Mar 21, 2015 10:28 pm

Re: Zmud - Saving a pattern into a variable.

Post by Taziar » Tue Oct 11, 2016 10:19 am

Glad all this came up because I learned something cool!

Reading some forum posts and doing some testing I have found that if you set your trigger as case sensitive whenever possible it helps to speed up your triggers and optimize speed, this is because ZMUD doesn't have to test for both lower and upper case on each letter in a string. Also using the idea above I found that setting the case will force pattern matching to work like this:

[A-Z]%w with case set will only trigger on a Capitalized word

[a-z]%w with case set will only trigger on a word not capitalized.

Without case set both [A-Z] and [a-z] trigger for either upper or lower case.

You can use {case} at the end of a trigger (trigger option) to set case sensitive.

Taziar

Enok
Posts: 166
Joined: Sat Apr 16, 2016 3:44 pm
Location: Sweden

Re: Zmud - Saving a pattern into a variable.

Post by Enok » Tue Oct 11, 2016 12:58 pm

Hey,

Unfortunately haven't got it working yet. Will look into it again tomorrow or the day after. I do appreciate the work you guys put in. Still trying to find my way around zmud.

Taziar
Posts: 961
Joined: Sat Mar 21, 2015 10:28 pm

Re: Zmud - Saving a pattern into a variable.

Post by Taziar » Sat Oct 15, 2016 1:25 pm

Got a version of this to work and added functionality to my prompt script located here:

http://www.wotmudarchives.org/forum/vie ... 2581#p2581

Variable names to use in target script:
promptPlayerName
promptPlayerCondition

Works in all forms of prompt, solo, assisting pc or mob.

Any questions or help for any of my zMud scripts shoot me a mail or post here in help.

Post Reply