[2997] Implement script support for quest 9879

This will use the same base code as quest 9868.
Also, please note that this commit involves a lot of guesswork.

Part of #27