void main() { object oPC=GetEnteringObject(); object oWP; string sSay; object oSpeaker; if (GetIsPC(oPC)==TRUE) { // speak oWP=GetNearestObjectByTag("MAGIC_MOUTH",OBJECT_SELF,1); if (oWP!=OBJECT_INVALID) { // sayings gotten sSay=GetName(oWP); oSpeaker=GetNearestObjectByTag("MAGIC_MOUTH_SPEAKER",OBJECT_SELF,1); if (oSpeaker!=OBJECT_INVALID) { // speak through object AssignCommand(oSpeaker,SpeakString(sSay)); } // speak through object else { SendMessageToPC(oPC,"You hear a disembodied voice say '"+sSay+"'"); } } // sayings gotten } // speak }