Difference between revisions of "Script Function: Q4P5"

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> Q4P5(<span style="color:#0000FF">obj</span> Q4NO, <span style="color:#0000FF">obj</span>...")
 
 
Line 27: Line 27:
 
       <span style="color:#0000FF">else</span>
 
       <span style="color:#0000FF">else</span>
 
       {
 
       {
         Q4Q1 = [[teleport|<span style="color:#FF0000;font-weight:bold">teleport</span>]](Q4NO, [[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](user));
+
         Q4Q1 = [[Engine Function:_teleport|<span style="color:#FF0000;font-weight:bold">teleport</span>]](Q4NO, [[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](user));
 
         [[Engine Function:_systemMessage|<span style="color:#FF0000;font-weight:bold">systemMessage</span>]](user, <span style="color:#800000">"You put the remaining empty bottles at your feet."</span>);
 
         [[Engine Function:_systemMessage|<span style="color:#FF0000;font-weight:bold">systemMessage</span>]](user, <span style="color:#800000">"You put the remaining empty bottles at your feet."</span>);
 
       }
 
       }

Latest revision as of 08:46, 19 October 2018

 function void Q4P5(obj Q4NO, obj user)
 {
   int Q4Q1;
   Q4R3 = 0x00;
   obj Q47F = getBackpack(user);
   int Q5K1 = Q5K3[0x00];
   string Q5ZC = Q5K3[0x01];
   string Q5JZ;
   if (Q50N(Q5ZC[0x00]))
   {
     Q5JZ = "an ";
   }
   else
   {
     Q5JZ = "a ";
   }
   concat(Q5JZ, Q5ZC);
   concat(Q5JZ, " potion");
   obj Q5C7 = createGlobalObjectOn(Q4NO, Q5K1);
   if ((getQuantity(Q4NO) > 0x01) && (!isInContainer(Q4NO)))
   {
     if (canHold(Q47F, Q4NO))
     {
       Q4Q1 = putObjContainer(Q4NO, Q47F);
       systemMessage(user, "You put the remaining empty bottles in to your backpack.");
     }
     else
     {
       Q4Q1 = teleport(Q4NO, getLocation(user));
       systemMessage(user, "You put the remaining empty bottles at your feet.");
     }
   }
   int Q5K0 = Q5JY[0x02];
   setObjVar(Q5C7, "power", Q5K0);
   Q5RE(Q5C7, Q5JZ);
   string Q5OM = Q5JY[0x03];
   if (Q5OM == "")
   {
     Q5OM = Q5K1;
   }
   attachScript(Q5C7, Q5OM);
   destroyOne(Q4NO);
   return ();
 }