Difference between revisions of "Script Function: Q4TH"
From Ultima Online: The Second Age
(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<...") |
|||
Line 17: | Line 17: | ||
} | } | ||
<span style="color:#0000FF">int</span> Q66Y = 0x00; | <span style="color:#0000FF">int</span> Q66Y = 0x00; | ||
− | <span style="color:#0000FF">if</span> ([[Engine Function:_hasObjVar|<span style="color:#FF0000;font-weight:bold">hasObjVar</span>]](item, | + | <span style="color:#0000FF">if</span> ([[Engine Function:_hasObjVar|<span style="color:#FF0000;font-weight:bold">hasObjVar</span>]](item, <span style="color:#800000">"vendedPrice"</span>)) |
{ | { | ||
− | Q66Y = [[Engine Function:_getObjVar|<span style="color:#FF0000;font-weight:bold">getObjVar</span>]](item, | + | Q66Y = [[Engine Function:_getObjVar|<span style="color:#FF0000;font-weight:bold">getObjVar</span>]](item, <span style="color:#800000">"vendedPrice"</span>); |
} | } | ||
<span style="color:#0000FF">if</span> (Q66Y > val) | <span style="color:#0000FF">if</span> (Q66Y > val) |
Latest revision as of 01:20, 8 October 2018
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); }