Script Function: Q41Y

From Ultima Online: The Second Age
Jump to: navigation, search
 function int Q41Y(obj user, int Q4KF, loc Q5HP)
 {
   list Q4AB = 0x0A26, 0x0A27, 0x0A28, 0x0A29, 0x142F, 0x1433, 0x1437, 0x1853, 0x1857, 0x1C16;
   list Q514;
   int count = 0x00;
   getObjectsInRange(Q514, Q5HP, 0x02);
   int Q50Z = numInList(Q514);
   int Q4AA = numInList(Q4AB);
   for(int i = 0x00; i < Q50Z; i++)
   {
     int Q513 = getObjType(Q514[i]);
     for(int Q518 = 0x00; Q518 < Q4AA; Q518++)
     {
       if (Q513 == (Q4AB[Q518]))
       {
         count++;
         if (Q4KF)
         {
           useItem(user, Q514[i]);
         }
       }
     }
   }
   return (count);
 }