Script Function: Q4TH

From Ultima Online: The Second Age
Jump to: navigation, search
 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, "vendedPrice"))
   {
     Q66Y = getObjVar(item, "vendedPrice");
   }
   if (Q66Y > val)
   {
     val = Q66Y;
   }
   return (val);
 }