Difference between revisions of "Script Function: Q4CE"
From Ultima Online: The Second Age
(Created page with " <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4CE(<span style="color:#0000FF">string</span> Q46R) { <span style="color:#0000FF">i...") |
|||
Line 1: | Line 1: | ||
+ | <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4CE(<span style="color:#0000FF">string</span> Q46R) | ||
+ | { | ||
+ | <span style="color:#0000FF">int</span> i; | ||
+ | <span style="color:#0000FF">list</span> Q59E; | ||
+ | <span style="color:#0000FF">int</span> Q4QM = 0x00; | ||
+ | <span style="color:#0000FF">if</span> (![[Engine Function:_hasObjVar|<span style="color:#FF0000;font-weight:bold">hasObjVar</span>]](this, <span style="color:#800000">"myMurderWitnessList"</span>)) | ||
+ | { | ||
+ | debugMessage(<span style="color:#800000">"No murder list."</span>); | ||
+ | <span style="color:#0000FF">return</span> (0x00); | ||
+ | } | ||
+ | [[Engine Function:_getObjListVar|<span style="color:#FF0000;font-weight:bold">getObjListVar</span>]](Q59E, this, <span style="color:#800000">"myMurderWitnessList"</span>); | ||
+ | <span style="color:#0000FF">list</span> Q61X; | ||
+ | <span style="color:#0000FF">string</span> Q5ZM; | ||
+ | for(i = 0x00; i < [[Engine Function:_numInList|<span style="color:#FF0000;font-weight:bold">numInList</span>]](Q59E); i++) | ||
+ | { | ||
+ | [[Engine Function:_copyList|<span style="color:#FF0000;font-weight:bold">copyList</span>]](Q61X, Q59E[i]); | ||
+ | <span style="color:#0000FF">if</span> (Q46R == [[Engine Function:_getName|<span style="color:#FF0000;font-weight:bold">getName</span>]](Q61X[0x00])) | ||
+ | { | ||
+ | Q5ZM = [[Engine Function:_getName|<span style="color:#FF0000;font-weight:bold">getName</span>]](Q61X[0x00]) + <span style="color:#800000">" is a bloody murderer! I saw "</span> + [[Engine Function:_getHimHer|<span style="color:#FF0000;font-weight:bold">getHimHer</span>]](Q61X[0x00]) + <span style="color:#800000">" kill "</span> + [[Engine Function:_getName|<span style="color:#FF0000;font-weight:bold">getName</span>]](Q61X[0x01]) + <span style="color:#800000">" with my own eyes!"</span>; | ||
+ | Q4QM = 0x01; | ||
+ | <span style="color:#0000FF">break</span>; | ||
+ | } | ||
+ | <span style="color:#0000FF">if</span> (Q46R == [[Engine Function:_getName|<span style="color:#FF0000;font-weight:bold">getName</span>]](Q61X[0x01])) | ||
+ | { | ||
+ | Q5ZM = [[Engine Function:_getName|<span style="color:#FF0000;font-weight:bold">getName</span>]](Q61X[0x01]) + <span style="color:#800000">" was brutally slain by "</span> + [[Engine Function:_getName|<span style="color:#FF0000;font-weight:bold">getName</span>]](Q61X[0x00]) + <span style="color:#800000">"!"</span> + <span style="color:#800000">" I saw it with my own eyes!"</span>; | ||
+ | Q4QM = 0x01; | ||
+ | <span style="color:#0000FF">break</span>; | ||
+ | } | ||
+ | } | ||
+ | <span style="color:#0000FF">if</span> (Q4QM) | ||
+ | { | ||
+ | [[Script_Function:_Q4J9|<span style="color:#2B91AF">Q4J9</span>]](this); | ||
+ | <span style="color:#0000FF">obj</span> Q611 = Q61X[0x00]; | ||
+ | <span style="color:#0000FF">string</span> Q58D = [[Engine Function:_getHeShe|<span style="color:#FF0000;font-weight:bold">getHeShe</span>]](Q611) + <span style="color:#800000">" is "</span> + [[Engine Function:_getDirection|<span style="color:#FF0000;font-weight:bold">getDirection</span>]]([[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](this), [[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](Q611)) + <span style="color:#800000">"."</span>; | ||
+ | [[Engine Function:_bark|<span style="color:#FF0000;font-weight:bold">bark</span>]](this, Q58D); | ||
+ | <span style="color:#0000FF">if</span> ([[Engine Function:_getDirection|<span style="color:#FF0000;font-weight:bold">getDirection</span>]]([[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](this), [[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](Q611)) != <span style="color:#800000">"right here"</span>) | ||
+ | { | ||
+ | Q58D = <span style="color:#800000">"It is "</span> + [[Engine Function:_getDistance|<span style="color:#FF0000;font-weight:bold">getDistance</span>]]([[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](this), [[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](Q611)) + <span style="color:#800000">" from here."</span>; | ||
+ | <span style="color:#0000FF">if</span> ([[Engine Function:_getDistance|<span style="color:#FF0000;font-weight:bold">getDistance</span>]]([[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](this), [[Engine Function:_getLocation|<span style="color:#FF0000;font-weight:bold">getLocation</span>]](Q611)) == <span style="color:#800000">"right here"</span>) | ||
+ | { | ||
+ | Q58D = <span style="color:#800000">"Just turn around and look."</span>; | ||
+ | } | ||
+ | [[Engine Function:_bark|<span style="color:#FF0000;font-weight:bold">bark</span>]](this, Q58D); | ||
+ | <span style="color:#0000FF">return</span> (0x01); | ||
+ | } | ||
+ | } | ||
+ | <span style="color:#0000FF">return</span> (0x00); | ||
+ | } | ||
+ | |||
<span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4CE(<span style="color:#0000FF">string</span> Q46R) | <span style="color:#0000FF">function</span> <span style="color:#0000FF">int</span> Q4CE(<span style="color:#0000FF">string</span> Q46R) | ||
{ | { |
Latest revision as of 14:38, 12 October 2018
function int Q4CE(string Q46R) { int i; list Q59E; int Q4QM = 0x00; if (!hasObjVar(this, "myMurderWitnessList")) { debugMessage("No murder list."); return (0x00); } getObjListVar(Q59E, this, "myMurderWitnessList"); list Q61X; string Q5ZM; for(i = 0x00; i < numInList(Q59E); i++) { copyList(Q61X, Q59E[i]); if (Q46R == getName(Q61X[0x00])) { Q5ZM = getName(Q61X[0x00]) + " is a bloody murderer! I saw " + getHimHer(Q61X[0x00]) + " kill " + getName(Q61X[0x01]) + " with my own eyes!"; Q4QM = 0x01; break; } if (Q46R == getName(Q61X[0x01])) { Q5ZM = getName(Q61X[0x01]) + " was brutally slain by " + getName(Q61X[0x00]) + "!" + " I saw it with my own eyes!"; Q4QM = 0x01; break; } } if (Q4QM) { Q4J9(this); obj Q611 = Q61X[0x00]; string Q58D = getHeShe(Q611) + " is " + getDirection(getLocation(this), getLocation(Q611)) + "."; bark(this, Q58D); if (getDirection(getLocation(this), getLocation(Q611)) != "right here") { Q58D = "It is " + getDistance(getLocation(this), getLocation(Q611)) + " from here."; if (getDistance(getLocation(this), getLocation(Q611)) == "right here") { Q58D = "Just turn around and look."; } bark(this, Q58D); return (0x01); } } return (0x00); }
function int Q4CE(string Q46R) { int i; list Q59E; int Q4QM = 0x00; if (!hasObjVar(this, "myMurderWitnessList")) { debugMessage("No murder list."); return (0x00); } getObjListVar(Q59E, this, "myMurderWitnessList"); list Q61X; string Q5ZM; for(i = 0x00; i < numInList(Q59E); i++) { copyList(Q61X, Q59E[i]); if (Q46R == getName(Q61X[0x00])) { Q5ZM = getName(Q61X[0x00]) + " is a bloody murderer! I saw " + getHimHer(Q61X[0x00]) + " kill " + getName(Q61X[0x01]) + " with my own eyes!"; Q4QM = 0x01; break; } if (Q46R == getName(Q61X[0x01])) { Q5ZM = getName(Q61X[0x01]) + " was brutally slain by " + getName(Q61X[0x00]) + "!" + " I saw it with my own eyes!"; Q4QM = 0x01; break; } } if (Q4QM) { Q4J9(this); obj Q611 = Q61X[0x00]; string Q58D = getHeShe(Q611) + " is " + getDirection(getLocation(this), getLocation(Q611)) + "."; bark(this, Q58D); if (getDirection(getLocation(this), getLocation(Q611)) != "right here") { Q58D = "It is " + getDistance(getLocation(this), getLocation(Q611)) + " from here."; if (getDistance(getLocation(this), getLocation(Q611)) == "right here") { Q58D = "Just turn around and look."; } bark(this, Q58D); return (0x01); } } return (0x00); }