Sometimes omit alias from output

Posted by Areadien on Fri 16 Feb 2018 11:57 PM — 3 posts, 15,606 views.

USA #0
Hello,

I would like to create a conditional omit_from_output for an alias. I have everything else gagged properly, but when I execute a certain alias only when a certain variable is set to true. Here's my code so far.

<aliases>
    <alias enabled="y" match="^cont$" omit_from_output="y" regexp="y" send_to="12" sequence="100">
        <send>continue()</send>
    </alias>
</alias>

function continue()
    if varSet == true then
        Send("c") --I want this gagged in this instance, and not any other time I send "c"
    end
end


I have other functions that set the variable to true or false, and they're attached to a trigger.
Australia Forum Administrator #1
The "omit from output" just omits the alias being echoed in the output window (for you to see), it doesn't stop it doing what it is going to do.

You can do SendNoEcho to send to the MUD and not echo in the output window.

Template:function=SendNoEcho
SendNoEcho

The documentation for the SendNoEcho script function is available online. It is also in the MUSHclient help file.

USA #2
Yeah, I wanted it to not show for me under a specific circumstance.

I figured out how to do this, though. What I did was I made a second alias to be fired under that circumstance, and I've set it to omit_from_output="y".