Script Function: Q62Q

From Ultima Online: The Second Age
Jump to: navigation, search
 function int Q62Q(obj Q62O, int Q4DW, int Q478)
 {
   int Q5NC;
   obj ship = getMultiSlaveId(this);
   if (ship == NULL())
   {
     int Q5FV = Q630(Q62O);
     bark(this, "Ar, I have no ship!");
     return (0x00);
   }
   if (Q464 == 0x01)
   {
     bark(this, "Ar, the anchor is down sir!");
     return (0x00);
   }
   if ((Q4DW >= 0x08) && (Q4DW <= 0x0A))
   {
     int Q4ID = Q4DW - 0x07;
     Q5NC = Q62Z(ship, Q4ID);
     if (Q5NC > 0x00)
     {
       if (!Q478)
       {
         bark(Q62O, "Yes, sir.");
       }
     }
     else
     {
       if (Q5NC < 0x00)
       {
         bark(Q62O, "Arr, the water is too turbulent to turn sir!");
       }
       else
       {
         bark(Q62O, "Ar, can't turn sir.");
       }
       Q5FV = Q630(Q62O);
       return (0x00);
     }
     if (!Q478)
     {
       Q5FV = Q630(Q62O);
       return (0x00);
     }
     return (0x01);
   }
   if (((Q4DW >= 0x00) && (Q4DW <= 0x07)) || ((Q4DW >= 0x0B) && (Q4DW <= 0x1A)) || ((Q4DW >= 0x1D) && (Q4DW <= 0x24)))
   {
     int Q58B = 0x01;
     int Q5CK = 0x00;
     if ((Q4DW >= 0x00) && (Q4DW <= 0x07))
     {
       Q5CK = Q4DW;
       if ((Q4DW == 0x00) || (Q4DW == 0x01) || (Q4DW == 0x07))
       {
         Q58B = 0x03;
       }
     }
     if ((Q4DW >= 0x0B) && (Q4DW <= 0x12))
     {
       Q5CK = Q4DW - 0x0B;
     }
     if ((Q4DW >= 0x13) && (Q4DW <= 0x1A))
     {
       Q5CK = Q4DW - 0x13;
       if ((Q5CK == 0x00) || (Q5CK == 0x01) || (Q5CK == 0x07))
       {
         Q58B = 0x03;
       }
     }
     if ((Q4DW >= 0x1D) && (Q4DW <= 0x24))
     {
       Q5CK = Q4DW - 0x1D;
     }
     Q5NC = Q5SP(ship, Q5CK, Q58B);
     if (Q5NC == 0x00)
     {
       bark(Q62O, "Ar, we've stopped sir.")Q5FV = Q630(Q62O);
       Q62W(Q62O);
       return (0x00);
     }
     else
     {
       if (Q5NC < 0x00)
       {
         bark(Q62O, "Ar, turbulent water!")
         Q62V(Q62O);
         Q5NC = Q5S4(ship, Q5CK, Q62O);
         if (!Q478)
         {
           if (!Q65T)
           {
             Q5FV = Q630(Q62O);
           }
           else
           {
             Q65T = 0x00;
           }
         }
         return (0x00);
       }
       else
       {
         if (((Q4DW >= 0x13) && (Q4DW <= 0x1A)) || ((Q4DW >= 0x1D) && (Q4DW <= 0x24)))
         {
           if (!Q478)
           {
             Q5FV = Q630(Q62O);
           }
         }
       }
     }
     return (0x01);
   }
   if (Q4DW == 0x1B)
   {
     return (Q62R(Q62O, 0x00));
   }
   if (Q4DW == 0x1C)
   {
     return (Q62R(Q62O, 0x01));
   }
   if (Q4DW >= 0x25)
   {
     bark(this, "Ar, I don't know how to do that, sir.");
     Q5FV = Q630(Q62O);
     return (0x00);
   }
   return (0x00);
 }