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.
 Entire forum ➜ MUSHclient ➜ General ➜ Gagging on an if?

Gagging on an if?

Posting of new messages is disabled at present.

Refresh page


Posted by Katie Love   (19 posts)  Bio
Date Tue 23 Dec 2008 09:04 PM (UTC)
Message
I'm trying to set up a trigger that will gag, but not always.

For example, I have a trigger set to grab room exits when I do a look or when a new room is entered. During certain times, the script may want to fire a "look" on it's own.

The problem is, if the "look" command is USER generated I want it to display the output. if the "look" command is AUTO generated, I want it gagged. The checkbox option in the create trigger window appears to be a one-size fits all solution.

Any thoughts on this? Does my question make sense? Thanks!
Top

Posted by WillFa   USA  (525 posts)  Bio
Date Reply #1 on Tue 23 Dec 2008 09:19 PM (UTC)
Message
Just to give you a couple of ideas to run with:

Trigger always gags, sends to script after omit, if checks to see if last CommandHistory is look then notes/ColourNotes the omitted text...

Gives the end result you want. It may not handle spammed user input well.



alternate way:
Gag trigger is in a group, script enables the group, sends a look, mud outputs the text and a prompt, prompt trigger disables the group.

Doing this though may not handle lag very well.

Top

Posted by Katie Love   (19 posts)  Bio
Date Reply #2 on Tue 23 Dec 2008 10:12 PM (UTC)
Message
Thanks for the tips WillFa :-)

It least it's giving me a place to start. I had thought of a couple similar ideas, but the just seemed...messy. I guess I wasn't too far off track!
Top

Posted by Nick Gammon   Australia  (23,122 posts)  Bio   Forum Administrator
Date Reply #3 on Tue 23 Dec 2008 11:08 PM (UTC)
Message
Quote:

The checkbox option in the create trigger window appears to be a one-size fits all solution.


As Willfa says, scripting lets you extend the basic GUI interface to handle different situations.

However the idea of a trigger sending something, and that something, which arrives later (maybe after a tell or two) being automatically gagged, is something I can't even begin to envisage how it might automatically happen.

Just imagine an auto-generated "look" happening during a fight, and the room description showing up 20 lines later. Unless you can recognize the room description (eg. by its colour) then you are in trouble.

However if the room description *can* be recognized in some way, then a simple thing would be to enable the gagging trigger, as Willfa says, at the time you send the "look" and when the description arrives, have the gagging trigger disable itself.



- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Shadowfyr   USA  (1,788 posts)  Bio
Date Reply #4 on Wed 24 Dec 2008 04:44 PM (UTC)
Message
Wouldn't it be easier to just recognize that you entered combat, or left, and gag/ungag the automatic event instead?
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.


20,055 views.

Posting of new messages is disabled at present.

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.