Page 2 of 2

Re: creating a combat log file

Posted: Sun Apr 07, 2013 8:08 pm
by lisa
If you really wanted to use the addon with MM you could add a function like this to the addon.

Code: Select all

function AdvCombatLog_return()
	--return AdvCombatLog_Log
	local ret = ""
	if #AdvCombatLog_Log ~= 0 then
		for i = 1, #AdvCombatLog_Log do
			ret = ret..AdvCombatLog_Log[i]
		end
		return ret
	else
		SendSystemChat("nothing")
	end
end
Unfortunately I failed at making it return a table so I had to make the table into a string.

Looks something like this

Code: Select all

Command> print(sendMacro("AdvCombatLog_return()"))
Use MACRO: Executing RoMScript "AdvCombatLog_return()".
[01:56:16 pm]  > Urgent Heal < 2184 < Life[01:56:18 pm]  > Urgent Heal < 2201 <
Life[02:01:42 pm]  > Urgent Heal < 2143 < Life[02:01:46 pm] Charname > Magic Frog
> Purgatory Fire < 16037 < critically < Life[02:01:49 pm] Charname > Zapa River Os
trich > Purgatory Fire < 15913 < critically < Life[02:01:52 pm] Charname > Magic F
rog > Purgatory Fire < 15752 < critically < Life[02:01:53 pm] Charname > Zapa Rive
r Ostrich > Purgatory Fire < 15496 < critically < Life[02:01:59 pm] Charname > Zap
a River Ostrich > Purgatory Fire < 12669 < Life[02:01:59 pm] Charname > Magic Frog
 > Purgatory Fire < 15878 < critically < Life[02:01:59 pm] Charname > Zapa River C
hupura > Purgatory Fire < 15827 < critically < Life[02:02:03 pm] Charname > Magic
Frog > Purgatory Fire < 15951 < critically < Life[02:02:06 pm] Charname > Rat > Pu
rgatory Fire < 15821 < critically < Life[02:02:06 pm] Charname > Rat > Purgatory F
ire < 15680 < critically < Life[02:02:07 pm] Charname > Rat > Purgatory Fire < 157
15 < critically < Life[02:02:08 pm] Charname > Zapa River Chupura > Purgatory Fire
 < 15788 < critically < Life[02:02:08 pm] Charname > Magic Frog > Purgatory Fire <
 15774 < critically < Life[02:02:11 pm] Charname > Zapa River Ostrich > Purgatory
Fire < 15445 < critically < Life[02:02:13 pm] Charname > Magic Frog > Purgatory Fi
re < 15741 < critically < Life

Re: creating a combat log file

Posted: Mon Apr 08, 2013 12:06 am
by rock5
You could have added a carriage return between each, to improve readability.

Code: Select all

         ret = ret.."\n"..AdvCombatLog_Log[i]

Re: creating a combat log file

Posted: Mon Apr 08, 2013 12:58 am
by lisa
rock5 wrote:You could have added a carriage return between each, to improve readability.

Code: Select all

         ret = ret.."\n"..AdvCombatLog_Log[i]
good point, I was trying to think of something but nothing came to mind, so simple but so good =)