Script Function: Q49V

From Ultima Online: The Second Age
Revision as of 09:55, 10 October 2018 by Grimoric (talk | contribs) (Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q49V(<span style="color:#0000FF">obj</span> Q5KD, <span style="color:#0000FF">obj</span> Q...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
 function int Q49V(obj Q5KD, obj Q5KC, int Q5NM)
 {
   obj user = Q5KD;
   obj usedon = Q5KC;
   if (Q5NM)
   {
     user = Q5KC;
     usedon = Q5KD;
   }
   if (usedon == NULL())
   {
     return (0x00);
   }
   if (Q5KC != NULL())
   {
     if (getTopmostContainer(Q5KC) != Q5KD)
     {
       if (!canSeeObj(user, usedon))
       {
         systemMessage(user, "Target can not be seen.");
         return (0x00);
       }
       if (getDistanceInTiles(getLocation(user), getLocation(usedon)) > 0x0C)
       {
         systemMessage(user, "Target is too far away.");
         return (0x00);
       }
     }
   }
   return (0x01);
 }