Script Function: Q4JK

From Ultima Online: The Second Age
Jump to: navigation, search
 function int Q4JK(obj user)
 {
   int Q5NC = 0x00;
   loc Q4VS = getLocation(user);
   count = 0x00;
   sfx(Q4VS, 0x020D, 0x00);
   clearList(Q488);
   list Q5KB;
   getMobsInRange(Q5KB, Q4VS, 0x0A);
   for(int Q61N = 0x00; Q61N < numInList(Q5KB); Q61N++)
   {
     obj victim = Q5KB[Q61N];
     if (Q50G(victim))
     {
       if (Q50E(user, victim))
       {
         appendToList(Q488, victim);
       }
     }
   }
   obj Q68A;
   int Q45Y;
   int Q527;
   for(Q61N = 0x00; Q61N < numInList(Q488); Q61N++)
   {
     Q5NC = 0x01;
     Q68A = Q488[Q61N];
     Q45Y = getCurHP(Q68A) - (getMaxHP(Q68A) / 0x02);
     if (isNPC(Q68A))
     {
       Q45Y = Q45Y / 0x04;
     }
     disableBehaviors(Q68A);
     Q4JU(Q68A);
     Q5UK(user, Q68A, 0x01, 0x00);
     if (Q45Y > 0x00)
     {
       Q527 = Q428(this, Q45Y, user, Q68A, 0x08, 0x00);
       Q5NC = 0x01;
     }
   }
   shortcallback(this, 0x02, 0x36);
   Q5UQ(this);
   return (0x01);
 }