Combat log event unfiltered menu

User Tag List

Results 1 to 4 of 4
  1. #1
    G0tha's Avatar Member
    Reputation
    9
    Join Date
    Jul 2013
    Posts
    76
    Thanks G/R
    4/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Combat log event unfiltered

    PHP Code:
    if not CombatLogActionDetectedTable then CombatLogActionDetectedTable={} end
    if not fdrcrit then fdrcrit=CreateFrame("Frame"end

    function CombatLogActionDetected(timestamp,eventtype,unknown1,casterGUID,casterNAME,unknown2,unknown3,targetGUID,targetNAME,unknown4,unknown5,spellID,spellNAME,spellSCHOOL,TimeToKeepInTable)

            
    fdrcrit:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
           function 
    fdrcritOnEvent(self,event,...)
                    
                    if 
    event == "COMBAT_LOG_EVENT_UNFILTERED" then
                    local cLOG
    ={...}
                    if (
    cLOG[1]==timestamp        or timestamp=="nic")
                    and(
    cLOG[2]==eventtype      or eventtype=="nic")
                    and(
    cLOG[3]==unknown1     or unknown1=="nic")
                    and(
    cLOG[4]==casterGUID   or casterGUID=="nic")
                    and(
    cLOG[5]==casterNAME  or casterNAME=="nic")
                    and(
    cLOG[6]==unknown2      or unknown2=="nic")
                    and(
    cLOG[7]==unknown3      or unknown3=="nic")
                    and(
    cLOG[8]==targetGUID    or targetGUID=="nic")
                    and(
    cLOG[9]==targetNAME   or targetNAME=="nic")
                    and(
    cLOG[10]==unknown4    or unknown4=="nic")
                    and(
    cLOG[11]==unknown5     or unknown5=="nic")
                    and(
    cLOG[12]==spellID        or spellID=="nic")
                    and(
    cLOG[13]==spellNAME     or spellNAME=="nic")
                    and(
    cLOG[14]==spellSCHOOL   or spellSCHOOL=="nic")
                    
    then
                  
                    tinsert
    (CombatLogActionDetectedTable,{
                    
    timestamp   =   cLOG[1],
                    
    eventtype   =   cLOG[2],
                    
    unknown1    =   cLOG[3],
                    
    casterGUID  =   cLOG[4],
                    
    casterNAME  =   cLOG[5],
                    
    unknown2    =   cLOG[6],
                    
    unknown3    =   cLOG[7],
                    
    targetGUID  =   cLOG[8],
                    
    targetNAME  =   cLOG[9],
                    
    unknown4    =   cLOG[10],
                    
    unknown5    =   cLOG[11],
                    
    spellID     =   cLOG[12],
                    
    spellNAME   =   cLOG[13],
                    
    spellSCHOOL =   cLOG[14],
                    
    TimeToKeepInTable TimeToKeepInTable,
                    
    Gtime       =   GetTime(),
                    
    MyCurrentTarget UnitGUID("target")
                    })
                    
    end
                    end
            end
            fdrcrit
    :SetScript("OnEvent",fdrcritOnEvent)
                
                for 
    i=1,#CombatLogActionDetectedTable do
                    
    if GetTime()>CombatLogActionDetectedTable[i].Gtime+CombatLogActionDetectedTable[i].TimeToKeepInTable then
                    tremove
    (CombatLogActionDetectedTable,i)
                    
    end
                end
                    
                
    for i=1,#CombatLogActionDetectedTable do
                    
    if (CombatLogActionDetectedTable[i].timestamp==timestamp        or timestamp=="nic")
                    and(
    CombatLogActionDetectedTable[i].eventtype==eventtype        or eventtype=="nic")
                    and(
    CombatLogActionDetectedTable[i].unknown1==unknown1          or unknown1=="nic")
                    and(
    CombatLogActionDetectedTable[i].casterGUID==casterGUID      or casterGUID=="nic")
                    and(
    CombatLogActionDetectedTable[i].casterNAME==casterNAME      or casterNAME=="nic")
                    and(
    CombatLogActionDetectedTable[i].unknown2==unknown2          or unknown2=="nic")
                    and(
    CombatLogActionDetectedTable[i].unknown3==unknown3          or unknown3=="nic")
                    and(
    CombatLogActionDetectedTable[i].targetGUID==targetGUID      or targetGUID=="nic")
                    and(
    CombatLogActionDetectedTable[i].targetNAME==targetNAME      or targetNAME=="nic")
                    and(
    CombatLogActionDetectedTable[i].unknown4==unknown4          or unknown4=="nic")
                    and(
    CombatLogActionDetectedTable[i].unknown5==unknown5          or unknown5=="nic")
                    and(
    CombatLogActionDetectedTable[i].spellID==spellID            or spellID=="nic")
                    and(
    CombatLogActionDetectedTable[i].spellNAME==spellNAME        or spellNAME=="nic")
                    and(
    CombatLogActionDetectedTable[i].spellSCHOOL==spellSCHOOL    or spellSCHOOL=="nic")
                    
    then
                    
    return 
                    
    true,                                      --1
                    CombatLogActionDetectedTable
    [i].timestamp,--2
                    CombatLogActionDetectedTable
    [i].eventtype, --3      
                    CombatLogActionDetectedTable
    [i].unknown1,--4
                    CombatLogActionDetectedTable
    [i].casterGUID,--5
                    CombatLogActionDetectedTable
    [i].casterNAME,--6
                    CombatLogActionDetectedTable
    [i].unknown2,--7
                    CombatLogActionDetectedTable
    [i].unknown3,--8
                    CombatLogActionDetectedTable
    [i].targetGUID,--9
                    CombatLogActionDetectedTable
    [i].targetNAME,--10
                    CombatLogActionDetectedTable
    [i].unknown4,--11
                    CombatLogActionDetectedTable
    [i].unknown5,--12
                    CombatLogActionDetectedTable
    [i].spellID,--13
                    CombatLogActionDetectedTable
    [i].spellNAME,--14
                    CombatLogActionDetectedTable
    [i].spellSCHOOL,--15
                    CombatLogActionDetectedTable
    [i].TimeToKeepInTable,--16
                    CombatLogActionDetectedTable
    [i].Gtime,--17
                    CombatLogActionDetectedTable
    [i].MyCurrentTarget--18
                    end
                end
    end



    CombatLogActionDetected
    ("nic","SPELL_CAST_SUCCESS","nic","nic","nic","nic","nic","nic","nic","nic","nic",86121,"nic","nic",20)
    CombatLogActionDetected("nic","SPELL_CAST_SUCCESS","nic","nic","nic","nic","nic","nic","nic","nic","nic",30108,"nic","nic",20)
    CombatLogActionDetected("nic","SPELL_CAST_SUCCESS","nic","nic","nic","nic","nic","nic","nic","nic","nic",86105,"nic","nic",20
    I want to create a function where i can use combat logs for all three events, but it only saves to table the last one listed on the bottom
    PHP Code:
    CombatLogActionDetected("nic","SPELL_CAST_SUCCESS","nic","nic","nic","nic","nic","nic","nic","nic","nic",86121,"nic","nic",20)
    CombatLogActionDetected("nic","SPELL_CAST_SUCCESS","nic","nic","nic","nic","nic","nic","nic","nic","nic",30108,"nic","nic",20)
    CombatLogActionDetected("nic","SPELL_CAST_SUCCESS","nic","nic","nic","nic","nic","nic","nic","nic","nic",86105,"nic","nic",20
    Last edited by G0tha; 03-26-2018 at 12:46 PM.

    Combat log event unfiltered
  2. #2
    G0tha's Avatar Member
    Reputation
    9
    Join Date
    Jul 2013
    Posts
    76
    Thanks G/R
    4/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anybody?

  3. #3
    Numba1stunna1's Avatar Active Member
    Reputation
    70
    Join Date
    Dec 2013
    Posts
    182
    Thanks G/R
    1/34
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Every time you call the method COmbatLogActionDetected, you're essentially creating (overwriting) a global callback function (fdrcritOnEvent) based on the arguments passed. This means the function will only work for when the LAST time the function is called of the arguments passed in the parameters. This is very messy coding. Create a local frame and callback function to lexically scope it for the SetScript("OnEvent",...). Then create a function to track those parameters in CombatLogActionDetected(), perhaps a table of tracked parameters.

  4. Thanks G0tha (1 members gave Thanks to Numba1stunna1 for this useful post)
  5. #4
    pofpof's Avatar Member
    Reputation
    1
    Join Date
    Mar 2020
    Posts
    21
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is it possible to get the addon for PQR Combat Log ONLY?

Similar Threads

  1. [BETA] Live Combat Log Single / Companion
    By ESTOPA in forum SWTOR Bots and Programs
    Replies: 8
    Last Post: 04-30-2012, 12:28 PM
  2. [How To] Wowmeteronline(combat log parsing)
    By gerathros in forum World of Warcraft Guides
    Replies: 4
    Last Post: 03-15-2009, 01:20 PM
  3. How to Read Combat log or Chat log? with program?
    By riki in forum World of Warcraft General
    Replies: 0
    Last Post: 08-06-2008, 02:41 PM
  4. [Discovery] Wierd Combat log
    By strobel in forum World of Warcraft Exploration
    Replies: 9
    Last Post: 04-13-2008, 08:32 AM
  5. Simple combat log thing
    By Herzeleid in forum WoW UI, Macros and Talent Specs
    Replies: 1
    Last Post: 08-06-2007, 10:12 PM
All times are GMT -5. The time now is 09:27 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search