Script Function: Q51U
From Ultima Online: The Second Age
function int Q51U(obj Q5NV, obj user, obj usedon) { list Q51V; getContents(Q51V, Q5NV); int num = numInList(Q51V); for(int Q4EJ = 0x00; Q4EJ < num; Q4EJ++) { obj Q51R = Q51V[Q4EJ]; if (Q51O(Q51R, usedon)) { if (Q51Q(Q51R, usedon)) { barkTo(usedon, user, "You lock " + getName(usedon) + "."); } else { barkTo(usedon, user, "You unlock " + getName(usedon) + "."); } return (0x01); } } barkTo(usedon, user, "You do not have a key for " + getName(usedon) + "."); return (0x01); }