Difference between revisions of "Script Function: Q4M9"

From Ultima Online: The Second Age
Jump to: navigation, search
(Blanked the page)
 
Line 1: Line 1:
 
+
  <span style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q4M9(<span style="color:#0000FF">obj</span> spell, <span style="color:#0000FF">obj</span> caster)
 +
  {
 +
    <span style="color:#0000FF">if</span> ([[Script_Function:_Q4YT|<span style="color:#2B91AF">Q4YT</span>]](caster) || [[Script_Function:_Q507|<span style="color:#2B91AF">Q507</span>]](caster))
 +
    {
 +
      [[Engine Function:_systemMessage|<span style="color:#FF0000;font-weight:bold">systemMessage</span>]](caster, <span style="color:#800000">"You are already casting a spell."</span>);
 +
      <span style="color:#0000FF">return</span> ();
 +
    }
 +
    <span style="color:#0000FF">if</span> ([[Engine Function:_getMobFlag|<span style="color:#FF0000;font-weight:bold">getMobFlag</span>]](caster, 0x02))
 +
    {
 +
      [[Engine Function:_systemMessage|<span style="color:#FF0000;font-weight:bold">systemMessage</span>]](caster, <span style="color:#800000">"You can not cast a spell while frozen."</span>);
 +
      <span style="color:#0000FF">return</span> ();
 +
    }
 +
    <span style="color:#0000FF">int</span> Q5UX = [[Script_Function:_Q4T2|<span style="color:#2B91AF">Q4T2</span>]](spell);
 +
    <span style="color:#0000FF">int</span> Q5US = [[Script_Function:_Q4SY|<span style="color:#2B91AF">Q4SY</span>]](Q5UX);
 +
    <span style="color:#0000FF">int</span> Q55B = [[Script_Function:_Q4SX|<span style="color:#2B91AF">Q4SX</span>]](Q5US);
 +
    <span style="color:#0000FF">if</span> (![[Script_Function:_Q49Q|<span style="color:#2B91AF">Q49Q</span>]](caster, Q55B))
 +
    {
 +
      <span style="color:#0000FF">return</span> ();
 +
    }
 +
    [[Engine Function:_setObjVar|<span style="color:#FF0000;font-weight:bold">setObjVar</span>]](caster, <span style="color:#800000">"spellObj"</span>, spell);
 +
    [[Engine Function:_attachScript|<span style="color:#FF0000;font-weight:bold">attachScript</span>]](caster, <span style="color:#800000">"casting"</span>);
 +
    <span style="color:#0000FF">int</span> Q4H9 = [[Script_Function:_Q4SV|<span style="color:#2B91AF">Q4SV</span>]](Q5US, Q5UX);
 +
    [[Engine Function:_shortcallback|<span style="color:#FF0000;font-weight:bold">shortcallback</span>]](caster, Q4H9, 0x80);
 +
    [[Engine Function:_shortcallback|<span style="color:#FF0000;font-weight:bold">shortcallback</span>]](caster, 0x00, 0x82);
 +
    [[Engine Function:_bark|<span style="color:#FF0000;font-weight:bold">bark</span>]](caster, [[Script_Function:_Q4T5|<span style="color:#2B91AF">Q4T5</span>]]([[Script_Function:_Q4T2|<span style="color:#2B91AF">Q4T2</span>]](spell)));
 +
    <span style="color:#0000FF">return</span> ();
 +
  }

Latest revision as of 03:12, 8 October 2018

 function void Q4M9(obj spell, obj caster)
 {
   if (Q4YT(caster) || Q507(caster))
   {
     systemMessage(caster, "You are already casting a spell.");
     return ();
   }
   if (getMobFlag(caster, 0x02))
   {
     systemMessage(caster, "You can not cast a spell while frozen.");
     return ();
   }
   int Q5UX = Q4T2(spell);
   int Q5US = Q4SY(Q5UX);
   int Q55B = Q4SX(Q5US);
   if (!Q49Q(caster, Q55B))
   {
     return ();
   }
   setObjVar(caster, "spellObj", spell);
   attachScript(caster, "casting");
   int Q4H9 = Q4SV(Q5US, Q5UX);
   shortcallback(caster, Q4H9, 0x80);
   shortcallback(caster, 0x00, 0x82);
   bark(caster, Q4T5(Q4T2(spell)));
   return ();
 }