Script Function: Q4JK

From Ultima Online: The Second Age
Revision as of 15:53, 12 October 2018 by Grimoric (talk | contribs) (Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4JK(<span style="color:#0000FF">obj</span> user) { <span style="color:#0000FF">int<...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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);
 }