Script Function: Q4KE

From Ultima Online: The Second Age
Revision as of 03:55, 12 October 2018 by Grimoric (talk | contribs) (Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q4KE(<span style="color:#0000FF">obj</span> this, <span style="color:#0000FF">int</span>...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
 function void Q4KE(obj this, int Q52S)
 {
   string Q60V;
   int Q56B = random(0x02, Q52S);
   int Q566;
   string Q610;
   string Q618;
   int Q5KV;
   int Q4AE;
   for(int i = 0x00; i < Q56B; i++)
   {
     Q618 = " ";
     Q4AE = 0x00;
     if (i != 0x00)
     {
       Q5KV = random(0x01, 0x0F);
       if (Q5KV < 0x0B)
       {
         Q618 = " ";
       }
       else
       {
         Q4AE = 0x01;
         if (Q5KV > 0x0D)
         {
           Q618 = "! ";
         }
         else
         {
           Q618 = ". ";
         }
       }
     }
     if (random(0x00, 0x0A) < 0x03)
     {
       Q566 = random(0x01, 0x05);
     }
     else
     {
       Q566 = random(0x01, 0x03);
     }
     int Q68P = 0x00;
     if (hasObjVar(this, "nonHuman"))
     {
       Q68P = getObjVar(this, "nonHuman");
     }
     for(int Q518 = 0x00; Q518 < Q566; Q518++)
     {
       if (Q68P == 0x00)
       {
         Q610 = getOrcishSyllable(random(0x00, 0x7FFF));
       }
       else
       {
         if (Q68P == 0x01)
         {
           Q610 = getWispishSyllable(random(0x00, 0x7FFF));
         }
         else
         {
           if (Q68P == 0x02)
           {
             Q610 = getLizardishSyllable(random(0x00, 0x7FFF));
           }
           else
           {
             Q610 = getRattishSyllable(random(0x00, 0x7FFF));
           }
         }
       }
       if ((Q518 == 0x00) && (Q4AE == 0x01))
       {
         toUpper(Q610, 0x00, 0x01);
       }
       concat(Q618, Q610);
     }
     concat(Q60V, Q618);
   }
   if (random(0x01, 0x05) == 0x01)
   {
     concat(Q60V, "!");
   }
   else
   {
     concat(Q60V, ".");
   }
   toUpper(Q60V, 0x00, 0x02);
   bark(this, Q60V);
   sfx(getLocation(this), Q5U6, 0x00);
   return ();
 }