Script Function: Q4M5

From Ultima Online: The Second Age
Revision as of 03:53, 12 October 2018 by Grimoric (talk | contribs) (Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q4M5(<span style="color:#0000FF">obj</span> this) { <span style="color:#0000FF">lis...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
 function void Q4M5(obj this)
 {
   list Q5XE;
   getObjectsInRange(Q5XE, getLocation(this), 0x0A);
   int Q60R = random(0x00, numInList(Q5XE) - 0x01);
   obj Q61K = Q5XE[Q60R];
   if (!Q5W3(this, Q61K))
   {
     return ();
   }
   if (getWeight(Q61K) > 0x14)
   {
     if (0x00)
     {
       bark(this, "Tried to scavenge something too heavy. :P");
     }
     return ();
   }
   if (Q4Z8(this, Q61K))
   {
     return ();
   }
   if (getObjType(Q61K) == 0x00)
   {
     return ();
   }
   if (hasObjVar(this, "ScavengeLastItemGotten"))
   {
     obj Q63H = getObjVar(this, "ScavengeLastItemGotten");
     if (hasObj(this, Q63H))
     {
       deleteObject(Q63H);
     }
   }
   member obj Q5OI = Q61K;
   walkTo(this, getLocation(Q61K), 0x08);
   return ();
 }