[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Gagging on an if?
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Gagging on an if?

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


Posted by Katie Love   (19 posts)  [Biography] 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!
[Go to top] top

Posted by WillFa   USA  (525 posts)  [Biography] 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.

[Go to top] top

Posted by Katie Love   (19 posts)  [Biography] 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!
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] 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
[Go to top] top

Posted by Shadowfyr   USA  (1,783 posts)  [Biography] 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?
[Go to top] 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.


5,650 views.

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

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]