Script Function: Q5OH

From Ultima Online: The Second Age
Jump to: navigation, search
 function void Q5OH(int Q65M)
 {
   int Q5VV = getX(Q5VR);
   int Q5VW = getY(Q5VR);
   int Q4NW = getX(Q4NU);
   int Q4NX = getY(Q4NU);
   loc place;
   int y;
   int x;
   int Q6A0;
   int c = 0x00;
   systemMessage(gm, "Starting terrain scan from " + Q5VR + " to " + Q4NU + ".");
   updatesOff();
   for(y = Q5VW; y < (Q4NX + 0x01); y++)
   {
     for(x = Q5VV; x < (Q4NW + 0x01); x++)
     {
       place = x, y, 0x00;
       Q6A0 = getElevation(place);
       place = x, y, Q6A0;
       if (!Q4Z1(place))
       {
         switch (Q65M)
         {
         case 0x01
           Q5IL(place);
           break;
         case 0x02
           Q4B4(place);
           break;
         case 0x03
           Q4MO(place);
           break;
         case 0x04
           Q5IK(place);
           break;
         case 0x05
           Q4M6(place);
           break;
         case 0x06
           Q4JN(place);
           break;
         case 0x07
           break;
         case 0x08
           Q5L5(place);
           break;
         case 0x09
           Q545(place);
           break;
         default
           break;
         }
       }
     }
   }
   if (Q65M == 0x06)
   {
     copyList(Q5ZF, Q5RJ);
   }
   systemMessage(gm, "Terrain scan complete.");
   updatesOn();
   return ();
 }