Script Function: Q5MO

From Ultima Online: The Second Age
Revision as of 10:08, 7 October 2018 by Grimoric (talk | contribs) (Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q5MO(<span style="color:#0000FF">obj</span> user) { <span style="color:#0000FF">if<...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
 function void Q5MO(obj user)
 {
   if (!isEditing(user))
   {
     if (Q4SD() != user)
     {
       barkTo(this, user, <span style="color:#800000">"Why would you care?  You don't run this shop."</span>);
       return ();
     }
   }
   Q4CG(user);
   int quantity = Q4RQ(user);
   int myAccount = getObjVar(this, <span style="color:#800000">"myAccount"</span>);
   barkTo(this, user, <span style="color:#800000">"I am holding "</span> + quantity + <span style="color:#800000">" gold for you."</span>);
   int Q5MH = Q4SP();
   barkTo(this, user, <span style="color:#800000">"My current charge is "</span> + Q5MH + <span style="color:#800000">" gold per day."</span>);
   int Q5DZ = (quantity + myAccount) / Q5MH;
   int Q4NF = Q5DZ / 0x0C;
   if (Q5DZ > 0x00)
   {
     barkTo(this, user, <span style="color:#800000">"Including your gold I'm holding, I have enough gold to continue working for "</span> + Q5DZ + <span style="color:#800000">" days. ("</span> + Q4NF + <span style="color:#800000">" earth days)"</span>);
   }
   else
   {
     int Q582 = Q5MH - quantity - myAccount;
     barkTo(this, user, <span style="color:#800000">"You need to give me "</span> + Q582 + <span style="color:#800000">" gold by the end of the day to retain my services."</span>);
   }
   return ();
 }