Difference between revisions of "Script Function: Q4JG"

From Ultima Online: The Second Age
Jump to: navigation, search
(Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q4JG(<span style="color:#0000FF">obj</span> user, <span style="color:#0000FF">loc</span>...")
 
 
(One intermediate revision by the same user not shown)
Line 4: Line 4:
 
     [[Engine Function:_faceHere|<span style="color:#FF0000;font-weight:bold">faceHere</span>]](user, [[Engine Function:_getDirectionInternal|<span style="color:#FF0000;font-weight:bold">getDirectionInternal</span>]](Q4VS, place));
 
     [[Engine Function:_faceHere|<span style="color:#FF0000;font-weight:bold">faceHere</span>]](user, [[Engine Function:_getDirectionInternal|<span style="color:#FF0000;font-weight:bold">getDirectionInternal</span>]](Q4VS, place));
 
     <span style="color:#0000FF">int</span> Q5VE = [[Engine Function:_getSkillLevelReal|<span style="color:#FF0000;font-weight:bold">getSkillLevelReal</span>]](user, 0x19);
 
     <span style="color:#0000FF">int</span> Q5VE = [[Engine Function:_getSkillLevelReal|<span style="color:#FF0000;font-weight:bold">getSkillLevelReal</span>]](user, 0x19);
     <span style="color:#0000FF">int</span> Q4B3 = [[dice|<span style="color:#FF0000;font-weight:bold">dice</span>]](0x01, 0x03E8);
+
     <span style="color:#0000FF">int</span> Q4B3 = [[Engine Function:_dice|<span style="color:#FF0000;font-weight:bold">dice</span>]](0x01, 0x03E8);
 
     <span style="color:#0000FF">if</span> (Q4B3 < Q5VE)
 
     <span style="color:#0000FF">if</span> (Q4B3 < Q5VE)
 
     {
 
     {
Line 26: Line 26:
 
       }
 
       }
 
     }
 
     }
     <span style="color:#0000FF">int</span> Q4B0 = [[dice|<span style="color:#FF0000;font-weight:bold">dice</span>]](0x01, 0x03E8);
+
     <span style="color:#0000FF">int</span> Q4B0 = [[Engine Function:_dice|<span style="color:#FF0000;font-weight:bold">dice</span>]](0x01, 0x03E8);
 
     <span style="color:#0000FF">if</span> ((0x03E8 - Q5VE) < Q4B0)
 
     <span style="color:#0000FF">if</span> ((0x03E8 - Q5VE) < Q4B0)
 
     {
 
     {
       <span style="color:#0000FF">int</span> Q4Y0 = [[dice|<span style="color:#FF0000;font-weight:bold">dice</span>]](0x0A, 0x3C);
+
       <span style="color:#0000FF">int</span> Q4Y0 = [[Engine Function:_dice|<span style="color:#FF0000;font-weight:bold">dice</span>]](0x0A, 0x3C);
 
       <span style="color:#0000FF">if</span> ((Q4Y0 + Q5VE) < 0x03E8)
 
       <span style="color:#0000FF">if</span> ((Q4Y0 + Q5VE) < 0x03E8)
 
       {
 
       {

Latest revision as of 20:46, 18 October 2018

 function void Q4JG(obj user, loc place)
 {
   loc Q4VS = getLocation(user);
   faceHere(user, getDirectionInternal(Q4VS, place));
   int Q5VE = getSkillLevelReal(user, 0x19);
   int Q4B3 = dice(0x01, 0x03E8);
   if (Q4B3 < Q5VE)
   {
     list Q4YN;
     getMobsInRange(Q4YN, place, 0x02);
     for(int x = 0x00; x < numInList(Q4YN); x++)
     {
       if (hasScript(Q4YN[x], "reminvis"))
       {
         doMobAnimation(Q4YN[x], 0x376A, 0x09, 0x28, 0x00, 0x00);
       }
     }
     list Q4YM;
     getObjectsInRange(Q4YM, place, 0x02);
     for(int y = 0x00; y < numInList(Q4YM); y++)
     {
       if (hasScript(Q4YM[y], "reminvis"))
       {
         doLocAnimation(getLocation(Q4YM[y]), 0x376A, 0x09, 0x14, 0x00, 0x00);
       }
     }
   }
   int Q4B0 = dice(0x01, 0x03E8);
   if ((0x03E8 - Q5VE) < Q4B0)
   {
     int Q4Y0 = dice(0x0A, 0x3C);
     if ((Q4Y0 + Q5VE) < 0x03E8)
     {
       addSkillLevel(user, 0x0E, Q4Y0);
     }
     else
     {
       setSkillLevel(user, 0x0E, 0x03E8);
     }
   }
   return ();
 }