EnigmaScript is a programming/scripting language designed to make it easy for Minecraft map makers to make adventures or stories. But it can do more then that! The easy but powerful scripting language allows you to perform actions when various events occur in the world. You can listen to block interaction events, you can interphere when the player dies, you can do timed actions. Based on those events you can then spawn mobs, change parts of the worlds, animate blocks, and so on.
Documentation on EnigmaScript here: EnigmaScript Wiki
This mod also supports The Lost Cities (https://minecraft.curseforge.com/projects/the-lost-cities)
This mod works well with In Control (https://minecraft.curseforge.com/projects/in-control)