Script Function: Q4IW

From Ultima Online: The Second Age
Revision as of 17:54, 12 October 2018 by Grimoric (talk | contribs) (Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4IW(<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 Q4IW(obj user, loc place)
 {
   list Q5HT;
   int defenseBonus;
   int Q5NC = 0x00;
   defenseBonus = (getSkillLevel(user, 0x19) / 0x0A);
   int Q4NC = 0x06 * getSkillLevel(user, 0x19) / 0x05;
   getMobsInRange(Q5HT, place, 0x02);
   for(int x = 0x00; x < numInList(Q5HT); x++)
   {
     obj Q5HY = Q5HT[x];
     if (Q50G(Q5HY))
     {
       if (!(hasScript(Q5HY, "reflctor")))
       {
         if (!(hasScript(Q5HY, "remprtct")))
         {
           doMobAnimation(Q5HY, 0x375A, 0x09, 0x14, 0x00, 0x00);
           setObjVar(Q5HY, "defenseBonus", defenseBonus);
           int Q5BM = getNaturalAC(Q5HY) + defenseBonus;
           setNaturalAC(Q5HY, Q5BM);
           attachScript(Q5HY, "remprtct");
           int Q527 = Q41J(user, Q5HY, 0x00, this);
           callback(Q5HY, Q4NC, 0x13);
           sfx(place, 0x01F7, 0x00);
           Q5NC = 0x01;
         }
       }
     }
   }
   Q5UQ(this);
   return (Q5NC);
 }