Script Function: Q46J

From Ultima Online: The Second Age
Revision as of 05:13, 10 October 2018 by Grimoric (talk | contribs) (Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q46J(<span style="color:#0000FF">obj</span> user, <span style="color:#0000FF">obj</span> Q...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
 function int Q46J(obj user, obj Q66L)
 {
   if (hasObjVar(Q66L, "lifeRemaining"))
   {
     int lifeRemaining = getObjVar(Q66L, "lifeRemaining");
     if (lifeRemaining > 0x01)
     {
       setObjVar(Q66L, "lifeRemaining", (lifeRemaining - 0x01));
     }
     else
     {
       string name = getNameByType(getObjType(this));
       systemMessage(user, "You destroyed the " + name + ".");
       return (0x01);
     }
   }
   else
   {
     setObjVar(Q66L, "lifeRemaining", 0x32);
   }
   return (0x00);
 }