Script Function: Q49Q

From Ultima Online: The Second Age
Revision as of 19:20, 10 October 2018 by Grimoric (talk | contribs) (Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q49Q(<span style="color:#0000FF">obj</span> user, <span style="color:#0000FF">int</span> Q...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
 function int Q49Q(obj user, int Q55B)
 {
   obj rightHand = getItemAtSlot(user, 0x01);
   obj leftHand = getItemAtSlot(user, 0x02);
   if (!Q4ZA(rightHand))
   {
     barkToHued(user, user, 0x22, "Your hands must be free to cast spells.");
     return (0x00);
   }
   if (getCompileFlag(0x01))
   {
     if (!Q4ZA(leftHand))
     {
       barkToHued(user, user, 0x22, "Your hands must be free to cast spells.");
       return (0x00);
     }
   }
   else
   {
     if ((!isUsingVirtueShield(user)) && (!Q4ZA(leftHand)))
     {
       barkToHued(user, user, 0x22, "Your hands must be free to cast spells.");
       return (0x00);
     }
   }
   if (!Q41P(user, Q55B))
   {
     barkToHued(user, user, 0x22, "Not enough mana to cast this spell.");
     return (0x00);
   }
   if (isDead(user))
   {
     return (0x00);
   }
   return (0x01);
 }