Difference between revisions of "Script Function: Q4K5"

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> Q4K5(<span style="color:#0000FF">obj</span> user, <span style="color:#0000FF">obj</span> u...")
 
 
Line 12: Line 12:
 
       <span style="color:#0000FF">if</span> ([[Engine Function:_hasObjVar|<span style="color:#FF0000;font-weight:bold">hasObjVar</span>]](this, <span style="color:#800000">"magicItemBonus"</span>))
 
       <span style="color:#0000FF">if</span> ([[Engine Function:_hasObjVar|<span style="color:#FF0000;font-weight:bold">hasObjVar</span>]](this, <span style="color:#800000">"magicItemBonus"</span>))
 
       {
 
       {
         Q5MJ = 0x19 + [[dice|<span style="color:#FF0000;font-weight:bold">dice</span>]](0x01, 0x0A);
+
         Q5MJ = 0x19 + [[Engine Function:_dice|<span style="color:#FF0000;font-weight:bold">dice</span>]](0x01, 0x0A);
 
       }
 
       }
 
       <span style="color:#0000FF">else</span>
 
       <span style="color:#0000FF">else</span>
 
       {
 
       {
         Q5MJ = ([[Engine Function:_getSkillLevel|<span style="color:#FF0000;font-weight:bold">getSkillLevel</span>]](user, 0x19) / 0x0A) * 0x04 + [[dice|<span style="color:#FF0000;font-weight:bold">dice</span>]](0x01, 0x0A);
+
         Q5MJ = ([[Engine Function:_getSkillLevel|<span style="color:#FF0000;font-weight:bold">getSkillLevel</span>]](user, 0x19) / 0x0A) * 0x04 + [[Engine Function:_dice|<span style="color:#FF0000;font-weight:bold">dice</span>]](0x01, 0x0A);
 
       }
 
       }
 
       <span style="color:#0000FF">int</span> Q4FY = [[Engine Function:_getCurHP|<span style="color:#FF0000;font-weight:bold">getCurHP</span>]](usedon);
 
       <span style="color:#0000FF">int</span> Q4FY = [[Engine Function:_getCurHP|<span style="color:#FF0000;font-weight:bold">getCurHP</span>]](usedon);

Latest revision as of 20:45, 18 October 2018

 function int Q4K5(obj user, obj usedon)
 {
   int Q5NC = 0x00;
   if (Q50G(usedon))
   {
     int Q5MJ;
     loc Q4VS = getLocation(user);
     loc there = getLocation(usedon);
     faceHere(user, getDirectionInternal(Q4VS, there));
     doMobAnimation(usedon, 0x376A, 0x09, 0x20, 0x00, 0x00);
     sfx(there, 0x0202, 0x00);
     if (hasObjVar(this, "magicItemBonus"))
     {
       Q5MJ = 0x19 + dice(0x01, 0x0A);
     }
     else
     {
       Q5MJ = (getSkillLevel(user, 0x19) / 0x0A) * 0x04 + dice(0x01, 0x0A);
     }
     int Q4FY = getCurHP(usedon);
     addHP(usedon, Q5MJ);
     int Q5CO = getCurHP(usedon);
     Q5MJ = Q5CO - Q4FY;
     string Q4PN = Q5MJ;
     if (isPlayer(user))
     {
       systemMessage(user, Q4PN + " points of damage have been healed.");
     }
     if (Q5MJ != 0x00)
     {
       int Q527 = Q41J(user, usedon, 0x00, this);
       Q5NC = 0x01;
     }
   }
   Q5UQ(this);
   return (Q5NC);
 }