Script Function: Q4SI

From Ultima Online: The Second Age
Jump to: navigation, search
 function obj Q4SI()
 {
   obj Q60T;
   if (numInList(Q5DN) > 0x00)
   {
     Q60T = Q5DN[random(0x00, numInList(Q5DN) - 0x01)];
   }
   if (hasObjVar(Q60T, "isActor"))
   {
     if (0x00)
     {
       debugMessage("Selected a protagonist who is already an actor.");
       bark(Q60T, "I am already an actor!");
     }
     Q60T = NULL();
   }
   if (getBackpack(Q60T) == NULL())
   {
     if (0x00)
     {
       debugMessage("Selected actor without a backpack.");
     }
     Q60T = NULL();
   }
   if (0x00)
   {
     debugMessage("Quest protagonist selected.");
     bark(Q60T, "I am now a quest actor!");
   }
   return (Q60T);
 }