Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Tips and tricks ➜ Help with a trigger

Help with a trigger

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Jaegar   (6 posts)  Bio
Date Tue 31 Aug 2004 09:55 PM (UTC)
Message
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.
Top

Posted by Flannel   USA  (1,230 posts)  Bio
Date Reply #1 on Tue 31 Aug 2004 10:29 PM (UTC)
Message
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.

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
Top

Posted by Jaegar   (6 posts)  Bio
Date Reply #2 on Tue 31 Aug 2004 10:47 PM (UTC)
Message
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).

Top

Posted by Flannel   USA  (1,230 posts)  Bio
Date Reply #3 on Tue 31 Aug 2004 11:09 PM (UTC)
Message
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\: \'(.*?)\'$

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
Top

Posted by Jaegar   (6 posts)  Bio
Date Reply #4 on Mon 06 Sep 2004 11:25 PM (UTC)
Message
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 (.*?)\'$

Top

Posted by Flannel   USA  (1,230 posts)  Bio
Date Reply #5 on Tue 07 Sep 2004 02:53 AM (UTC)
Message
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.


~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


18,227 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.