Script Function: Q5S8

From Ultima Online: The Second Age
Jump to: navigation, search
 function int Q5S8(obj Q4XN, loc place, int Q4ID, int num)
 {
   int Q5NC;
   loc Q4G3 = place;
   setZ(Q4G3, getZ(Q4G3) + 0x0F);
   for(int Q4EJ = 0x00; Q4EJ < num; Q4EJ++)
   {
     if (canSeeLoc(Q4XN, Q4G3))
     {
       obj multi = Q4SA(Q4G3);
       if ((multi == NULL()) && (dropCheck(Q4G3, Q4XN, getHeight(Q4XN))))
       {
         if (Q4EJ == 0x00)
         {
           int Q4IA = getZ(Q4G3) - getZ(place);
           if (Q4IA < 0x00)
           {
             Q4IA = Q4IA * (0x00 - 0x01);
           }
           if (Q4IA <= 0x03)
           {
             return (0x00);
           }
         }
         return (teleport(Q4XN, Q4G3));
       }
     }
     moveDir(Q4G3, Q4ID);
   }
   return (0x00);
 }