Script Function: Q5HF

From Ultima Online: The Second Age
Jump to: navigation, search
 function void Q5HF(obj this)
 {
   int myPatrolDelay = 0x1E;
   if (hasObjVar(this, "myPatrolDelay"))
   {
     myPatrolDelay = getObjVar(this, "myPatrolDelay");
   }
   Q66H(this);
   if (Q68M == numInList(Q5HE))
   {
     Q68M = 0x00;
   }
   if (numInList(Q5HE) < 0x01)
   {
     debugMessage("I have nothing in my list of items to patrol.");
     return ();
   }
   loc where = getLocation(Q5HE[Q68M])
   );
   if (0x00)
   {
     bark(this, "Walking to next patrol point.");
   }
   walkTo(this, where, 0x04);
   Q68M++;
   int Q5SZ = 0x01;
   if (hasObjVar(this, "continuePatrol"))
   {
     Q5SZ = getObjVar(this, "continuePatrol");
   }
   if (Q5SZ == 0x01)
   {
     callBack(this, myPatrolDelay, 0x17);
   }
   return;
 }