Auto-translated
Bravo1853, in the editor, within the Map Properties Tree, there is a MapScript item – this is the main script for the map and is executed automatically at the start. If it is empty, you need to specify the path to the file or create a new one. Write all the code in this single file; those that are linked in the properties of monsters and other objects are not used in practice. Once you understand how the file works, it is better to edit it using Notepad or MapScriptsEditor, as many users experience crashes when accessing it through the editor.