Script Function: Q49Q

From Ultima Online: The Second Age
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);
 }