35 lines
904 B
Plaintext
35 lines
904 B
Plaintext
|
//:://////////////////////////////////////////////////
|
||
|
//:: NW_C2_DEFAULT4
|
||
|
/*
|
||
|
Default OnConversation event handler for NPCs.
|
||
|
|
||
|
*/
|
||
|
//:://////////////////////////////////////////////////
|
||
|
//:: Copyright (c) 2002 Floodgate Entertainment
|
||
|
//:: Created By: Naomi Novik
|
||
|
//:: Created On: 12/22/2002
|
||
|
//:://////////////////////////////////////////////////
|
||
|
|
||
|
#include "nw_i0_generic"
|
||
|
|
||
|
void main()
|
||
|
{
|
||
|
|
||
|
// See if what we just 'heard' matches any of our
|
||
|
// predefined patterns
|
||
|
int nMatch = GetListenPatternNumber();
|
||
|
object oShouter = GetLastSpeaker();
|
||
|
|
||
|
if (nMatch == -1) {
|
||
|
if (GetCommandable(OBJECT_SELF))
|
||
|
{
|
||
|
ClearAllActions();
|
||
|
BeginConversation();
|
||
|
}
|
||
|
} else if (nMatch == 8888) {
|
||
|
if (GetLocalObject(OBJECT_SELF, "mail_Client") == oShouter) {
|
||
|
SetLocalString(OBJECT_SELF, "mail_Spoken", GetMatchedSubstring(0));
|
||
|
}
|
||
|
}
|
||
|
}
|