Difference between revisions of "Script Function: Q5VM"

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> Q5VM(<span style="color:#0000FF">obj</span> Q5KS) { <span style="color:#0000FF">obj...")
 
 
Line 42: Line 42:
 
     <span style="color:#0000FF">if</span> (0x00)
 
     <span style="color:#0000FF">if</span> (0x00)
 
     {
 
     {
       debugMessage(<span style="color:#800000">"Item type deliver quest [[activate|<span style="color:#2B91AF">activate</span>]]d."</span>);
+
       debugMessage(<span style="color:#800000">"Item type deliver quest activated."</span>);
 
     }
 
     }
 
     <span style="color:#0000FF">if</span> (Q5KS == [[Engine Function:_NULL|<span style="color:#FF0000;font-weight:bold">NULL</span>]]())
 
     <span style="color:#0000FF">if</span> (Q5KS == [[Engine Function:_NULL|<span style="color:#FF0000;font-weight:bold">NULL</span>]]())

Latest revision as of 01:18, 21 October 2018

 function void Q5VM(obj Q5KS)
 {
   obj destination;
   int Q511;
   obj Q4P1;
   int Q5D9 = random(0x00, 0x01);
   Q511 = Q4SJ(Q5KS);
   if (0x00)
   {
     debugMessage("Specific item fetch attempted.");
   }
   destination = Q4SI();
   if (destination == NULL())
   {
     if (0x00)
     {
       debugMessage("Item delivery aborted.");
     }
     Q45C(Q5KS);
     return ();
   }
   Q4P1 = requestCreateObjectIn(Q511, getBackpack(Q5KS));
   if (Q4P1 == NULL())
   {
     if (0x00)
     {
       debugMessage("Item delivery aborted.");
     }
     Q5VM(Q5KS);
   }
   setObjVar(Q5KS, "questItemDestination", destination);
   if (0x00)
   {
     debugMessage("Adding next leg of quest.");
   }
   list Q5LW = "A friend of mine needeth ", "I promised to take something to a friend... ", "I am supposed to deliver ";
   string Q59W = Q5LW[random(0x00, numInList(Q5LW) - 0x01)];
   Q4ET(destination, Q5D9);
   setObjVar(Q5KS, "questDeliverReason", Q59W);
   setObjVar(destination, "questDeliverObjectRec", Q4P1);
   setObjVar(Q5KS, "questDeliverObject", Q4P1);
   if (0x00)
   {
     debugMessage("Item type deliver quest activated.");
   }
   if (Q5KS == NULL())
   {
     return ();
   }
   attachScript(Q5KS, "quest_deliver_asker");
   if (destination == NULL())
   {
     return ();
   }
   attachScript(destination, "quest_deliver_dest");
   return ();
 }