Difference between revisions of "Script Function: Q4MC"

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> Q4MC(<span style="color:#0000FF">obj</span> this, <span style="color:#0000FF">obj</span>...")
 
 
Line 27: Line 27:
 
         <span style="color:#0000FF">if</span> ([[Engine Function:_giveItem|<span style="color:#FF0000;font-weight:bold">giveItem</span>]](giver, reward) == [[Engine Function:_NULL|<span style="color:#FF0000;font-weight:bold">NULL</span>]]())
 
         <span style="color:#0000FF">if</span> ([[Engine Function:_giveItem|<span style="color:#FF0000;font-weight:bold">giveItem</span>]](giver, reward) == [[Engine Function:_NULL|<span style="color:#FF0000;font-weight:bold">NULL</span>]]())
 
         {
 
         {
           <span style="color:#0000FF">int</span> Q4TR = [[teleport|<span style="color:#FF0000;font-weight:bold">teleport</span>]](reward, [[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](giver));
+
           <span style="color:#0000FF">int</span> Q4TR = [[Engine Function:_teleport|<span style="color:#FF0000;font-weight:bold">teleport</span>]](reward, [[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](giver));
 
         }
 
         }
 
         Q58D = Q58D + <span style="color:#800000">" Please accept this "</span> + [[Engine Function:_getName|<span style="color:#FF0000;font-weight:bold">getName</span>]](reward) + <span style="color:#800000">" as a reward."</span>;
 
         Q58D = Q58D + <span style="color:#800000">" Please accept this "</span> + [[Engine Function:_getName|<span style="color:#FF0000;font-weight:bold">getName</span>]](reward) + <span style="color:#800000">" as a reward."</span>;

Latest revision as of 07:44, 19 October 2018

 function void Q4MC(obj this, obj giver, int Q4TZ)
 {
   list Q5N5 = "I shall tell all of thy deed.", "Thy reputation shall be cemented by what I shall tell!", "I thank thee kindly!", "I cannot tell thee how much this helps me!", "I thank thee indeed!", "I confess I never expected thee to aid me!", "I admit that I never expected thee to help me!", "Thou'rt amazing! I thank thee.", "My gratitude hath no bounds!", "I shall tell all my friends of thee!", "My thanks.", "I owe thee many thanks.", "Thou hast accomplished what I sought!", "From the bottom of my heart, I thank thee.";
   string Q58D = Q5N5[random(0x00, numInList(Q5N5) - 0x01)];
   Q58D = Q58D + " ";
   if (Q4TZ)
   {
     addNotoriety(giver, 0x01);
   }
   else
   {
     removeNotoriety(giver, 0x01);
   }
   obj reward = getObjVar(this, "questReward");
   if (reward == NULL())
   {
     Q58D = Q58D + "I have no item to give thee, only news... " + Q4TQ(this, giver);
   }
   else
   {
     if (!hasObj(this, reward))
     {
       Q58D = Q58D + " Alas, the reward I was to give thee has been lost! + But... " + Q4TQ(this, giver);
     }
     else
     {
       if (giveItem(giver, reward) == NULL())
       {
         int Q4TR = teleport(reward, getLocation(giver));
       }
       Q58D = Q58D + " Please accept this " + getName(reward) + " as a reward.";
     }
   }
   bark(this, Q58D);
   Q57S(this);
   return ();
 }