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 v1.99.7 and higher

#var travel 0

#function {revdir}
{
     #if {"%0" == "north"} {#return south};
     #if {"%0" == "east"}  {#return west};
     #if {"%0" == "south"} {#return north};
     #if {"%0" == "west"}  {#return east};
     #if {"%0" == "up"}    {#return down};
     #if {"%0" == "down"}  {#return up}
}
 
#function {longdir}
{
     #if {"%0" == "n"} {#return north};
     #if {"%0" == "e"} {#return east};
     #if {"%0" == "s"} {#return south};
     #if {"%0" == "w"} {#return west};
     #if {"%0" == "u"} {#return up};
     #if {"%0" == "d"} {#return down}
}
 
#function {shortdir}
{
     #if {"%0" == "north"} {#return n};
     #if {"%0" == "east"}  {#return e};
     #if {"%0" == "south"} {#return s};
     #if {"%0" == "west"}  {#return w};
     #if {"%0" == "up"}    {#return u};
     #if {"%0" == "down"}  {#return d}
}
 
#function {finddir}
{
     #if {"%1" == "%2"}
     {
          #return %2
     }
     {
          #return %1
     }
}

#alias {travel}
{
     #if {$travel}
     {
          #var travel 0;
          #showme <118>You stop traveling.
     }
     {
          #var travel 1;
          #var lastdir @longdir{%0};
          #var lastdir @revdir{$lastdir}; 
          #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.
          };      

          #if {"%1" == "%* %* %*"}
          {
               #var travel 0;
               #showme <118>You stop traveling to pick up directions.
          };

          #if {$travel}
          {
               #var newdir @finddir{$lastdir %1};
               #showme <118>You travel $newdir.;

               #var lastdir @revdir{$newdir};

               @shortdir{$newdir}
          }
     }     
}
{1}