Script Function: Q4TH

From Ultima Online: The Second Age
Revision as of 10:09, 7 October 2018 by Grimoric (talk | contribs) (Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4TH(<span style="color:#0000FF">obj</span> item) { <span style="color:#0000FF">int<...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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, <span style="color:#800000">"vendedPrice"</span>))
   {
     Q66Y = getObjVar(item, <span style="color:#800000">"vendedPrice"</span>);
   }
   if (Q66Y > val)
   {
     val = Q66Y;
   }
   return (val);
 }