NWScript:
if(GetLocalInt(OBJECT_SELF, "iIsDancing") != 1)
{
object oClosestPC = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC);
string sMyCurrArea = GetTag(GetArea(OBJECT_SELF));
string sClosePCArea = GetTag(GetArea(oClosestPC));
if(sClosePCArea == sMyCurrArea)
{
SetLocalInt(OBJECT_SELF, "iIsDancing", 1);
ActionPlayAnimation(ANIMATION_FIREFORGET_VICTORY2);
DelayCommand(3.0, ActionPlayAnimation( ANIMATION_LOOPING_TALK_LAUGHING, 3.0, 2.0));
DelayCommand(3.0, PlayVoiceChat(VOICE_CHAT_LAUGH));
DelayCommand(5.0, ActionPlayAnimation( ANIMATION_FIREFORGET_VICTORY1));
DelayCommand(8.5, ActionPlayAnimation( ANIMATION_FIREFORGET_VICTORY3));
DelayCommand(11.0, ActionPlayAnimation( ANIMATION_LOOPING_GET_MID, 3.0, 2.0));
DelayCommand(14.5, PlayVoiceChat(VOICE_CHAT_LAUGH));
DelayCommand(13.0, ActionPlayAnimation( ANIMATION_FIREFORGET_VICTORY3));
DelayCommand(12.0, SetLocalInt(OBJECT_SELF, "iIsDancing", 0));
}
}