Difference between revisions of "Script Function: Q5VO"
From Ultima Online: The Second Age
(Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q5VO(<span style="color:#0000FF">obj</span> Q5KS) { <span style="color:#0000FF">obj...") |
|||
Line 52: | Line 52: | ||
<span style="color:#0000FF">if</span> (0x00) | <span style="color:#0000FF">if</span> (0x00) | ||
{ | { | ||
− | debugMessage(<span style="color:#800000">"Item type fetch quest | + | debugMessage(<span style="color:#800000">"Item type fetch quest activated."</span>); |
} | } | ||
[[Engine Function:_setObjVar|<span style="color:#FF0000;font-weight:bold">setObjVar</span>]](Q5KS, <span style="color:#800000">"questFetchObjType"</span>, Q511); | [[Engine Function:_setObjVar|<span style="color:#FF0000;font-weight:bold">setObjVar</span>]](Q5KS, <span style="color:#800000">"questFetchObjType"</span>, Q511); | ||
Line 59: | Line 59: | ||
<span style="color:#0000FF">if</span> (0x00) | <span style="color:#0000FF">if</span> (0x00) | ||
{ | { | ||
− | debugMessage(<span style="color:#800000">"Specific item fetch quest | + | debugMessage(<span style="color:#800000">"Specific item fetch quest activated."</span>); |
} | } | ||
[[Engine Function:_setObjVar|<span style="color:#FF0000;font-weight:bold">setObjVar</span>]](Q5KS, <span style="color:#800000">"questFetchObject"</span>, Q4P1); | [[Engine Function:_setObjVar|<span style="color:#FF0000;font-weight:bold">setObjVar</span>]](Q5KS, <span style="color:#800000">"questFetchObject"</span>, Q4P1); |
Latest revision as of 01:19, 21 October 2018
function void Q5VO(obj Q5KS) { obj Q4WD; int Q511; obj Q4P1; int Q5D9 = random(0x00, 0x03); Q511 = Q4SJ(Q5KS); switch (Q5D9) { default case 0x00 case 0x01 break; case 0x02 case 0x03 if (0x00) { debugMessage("Specific item fetch attempted."); } Q4WD = Q4SI(); if (Q4WD == NULL()) { if (0x00) { debugMessage("Specific item fetch aborted."); } Q5VO(Q5KS); return (); } Q4P1 = requestCreateObjectIn(Q511, getBackpack(Q4WD)); if (Q4P1 == NULL()) { if (0x00) { debugMessage("Specific item fetch aborted."); } Q5VO(Q5KS); } setObjVar(Q4WD, "questReward", Q4P1); setObjVar(Q5KS, "questItemHolder", Q4WD); if (0x00) { debugMessage("Adding next leg of quest."); } Q45C(Q4WD); break; } list Q5LW = "'Tis an odd hobby, but I collect ", "I cannot tell thee why, but I need ", "I have need of ", "I need to get ", "I could really use ", "I have great need of ", "I could use ", "'Tis my fondest hope to own ", "I wish to own ", "I would like ", "I badly need to get ", "I dearly wish to get ", "I dearly wish to obtain ", "I wish to obtain ", "I collect ", "I would like to have ", "I collect", "'Tis my life's work to obtain ", "I have always wished ", "I have always wanted ", "I have always desired ", "I have always dreamed of getting "; string Q59W = Q5LW[random(0x00, numInList(Q5LW) - 0x01)]; Q4ET(Q5KS, Q5D9); setObjVar(Q5KS, "questFetchReason", Q59W); if (0x00) { debugMessage("Item type fetch quest activated."); } setObjVar(Q5KS, "questFetchObjType", Q511); if (Q4P1 != NULL()) { if (0x00) { debugMessage("Specific item fetch quest activated."); } setObjVar(Q5KS, "questFetchObject", Q4P1); } if (Q5KS == NULL()) { return (); } attachScript(Q5KS, "quest_fetch_asker"); return (); }