print() should do fine normally.
But this time you need to explicitly add "self" to the function, because you removed the "frame:" (which acts as 'self').
Code:
local tracker = CreateFrame("Frame")
tracker:RegisterEvent("CHAT_MSG_LOOT")
local function Looten(self, event, ...)
if event == "CHAT_MSG_LOOT" then
print("it works")
end
end
tracker:SetScript("OnEvent", Looten)
Still, if it doesn't work, please post your .toc-file! Or add a
print("test") to the top of your file to see if it gets loaded at all.