Difference between revisions of "Script Function: Q5VQ"
From Ultima Online: The Second Age
(Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q5VQ(<span style="color:#0000FF">obj</span> Q5KS) { <span style="color:#0000FF">obj...") |
|||
Line 19: | Line 19: | ||
<span style="color:#0000FF">if</span> (0x00) | <span style="color:#0000FF">if</span> (0x00) | ||
{ | { | ||
− | debugMessage(<span style="color:#800000">"Murder quest | + | debugMessage(<span style="color:#800000">"Murder quest activated."</span>); |
} | } | ||
[[Engine Function:_setObjVar|<span style="color:#FF0000;font-weight:bold">setObjVar</span>]](Q5KS, <span style="color:#800000">"questMurderVictim"</span>, victim); | [[Engine Function:_setObjVar|<span style="color:#FF0000;font-weight:bold">setObjVar</span>]](Q5KS, <span style="color:#800000">"questMurderVictim"</span>, victim); |
Latest revision as of 01:18, 21 October 2018
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 (); }