Script Function: Q4DP

From Ultima Online: The Second Age
Revision as of 17:01, 7 October 2018 by Grimoric (talk | contribs) (Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q4DP(<span style="color:#0000FF">obj</span> user) { <span style="color:#0000FF">int...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
 function void Q4DP(obj user)
 {
   int Q4TX = (getCanCarry(user) - getWeight(user)) * 0x32;
   if (Q4TX <= 0x00)
   {
     barkTo(this, user, <span style="color:#800000">"You are overloaded already."</span>);
     return ();
   }
   obj gold = Q64F(user, user, Q4TX);
   if (gold == NULL())
   {
     barkTo(this, user, <span style="color:#800000">"I am holding no gold for you."</span>);
     return ();
   }
   int quantity = getQuantity(gold);
   if (quantity >= Q4TX)
   {
     barkTo(this, user, <span style="color:#800000">"Here is "</span> + quantity + <span style="color:#800000">" gold, all you can carry."</span>);
   }
   else
   {
     barkTo(this, user, <span style="color:#800000">"Here is "</span> + quantity + <span style="color:#800000">" gold, all I've collected."</span>);
   }
   return ();
 }