Script Function: Q4LK
From Ultima Online: The Second Age
function void Q4LK(obj this, obj usedon, obj user) { int Q57Y; Q57Y = getStrength(usedon) + getDexterity(usedon) + getSkillLevel(usedon, 0x05) + getSkillLevel(usedon, 0x1B); Q57Y = Q57Y - (getStrength(this) + getDexterity(this) + getSkillLevel(this, 0x05) + getSkillLevel(this, 0x1B)); Q57Y = Q57Y / 0x0A; if ((isHuman(usedon)) && (isNPC(usedon)) && (isHuman(this))) { bark(this, "I am no murderer!"); return (); } if (Q4KK(this, Q57Y)) { if (0x00) { bark(this, "Attacking!"); } copyControllerInfo(this, user); Q4DG(this); setObjVar(this, "controllerTimeout", 0x02 * 0x3C * 0x04); callbackAdvanced(this, 0x02 * 0x3C * 0x04, 0x14, 0x00); setObjVar(this, "victim", usedon); setObjVar(this, "user", user); walkTo(this, getLocation(usedon), 0x10); attack(this, usedon); if (!getCompileFlag(0x01)) { criminalAct(user, usedon, 0x01, 0x0A); callGuards(user, getLocation(user), 0x02); } } removeObjVar(this, "petAttack"); return (); }