Script Function: Q4J6

From Ultima Online: The Second Age
Revision as of 16:31, 12 October 2018 by Grimoric (talk | contribs) (Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4J6(<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 Q4J6(obj user, loc place)
 {
   int Q5NC = 0x00;
   loc Q4VS = getLocation(user);
   faceHere(user, getDirectionInternal(Q4VS, place));
   clearList(Q5HT);
   list Q5HQ;
   getMobsInRange(Q5HQ, place, 0x02);
   int Q63V = numInList(Q5HQ);
   beginSequence();
   Q57L = user;
   Q5NQ = 0x00;
   int Q49M = 0x00;
   for(int x = 0x00; x < Q63V; x++)
   {
     obj Q5HY = Q5HQ[x];
     if (Q50G(Q5HY))
     {
       if (hasScript(Q5HY, "reflctor"))
       {
         doLightning(user);
         detachScript(Q5HY, "reflctor");
         int Q527 = Q429(this, Q57L, Q57L, 0x02, 0x01);
         if (!Q49M)
         {
           Q49M = 0x01;
           Q5UK(user, Q5HY, 0x02, 0x00);
         }
       }
       else
       {
         Q5NC = 0x01;
         doLightning(Q5HY);
         if (!Q49M)
         {
           Q49M = 0x01;
           Q5UK(user, Q5HY, 0x02, 0x00);
         }
         callback(this, 0x01, 0x19);
         appendToList(Q5HT, Q5HY);
       }
     }
   }
   endSequence(0x01);
   sfx(place, 0x29, 0x00);
   Q5UR(this, Q5NC);
   return (Q5NC);
 }