Difference between revisions of "Script Function: Cleanup"

From Ultima Online: The Second Age
Jump to: navigation, search
Line 1: Line 1:
 
   <span style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> cleanup()
 
   <span style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> cleanup()
 
   {
 
   {
     [[Engine Function:_removeObjVar|<span style="color:#FF0000;font-weight:bold">removeObjVar</span>]](this, <span style=<span style="color:#800000">"lastCriminal"</span>);
+
     [[Engine Function:_removeObjVar|<span style="color:#FF0000;font-weight:bold">removeObjVar</span>]](this, <span style="color:#800000">"lastCriminal"</span>);
     [[Engine Function:_removeObjVar|<span style="color:#FF0000;font-weight:bold">removeObjVar</span>]](this, <span style=<span style="color:#800000">"lastVictim"</span>);
+
     [[Engine Function:_removeObjVar|<span style="color:#FF0000;font-weight:bold">removeObjVar</span>]](this, <span style="color:#800000">"lastVictim"</span>);
     [[Engine Function:_removeObjVar|<span style="color:#FF0000;font-weight:bold">removeObjVar</span>]](this, <span style=<span style="color:#800000">"crimeSeverity"</span>);
+
     [[Engine Function:_removeObjVar|<span style="color:#FF0000;font-weight:bold">removeObjVar</span>]](this, <span style="color:#800000">"crimeSeverity"</span>);
     [[Engine Function:_removeObjVar|<span style="color:#FF0000;font-weight:bold">removeObjVar</span>]](this, <span style=<span style="color:#800000">"crimeLocation"</span>);
+
     [[Engine Function:_removeObjVar|<span style="color:#FF0000;font-weight:bold">removeObjVar</span>]](this, <span style="color:#800000">"crimeLocation"</span>);
     [[Engine Function:_detachScript|<span style="color:#FF0000;font-weight:bold">detachScript</span>]](this, <span style=<span style="color:#800000">"witness"</span>);
+
     [[Engine Function:_detachScript|<span style="color:#FF0000;font-weight:bold">detachScript</span>]](this, <span style="color:#800000">"witness"</span>);
 
     <span style="color:#0000FF">return</span> ();
 
     <span style="color:#0000FF">return</span> ();
 
   }
 
   }

Revision as of 19:04, 7 October 2018

 function void cleanup()
 {
   removeObjVar(this, "lastCriminal");
   removeObjVar(this, "lastVictim");
   removeObjVar(this, "crimeSeverity");
   removeObjVar(this, "crimeLocation");
   detachScript(this, "witness");
   return ();
 }
 function void cleanup()
 {
   if (isContainer(this))
   {
     list Q4E4;
     getContents(Q4E4, this);
     while(numInList(Q4E4))
     {
       list args;
       message(Q4E4[0x00], "cleanup", args);
       removeItem(Q4E4, 0x00);
     }
   }
   removeObjVar(this, "vendedOwner");
   removeObjVar(this, "vendedPrice");
   removeObjVar(this, "description");
   detachScript(this, "vended");
   return ();
 }