Script Function: Q4M9

From Ultima Online: The Second Age
Revision as of 03:12, 8 October 2018 by Grimoric (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
 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 ();
 }