Difference between revisions of "Script Function: Q53Z"

From Ultima Online: The Second Age
Jump to: navigation, search
(Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q53Z() { <span style="color:#0000FF">int</span> charges = 0x00; <span style="col...")
(No difference)

Revision as of 10:49, 7 October 2018

 function int Q53Z()
 {
   int charges = 0x00;
   if (hasObjVar(this, <span style="color:#800000">"charges"</span>))
   {
     charges = getObjVar(this, <span style="color:#800000">"charges"</span>);
   }
   if (charges <= 0x00)
   {
     removeObjVar(this, <span style="color:#800000">"charges"</span>);
   }
   else
   {
     setObjVar(this, <span style="color:#800000">"charges"</span>, charges - 0x01);
     returnResourcesToBank(this, 0x03, <span style="color:#800000">"magic"</span>);
   }
   return (charges);
 }