Thank you for your answer, and I have another question for you. Is it possible to create a task like "kill all monsters of a specific race on the map"?
- We disable the weekly spawning of creatures;
- We add objects from the entire map to an array, with our conditions (in this case, all creatures of one race);
- After each battle, we create a new array for the entire map, and if there are no more creatures of a certain type left, we mark the task as completed.
Although the algorithm is very simple, implementing the above is not very easy. It's not a guarantee that it will work.
Of course, there might be an easier way, but this is what came to my mind for scripts.
a few minutes later...
Here's a simpler way:), but it's more cumbersome and not universal:
Pre-place all non-random monsters on the map, disable the weekly spawning of monsters, give monsters of a specific race names, and after each battle, check if each object exists on the map, and if none are left, the condition is met.