Script Function: Q5VQ

From Ultima Online: The Second Age
Jump to: navigation, search
 function void Q5VQ(obj Q5KS)
 {
   obj victim = Q4SI();
   if (victim == NULL())
   {
     if (0x00)
     {
       debugMessage("Murder quest aborted for ack of a victim.");
     }
     Q45C(Q5KS);
     return ();
   }
   list Q5LW = "I have a deep hatred for ", "I have a feud with ", "I was insulted terribly by ", "I have good reasons to wish someone dead... ", "'Tis distasteful, perhaps, but with such a scoundrel, there is no other solution. 'Tis ", "Revile me not, but I have an enemy: ", "I have an enemy, ", "I have reasons to wish someone dead... Their name is ", "I was asked to kill someone but I am too scared to do it. Their name is ", "My family hath had a longstanding feud with ";
   string Q59W = Q5LW[random(0x00, numInList(Q5LW) - 0x01)];
   Q59W = Q59W + getName(victim) + Q59D();
   int Q5D9 = random(0x02, 0x03);
   Q4ET(Q5KS, Q5D9);
   setObjVar(Q5KS, "questMurderReason", Q59W);
   if (0x00)
   {
     debugMessage("Murder quest activated.");
   }
   setObjVar(Q5KS, "questMurderVictim", victim);
   setObjVar(victim, "questMyMurderer", Q5KS);
   if (Q5KS == NULL())
   {
     return ();
   }
   attachScript(Q5KS, "quest_murder_asker");
   if (victim == NULL())
   {
     return ();
   }
   attachScript(victim, "quest_murder_victim");
   return ();
 }