As I continue with the many available options, I thought it'd be a great idea to add a command that returned the next waypoint xyz coord's. Reason being, once in a while, the rail will get stuck, but if I know the xy position that the rail is attempting to get to, I can run, or 'live-update' the rail. Here's what I mean. Character is at point A, moving to point B, but gets ultimately stuck. Now suppose the script notices that enough time has passed where the character should have arrived at B and yet is not there. At this point, I call the TM_RE and ask for the next waypoint xyz and have it return those coord in a format such as this: XXX_YYY_ZZZ. From here, my script (or another) could find out what the problem is, and handle it appropriately, thus moving the character to the next waypoint. Perhaps via a tile seach, new object, or something unexpected occured, a waypoint could actually be inserted between A and B, thus making B=C.
Example code perhaps:
; rail is running
if result <> Idle
{
gosub do stuff
gosub do more stuff
if result = error
{
call tm_setservercommand stop
call tm_getnextwaypointXYZ
gosub parse_result #result
gosub movetonewposition
call tm_runrail 1% 2% 3% 4%
}
}