Script Function: Q4JN

From Ultima Online: The Second Age
Jump to: navigation, search
 function void Q4JN(loc place)
 {
   int Q66J;
   int Q66I;
   int Q66K;
   int left;
   int right;
   int Q546;
   int lower;
   int Q547;
   int Q4AU = getTile(place);
   int x = getX(place);
   int y = getY(place);
   loc Q5DL = place;
   int c = 0x00;
   loc Q4FA = place;
   int Q62L = getTile(place);
   setX(Q5DL, x - 0x01);
   left = getTile(Q5DL);
   setY(Q5DL, y - 0x01);
   Q66J = getTile(Q5DL);
   setX(Q5DL, x);
   Q66I = getTile(Q5DL);
   setX(Q5DL, x + 0x01);
   Q66K = getTile(Q5DL);
   setY(Q5DL, y);
   right = getTile(Q5DL);
   setY(Q5DL, y + 0x01);
   Q547 = getTile(Q5DL);
   setX(Q5DL, x);
   lower = getTile(Q5DL);
   setX(Q5DL, x - 0x01);
   Q546 = getTile(Q5DL);
   if (Q503(Q4AU))
   {
     return ();
   }
   if ((Q503(Q66J)) && (!Q503(left)) && (!Q503(Q66I)))
   {
     Q62L = 0x0D;
     c = 0x01;
     Q4FA = getX(place) - 0x01, getY(place) - 0x01, getZ(place);
   }
   if ((Q503(Q66K)) && (!Q503(right)) && (!Q503(Q66I)))
   {
     Q62L = 0x0E;
     c = 0x01;
     Q4FA = getX(place) - 0x01, getY(place) + 0x01, getZ(place);
   }
   if ((Q503(Q547)) && (!Q503(right)) && (!Q503(lower)))
   {
     Q62L = 0x0F;
     c = 0x01;
   }
   if ((Q503(Q546)) && (!Q503(left)) && (!Q503(lower)))
   {
     Q62L = 0x10;
     c = 0x01;
   }
   if ((Q503(left)) && (!Q503(right)))
   {
     Q62L = random(0x01, 0x03);
     c = 0x01;
     Q4FA = getX(place) - 0x01, getY(place), getZ(place);
   }
   if ((Q503(right)) && (!Q503(left)))
   {
     Q62L = random(0x07, 0x09);
     c = 0x01;
   }
   if ((Q503(Q66I)) && (!Q503(lower)))
   {
     Q62L = random(0x04, 0x06);
     c = 0x01;
     Q4FA = getX(place), getY(place) - 0x01, getZ(place);
   }
   if ((Q503(lower)) && (!Q503(Q66I)))
   {
     Q62L = random(0x0A, 0x0C);
     c = 0x01;
   }
   if ((Q503(left)) && (Q503(Q66I)))
   {
     Q62L = 0x0D + 0x06;
     c = 0x01;
   }
   if ((Q503(left)) && (Q503(lower)))
   {
     Q62L = 0x0C + 0x06;
     c = 0x01;
     Q4FA = getX(place) - 0x01, getY(place) + 0x01, getZ(place);
   }
   if ((Q503(right)) && (Q503(Q66I)))
   {
     Q62L = 0x0E + 0x06;
     c = 0x01;
     Q4FA = getX(place) - 0x01, getY(place) - 0x01, getZ(place);
   }
   if ((Q503(right)) && (Q503(lower)))
   {
     Q62L = 0x0B + 0x06;
     c = 0x01;
   }
   if (c)
   {
     setTile(place, Q64K[Q62L]);
   }
   setElevation(place, getElevation(Q4FA));
   return ();
 }