Script Function: Q4CS

From Ultima Online: The Second Age
Jump to: navigation, search
 function int Q4CS(obj Q68S)
 {
   int s = getRealStrength(Q68S);
   int d = getRealDexterity(Q68S);
   int i = getRealIntelligence(Q68S);
   int Q5W7 = abs(s) + abs(d) + abs(i);
   int Q5TT = abs(getStatMod(Q68S, 0x00));
   int Q4IR = abs(getStatMod(Q68S, 0x01));
   int Q4XV = abs(getStatMod(Q68S, 0x02));
   int Q5W6 = Q5TT + Q4IR + Q4XV;
   if ((s < 0x00) || (d < 0x00) || (i < 0x00) || (s > 0x69) || (d > 0x69) || (i > 0x69) || (Q5W7 > 0xEB))
   {
     return (0x01);
   }
   if ((Q5TT > 0x0F) || (Q4IR > 0x0F) || (Q4XV > 0x0F) || (Q5W6 > 0x28))
   {
     return (0x01);
   }
   int Q63R = 0x00;
   int Q63W = 0x00;
   for(int Q525 = 0x00; Q525 < 0x2E; Q525++)
   {
     int Q4FC = getSkillLevelNoStatNoMod(Q68S, Q525);
     int Q44X = abs(Q4FC);
     int Q4G1 = getSkillMod(Q68S, Q525);
     int Q44Y = abs(Q4G1);
     if ((Q4FC < 0x00) || (Q4FC > 0x041A) || (Q44Y > 0x012C))
     {
       return (0x01);
     }
     Q63R = Q63R + Q44X;
     Q63W = Q63W + Q44Y;
   }
   if ((Q63R > 0x1BBC) || (Q63W > 0x01F4))
   {
     return (0x01);
   }
   return (0x00);
 }