Script Function: Q4UH
From Ultima Online: The Second Age
function void Q4UH(obj Q4UI, obj Q607) { if (!isValid(Q4UI)) { return (); } if (isInContainer(Q4UI)) { bark(Q4UI, "This is in a container and cannot be guarded."); return (); } list Q517; if (!isInList(guardList, Q4UI)) { appendToList(guardList, Q4UI); } attachScript(Q4UI, "guarded"); if (hasObjVar(Q4UI, "myGuards")) { getObjListVar(Q517, Q4UI, "myGuards"); } if (!isInList(Q517, Q607)) { appendToList(Q517, Q607); } setObjVar(Q4UI, "myGuards", Q517); if (0x00) { bark(Q4UI, "I am now guarded."); } return; }