Script Function: Q5HG
From Ultima Online: The Second Age
function int Q5HG() { int Q5SX = Q4SP(); int myAccount = getObjVar(this, <span style="color:#800000">"myAccount"</span>); myAccount = myAccount - Q5SX; if (myAccount < 0x00) { obj gold = Q64F(this, Q4SD(), 0x00 - myAccount); if (gold != NULL()) { myAccount = myAccount + getQuantity(gold); deleteObject(gold); } if (myAccount < 0x00) { Q4DB(); return (0x00); } } setObjVar(this, <span style="color:#800000">"myAccount"</span>, myAccount); return (0x01); }