Script Function: Q5IK

From Ultima Online: The Second Age
Jump to: navigation, search
 function void Q5IK(loc place)
 {
   list s;
   string e;
   string Q5H7;
   Q5H7 = "" + getX(place) + " " + getY(place) + " " + getZ(place);
   int x;
   if (random(0x00, 0x05) > 0x03)
   {
     switch (Q5W4)
     {
     case 0x00
       s = "newtree", "underbrush", "newlog", "newrock";
       e = s[random(0x00, numInList(s) - 0x01)];
       escript(gm, e, Q5H7);
       break;
     case 0x01
       if (random(0x00, 0x03))
       {
         break;
       }
       s = 0x0D25, 0x0D26, 0x0D27, 0x0D28, 0x0D2A, 0x0D2C, 0x0D2E, 0x0D25, 0x0D26, 0x0D27, 0x0D28, 0x0D2A, 0x0D2C, 0x0D2E, 0x0D25, 0x0D26, 0x0D27, 0x0D28, 0x0D2A, 0x0D2C, 0x1363, 0x1364, 0x1365, 0x1366, 0x1367, 0x1368, 0x1369, 0x136A, 0x136B, 0x136C, 0x136D, 0x0D2E, 0x0D32, 0x0D32, 0x0D32, 0x0C95, 0x0C96, 0x0D31, 0x0D30, 0x0D35, 0x0D37;
       x = s[random(0x00, numInList(s) - 0x01)];
       createStatic(place, x);
       if (random(0x00, 0x01))
       {
         if (x == 0x0D28)
         {
           createStatic(place, 0x0D29);
         }
         if (x == 0x0D2A)
         {
           createStatic(place, 0x0D2B);
         }
         if (x == 0x0D2C)
         {
           createStatic(place, 0x0D2D);
         }
         if (x == 0x0D2E)
         {
           createStatic(place, 0x0D2F);
         }
         if (x == 0x0D35)
         {
           createStatic(place, 0x0D36);
         }
       }
       break;
     case 0x02
       s = "newjtree", "newjbrush", "newjbrush", "newjbrush", "newjlog", "newrock", "newjshroom";
       e = s[random(0x00, numInList(s) - 0x01)];
       escript(gm, e, Q5H7);
       break;
     case 0x03
       if (random(0x00, 0x0A))
       {
         break;
       }
       s = 0x0CAF, 0x0CB0, 0x0CB5, 0x0CB6, 0x0C85, 0x0D29, 0x0D2B, 0x0D2D, 0x0D2F, 0x0D15, 0x0D16, 0x0D17, 0x0D18, 0x0D19, 0x0D15, 0x0D16, 0x0D17, 0x0D18, 0x0D19, 0x0D14, 0x0D13, 0x0D12, 0x1773, 0x1774, 0x177B, 0x177C, 0x1777, 0x1778, 0x1363, 0x1364, 0x1365, 0x1366, 0x1367, 0x1368, 0x1369, 0x136A, 0x136B, 0x136C, 0x136D;
       x = s[random(0x00, numInList(s) - 0x01)];
       createStatic(place, x);
       break;
     case 0x04
       escript(gm, "newtree", Q5H7);
       break;
     case 0x05
       s = 0x0D08, 0x0D06, 0x0DC2, 0x0D07, 0x0DC3, 0x0DC1, 0x0D0A, 0x0DBC, 0x0D09, 0x0DBD, 0x0D0B, 0x0DBE, 0x0D04, 0x0CB7, 0x0CB8, 0x0CB9, 0x0CBA, 0x0CBB, 0x0CBC, 0x0CBD, 0x0CB7, 0x0CB8, 0x0CB9, 0x0CBA, 0x0CBB, 0x0CBC, 0x0CBD, 0x0CB7, 0x0CB8, 0x0CB9, 0x0CBA, 0x0CBB, 0x0CBC, 0x0CBD, 0x0CC4, 0x0C94, 0x0C93, 0x0C98, 0x0C97, 0x0CA7;
       x = s[random(0x00, numInList(s) - 0x01)];
       createStatic(place, x);
       break;
     case 0x06
       s = 0x0D08, 0x0D06, 0x0DC2, 0x0D07, 0x0DC3, 0x0DC1, 0x0D0A, 0x0DBC, 0x0D09, 0x0DBD, 0x0D0B, 0x0DBE, 0x0D04, 0x0D05, 0x324E, 0x3250, 0x324D, 0x324C, 0x0CF8, 0x0CFB, 0x0CFE, 0x0D01;
       x = s[random(0x00, numInList(s) - 0x01)];
       createStatic(place, x);
       loc Q5DL;
       if (x == 0x324E)
       {
         Q5DL = place;
         setY(place, (getY(place) - 0x01));
         createStatic(place, 0x324F);
       }
       if (x == 0x3250)
       {
         Q5DL = place;
         setX(place, (getX(place) - 0x01));
         createStatic(place, 0x324F);
       }
       break;
     case 0x07
       s = 0x1B7E, 0x1B7E, 0x1B7E, 0x1B7E, 0x1B7E, 0x0CD6, 0x0CD8, 0x0CD6, 0x0CD8, 0x0CD6, 0x0CD8, 0x0CD6, 0x0CD8, 0x0CD6, 0x0CD8, 0x0CD6, 0x0CD8, 0x0CD6, 0x0CD8, 0x0CD6, 0x0CD8, 0x0CD6, 0x0CD8, 0x0CD6, 0x0CD8, 0x0CD6, 0x0CD8, 0x0CD6, 0x0CD8, 0x0CD6, 0x0CD8, 0x0CD6, 0x0CD8, 0x0CD6, 0x0CD8, 0x0CD6, 0x0CD8, 0x0CD6, 0x0CD8, 0x0CD6, 0x0CD8, 0x0CD6, 0x0CD8, 0x0CD6, 0x0CD8, 0x0CD6, 0x0CD8, 0x0CD6, 0x0CD8;
       if (random(0x00, 0x07))
       {
         x = s[random(0x00, numInList(s) - 0x01)];
         createStatic(place, x);
         if (x == 0x0CD6)
         {
           createStatic(place, 0x0CD7);
         }
         if (x == 0x0CD8)
         {
           createStatic(place, 0x0CD9);
         }
       }
       else
       {
         escript(gm, "newrock", Q5H7);
       }
       break;
     case 0x08
       escript(gm, "underbrush", Q5H7);
       break;
     case 0x09
       escript(gm, "newrock", Q5H7);
       break;
     case 0x0A
       escript(gm, "newshroom", Q5H7);
       break;
     default
       break;
     }
   }
   return ();
 }