Script Function: Q5VF
From Ultima Online: The Second Age
function int Q5VF(obj this, obj speaker, string arg) { list args; split(args, arg); int Q4QI = 0x00; int Q4Q1; string bar; list Q4BC; list Q5Z4; string Q4QS; if (getResourcesOnObj(this, 0x00, Q5Z4)) { copyList(Q4BC, Q5Z4); } if (getResourcesOnObj(this, 0x02, Q5Z4)) { for(int i = 0x00; i < (numInList(Q5Z4) - 0x01); i++) { bar = Q5Z4[i]; appendToList(Q4BC, bar); } } string Q47Y; for(i = 0x00; i < numInList(Q4BC); i++) { for(int Q518 = 0x00; Q518 < numInList(args); Q518++) { bar = Q4BC[i]; Q47Y = args[Q518]; if (bar == Q47Y) { Q4QI = 0x01; Q4QS = Q4BC[i]; } } } if (Q4QI) { if (0x00) { bark(this, "Found something!"); bark(this, Q4QS); } bar = Q4QS; if (getResource(Q4Q1, this, Q4QS, 0x00, 0x02)) { bar = getResourceName(Q4QS, 0x00); } else { if (getResource(Q4Q1, this, Q4QS, 0x02, 0x02)) { bar = getResourceName(Q4QS, 0x02); } } setObjVar(this, "CurrentNeedString", bar); replyTo(this, speaker, "@InternalNeedResponse"); Q4J9(this); return (0x00); } return (0x01); }
function int Q5VF(obj this, obj speaker, string arg) { list args; split(args, arg); int Q4QI = 0x00; int Q4Q1; string bar; list Q4BC; list Q5Z4; string Q4QS; if (getResourcesOnObj(this, 0x00, Q5Z4)) { copyList(Q4BC, Q5Z4); } if (getResourcesOnObj(this, 0x02, Q5Z4)) { for(int i = 0x00; i < (numInList(Q5Z4) - 0x01); i++) { bar = Q5Z4[i]; appendToList(Q4BC, bar); } } string Q47Y; for(i = 0x00; i < numInList(Q4BC); i++) { for(int Q518 = 0x00; Q518 < numInList(args); Q518++) { bar = Q4BC[i]; Q47Y = args[Q518]; if (bar == Q47Y) { Q4QI = 0x01; Q4QS = Q4BC[i]; } } } if (Q4QI) { if (0x00) { bark(this, "Found something!"); bark(this, Q4QS); } bar = Q4QS; if (getResource(Q4Q1, this, Q4QS, 0x00, 0x02)) { bar = getResourceName(Q4QS, 0x00); } else { if (getResource(Q4Q1, this, Q4QS, 0x02, 0x02)) { bar = getResourceName(Q4QS, 0x02); } } setObjVar(this, "CurrentNeedString", bar); replyTo(this, speaker, "@InternalNeedResponse"); Q4J9(this); return (0x00); } return (0x01); }