You are referencing arg1 when it should be spellID and you are checking the wrong events. Give this a shot:
Lua Code:
local SPELL_ID = 24275 -- Hammer of Wrath
local frame = CreateFrame("Frame")
frame:SetScript("OnEvent", function(self, event, spellID)
if event == "SPELL_ACTIVATION_OVERLAY_GLOW_SHOW" then
if spellID == SPELL_ID then
print("Hello, WoW!")
end
elseif event == "SPELL_ACTIVATION_OVERLAY_GLOW_HIDE" then
if spellID == SPELL_ID then
print("Bye")
end
end
end)
frame:RegisterEvent("SPELL_ACTIVATION_OVERLAY_GLOW_SHOW")
frame:RegisterEvent("SPELL_ACTIVATION_OVERLAY_GLOW_HIDE")