Script Function: Q4CI

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> Q4CI(<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 Q4CI(obj this, list args)
 {
   int Q65M;
   int Q4QI = 0x00;
   string name;
   list Q5B5;
   int i;
   obj Q4WD;
   string Q58D;
   if (!hasObjVar(this, "questFetchObjType"))
   {
     return (Q58D);
   }
   Q65M = getObjVar(this, "questFetchObjType");
   Q4QI = 0x00;
   name = getNameByType(Q65M);
   split(Q5B5, name);
   for(i = 0x00; i < numInList(Q5B5); i++)
   {
     name = Q5B5[i];
     if (isInList(args, name))
     {
       Q4QI = 0x01;
     }
   }
   if (Q4QI)
   {
     name = getObjVar(this, "questFetchReason");
     if (hasObjVar(this, "questItemHolder"))
     {
       Q4WD = getObjVar(this, "questItemHolder");
       name = getName(Q4WD);
       Q58D = getNameByType(Q65M) + "s? Hast thou spoken to " + name + "? " + Q4RP(this);
     }
     else
     {
       Q58D = getNameByType(Q65M) + "s? " + name + "one. " + Q4RP(this);
     }
     toUpper(Q58D, 0x00, 0x01);
     Q58D = Q58D + " ";
   }
   return (Q58D);
 }