Script Function: Q5YB

From Ultima Online: The Second Age
Revision as of 19:19, 10 October 2018 by Grimoric (talk | contribs) (Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q5YB(<span style="color:#0000FF">obj</span> user, <span style="color:#0000FF">list</span>...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
 function int Q5YB(obj user, list Q5BD)
 {
   int Q5LS = 0x00;
   int Q526 = 0x00;
   for(int Q4CK = 0x00; (Q4CK < numInList(Q5BD)) && (Q526 == 0x00); Q4CK++)
   {
     Q5LS = Q5BD[Q4CK];
     if (getGeneric(user, Q5LS) <= 0x00)
     {
       Q526 = 0x01;
       break;
     }
   }
   if (Q526 == 0x01)
   {
     if (isPlayer(user))
     {
       barkToHued(user, user, 0x22, "More reagents are needed for this spell.");
     }
     return (0x00);
   }
   else
   {
     for(int Q4SK = 0x00; Q4SK < numInList(Q5BD); Q4SK++)
     {
       Q5LS = Q5BD[Q4SK];
       destroyGeneric(user, Q5LS, 0x01);
     }
     return (0x01);
   }
   if (isPlayer(user))
   {
     bark(user, "BUG! Please report: Invalid takeReagent return.");
   }
   return (0x00);
 }