Script Function: Q4DP

From Ultima Online: The Second Age
Revision as of 19:17, 7 October 2018 by Grimoric (talk | contribs)
(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, "You are overloaded already.");
     return ();
   }
   obj gold = Q64F(user, user, Q4TX);
   if (gold == NULL())
   {
     barkTo(this, user, "I am holding no gold for you.");
     return ();
   }
   int quantity = getQuantity(gold);
   if (quantity >= Q4TX)
   {
     barkTo(this, user, "Here is " + quantity + " gold, all you can carry.");
   }
   else
   {
     barkTo(this, user, "Here is " + quantity + " gold, all I've collected.");
   }
   return ();
 }