Well it's very important you get that figured out. Once you do that, you can pretty much answer your own questions when it comes to "Why is the script acting this way?"
Like they say in Monopoly, "Do not pass GO, do not collect $200" until you get that set up!
There are no real instructions really. When the script hits the "pause" command, you'll see the execution pause at that line. Click on EUO window to bring it to top and then press F7 or F8 to see the cursor single-step your code. You can see if it loops, and coupled with looking at the live variable update (Tools/Manage VarList) you can see how variables change on a line-to-line basis.
BTW:
F7 = Step into - means if you try to F7 over a gosub, you actually follow the gosub to the code
F8 = Step over - if you try and F8 over a gosub, the whole subroutine will execute and the next executed line you'll see will be right after the gosub called.
Like most everything else with EUO, you just have to figure out features on your own.
A bit more about the VarList:
When you select that menu item, it will pop up a window called "Manage VarLilst". Scroll down to the end of the window and you'll see:
\Result Variables
#DISPRES
#MENURES
#STRRES
#RESULT
At the end of this window, add additional variables you might want to look at. Do something like this:
\Result Variables
#DISPRES
#MENURES
#STRRES
#RESULT
\Mine
%variable1
%variable2
%loot_count
When you close this edit window, those variable will now be found in the right-hand pane of the EUO UI window toward the bottom.
The "\Mine" creates a sub-section and the variable names are grouped within the "Mine" collapse area.