Group and sort events in WorldScriptHelper.