I used a label structure to create subroutines on an event, which can't account for them.
program goes in, literally runs the command "go to label xxxxx" as a script call ("xxxxx" being dynamic, changes according to the game), runs the event, goes back right after the script call, exits the main loop.
I didn't want to bother making hundreds of independent common events that would all run the-same-thing-but-not-quite, so I packed them all into the same event through labels.
the system didn't merit it's own plugin, hence the complex eventing.
the whole system is basically a manager: you send it one piece of data, the event does all the processing, and returns, independent from the main program.