Script Function: Q62Z

From Ultima Online: The Second Age
Jump to: navigation, search
 function int Q62Z(obj ship, int Q4ID)
 {
   int Q5SG = getObjVar(ship, "myshipdir");
   int Q4AG = 0x00;
   Q5SG = Q5SG + 0x04;
   if (Q4ID == 0x01)
   {
     Q5SG = Q5SG + 0x01;
     Q4AG = 0x02;
   }
   if (Q4ID == 0x02)
   {
     Q5SG = Q5SG - 0x01;
     Q4AG = 0x06;
   }
   if (Q4ID == 0x03)
   {
     Q5SG = Q5SG - 0x02;
     Q4AG = 0x04;
   }
   if (Q5SG > 0x03)
   {
     Q5SG = Q5SG - 0x04;
   }
   if (Q5SG > 0x03)
   {
     Q5SG = Q5SG - 0x04;
   }
   int Q5NC = Q5SQ(ship, Q5SG, Q4AG);
   Q62T(ship);
   return (Q5NC);
 }