[mt663] Implement BeforeDespawn and DoAction in creature AI for instance scripting purposes.