Script Function: Q4V2

From Ultima Online: The Second Age
Jump to: navigation, search
 function int Q4V2(obj speaker)
 {
   if (speaker != Q5YH)
   {
     return (0x01);
   }
   if ((getNotoriety(speaker) < 0x7F) || Q4VC(speaker) || Q4V6(speaker))
   {
     Q5YH = NULL();
     return (0x00);
   }
   obj Q5RU;
   if (Q4YU)
   {
     Q5RU = requestCreateObjectIn(0x1BC3, getBackpack(speaker));
   }
   else
   {
     Q5RU = requestCreateObjectIn(0x1BC4, getBackpack(speaker));
   }
   if (Q5RU == NULL())
   {
     bark(this, "I'm sorry, the ranks of the knights are currently full.");
     return (0x00);
   }
   setObjVar(Q5RU, "owner", speaker);
   list Q5H7 = "Excellent! Welcome to our ranks!", "Welcome to our ranks!", "Excellent!", "'Tis a good choice.", "Congratulations!", "I congratulate thee!";
   string Q58D = Q5H7[random(0x00, numInList(Q5H7) - 0x01)];
   Q58D = Q58D + " Thy shield is in thy backpack. Be sure that thou dost " "not lose thy reputation, or else thou shalt lose thy life with it.";
   bark(this, Q58D);
   Q5YH = NULL();
   return (0x00);
 }