Script Function: Q4BS

From Ultima Online: The Second Age
Jump to: navigation, search
 function int Q4BS(obj this, string Q698, obj speaker)
 {
   if ((Q698 != "fetch") && (Q698 != "get") && (Q698 != "bring"))
   {
     return (0x00);
   }
   if (getWeight(this) > 0x64)
   {
     if (!isPet(this))
     {
       bark(this, "I am already carrying too much.");
     }
     else
     {
       systemMessage(speaker, "Your pet couldn't possibly carry any more.");
     }
     return (0x00);
   }
   setObjVar(this, "petFetch", 0x01);
   if (!isPet(this))
   {
     bark(this, "What shall I get for you?");
   }
   else
   {
     systemMessage(speaker, "Click on the object to fetch.");
   }
   targetObj(speaker, this);
   return (0x01);
 }