Cerveza brought this up, and I wanted to comment on it because it can cause issues if you aren't aware of what's going on. In a couple places in your code, you are calling the same subroutine within your sub. This is known as recursive calling, and EUO has limits built in to prevent this from happening. For example:
sub opendoor ; your sub
wait 20
finditem %monsters G_12 ;Don't try to open door is spawn still in there
if #findkind >= 1
{
gosub heal
wait 50
gosub heal
wait 50
gosub opendoor ; your call to the same sub
}
finditem %doors
set #lobjectid #findid
event macro 17
wait 10
return
From the flow of your script, I'm not sure how to prevent this. But since your "returns" will not be balanced, you will be piling up "gosubs" without returning from some of them. It might "seem" to work, but if you follow the script flow, you might find it's not working how you think it should.
Now I'm not saying you can't use EUO recursively (although it doesn't really work well), I'm saying that if you do a "gosub", there needs to be a matching "return". One other thing to note about recursive calls in EUO is that if you have "for" loop in a recursively called routine, it WON'T WORK! fyi.
Just wanted you to think a bit about this.