41 lines
1.2 KiB
Plaintext
41 lines
1.2 KiB
Plaintext
void main()
|
|
{
|
|
if (GetIsListening(OBJECT_SELF))
|
|
{
|
|
// Get what he heard
|
|
int nPattern = GetListenPatternNumber();
|
|
|
|
//When someone says the right password
|
|
|
|
if (nPattern == 2000) //Do this on password 1
|
|
{
|
|
object oStatue = GetObjectByTag("hagar_statue");
|
|
object oTarget = GetObjectByTag("hagar_door");
|
|
string sText;
|
|
sText = "You may now enter.";
|
|
DelayCommand(5.0, AssignCommand(oStatue, ActionSpeakString (sText, TALKVOLUME_TALK)));
|
|
AssignCommand(oTarget, ActionOpenDoor(oTarget));}
|
|
|
|
//if (nPattern == 2001) //Do this on password 2
|
|
//{
|
|
//object oTarget;
|
|
//oTarget = GetObjectByTag("hagar_door");
|
|
//AssignCommand(oTarget, ActionOpenDoor(oTarget));
|
|
//}
|
|
|
|
//if (nPattern == 2002) //Do this on password 3
|
|
//{
|
|
//object oTarget;
|
|
//oTarget = GetObjectByTag("hagar_door");
|
|
//AssignCommand(oTarget, ActionOpenDoor(oTarget));
|
|
//}
|
|
|
|
//if (nPattern == 2003) //Do this on password 4
|
|
//{
|
|
//object oTarget;
|
|
//oTarget = GetObjectByTag("hagar_door");
|
|
//AssignCommand(oTarget, ActionOpenDoor(oTarget));
|
|
//}
|
|
}
|
|
}
|