Script Function: Q64G

From Ultima Online: The Second Age
Revision as of 17:43, 12 October 2018 by Grimoric (talk | contribs) (Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q64G(<span style="color:#0000FF">obj</span> Q4F0, <span style="color:#0000FF">obj</span>...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
 function void Q64G(obj Q4F0, obj Q62D, int Q571)
 {
   int Q63U;
   list metal;
   clearList(metal);
   Q4S8(metal, Q62D);
   for(int num = numInList(metal); num > 0x00; num--)
   {
     int Q56Z;
     obj Q5UD = metal[0x00];
     int Q4Q1 = getResource(Q56Z, Q5UD, "metal", 0x03, 0x02);
     if (Q571 >= Q56Z)
     {
       transferResources(Q4F0, Q5UD, Q56Z, "metal");
       deleteObject(Q5UD);
       removeItem(metal, 0x00);
       Q571 = Q571 - Q56Z;
     }
     else
     {
       transferResources(Q4F0, Q5UD, Q571, "metal");
       Q4Q1 = getResource(Q56Z, Q5UD, "metal", 0x03, 0x02);
       if (Q56Z < 0x01)
       {
         deleteObject(Q5UD);
       }
       break;
     }
   }
   clearList(metal);
   return ();
 }