Difference between revisions of "Script Function: Q49Q"

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> Q49Q(<span style="color:#0000FF">obj</span> user, <span style="color:#0000FF">int</span> Q...")
 
(No difference)

Latest revision as of 19:20, 10 October 2018

 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);
 }