Thanks for the encouraging words!
I went back and changed the move commands to event pathfind, which once again seemed to fix the problem for a bit. It appears that neither move or pathfind are precise (hence the need for the 3rd parameter, I'm learning!) and my movement routines require very precise geocoords to make it through portals.
I don't think there is anything "wrong" with my coding - since why would it work several times before breaking? - I think my overall approach is flawed. For example:
sub return_to_portal
move 1541 1340
wait 1s
move 1544 1334
wait 2s
move 1537 1327
wait 2s
move 1529 1325
wait 2s
move 1526 1325
wait 1s
move 1510 1325
wait 1s
move 1486 1323
wait 1s
move 1457 1330
wait 1s
move 1458 1328
wait 1s
key left
wait 1s
key left
wait 1s
return
Here I left out the 3rd and 4th parameters, which may have been causing some of my issues. Last night, I changed all of the 'moves' back to event pathfind and included the Z-axis coordinates as well. That seemed to 1) reduce some of the random thrashing about as my toon attempted to follow the path and 2) increase the speed of the script. Speaking of speed, I also took into consideration my rather short wait times and lengthened them a few seconds.
The "key" commands were my brute force attempt to transition from one area to the next. I can get the character to the threshold, but I can't make him cross without hard-coding a couple keystrokes. This is where I encounter my greatest difficultly. As the script misses each spot by a square or two, sometimes I'm not in exactly the right place to force the transition.
Really, I need help understanding how to call TM's rail engine to run the rail I made with his outstanding rail generator. I tried backward-engineering from the heartwood script, but I'm still rather flummoxed. It seems like it should be easy, I'm just not up to that level yet...
Any suggestions?
Cheers!