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