Difference between revisions of "Script Function: Q5Z2"

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> Q5Z2(<span style="color:#0000FF">obj</span> boss, <span style="color:#0000FF">loc</span>...")
 
 
Line 35: Line 35:
 
         <span style="color:#0000FF">if</span> ([[Script_Function:_Q5Z1|<span style="color:#2B91AF">Q5Z1</span>]](it, [[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](it), destination, <span style="color:#800000">"teleport there"</span>))
 
         <span style="color:#0000FF">if</span> ([[Script_Function:_Q5Z1|<span style="color:#2B91AF">Q5Z1</span>]](it, [[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](it), destination, <span style="color:#800000">"teleport there"</span>))
 
         {
 
         {
           <span style="color:#0000FF">int</span> r = [[teleport|<span style="color:#FF0000;font-weight:bold">teleport</span>]](it, destination);
+
           <span style="color:#0000FF">int</span> r = [[Engine Function:_teleport|<span style="color:#FF0000;font-weight:bold">teleport</span>]](it, destination);
 
         }
 
         }
 
       }
 
       }

Latest revision as of 08:44, 19 October 2018

 function void Q5Z2(obj boss, loc destination)
 {
   list Q57T;
   list Q48U;
   obj it;
   int Q642 = 0x00;
   getMobsInRange(Q57T, getLocation(boss), 0x19);
   for(int i = 0x00; i < numInList(Q57T); i++)
   {
     it = Q57T[i];
     Q642 = 0x00;
     if (hasObjListVar(it, "myBoss"))
     {
       getObjListVar(Q48U, it, "myBoss");
       if (isInList(Q48U, boss))
       {
         if (getLeader(it) == boss)
         {
           Q642 = 0x01;
         }
       }
     }
     else
     {
       if (isNPC(it))
       {
         if (getLeader(it) == boss)
         {
           Q642 = 0x01;
         }
       }
     }
     if (Q642)
     {
       if (Q5Z1(it, getLocation(it), destination, "teleport there"))
       {
         int r = teleport(it, destination);
       }
     }
   }
   return ();
 }