Script Function: Q4TH
From Ultima Online: The Second Age
function int Q4TH(obj item) { int val = 0x00; if (isContainer(item)) { list Q4E4; getContents(Q4E4, item); for(int i = numInList(Q4E4); i > 0x00; i--) { val = val + Q4TH(Q4E4[0x00]); removeItem(Q4E4, 0x00); } } else { val = getValue(item); } int Q66Y = 0x00; if (hasObjVar(item, <span style="color:#800000">"vendedPrice"</span>)) { Q66Y = getObjVar(item, <span style="color:#800000">"vendedPrice"</span>); } if (Q66Y > val) { val = Q66Y; } return (val); }