Difference between revisions of "Script Function: Q4TV"

From Ultima Online: The Second Age
Jump to: navigation, search
(Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q4TV(<span style="color:#0000FF">obj</span> victim) { <span style="color:#0000FF">l...")
 
 
Line 14: Line 14:
 
       [[Engine Function:_walkTo|<span style="color:#FF0000;font-weight:bold">walkTo</span>]](Q67S, there, 0x0E);
 
       [[Engine Function:_walkTo|<span style="color:#FF0000;font-weight:bold">walkTo</span>]](Q67S, there, 0x0E);
 
       [[Engine Function:_shortcallback|<span style="color:#FF0000;font-weight:bold">shortcallback</span>]](Q67S, Q5R6, 0x34);
 
       [[Engine Function:_shortcallback|<span style="color:#FF0000;font-weight:bold">shortcallback</span>]](Q67S, Q5R6, 0x34);
 +
    }
 +
    <span style="color:#0000FF">return</span> ();
 +
  }
 +
 +
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q4TV(<span style="color:#0000FF">obj</span> victim)
 +
  {
 +
    <span style="color:#0000FF">loc</span> Q4VS = [[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](this);
 +
    <span style="color:#0000FF">loc</span> there = [[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](victim);
 +
    trackee = victim;
 +
    <span style="color:#0000FF">int</span> Q5R6 = [[Engine Function:_getDistanceInTiles|<span style="color:#FF0000;font-weight:bold">getDistanceInTiles</span>]](Q4VS, there);
 +
    <span style="color:#0000FF">if</span> (Q5R6 < 0x01)
 +
    {
 +
      Q5R6 = 0x01;
 +
      <span style="color:#0000FF">if</span> (![[Engine Function:_isValid|<span style="color:#FF0000;font-weight:bold">isValid</span>]](victim))
 +
      {
 +
        <span style="color:#0000FF">return</span> ();
 +
      }
 +
      [[Script_Function:_Q4GJ|<span style="color:#2B91AF">Q4GJ</span>]](victim, 0x14);
 +
    }
 +
    <span style="color:#0000FF">else</span>
 +
    {
 +
      [[Engine Function:_walkTo|<span style="color:#FF0000;font-weight:bold">walkTo</span>]](this, there, 0x0F);
 +
      [[Engine Function:_shortcallback|<span style="color:#FF0000;font-weight:bold">shortcallback</span>]](this, Q5R6, 0x34);
 
     }
 
     }
 
     <span style="color:#0000FF">return</span> ();
 
     <span style="color:#0000FF">return</span> ();
 
   }
 
   }

Latest revision as of 17:25, 12 October 2018

 function void Q4TV(obj victim)
 {
   loc Q4VS = getLocation(Q67S);
   loc there = getLocation(victim);
   trackee = victim;
   int Q5R6 = getDistanceInTiles(Q4VS, there);
   if (Q5R6 < 0x01)
   {
     Q5R6 = 0x01;
     Q4GJ(victim, 0x1E);
   }
   else
   {
     walkTo(Q67S, there, 0x0E);
     shortcallback(Q67S, Q5R6, 0x34);
   }
   return ();
 }
 function void Q4TV(obj victim)
 {
   loc Q4VS = getLocation(this);
   loc there = getLocation(victim);
   trackee = victim;
   int Q5R6 = getDistanceInTiles(Q4VS, there);
   if (Q5R6 < 0x01)
   {
     Q5R6 = 0x01;
     if (!isValid(victim))
     {
       return ();
     }
     Q4GJ(victim, 0x14);
   }
   else
   {
     walkTo(this, there, 0x0F);
     shortcallback(this, Q5R6, 0x34);
   }
   return ();
 }