Script Function: Q5Z2

From Ultima Online: The Second Age
Jump to: navigation, search
 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 ();
 }