Script Function: Q4LO
From Ultima Online: The Second Age
function void Q4LO(obj this, obj usedon, obj user) { if (Q4BD(this, usedon)) { copyControllerInfo(this, user); Q4UH(usedon, this); } else { if (Q4KK(this, 0x00)) { obj Q4UO = isAnyMultiBelow(getLocation(usedon)); if (!Q593(Q4UO, user)) { bark(this, "Items in other people's houses or ships cannot be guarded."); Q4LP(this); return (); } if (isInContainer(usedon)) { bark(this, "Items in containers cannot be guarded."); Q4LP(this); return (); } if (thinksItsAtHome(usedon)) { bark(this, "Other people's items cannot be guarded."); Q4LP(this); return (); } if (isMobile(usedon)) { if (!isPlayer(usedon)) { if (!Q4BD(usedon, user)) { bark(this, "Living things other than pets cannot be guarded."); Q4LP(this); return (); } } } copyControllerInfo(this, user); Q4UH(usedon, this); } } if (0x00) { bark(this, "done any guarding I'd do, returning."); } removeObjVar(this, "petGuard"); return (); }