onDeath moved to event and loot message moved to lua.

cropse in onDeath is now a metatable and contains the loot before it was
empty.