Script Function: Q41O

From Ultima Online: The Second Age
Revision as of 04:03, 12 October 2018 by Grimoric (talk | contribs) (Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q41O(<span style="color:#0000FF">obj</span> Q4P2, <span style="color:#0000FF">obj</span>...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
 function void Q41O(obj Q4P2, obj target)
 {
   if (!isValid(target))
   {
     return ();
   }
   if (isCounselor(target) || isDead(target))
   {
     return ();
   }
   if (Q41L(Q4P2, target))
   {
     sfx(getLocation(target), 0x0205, 0x00);
     if (!hasScript(target, "poisoned"))
     {
       int resist = 0x00;
       resist = Q4CN(NULL(), target, 0x05);
       receiveUnhealthyActionFrom(target, Q4P2);
       if (!resist)
       {
         setObjVar(target, "poison_strength", 0x02);
         attachScript(target, "poisoned");
         Q556(target);
       }
     }
   }
   return ();
 }