You didn't even ask for my help. Well, at least I wrote the scripts for the diplomacy. That's some help.
Thanks for the build, we'll test it!
By the way, a question arose - if the dungeons are removed, does the guard remain? Maybe something else could be placed instead of the dungeon? Perhaps a random artifact from the corresponding class, based on the hero's level: 1 treasure for levels 1-3, 5 for levels 4-9, 10 for levels 10-19, and 20 for levels 20+. Or, for levels 1-5, 1 treasure, 10 minor artifacts, and 20 major artifacts.