Script Function: Q46J

From Ultima Online: The Second Age
Revision as of 05:22, 12 October 2018 by Grimoric (talk | contribs)
(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);
 }
 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);
 }