Gagging on an if?

Posted by Katie Love on Tue 23 Dec 2008 09:04 PM — 5 posts, 25,879 views.

#0
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!
USA #1
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.

#2
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!
Australia Forum Administrator #3
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.


USA #4
Wouldn't it be easier to just recognize that you entered combat, or left, and gag/ungag the automatic event instead?