Well your trying to call:
nothing:donothing()
at the start of the script (since both the pointer and the method do not exist in this context).
This is where you are going wrong:
Code:
function SpellFinder(Event, pPlayer, spellId)
-- When a spell is cast this function is called
-- The person who cast this spell (pPlayer) and the spellId (spellId) are provided in the arguments
if spellId == 58178 then -- if spellid = 58178
pPlayer:CastSpell(30971) -- player cast this spell
end
end
RegisterServerHook(10, "SpellFinder")