Description
General
First of all, This isn't a Wow in-game addon....It's a NotePad+ + Plugin for debugging LogsWowCombatLog.txt
Choose to download the correct file to match your NotePad+ + (ANSI or UNICODE) AND WCMINCLUDES.zip Extract to the "plugins" folder in your NotePad+ + Directory, And begin the work...
TIPS: If you're required "lua51.dll", just download lualibs.zip and extract into your C:/Windows/Systeam32
You will find the plugin options in the NotePad+ + Menu plugins->WowCombatLogManager, there are 2 options here...
Load Current Editor As Lua Function:
- This will load your current text as Lua codes in your NotePad+ +, and run it ,As the picture shows...
So evenif you don't need to load WowCombatLog.txt... you can use it as a debugger of you lua codes
Load WowCombat TextFile
- This will popup a OpenFileDialog, after you choose a file (typically, World of Warcraft\Logs\WowCombatLog.txt), It will load Combat.lua file in your folder of Npp\Plugins\WCMINCLUDES\Combat.lua and transfer the file path you just choosed as it's argument. So in your Combat.lua you can get the file path by doing this
local path = ... local f = io.open(path,"r") --Deal with your file
- Threr is already a Combat.lua in the WCMINCLUDES folder.....You can modifier it as you want........ By default, You can see what will happen by do "Load Current Editor As Lua Function" with the codes below after loading a WowCombatLog.txt which include at least one Boss encounter of CTM (Every 100MB Text File will cause about 1 minutes to load, And be sure you have enough RAM)
local i = 0 for args in R:DO(1) do if i > 100 then return end print(args.time, args.event, args.sourceName, args.destName, args.spellId, args.spellName) i=i+1 end
Tips
The two options will share the same global environment and a same Lua state, That mean you can load WowCombatLog.txt once, and debug it for multi time...
That is one of the reason why i develope this instead of using "lua for windows"
C APIs
Threr are 5 C APIs I provide for lua..
- 1.MyStringMethod
- Use lua string pattern-match to deal with a hundreds of MBs Text file will be painful, So you can use this
local str = "12/18 13:59:49.540 SPELL_AURA_APPLIED,0x0480000001B73E33,\"Karal\",0x514,0x0,0x0480000001CA5187,\"Semon\",0x514,0x0,19506,\"Trueshot Aura\",0x40,BUFF" local time, event, sourGUID, sourName, ... = MyStringMethod(str) print(time) -- 13:59:49.540 print(event) -- SPELL_AURA_APPLIED print(sourName)-- Karal
- 2.OutPutString
- This is a function for outputting, so you can define your "print" function like the codes below:
function print(...) OutPutClear() local m = {...} local num = select('#',...) for i=1, num do m[i] = tostring(m[i]) end local str = table.concat(m, " ") str = str .. '\n' OutPutString(str) end
- 3.OutPutClear
- Just clean the OutPutWindow
- 4.SetCurrentDirectory
- If you don't know what is it for ,just ignore it ....... It does the same thing as the WIN32 api "SetCurrentDirectory" does..
- Since WowCombatLog.txt is encoded in UTF-8, I need to use require"icu", and it will load another 4 WIN32 dlls in Current App Directory, So i need to change it so that i can put all dlls in WCMINCLUDES folder..
- 5.GetCurrentDirectory
- The same as "SetCurrentDirectory"


