Script Function: Q41O

From Ultima Online: The Second Age
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 ();
 }