I have another question: how do I create a quest to "capture a specific town within a specified time (e.g., 2 weeks)"? If possible, please provide an example of such a script. Thank you in advance.
This is also not done through scripts, but through the map properties tree. How to do this is explained in the manual, for example, in this one: http://www.heroesworld.ru/files/data/409/465/Heroes5_Manual_ru.zip