The script was inspired from the MinimapEvents widget written by trepan. It adds a "/luaui specmode" command during gameplay to activate it. You can also use CTRL+ALT+S to enable/disable it and CTRL+ALT+C to switch between normal mode and attract mode.
The script will move the camera around "hot" places on the map. If there is no fighting then the widget will show different buildings, units that are created.
For the moment there is no algorithm to prioritize the importance of an event just that an battle event is more important than a building completion one.