Difference between revisions of "Script Function: Q4LN"

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> Q4LN(<span style="color:#0000FF">obj</span> this, <span style="color:#0000FF">obj</span>...")
 
 
Line 5: Line 5:
 
     {
 
     {
 
       <span style="color:#0000FF">string</span> Q60K;
 
       <span style="color:#0000FF">string</span> Q60K;
       <span style="color:#0000FF">if</span> ([[Engine Function:_hasObjVar|<span style="color:#FF0000;font-weight:bold">hasObjVar</span>]](this, <span style="color:#800000">"[[isPet|<span style="color:#2B91AF">isPet</span>]]"</span>))
+
       <span style="color:#0000FF">if</span> ([[Engine Function:_hasObjVar|<span style="color:#FF0000;font-weight:bold">hasObjVar</span>]](this, <span style="color:#800000">"isPet"</span>))
 
       {
 
       {
 
         Q60K = <span style="color:#800000">"I shall obey the orders given me by "</span> + [[Engine Function:_getName|<span style="color:#FF0000;font-weight:bold">getName</span>]](usedon) + <span style="color:#800000">" and treat "</span> + [[Engine Function:_getHimHer|<span style="color:#FF0000;font-weight:bold">getHimHer</span>]](usedon) + <span style="color:#800000">" as a friend."</span>;
 
         Q60K = <span style="color:#800000">"I shall obey the orders given me by "</span> + [[Engine Function:_getName|<span style="color:#FF0000;font-weight:bold">getName</span>]](usedon) + <span style="color:#800000">" and treat "</span> + [[Engine Function:_getHimHer|<span style="color:#FF0000;font-weight:bold">getHimHer</span>]](usedon) + <span style="color:#800000">" as a friend."</span>;

Latest revision as of 01:47, 21 October 2018

 function void Q4LN(obj this, obj usedon, obj user)
 {
   debugMessage("I are here");
   if (Q4KK(this, 0x00))
   {
     string Q60K;
     if (hasObjVar(this, "isPet"))
     {
       Q60K = "I shall obey the orders given me by " + getName(usedon) + " and treat " + getHimHer(usedon) + " as a friend.";
       bark(this, Q60K);
     }
     else
     {
       Q60K = getName(this) + " will not guard against " + getName(usedon) + " and will obey " + getHisHer(usedon) + " orders as if they were your own.";
       systemMessage(user, Q60K);
       if (isPlayer(usedon))
       {
         Q60K = getName(user) + " has granted you the ability to give orders to " + getHisHer(user) + " pet " + getName(this) + ". This creature will now consider you a friend.";
         systemMessage(usedon, Q60K);
       }
     }
     debugMessage("I are here2");
     receiveHelpfulActionFrom(usedon, user);
     Q458(this, usedon);
   }
   return ();
 }