Script Function: Q4ZM

From Ultima Online: The Second Age
Jump to: navigation, search
 function int Q4ZM(obj user)
 {
   int Q46D = 0x00;
   int Q4QG = 0x00;
   list Q5FD;
   clearList(Q5FD);
   getObjectsInRange(Q5FD, getLocation(user), 0x03);
   int Q5E6 = numInList(Q5FD);
   for(int i = 0x00; i < Q5E6; i++)
   {
     int Q620 = getObjType(Q5FD[i]);
     switch (Q620)
     {
     case 0x0FAF
     case 0x0FB0
       Q46D = 0x01;
       break;
     case 0x0FB1
       Q4QG = 0x01;
       break;
     }
     if (Q620 >= 0x197A)
     {
       if (Q620 <= 0x19A9)
       {
         Q4QG = 0x01;
       }
     }
   }
   if (!Q46D)
   {
     string Q47R = "You are not near an anvil";
     if (!Q4QG)
     {
       Q47R = Q47R + " or a forge.";
     }
     else
     {
       Q47R = Q47R + ".";
     }
     systemMessage(user, Q47R);
   }
   else
   {
     if (!Q4QG)
     {
       systemMessage(user, "You are not near a forge.");
     }
   }
   return (Q46D && Q4QG);
 }