Script Function: Q41G

From Ultima Online: The Second Age
Jump to: navigation, search
 function int Q41G(obj it, int Q463, int Q5JO, int Q5BI)
 {
   if (!isValid(it))
   {
     return (0x00);
   }
   int Q4FJ;
   Q4FJ = getNotoriety(it);
   int Q5C3 = Q4FJ + Q463;
   if (Q463 > 0x00)
   {
     if (Q4FJ > Q5JO)
     {
       Q5C3 = Q4FJ;
     }
     else
     {
       if (Q5C3 > Q5JO)
       {
         Q5C3 = Q5JO;
       }
     }
   }
   if (Q463 < 0x00)
   {
     if (Q4FJ < Q5BI)
     {
       Q5C3 = Q4FJ;
     }
     else
     {
       if (Q5C3 < Q5BI)
       {
         Q5C3 = Q5BI;
       }
     }
   }
   if (Q5C3 != Q4FJ)
   {
     setNotoriety(it, Q5C3);
     return (0x01);
   }
   return (0x00);
 }