Difference between revisions of "Script Function: Q4JA"

From Ultima Online: The Second Age
Jump to: navigation, search
(Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q4JA(<span style="color:#0000FF">obj</span> it) { <span style="color:#0000FF">if</s...")
 
 
Line 12: Line 12:
 
       [[Engine Function:_doSCommand|<span style="color:#FF0000;font-weight:bold">doSCommand</span>]](it, <span style="color:#800000">"ucoun me"</span>);
 
       [[Engine Function:_doSCommand|<span style="color:#FF0000;font-weight:bold">doSCommand</span>]](it, <span style="color:#800000">"ucoun me"</span>);
 
       [[Engine Function:_detachScript|<span style="color:#FF0000;font-weight:bold">detachScript</span>]](it, <span style="color:#800000">"decounselor2"</span>);
 
       [[Engine Function:_detachScript|<span style="color:#FF0000;font-weight:bold">detachScript</span>]](it, <span style="color:#800000">"decounselor2"</span>);
 +
    }
 +
    <span style="color:#0000FF">else</span>
 +
    {
 +
      [[Engine Function:_systemMessage|<span style="color:#FF0000;font-weight:bold">systemMessage</span>]](it, <span style="color:#800000">"All counselors are being unmade.  You can log in "</span> + (0x03 - num) + <span style="color:#800000">" more times"</span>);
 +
      [[Engine Function:_systemMessage|<span style="color:#FF0000;font-weight:bold">systemMessage</span>]](it, <span style="color:#800000">"without renewing until your counselor status is removed."</span>);
 +
      [[Engine Function:_systemMessage|<span style="color:#FF0000;font-weight:bold">systemMessage</span>]](it, <span style="color:#800000">"To continue being a Counselor, please re-apply to the web page"</span>);
 +
      [[Engine Function:_systemMessage|<span style="color:#FF0000;font-weight:bold">systemMessage</span>]](it, <span style="color:#800000">"under Help and Guidance / Playguide / Counselors."</span>);
 +
    }
 +
    <span style="color:#0000FF">return</span> ();
 +
  }
 +
 +
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q4JA(<span style="color:#0000FF">obj</span> it)
 +
  {
 +
    <span style="color:#0000FF">if</span> ([[Engine Function:_hasScript|<span style="color:#FF0000;font-weight:bold">hasScript</span>]](it, <span style="color:#800000">"counokay"</span>))
 +
    {
 +
      [[Engine Function:_detachScript|<span style="color:#FF0000;font-weight:bold">detachScript</span>]](it, <span style="color:#800000">"decounselor"</span>);
 +
      <span style="color:#0000FF">return</span> ();
 +
    }
 +
    num++;
 +
    <span style="color:#0000FF">if</span> (num > 0x03)
 +
    {
 +
      [[Engine Function:_systemMessage|<span style="color:#FF0000;font-weight:bold">systemMessage</span>]](it, <span style="color:#800000">"Your counselor status has been removed."</span>);
 +
      [[Engine Function:_doSCommand|<span style="color:#FF0000;font-weight:bold">doSCommand</span>]](it, <span style="color:#800000">"ucoun me"</span>);
 +
      [[Engine Function:_detachScript|<span style="color:#FF0000;font-weight:bold">detachScript</span>]](it, <span style="color:#800000">"decounselor"</span>);
 
     }
 
     }
 
     <span style="color:#0000FF">else</span>
 
     <span style="color:#0000FF">else</span>

Latest revision as of 16:23, 12 October 2018

 function void Q4JA(obj it)
 {
   if (hasScript(it, "counokay2"))
   {
     detachScript(it, "decounselor2");
     return ();
   }
   num++;
   if (num > 0x03)
   {
     systemMessage(it, "Your counselor status has been removed.");
     doSCommand(it, "ucoun me");
     detachScript(it, "decounselor2");
   }
   else
   {
     systemMessage(it, "All counselors are being unmade.  You can log in " + (0x03 - num) + " more times");
     systemMessage(it, "without renewing until your counselor status is removed.");
     systemMessage(it, "To continue being a Counselor, please re-apply to the web page");
     systemMessage(it, "under Help and Guidance / Playguide / Counselors.");
   }
   return ();
 }
 function void Q4JA(obj it)
 {
   if (hasScript(it, "counokay"))
   {
     detachScript(it, "decounselor");
     return ();
   }
   num++;
   if (num > 0x03)
   {
     systemMessage(it, "Your counselor status has been removed.");
     doSCommand(it, "ucoun me");
     detachScript(it, "decounselor");
   }
   else
   {
     systemMessage(it, "All counselors are being unmade.  You can log in " + (0x03 - num) + " more times");
     systemMessage(it, "without renewing until your counselor status is removed.");
     systemMessage(it, "To continue being a Counselor, please re-apply to the web page");
     systemMessage(it, "under Help and Guidance / Playguide / Counselors.");
   }
   return ();
 }