Script Function: Q4JF

From Ultima Online: The Second Age
Jump to: navigation, search
 function void Q4JF(obj user, loc place)
 {
   loc Q4VS = getLocation(user);
   faceHere(user, getDirectionInternal(Q4VS, place));
   int Q4VV = 0x00;
   if (testSkill(user, 0x0E))
   {
     list Q4VX;
     list Q4VW;
     getMobsInRange(Q4VX, place, 0x02);
     getObjectsInRange(Q4VW, place, 0x02);
     concatList(Q4VX, Q4VW);
     for(int x = 0x00; x < numInList(Q4VX); x++)
     {
       if (!isMobile(Q4VX[x]))
       {
         if (hasObjVar(Q4VX[x], "trapLevel"))
         {
           barkTo(Q4VX[x], user, "You notice something funny about this object.");
           Q4VV = 0x01;
         }
       }
       if (isInvisible(Q4VX[x]) && !isEditing(Q4VX[x]))
       {
         Q4VV = 0x01;
         setInvisible(Q4VX[x], 0x00);
         if (isPlayer(Q4VX[x]))
         {
           barkTo(Q4VX[x], Q4VX[x], "You have been revealed!");
         }
       }
     }
   }
   if (!Q4VV)
   {
     systemMessage(user, "You can see nothing hidden there.");
   }
   return ();
 }