Script Function: Q5MO
From Ultima Online: The Second Age
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 (); }