Difference between revisions of "Script Function: Q41W"

From Ultima Online: The Second Age
Jump to: navigation, search
(Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q41W(<span style="color:#0000FF">obj</span> Q5U8, <span style="color:#0000FF">obj</span> d...")
 
 
Line 23: Line 23:
 
     <span style="color:#0000FF">if</span> (![[Engine Function:_getCompileFlag|<span style="color:#FF0000;font-weight:bold">getCompileFlag</span>]](0x01))
 
     <span style="color:#0000FF">if</span> (![[Engine Function:_getCompileFlag|<span style="color:#FF0000;font-weight:bold">getCompileFlag</span>]](0x01))
 
     {
 
     {
       <span style="color:#0000FF">int</span> Q4IA = [[Engine Func:_NotorietyCompare|<span style="color:#FF0000;font-weight:bold">NotorietyCompare</span>]](Q5AQ, Q5A9);
+
       <span style="color:#0000FF">int</span> Q4IA = [[Engine Function:_NotorietyCompare|<span style="color:#FF0000;font-weight:bold">NotorietyCompare</span>]](Q5AQ, Q5A9);
 
       <span style="color:#0000FF">if</span> ((Q524 == 0x01) && (Q4IA == 0x01) && (![[Script_Function:_Q4BD|<span style="color:#2B91AF">Q4BD</span>]](Q5A9, Q5AQ)))
 
       <span style="color:#0000FF">if</span> ((Q524 == 0x01) && (Q4IA == 0x01) && (![[Script_Function:_Q4BD|<span style="color:#2B91AF">Q4BD</span>]](Q5A9, Q5AQ)))
 
       {
 
       {

Latest revision as of 16:13, 19 October 2018

 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);
 }