Script Function: Q4LA

From Ultima Online: The Second Age
Revision as of 05:12, 12 October 2018 by Grimoric (talk | contribs) (Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4LA(<span style="color:#0000FF">obj</span> user, <span style="color:#0000FF">loc</span> p...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
 function int Q4LA(obj user, loc place)
 {
   int Q5NC = 0x00;
   int damage;
   loc Q4VS = getLocation(user);
   faceHere(user, getDirectionInternal(Q4VS, place));
   list Q5HQ;
   clearList(Q5HT);
   int Q49M = 0x00;
   Q57L = user;
   getMobsInRange(Q5HQ, place, 0x02);
   beginSequence();
   for(int x = 0x00; x < numInList(Q5HQ); x++)
   {
     obj Q5HY = Q5HQ[x];
     if (Q50G(Q5HY))
     {
       Q5NC = 0x01;
       if (hasScript(Q5HY, "reflctor"))
       {
         doMobAnimation(Q5HY, 0x36B0, 0x0A, 0x0A, 0x00, 0x00);
         int Q527 = Q429(this, user, user, 0x04, 0x01);
       }
       else
       {
         int Q631;
         sfx(Q4VS, 0x0160, 0x00);
         doMissile_Mob2Mob(user, Q5HY, 0x36D4, 0x07, 0x00, 0x01);
         if ((getDistanceInTiles(Q4VS, place)) > 0x06)
         {
           Q631 = 0x02;
         }
         else
         {
           Q631 = 0x01;
         }
         callback(this, Q631, 0x19);
         appendToList(Q5HT, Q5HY);
         if (!Q49M)
         {
           Q49M = 0x01;
           Q5UK(Q57L, Q5HY, 0x02, 0x00);
         }
       }
     }
   }
   endSequence(0x01);
   Q5UR(this, Q5NC);
   return (Q5NC);
 }