So whats the best way to gag the line right after a line is triggered?
For example I have all my tells and chats captured and sent to a miniconsole but the prompt that goes with that line is still showing in the mainwindow, so their getting alittle spammy.
Gagging a line after a line
Re: Gagging a line after a line
Depends on the context. In general, you can use tempLineTrigger() to gag x lines after y lines have arrived. However, for prompt gagging, I'd add some code to your prompt trigger that decides if the prompt should be gagged e.g. define a global boolean variable gagPrompt and flag prompt gagging in the respective triggers.
trigger script:
prompt script:
trigger script:
Code: Select all
gagPrompt = true
Code: Select all
if gagPrompt then
gagPrompt = false;
deleteLine()
end
Re: Gagging a line after a line
tempLineTrigger() is what I'm looking for, I guess I just need more info on it, not getting how to use it from the manual for some reason. I'll play with it as well and see if I can figure it out.
But thanks very much Heiko!
But thanks very much Heiko!
Re: Gagging a line after a line
They're quite handy... lemme see if I can help
tempLineTrigger(1,1, [[deleteLine()]])
would delete the line immediately following the line your trigger matches on, if you put it in the script box for that trigger.
IF you wanted to have some form of check as to whether you should gag the line or not, you could instead do
tempLineTrigger(1, 1, [[gagline()]])
and have
in a script somewhere. Then, if you want to gag the line, you set condition to true (you can use whatever variable you want... I'm just using condition as a placeholder) and insert the tempLineTrigger() call. Now, if the line you want to gag always comes 2 lines after the one your trigger fires on, it would be
tempLineTrigger(2, 1, [[gagline()]])
if you wanted to delete 3 lines following the one you trigger on, without checking, it would be:
tempLineTrigger(1, 3, [[deleteLine()]])
... so the first number is "how many lines to wait before starting" and the second is "once started, how many lines do I go for"
I don't know if that helps or not... but if not, ask questions, I'll try again.
tempLineTrigger(1,1, [[deleteLine()]])
would delete the line immediately following the line your trigger matches on, if you put it in the script box for that trigger.
IF you wanted to have some form of check as to whether you should gag the line or not, you could instead do
tempLineTrigger(1, 1, [[gagline()]])
and have
Code: Select all
function gagline()
if condition then
deleteLine()
condition = false
end
end
tempLineTrigger(2, 1, [[gagline()]])
if you wanted to delete 3 lines following the one you trigger on, without checking, it would be:
tempLineTrigger(1, 3, [[deleteLine()]])
... so the first number is "how many lines to wait before starting" and the second is "once started, how many lines do I go for"
I don't know if that helps or not... but if not, ask questions, I'll try again.
Re: Gagging a line after a line
Perfect Demonnic! I understand how to use it now. Thanks very much, its in my script and functioning just like I want.
EDIT: AND I just figured out that tempLine solves another problem I was having elsewhere, very nice!
EDIT: AND I just figured out that tempLine solves another problem I was having elsewhere, very nice!