Script Function: Q4C7

From Ultima Online: The Second Age
Revision as of 22:23, 11 October 2018 by Grimoric (talk | contribs) (Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">string</span> Q4C7(<span style="color:#0000FF">obj</span> this, <span style="color:#0000FF">list</spa...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
 function string Q4C7(obj this, list args)
 {
   string Q58D;
   obj Q4WD;
   int Q65M;
   string name;
   if (!hasObjVar(this, "questItemHolder"))
   {
     return (Q58D);
   }
   if (!hasObjVar(this, "questFetchObjType"))
   {
     return (Q58D);
   }
   Q4WD = getObjVar(this, "questItemHolder");
   Q65M = getObjVar(this, "questFetchObjType");
   name = getName(Q4WD);
   if (isInList(args, name))
   {
     Q58D = "Yes, " + getName(Q4WD) + " hath my " + getNameByType(Q65M) + " and " + getHeShe(Q4WD) + " is " + getDirection(getLocation(this), getLocation(Q4WD)) + ".";
     toUpper(Q58D, 0x00, 0x01);
     if (getDistance(getLocation(this), getLocation(Q4WD)) == "right here")
     {
       Q58D = Q58D + " Just turn around and look.";
     }
     else
     {
       if (getDistance(getLocation(this), getLocation(Q4WD)) == "a long journey")
       {
         Q58D = Q58D + " Just turn around and look.";
       }
       else
       {
         Q58D = Q58D + getHeShe(Q4WD) + " is " + getDistance(getLocation(this), getLocation(Q4WD)) + " from here.";
         toUpper(Q58D, 0x00, 0x01);
       }
     }
   }
   return (Q58D);
 }