Difference between revisions of "Script Function: Q668"

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> Q668(<span style="color:#0000FF">obj</span> this, <span style="color:#0000FF">obj</span>...")
 
 
Line 19: Line 19:
 
       {
 
       {
 
         Q58D = Q58D + <span style="color:#800000">"I have thy pet, "</span> + [[Engine Function:_getName|<span style="color:#FF0000;font-weight:bold">getName</span>]](Q59H) + <span style="color:#800000">"... let me fetch it. "</span>;
 
         Q58D = Q58D + <span style="color:#800000">"I have thy pet, "</span> + [[Engine Function:_getName|<span style="color:#FF0000;font-weight:bold">getName</span>]](Q59H) + <span style="color:#800000">"... let me fetch it. "</span>;
         Q4Q1 = [[teleport|<span style="color:#FF0000;font-weight:bold">teleport</span>]](Q59H, [[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](speaker));
+
         Q4Q1 = [[Engine Function:_teleport|<span style="color:#FF0000;font-weight:bold">teleport</span>]](Q59H, [[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](speaker));
 
         [[Engine Function:_removeObjVar|<span style="color:#FF0000;font-weight:bold">removeObjVar</span>]](Q59H, <span style="color:#800000">"isInStables"</span>);
 
         [[Engine Function:_removeObjVar|<span style="color:#FF0000;font-weight:bold">removeObjVar</span>]](Q59H, <span style="color:#800000">"isInStables"</span>);
 
         [[Engine Function:_detachScript|<span style="color:#FF0000;font-weight:bold">detachScript</span>]](Q59H, <span style="color:#800000">"petzap"</span>);
 
         [[Engine Function:_detachScript|<span style="color:#FF0000;font-weight:bold">detachScript</span>]](Q59H, <span style="color:#800000">"petzap"</span>);

Latest revision as of 07:42, 19 October 2018

 function void Q668(obj this, obj speaker)
 {
   int Q4Q1;
   list Q5I2;
   getContents(Q5I2, this);
   if (numInList(Q5I2) < 0x01)
   {
     bark(this, "But I have no animals stabled with me at the moment!");
     return ();
   }
   obj Q5H7;
   list Q48U;
   obj Q59H;
   string Q58D;
   for(int i = 0x00; i < numInList(Q5I2); i++)
   {
     Q59H = Q5I2[i];
     if (Q42T(Q59H, "myBoss", speaker))
     {
       Q58D = Q58D + "I have thy pet, " + getName(Q59H) + "... let me fetch it. ";
       Q4Q1 = teleport(Q59H, getLocation(speaker));
       removeObjVar(Q59H, "isInStables");
       detachScript(Q59H, "petzap");
       if (!Q4Q1)
       {
         Q58D = Q58D + "I am sorry to inform thee that... well... it died. ";
         deleteObject(Q59H);
       }
     }
   }
   bark(this, Q58D);
   return ();
 }