Event Display lets you define lua functions for different events in game. You can respond to many different things exactly the way you want.
How to create a frame
The first step is to open the configuration screen by typing /ed In the options, you need to create a frame first, by setting a frame name, clicking OK and clicking Add. The frame now appears on the list and you can configure it as you want. Third step is to add events to your window, which can be done in the events tab. It's possible to define any ingame events, combat log related events (by just typing in the combat event name) and also an OnUpdate event. There is also an OnInitialize event for every frame, which can be defined directly in the frame details.
/ed ui,config,options - displays the configuration screen