Script Function: Q5YB

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