Script Function: Q5Z2

From Ultima Online: The Second Age
Revision as of 07:44, 19 October 2018 by Grimoric (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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 ();
 }