Script Function: Q5LX
From Ultima Online: The Second Age
function int Q5LX(obj this, obj speaker, string arg) { list args; int i; int Q4QI; if (!Q4J8(this, speaker, arg)) { return (0x01); } split(args, arg); list Q5B5; list memoryRecent; list memoryNotoriety; if (hasObjVar(this, "memoryRecent")) { getObjListVar(memoryRecent, this, "memoryRecent"); } if (hasObjVar(this, "memoryNotoriety")) { getObjListVar(memoryNotoriety, this, "memoryNotoriety"); } copyList(Q5B5, memoryRecent); if (0x00) { debugMessage("Added recent memory to the names check list."); } list Q61Q; obj Q609; int Q55T = numInList(memoryNotoriety); for(i = 0x00; i < Q55T; i++) { copyList(Q61Q, memoryNotoriety[i]); Q609 = Q61Q[0x00]; appendToList(Q5B5, Q609); if (0x00) { debugMessage("Added a name from fame memory to the names check list."); } } int Q518; Q4QI = 0x00; string Q60L; string Q4BA; for(i = 0x00; i < numInList(args); i++) { Q60L = args[i]; for(Q518 = 0x00; Q518 < numInList(Q5B5); Q518++) { Q4BA = getName(Q5B5[Q518]); if (Q60L == Q4BA) { Q4QI = 0x01; break; } } } if (!Q4QI) { Q4QI = Q4CE(arg); } if (Q4QI) { if (0x00) { debugMessage("Recognized a name in speech."); } Q60L = getName(Q5B5[Q518]); string Q4W7 = getName(speaker); if (Q60L != Q4W7) { replyTo(this, Q5B5[Q518], "@InternalNameRecognition"); Q4J9(this); if (0x00) { debugMessage("doing Convo Pause"); } obj Q611 = Q5B5[Q518]; string Q58D = getHeShe(Q611) + " is " + getDirection(getLocation(this), getLocation(Q611)) + "."; toUpper(Q58D, 0x00, 0x01); bark(this, Q58D); if (getDistance(getLocation(this), getLocation(Q611)) == "right here") { Q58D = "Just turn around and look."; } else { if (getDistance(getLocation(this), getLocation(Q611)) == "a long journey") { Q58D = "Just turn around and look."; } else { Q58D = getHeShe(Q611) + " is " + getDistance(getLocation(this), getLocation(Q611)) + " from here."; toUpper(Q58D, 0x00, 0x01); bark(this, Q58D); } } return (0x00); } if (0x00) { bark(this, "Speaker asked about himself."); } } return (0x01); }
function int Q5LX(obj this, obj speaker, string arg) { list args; int i; int Q4QI; if (!Q4J8(this, speaker, arg)) { return (0x01); } split(args, arg); list Q5B5; list memoryRecent; list memoryNotoriety; if (hasObjVar(this, "memoryRecent")) { getObjListVar(memoryRecent, this, "memoryRecent"); } if (hasObjVar(this, "memoryNotoriety")) { getObjListVar(memoryNotoriety, this, "memoryNotoriety"); } copyList(Q5B5, memoryRecent); if (0x00) { debugMessage("Added recent memory to the names check list."); } list Q61Q; obj Q609; int Q55T = numInList(memoryNotoriety); for(i = 0x00; i < Q55T; i++) { copyList(Q61Q, memoryNotoriety[i]); Q609 = Q61Q[0x00]; appendToList(Q5B5, Q609); if (0x00) { debugMessage("Added a name from fame memory to the names check list."); } } int Q518; Q4QI = 0x00; string Q60L; string Q4BA; for(i = 0x00; i < numInList(args); i++) { Q60L = args[i]; for(Q518 = 0x00; Q518 < numInList(Q5B5); Q518++) { Q4BA = getName(Q5B5[Q518]); if (Q60L == Q4BA) { Q4QI = 0x01; break; } } } if (!Q4QI) { Q4QI = Q4CE(arg); } if (Q4QI) { if (0x00) { debugMessage("Recognized a name in speech."); } Q60L = getName(Q5B5[Q518]); string Q4W7 = getName(speaker); if (Q60L != Q4W7) { replyTo(this, Q5B5[Q518], "@InternalNameRecognition"); Q4J9(this); if (0x00) { debugMessage("doing Convo Pause"); } obj Q611 = Q5B5[Q518]; string Q58D = getHeShe(Q611) + " is " + getDirection(getLocation(this), getLocation(Q611)) + "."; toUpper(Q58D, 0x00, 0x01); bark(this, Q58D); if (getDistance(getLocation(this), getLocation(Q611)) == "right here") { Q58D = "Just turn around and look."; } else { if (getDistance(getLocation(this), getLocation(Q611)) == "a long journey") { Q58D = "Just turn around and look."; } else { Q58D = getHeShe(Q611) + " is " + getDistance(getLocation(this), getLocation(Q611)) + " from here."; toUpper(Q58D, 0x00, 0x01); bark(this, Q58D); } } return (0x00); } if (0x00) { bark(this, "Speaker asked about himself."); } } return (0x01); }