Script Function: Q41W

From Ultima Online: The Second Age
Jump to: navigation, search
 function int Q41W(obj Q5U8, obj dest, int Q5NM, int Q524, int Q54K)
 {
   obj Q5AQ = Q5U8;
   obj Q5A9 = dest;
   if (Q5AQ == Q5A9)
   {
     return (0x00);
   }
   if (Q5NM)
   {
     Q5AQ = dest;
     Q5A9 = Q5U8;
   }
   if (getCompileFlag(0x01))
   {
     if (Q524 == 0x01)
     {
       receiveHelpfulActionFrom(Q5A9, Q5AQ);
       int value = getKarma(Q5A9) / 0x05;
       changeKarma(Q5AQ, value);
     }
   }
   if (!getCompileFlag(0x01))
   {
     int Q4IA = NotorietyCompare(Q5AQ, Q5A9);
     if ((Q524 == 0x01) && (Q4IA == 0x01) && (!Q4BD(Q5A9, Q5AQ)))
     {
       int Q463 = 0x00 - ((Q54K + 0x01) / 0x02);
       int Q5BI = (0x00 - (((Q54K + 0x01) / 0x02) * 0x18));
       if (Q41G(Q5AQ, Q463, 0x00, Q5BI))
       {
         systemMessage(Q5AQ, "That action is frowned upon.");
       }
       return (Q463);
     }
   }
   return (0x00);
 }