Script Function: Q4LU

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> Q4LU(<span style="color:#0000FF">obj</span> user, <span style="color:#0000FF">loc</span> u...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
 function int Q4LU(obj user, loc usedon, int Q5UX, int Q50V)
 {
   if (isPlayer(user))
   {
     if (hasObjVar(user, "spellCastersLevel"))
     {
       removeObjVar(user, "spellCastersLevel");
     }
   }
   Q662(user, 0x00);
   int Q5US = Q4SY(Q5UX);
   int Q55B = Q4SX(Q5US);
   if (!Q49R(user, usedon, Q55B))
   {
     return (0x00);
   }
   int Q5TG = 0x00;
   if (Q50V)
   {
     Q5TG = 0x02;
   }
   int Q4IB = Q4SW(Q5US - Q5TG);
   if (testAndLearnSkill(user, 0x19, Q4IB, 0x28) <= 0x00)
   {
     return (0x00);
   }
   loseMana(user, Q55B);
   return (0x01);
 }