Script Function: Q41T

From Ultima Online: The Second Age
Jump to: navigation, search
 function void Q41T(obj scroll, string Q5OL)
 {
   if (Q5OL == "")
   {
     return ();
   }
   string Q5FL;
   int objtype = getObjType(scroll);
   Q5FL = objtype;
   if (!hasScript(scroll, Q5FL))
   {
     attachScript(scroll, Q5FL);
   }
   if (!hasScript(scroll, Q5OL))
   {
     attachScript(scroll, Q5OL);
   }
   if (hasScript(scroll, "magscroll"))
   {
     detachScript(scroll, "magscroll");
   }
   list Q5OO;
   getScripts(Q5OO, scroll);
   int Q5F0 = 0x00;
   int Q5EV = 0x00;
   int Q5ET = 0x00;
   int Q5EX = 0x00;
   int Q4QI = 0x00;
   int Q5EY = numInList(Q5OO);
   for(int i = 0x00; i < Q5EY; i++)
   {
     Q4QI = 0x00;
     string Q4GF = Q5OO[i];
     if (Q4GF == Q5OL)
     {
       Q5F0++;
       Q4QI = 0x01;
     }
     if (Q4GF == Q5FL)
     {
       Q5EV++;
       Q4QI = 0x01;
     }
     if (Q4GF == "vended")
     {
       Q5EX++;
       Q4QI = 0x01;
     }
     if (!Q4QI)
     {
       detachScript(scroll, Q4GF);
     }
   }
   return ();
 }