By the way, how do I know where to insert the "sleep" command?
If you still don't understand, the best thing to do is to open the map files of the original campaign and take a look at any MapScript.lua or script.lua or mapname_script.lua (there might be something like that in the original Heroes of Might and Magic V).