func void ZS_ObserveIntruder ()
// Initialisieren des Eindringlingsbeobachten
{
	PrintDebug("ZS_ObserveIntruder");
	if (other.guild != 23 )
	{
		if (Npc_IsPlayer(other))
		{
			PrintDebug("Wld_DetectPlayer");
			if (Npc_IsNear (self,other) && C_AreWeStronger(self,other))// Wer steht mir da in der Sonne
			{
				PrintDebug("ZS_ObserveIntruderCounter");
				AI_TurnToNpc(self, other);
				//Mdl_ApplyNewStandAni(self, NPC_RUN, "s_Stand_ArmsCrossed");
				self.aivar [AIV_OBSERVEINTRUDER_COUNTER] +=1;	// Zählen
				if (self.aivar [AIV_OBSERVEINTRUDER_COUNTER] == 2)
				{
					PrintDebug("ZS_ObserveIntruderReset");
					if (Npc_GetAttitude(self,other) == ATT_NEUTRAL)
					{
						if ( self.aivar[AIV_OBSERVEINTRUDER_STRAINED] ==0)
						{
							PrintDebug("..BeGone");
							B_Say(self,"$BeGone");
							//Mdl_ApplyNewStandAni(self, NPC_RUN, "s_Stand_ArmsCrossed");
							self.aivar[AIV_OBSERVEINTRUDER_STRAINED] =1;
						}
						else if (self.aivar[AIV_OBSERVEINTRUDER_STRAINED] == 1)
						{
							B_Say(self,"$BeGoneOrSuffer");
							//Mdl_ApplyNewStandAni(self, NPC_RUN, "s_Stand_HandOnWeapon");
							self.aivar[AIV_OBSERVEINTRUDER_STRAINED] =0;
							PrintDebug("ZS_ObserveIntruderToAngry");
							Npc_SetTempAttitude(self,ATT_ANGRY);
						};
						self.aivar [AIV_OBSERVEINTRUDER_COUNTER] = 0;
					}
					else if (Npc_GetAttitude (self,other) == ATT_ANGRY)
					{
					
						Npc_SetTempAttitude (self,ATT_HOSTILE);
						AI_DoState(self,ZS_HelpAttack,0);
					};
				};
			};
		};
	};
};

func void ZS_ObserveIntruder_End ()
{
	PrintDebug("ZS_ObserveIntruder_End");
	//Mdl_ApplyNewStandAni(self, NPC_RUN, "s_Run");
	//self.aivar [AIV_OBSERVEINTRUDER_STRAINED] = 0;

};

