Difference between revisions of "Script Function: Q5OH"

From Ultima Online: The Second Age
Jump to: navigation, search
 
Line 59: Line 59:
 
       [[Engine Function:_copyList|<span style="color:#FF0000;font-weight:bold">copyList</span>]](Q5ZF, Q5RJ);
 
       [[Engine Function:_copyList|<span style="color:#FF0000;font-weight:bold">copyList</span>]](Q5ZF, Q5RJ);
 
     }
 
     }
     [[Engine Function:_systemMessage|<span style="color:#FF0000;font-weight:bold">systemMessage</span>]](gm, <span style="color:#800000">"Terrain [[scan|<span style="color:#2B91AF">scan</span>]] complete."</span>);
+
     [[Engine Function:_systemMessage|<span style="color:#FF0000;font-weight:bold">systemMessage</span>]](gm, <span style="color:#800000">"Terrain scan complete."</span>);
 
     [[Engine Function:_updatesOn|<span style="color:#FF0000;font-weight:bold">updatesOn</span>]]();
 
     [[Engine Function:_updatesOn|<span style="color:#FF0000;font-weight:bold">updatesOn</span>]]();
 
     <span style="color:#0000FF">return</span> ();
 
     <span style="color:#0000FF">return</span> ();
 
   }
 
   }

Latest revision as of 17:57, 19 October 2018

 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 ();
 }