Script Function: Q4MC

From Ultima Online: The Second Age
Jump to: navigation, search
 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 ();
 }