In data.pak, there is a folder called scripts. You should be interested in advmap-startup.lua. At the end of it, you need to write doFile with a link to your triggers.
The advice helped, thank you. But there is one problem. In single-player mode, the scripts work, the treasure chests work as they should, but this does not apply to multiplayer. When trying to start a game on an RMX map with an opponent, all creature banks reset their scripts and act according to their functions before the changes. When trying to play the same map in single-player mode, everything works fine again. Of course, the opponent also has the modification installed. What could be the problem?