Script Function: Q4BZ

From Ultima Online: The Second Age
Jump to: navigation, search
 function int Q4BZ(obj this, string Q698, obj speaker)
 {
   int Q4E3 = 0x00;
   if (Q698 != "patrol")
   {
     return (0x00);
   }
   if (0x00)
   {
     bark(this, "Got order to patrol.");
   }
   if (hasObjVar(this, "continuePatrol"))
   {
     Q4E3 = getObjVar(this, "continuePatrol");
   }
   if (!Q4E3)
   {
     setObjVar(this, "continuePatrol", 0x01);
     if (!isPet(this))
     {
       bark(this, "Patrolling.");
     }
     else
     {
       Q4LJ(this);
       barkTo(this, speaker, "Your pet begins to patrol.");
     }
     Q5HF(this);
   }
   else
   {
     setObjVar(this, "continuePatrol", 0x00);
     if (!isPet(this))
     {
       bark(this, "Stopping patrol.");
     }
     else
     {
       Q4LJ(this);
       barkTo(this, speaker, "Your pet stops patrolling.");
     }
   }
   return (0x01);
 }