• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

Question - Events - flush or not to flush. That, is the question.

AmericanNero

Seasoned veteran member
Joined
Oct 13, 2020
RedCents
4,709¢
Questions! I seek wisdom.

Is there a maximum age for events, or a maximum queue depth? I tried to rtfm but nada.

I wonder how aggressive code should be at flushing. Not all code I see uses flush in a way I think would make sense. Sometimes you don't want to flush, which is for good reason because sometimes you want the same event to repeat. But sometimes I think all events of a type should be flushed.

Thank you,
AN
 
i see it this way, if i want my reaction to the event to happen when the event happens, and not on some older trigger in the stack, then i flush
 
Hell I was thinking if its yellow let it mellow if its brown send it down ....... not the flushing I was expecting
 
In all seriousness, can we wipe away the silly. I had a question that I seek wisdom for. Unless the silence means nobody knows and this thread is flushed, winding up at Fippy's.
 
kaen answered your question with a good answer. If you have more questions after that answer, now's a good time to ask.
 
Easiest way to check for a maximum number of events is to test it. Without looking in source no one probably knows how many events you can queue up because it isn't relevant.

#event testEvent "#*#eventtest#*#"

Sub Main
/while (1) {
/echo eventtest ${Event.Triggered}
/delay 1
}
/return

Sub Event_testEvent
/return
 
The reason I asked, and I *should* have been more upfront about it but I wasn't thinking clearly, is I was looking at some legacy code and noticed a slowdown as time went on. Now, since I'm not the original author and the code has passed through many hands, I am loathe to tinker with certain things until I am certain, and it's a pretty big chunk of code.

If the number of events in the queue keeps building I thought maybe that might be a contributing factor. Sorry for my original poor question.
 
It shouldn't, but who knows. You can check how many are queued with the above Event info.
 
Easiest way to check for a maximum number of events is to test it. Without looking in source no one probably knows how many events you can queue up because it isn't relevant.

#event testEvent "#*#eventtest#*#"

Sub Main
/while (1) {
/echo eventtest ${Event.Triggered}
/delay 1
}
/return

Sub Event_testEvent
/return

${Events} or ${Event} are not exposed TLO. The manual says so, and I tested it :) But I figure a good old fashioned /doevents will do the trick.
 
Last edited:
The likely answer is when you/the process runs out of memory. It's more than 10,000
 
i think older macro coders, wasn't sure entirely on when and where to doevents, cause sometimes you see them thrown in for good measure, i even done that myself, thinking events was something it wasn't, so legacy code can be extremely misleading when it comes to that.
 
Question - Events - flush or not to flush. That, is the question.

Users who are viewing this thread

Back
Top
Cart