instance SLD_201_Bloodwyn (Npc_Default)	//GateGuard2 Südtor
{
	//-------- primary data --------
	name =							"Bloodwyn";
	guild =							GIL_SLD;
	level =							3;
	memory =						SC_UNKNOWN;
	regrow =						0;
	voice =							21;
	id = 							201;
		
	//-------- abilities --------
	attribute[ATR_STRENGTH] =		3;
	attribute[ATR_DEXTERITY] =		2;
	attribute[ATR_MANA_MAX] =		0;
	attribute[ATR_MANA] =			0;
	attribute[ATR_MADNESS_MAX] =	3;
	attribute[ATR_MADNESS] =		3;
	attribute[ATR_HITPOINTS_MAX] =	8;
	attribute[ATR_HITPOINTS] =		8;
	attribute[ATR_PROTECTION] =		2;

	talents =						TAL_1H_AXE;

	//-------- visuals --------
	// 					animations
	Mdl_SetVisual		(self,"humanS.mds");
	// 					body mesh,					head mesh,				hairmesh,		face-tex,		hair-tex,	skin	
	Mdl_SetVisualMesh	(self,"HuS_Body_Naked7_U01.asc",	"Hum_Head_Bald7.mms",	"",			DEFAULT,	DEFAULT,	DEFAULT);
	Mdl_ApplyOverlayMds		(self,"HUMANS_WALKA2.mds");
	//-------- inventory --------
	EquipItem     (self, Axe2);
	// EquipItem     (self, LeatherArmor);
	CreateInvItems(self, HealingPotion, 1);
	
	//-------------Daily Routine-------------
	daily_routine = Rtn_201;
	
	observeIntruder		=	ZS_PissObserveIntruder;	
};

FUNC VOID Rtn_201 ()
{
	TA_Sleep	(00,03,"OCR_HUT_74");
	TA_Guard	(03,00,"OCR_MAINGATE_RIGHT_GUARD");
};

func void ZS_PissObserveIntruder ()
{
	if (!self.aivar[AIV_PISS_COUNTER] == 1 )
	{
		AI_SetWalkmode (self, NPC_RUN);
		AI_GotoWp (self, "OCR_PISS");
		AI_PlayAni (self, "S_PEE");
		self.aivar [AIV_PISS_COUNTER]	= 1;
	}
	else
	{
		PrintDebug("ZS_ObserveIntruder");
		
		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);
						ZS_Attack();
					};
				};
			};
		};
	};
};

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

};



