EC: logging void pool results

If you want to log the results of void pool runs in EC, here is one way to do that.
This creates a new logfile for a given play session and playerID in the logs subdirectory under the UO game folder.

I didn't see an obvious way to append to an existing logfile, perhaps somebody knows how?

textparsing.lua, function TextParsing.TimersNbuff(), add this case:

	if ( SystemData.TextID == 1152649 or	-- for your participation in the battle for the void pool on ~1_FACET~, you have received ~2_POINTS~
SystemData.TextID == 1152650 -- during the battle, you helped fight back ~1_count~ out of ~2_total~ waves, your final wave was ~3_max~. your total score was ~4_score~
) then



textparsing.lua, add this at the end of the file:

TextParsing.VoidPoolResults = nil

function TextParsing.VoidPoolLog(output)

if(TextParsing.VoidPoolResults == nil) then
local filename = "logs/" .. Interface.Clock.DD .. "-" .. Interface.Clock.MM .. "-" .. Interface.Clock.YYYY .. "_" .. Interface.Clock.h .. "-" .. Interface.Clock.m .. "-" .. Interface.Clock.s .. "_" .. tostring(WindowData.PlayerStatus.PlayerId) .. "_voidpool.txt"

TextParsing.VoidPoolResults = "voidpool_results"

TextLogCreate (TextParsing.VoidPoolResults, 1024)
TextLogSetEnabled(TextParsing.VoidPoolResults, true)
TextLogSetIncrementalSaving( TextParsing.VoidPoolResults, true, filename )

TextLogSetEnabled( TextParsing.VoidPoolResults, true )
TextLogAddEntry(TextParsing.VoidPoolResults, 1, output)
TextLogSetEnabled( TextParsing.VoidPoolResults, false )


Sign In or Register to comment.