Gagging output

Post Reply
Akaxi
Posts: 13
Joined: Tue Sep 28, 2010 8:06 pm

Gagging output

Post by Akaxi »

I have some code that pulls out text from the main display and puts it in a miniconsole. I can remove the text from the main display (using selectString(matches[1],1) and deleteLine() ), but I still end up generating another command line prompt.

For instance (this is in MKO), the main display has something like
7110 health, 286 endurance xb-ih
7110 health, 286 endurance xb-
With the actual output of 'ih' going elsewhere. I'd like the second line there to never appear, or alternatively for the first one to be removed, so on the main display its like the command never happened. Any ideas?

User avatar
Rakon
Posts: 350
Joined: Tue Feb 16, 2010 7:41 pm
Contact:

Re: Gagging output

Post by Rakon »

Make a trigger that matches on your prompt, and has the following logic:
Code: [show] | [select all] lua
if  promptGag == nil then promptGag = false end -- Make sure we're not checking a nil variable

if promptGag == true then 
 deleteLine(line)
end 

promptGag = false
In your IH capture alias, set a variable :
'promptGag = true'

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Gagging output

Post by Vadi »

You can also use:
Code: [show] | [select all] lua
deleteLine()
tempLineTrigger(1,1,[[if isPrompt() then deleteLine() end]])

Akaxi
Posts: 13
Joined: Tue Sep 28, 2010 8:06 pm

Re: Gagging output

Post by Akaxi »

Thanks, both of you!

Unrelated question - is the echoLink() bug still active? (https://bugs.launchpad.net/mudlet/+bug/589706/+activity)
I'd like to format the text other than blue underlined in a miniconsole, but I don't see an obvious workaround and the "true" boolean argument seems to be bugged.

Not a big deal, of course - just curious!

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Gagging output

Post by Vadi »

it'll work in the next update, or might work in the latest prerelease.

Post Reply