TinTin++ Mud Client Scripts  
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
space
space
I logged onto Aardwolf to test this script, the syntax is simple: travel e, travel n, etc. It will follow a path untill it runs into a dead end, you reach an intersection, or you type 'travel' while traveling. Very useful for muds with long roads connecting areas.

space
#nop This script is written for v2.00.1 and higher                                                                                                                                    
                                                                                                                                                                                      
#var travel 0

#var {revdir}   {{north}{south} {east}{west} {south}{north} {west}{east} {up}{down} {down}{up}}
#var {longdir}  {{n}{north} {e}{east} {s}{south} {w}{west} {u}{up} {d}{down}}
#var {shortdir} {{north}{n} {east}{e} {south}{s} {west}{w} {up}{u} {down}{d}}

#function {finddir}
{
     #if {"%1" != "%2"}
     {
          #return %2
     }
     {
          #return %3
     }
}
 
#alias {travel}
{
     #if {$travel}
     {
          #var travel 0;
          #showme <118>You stop traveling.
     }
     {
          #var travel 1;
          #var lastdir $revdir[$longdir[%0]];
          #showme <118>You travel %0.;       
          %0                          
     }      
}
 
#act {[Exits: %1]}
{
     #if {$travel}
     {
          #if {"%1" != "%* %*"}
          {                    
               #var travel 0;
               #showme <118>You stop traveling due to a dead end.
          }                                                      
           
          #regex {%1} {%* %* %*}
          {                     
               #var travel 0;
               #showme <118>You stop traveling to pick up directions.
          }                                                          
           
          #regex {%1} {%* %*}
          {                  
               #var newdir @finddir{$lastdir;&1;&2};
               #showme <118>You travel $newdir.;    
                                                
               #var lastdir $revdir[$newdir];   
                                             
               $shortdir[$newdir]            
          }                      
     }     
}
{1}