Difference between revisions of "Script Function: Q4RQ"

From Ultima Online: The Second Age
Jump to: navigation, search
(Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4RQ(<span style="color:#0000FF">obj</span> owner) { <span style="color:#0000FF">lis...")
 
 
Line 2: Line 2:
 
   {
 
   {
 
     <span style="color:#0000FF">list</span> goldOwnerList;
 
     <span style="color:#0000FF">list</span> goldOwnerList;
     [[Engine Function:_getObjListVar|<span style="color:#FF0000;font-weight:bold">getObjListVar</span>]](goldOwnerList, this, <span style=<span style="color:#800000">"color:#800000"</span>><span style="color:#800000">"goldOwnerList"</span></span>);
+
     [[Engine Function:_getObjListVar|<span style="color:#FF0000;font-weight:bold">getObjListVar</span>]](goldOwnerList, this, <span style="color:#800000">"goldOwnerList"</span>);
 
     <span style="color:#0000FF">int</span> quantity = 0x00;
 
     <span style="color:#0000FF">int</span> quantity = 0x00;
 
     for(<span style="color:#0000FF">int</span> i = 0x00; i < [[Engine Function:_numInList|<span style="color:#FF0000;font-weight:bold">numInList</span>]](goldOwnerList); i++)
 
     for(<span style="color:#0000FF">int</span> i = 0x00; i < [[Engine Function:_numInList|<span style="color:#FF0000;font-weight:bold">numInList</span>]](goldOwnerList); i++)
Line 10: Line 10:
 
       {
 
       {
 
         <span style="color:#0000FF">list</span> goldQuantityList;
 
         <span style="color:#0000FF">list</span> goldQuantityList;
         [[Engine Function:_getObjListVar|<span style="color:#FF0000;font-weight:bold">getObjListVar</span>]](goldQuantityList, this, <span style=<span style="color:#800000">"color:#800000"</span>><span style="color:#800000">"goldQuantityList"</span></span>);
+
         [[Engine Function:_getObjListVar|<span style="color:#FF0000;font-weight:bold">getObjListVar</span>]](goldQuantityList, this, <span style="color:#800000">"goldQuantityList"</span>);
 
         quantity = goldQuantityList[i];
 
         quantity = goldQuantityList[i];
 
         <span style="color:#0000FF">break</span>;
 
         <span style="color:#0000FF">break</span>;

Latest revision as of 01:13, 8 October 2018

 function int Q4RQ(obj owner)
 {
   list goldOwnerList;
   getObjListVar(goldOwnerList, this, "goldOwnerList");
   int quantity = 0x00;
   for(int i = 0x00; i < numInList(goldOwnerList); i++)
   {
     obj Q4FL = goldOwnerList[i];
     if (owner == Q4FL)
     {
       list goldQuantityList;
       getObjListVar(goldQuantityList, this, "goldQuantityList");
       quantity = goldQuantityList[i];
       break;
     }
   }
   return (quantity);
 }