//

The COMBAT_LOG overkill argument will have a value of -1 if the unit was not killed by the attack. For killing blows the value will be greater than or equal to 0, with a 0 for the case in which the blow delivered exactly the required amount of damage. 

function Foo_OnLoad()
  this:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED");
end

function Foo_OnEvent(self, event, ...)

  local timestamp, type, sourceGUID, sourceName, sourceFlags, destGUID, destName, destFlags = select(1, ...)
  -- Note, for this example, you could just use 'local type = select(2, ...)'.  The others are included so that it's clear what's available.

  if (event=="COMBAT_LOG_EVENT_UNFILTERED") then
    if (type=="SPELL_DAMAGE") then

      local spellId, spellName, spellSchool = select(9, ...)
      -- Use the following line in game version 3.0 or higher, for previous versions use the line after
      local amount, overkill, school, resisted, blocked, absorbed, critical, glancing, crushing = select(12, ...)

      if (spellName=="Mind Blast" and critical==true) then -- ==true for clarity only.  Not needed.
        DEFAULT_CHAT_FRAME:AddMessage("Mind Blast Just Critted!");
      end
    end
  end
end



if ((eventType == "PARTY_KILL") and (sourceName == UnitName("player"))) then