Difference between revisions of "Script Function: Q5VM"
From Ultima Online: The Second Age
(Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">void</span> Q5VM(<span style="color:#0000FF">obj</span> Q5KS) { <span style="color:#0000FF">obj...") |
(No difference)
|
Revision as of 22:25, 11 October 2018
function void Q5VM(obj Q5KS) { obj destination; int Q511; obj Q4P1; int Q5D9 = random(0x00, 0x01); Q511 = Q4SJ(Q5KS); if (0x00) { debugMessage("Specific item fetch attempted."); } destination = Q4SI(); if (destination == NULL()) { if (0x00) { debugMessage("Item delivery aborted."); } Q45C(Q5KS); return (); } Q4P1 = requestCreateObjectIn(Q511, getBackpack(Q5KS)); if (Q4P1 == NULL()) { if (0x00) { debugMessage("Item delivery aborted."); } Q5VM(Q5KS); } setObjVar(Q5KS, "questItemDestination", destination); if (0x00) { debugMessage("Adding next leg of quest."); } list Q5LW = "A friend of mine needeth ", "I promised to take something to a friend... ", "I am supposed to deliver "; string Q59W = Q5LW[random(0x00, numInList(Q5LW) - 0x01)]; Q4ET(destination, Q5D9); setObjVar(Q5KS, "questDeliverReason", Q59W); setObjVar(destination, "questDeliverObjectRec", Q4P1); setObjVar(Q5KS, "questDeliverObject", Q4P1); if (0x00) { debugMessage("Item type deliver quest activated."); } if (Q5KS == NULL()) { return (); } attachScript(Q5KS, "quest_deliver_asker"); if (destination == NULL()) { return (); } attachScript(destination, "quest_deliver_dest"); return (); }