35 lines
1.2 KiB
Plaintext
35 lines
1.2 KiB
Plaintext
|
// TAMRIL
|
||
|
|
||
|
void main()
|
||
|
{
|
||
|
object oMe=OBJECT_SELF;
|
||
|
int nPattern=GetListenPatternNumber();
|
||
|
int nState=GetLocalInt(GetModule(),"nEvilWizard");
|
||
|
object oSpeaker=GetLastSpeaker();
|
||
|
if (nPattern==112670&&nState==0)
|
||
|
{ // awaken
|
||
|
AssignCommand(oMe,ClearAllActions());
|
||
|
AssignCommand(oMe,SpeakString("Someone has spoken the word!! At last!"));
|
||
|
SetLocalInt(GetModule(),"nEvilWizard",1);
|
||
|
SetLocalInt(oSpeaker,"nEvilWizard",1);
|
||
|
} // awaken
|
||
|
else if (nPattern==112670)
|
||
|
{ //
|
||
|
AssignCommand(oMe,ClearAllActions());
|
||
|
AssignCommand(oMe,SpeakString("You are a clever scholar, but, someone has already uttered that word."));
|
||
|
} //
|
||
|
else if (nPattern==112671&&nState!=3&&nState!=0)
|
||
|
{ // free
|
||
|
AssignCommand(oMe,ClearAllActions());
|
||
|
AssignCommand(oMe,SpeakString("I am freed! Someone has spoken the second word!!"));
|
||
|
SetLocalInt(GetModule(),"nEvilWizard",3);
|
||
|
SetLocalInt(oSpeaker,"nEvilWizard",3);
|
||
|
} // free
|
||
|
else if (nPattern==112671&&nState==3)
|
||
|
{ //
|
||
|
AssignCommand(oMe,ClearAllActions());
|
||
|
AssignCommand(oMe,SpeakString("The one I sent has already uttered those words."));
|
||
|
} //
|
||
|
ExecuteScript("nw_c2_default4",oMe);
|
||
|
}
|