Help with a trigger

Posted by Jaegar on Tue 31 Aug 2004 09:55 PM — 6 posts, 19,175 views.

#0
I am trying to figure out if there is a way to setup a trigger to assign a "master" used for grouping. I am wanting to use this function so that I can setup certain triggers that will only be accessable by the person I assign as the "master" or group leader.

On one of the muds that I play, grouping is a very major part of the game. If the leader needs the group to enter a portal, it would be easier if I could setup a trigger to recognize when the group leader (and only the group leader) group tells a command such as gt "all enter portal" or all sleep, all stand, etc... Does anyone have any idea on how this can be done. I do not have enough knowledge of the scripting or triggers to come up with a solution for this. Any help would be greatly appreciated.
USA #1
I assume the group leader would change?

you could have a trigger like this:
@master tells the group: 'enter portal'.
With expand variable checked, and then the variable master would have their name.

Of course, with no output, I cant be too specific.
You could even do something like this:

@master tells the group: 'command all *'.
then he could command people to do anything, and you could catch it all (make certain checks, of course, so he cant delete you or anything), and then send it to the mud.

If you were to post some examples (copy/paste mud output) then we could be more specific in assisting.
#2
Here are a few examples of how the group tells look

**Zhara: 'all sleep'

**Zhara: 'all stand'

**Zhara: 'all enter ball'

**Zhara: 'all pull book'

This way the group will follow those specific commands, enter ball (name of the portal), sleep or stand, pull an object, etc...

However, I want to limit this to only the master (group leader).

USA #3
Since the trigger has asterisks in it, you'll need to use regular expressions.

^\*\*@master\: \'all stand\'$

should work (expand variables, regexp) and make a variable named "master" with Zhara in it.
And then change all stand for everything else.

You also might want to set it to ignore case.

If you wanted a catch all, would do this:
^\*\*@master\: \'(.*?)\'$
#4
I have created a variable names master. Now I would like to be able to set this from within the game by typing a command such as master [whoever]

then be able to add a check for this statement so that it will only recognize it if it is from the person named in the master variable

^[*]+(.*)\: \'all (.*?)\'$

USA #5
You dont need to use a wildcard.

Use @master (whereever you want it to be, like I already had), with expand variables checked.

It will then only match on lines with the master's name.

And your alias is simple, just make the alias, and then send: %1 or whatever (the correct wildcard) and then send to: variable.