
FUNC VOID ZS_AssessTalk ()
{// Standartgespräche über den Tagesablauf --> Ablauf immer Sc fragt Nsc wartet und Antwortet

	AI_StandUp(self);
	AI_TurnToNpc(self,other);

	if(Npc_IsInRoutine (self,ZS_REPAIRHUT) || Npc_IsInRoutine (self,ZS_REPAIRHUT_LOOP))
	{
		AI_OutputSVM	(other,"$SCQRepairHut");
		AI_WaitTillEnd	(self,	other);
		AI_PlayAni 		(self,"R_Sweat");
		PrintDebug("AI_PlayAni 		(self,R_Sweat);");
		AI_OutputSVM	(self,	"$NSCARepairHut");
	}
	
	else if (Npc_IsInRoutine(self,ZS_COOK) || Npc_IsInRoutine (self,ZS_COOK_LOOP)) 
	{
		AI_OutputSVM	(other,	"$SCQCook");
		AI_WaitTillEnd	(self,	other);
		AI_OutputSVM	(self,	"$NSCACook");
		
	} 

	else if (Npc_IsInRoutine(self,ZS_PLAYMUSIC_LOOP) || Npc_IsInRoutine (self,ZS_PLAYMUSIC)) 
	{
		AI_OutputSVM	(other,	"$SCQPlayMusic");
		AI_WaitTillEnd	(self,	other);
		AI_OutputSVM	(self,	"$NSCAPlayMusic");

	}

	else if (Npc_IsInRoutine(self,ZS_Sleep_LOOP) || Npc_IsInRoutine (self,ZS_Sleep))
	{
		var int sleephelp;
		sleephelp = Hlp_Random (3);
		if (sleephelp == 1)
		{
			AI_OutputSVM	(other, "$SCQSleep");
		}
		else 
		{
			AI_OutputSVM	(other,	"SCQSleep2");
		};
		AI_PlayAni 		(self,  "R_Yawn");
		AI_WaitTillEnd 	(self,other);
		AI_OutputSVM	(self, 	"$NSCASleep");
	}

	else if(Npc_IsInRoutine(self,ZS_PickOre))
	{
		AI_OutputSVM	(other,	"$SCQPickOre");
		AI_WaitTillEnd	(self,other);
		AI_OutputSVM	(self,	"$NSCAPickOre");
	}

	else if (Npc_IsInRoutine(self,ZS_HangAround) || Npc_IsInRoutine(self,ZS_HangAround_Loop))
	{
		AI_OutputSVM	(other,	"$SCQHangAround");
		AI_WaitTillEnd	(self,other);
		AI_OutputSVM	(self,	"$NSCAHangAround");
	}

	else if(Npc_IsInRoutine(self,ZS_Guard) || Npc_IsInRoutine(self,ZS_Guard_Loop))
	{
		AI_OutputSVM	(other,	"$SCQGuard");
		AI_WaitTillEnd	(self,other);
		AI_PointAtObj	(self,other);
		AI_OutputSVM	(self,	"$NSCAGuard");
		AI_StopPointAt	(self);
	}

	else if(Npc_IsInRoutine(self,ZS_Eat))
	{
		AI_OutputSVM	(other,	"$SCQEat");
		AI_WaitTillEnd	(self,other);
		AI_OutputSVM	(self,	"$NSCAEat");
	}

	else if(Npc_IsInRoutine(self,ZS_GotoWP))
	{
		AI_OutputSVM	(other,	"$SCQGotoWP");
		AI_WaitTillEnd	(self,other);
		AI_OutputSVM	(self,	"$NSCAGotoWP");
	}

	else if(Npc_IsInRoutine(self,ZS_Drunk))
	{
		AI_OutputSVM	(other,	"$SCSmalltalkDefault");
		AI_WaitTillEnd	(self,other);
		AI_OutputSVM	(self,	"$Laalalaa");
	}

	else if(Npc_IsInRoutine(self,ZS_Listen) || Npc_IsInRoutine(self,ZS_Listen_Loop))
	{
		AI_OutputSVM	(other,	"$SCQListen");
		AI_WaitTillEnd	(self,other);
		AI_OutputSVM	(self,	"$RTListen");
	}

	else if(Npc_IsInRoutine(self,ZS_Speech_Loop))
	{
		if (self.aivar[AIV_SPEECH_COUNTER] ==0)
		{
			AI_OutputSVM	(other,	"$SCQSpeech");
			self.aivar[AIV_SPEECH_COUNTER] == 1;
			AI_WaitTillEnd	(self,other);
			AI_OutPutSVM	(self,"NovSpeech1");
		}
		else if (self.aivar[AIV_SPEECH_COUNTER] ==1)
		{
			AI_OutputSVM	(self,"SCQSpeech2");
			self.aivar[AIV_SPEECH_COUNTER] ==2;
			AI_WaitTillEnd	(self,other);
			AI_OutPutSVM	(self,"NovSpeech2");
		}
		else if (self.aivar[AIV_SPEECH_COUNTER] ==2)
		{
			AI_OutputSVM	(self,"SCQSpeech3");
			self.aivar[AIV_SPEECH_COUNTER] ==3;
			AI_WaitTillEnd	(self,other);
			AI_OutPutSVM	(self,"NovSpeech3");
		}
		else if (self.aivar[AIV_SPEECH_COUNTER] ==3)
		{
			AI_OutputSVM	(self,"SCQSpeech4");
			self.aivar[AIV_SPEECH_COUNTER] == 1;
			AI_WaitTillEnd	(self,other);
			AI_OutPutSVM	(self,"NovSpeech4");
		}
		else 
		{
			AI_OutputSVM (self,"SCQSpeech5");
			self.aivar[AIV_SPEECH_COUNTER] == 1;
			AI_WaitTillEnd	(self,other);
			AI_OutPutSVM	(self,"NovSpeech5");
		};
	}
	else if(Npc_IsInRoutine(self,ZS_Speech))
	{
		if (self.aivar[AIV_SPEECH_COUNTER] ==0)
		{
			AI_OutputSVM	(other,	"$SCQSpeech");
			self.aivar[AIV_SPEECH_COUNTER] == 1;
			AI_WaitTillEnd	(self,other);
			AI_OutPutSVM	(self,"NovSpeech1");
		}
		else if (self.aivar[AIV_SPEECH_COUNTER] ==1)
		{
			AI_OutputSVM	(self,"SCQSpeech2");
			self.aivar[AIV_SPEECH_COUNTER] ==2;
			AI_WaitTillEnd	(self,other);
			AI_OutPutSVM	(self,"NovSpeech2");
		}
		else if (self.aivar[AIV_SPEECH_COUNTER] ==2)
		{
			AI_OutputSVM	(self,"SCQSpeech3");
			self.aivar[AIV_SPEECH_COUNTER] ==3;
			AI_WaitTillEnd	(self,other);
			AI_OutPutSVM	(self,"NovSpeech3");
		}
		else if (self.aivar[AIV_SPEECH_COUNTER] ==3)
		{
			AI_OutputSVM	(self,"SCQSpeech4");
			self.aivar[AIV_SPEECH_COUNTER] == 1;
			AI_WaitTillEnd	(self,other);
			AI_OutPutSVM	(self,"NovSpeech4");
		}
		else 
		{
			AI_OutputSVM (self,"SCQSpeech5");
			self.aivar[AIV_SPEECH_COUNTER] == 1;
			AI_WaitTillEnd	(self,other);
			AI_OutPutSVM	(self,"NovSpeech5");
		};
	}
	else
	{
		AI_OutputSVM	(other,	"$SCQDefault");
		AI_WaitTillEnd	(self,other);
		AI_OutputSVM	(self,	"$NSCADEFAULT");
	};		
};

FUNC VOID ZS_AssessTalkEnd()
{// End Talk ist zweite Aussage zum Tagesablauf um ein Ende des Gesprächs darzustellen	
	PrintDebug("EndTalk");
	AI_TurnToNpc	(self,other);
	AI_OutputSVM	(other,"$SCQq3");
	AI_WaitTillEnd	(self,	other);
	if (Npc_IsInRoutine(self,ZS_PLAYMUSIC) || Npc_IsInRoutine(self,ZS_PlayMusic_Loop)) 
	{
		AI_OutputSVM	(self,	"$EndPlayMusic");
		if (Npc_GetAttitude (self,other) == (ATT_FRIENDLY || ATT_NEUTRAL))
		{
			 Npc_SetTempAttitude (self,ATT_ANGRY);
		}
		else if (Npc_GetAttitude (self,other) == ATT_ANGRY)
		{
			Npc_SetTempAttitude (self, ATT_HOSTILE);
		};
	} 
	else if (Npc_IsInRoutine(self,ZS_REPAIRHUT) || Npc_IsInRoutine(self,ZS_RepairHut_Loop)) 
	{
		AI_OutputSVM	(self,	"$RTRepairHut");
		if (Npc_GetAttitude (self,other) == (ATT_FRIENDLY || ATT_NEUTRAL))
		{
			 Npc_SetTempAttitude (self,ATT_ANGRY);
		}
		else if (Npc_GetAttitude (self,other) == ATT_ANGRY)
		{
			Npc_SetTempAttitude (self, ATT_HOSTILE);
		};
	
	} 
	else if (Npc_IsInRoutine(self,ZS_COOK) || Npc_IsInRoutine(self,ZS_Cook_Loop)) 
	{
		AI_OutputSVM	(self,	"$EndCook");
		if (Npc_GetAttitude (self,other) == (ATT_FRIENDLY || ATT_NEUTRAL))
		{
			 Npc_SetTempAttitude (self,ATT_ANGRY);
		}
		else if (Npc_GetAttitude (self,other) == ATT_ANGRY)
		{
			Npc_SetTempAttitude (self, ATT_HOSTILE);
		};
		
	} 
	else if (Npc_IsInRoutine(self,ZS_Sleep) || Npc_IsInRoutine(self,ZS_Sleep_Loop)) 
	{
		AI_OutputSVM	(self,	"$EndSleep");
		if (Npc_GetAttitude (self,other) == (ATT_FRIENDLY || ATT_NEUTRAL))
		{
			 Npc_SetTempAttitude (self,ATT_ANGRY);
		}
		else if (Npc_GetAttitude (self,other) == ATT_ANGRY)
		{
			Npc_SetTempAttitude (self, ATT_HOSTILE);
		};
		
	} 
	else if (Npc_IsInRoutine(self,ZS_PickOre)) 
	{
		AI_OutputSVM	(self,	"$EndPickOre");
		if (Npc_GetAttitude (self,other) == (ATT_FRIENDLY || ATT_NEUTRAL))
		{
			 Npc_SetTempAttitude (self,ATT_ANGRY);
		}
		else if (Npc_GetAttitude (self,other) == ATT_ANGRY)
		{
			Npc_SetTempAttitude (self, ATT_HOSTILE);
		};
		
	}
	else if (Npc_IsInRoutine(self,ZS_HangAround) || Npc_IsInRoutine(self,ZS_HangAround_Loop)) 
	{
		AI_OutputSVM	(self,	"$EndHangAround");
		if (Npc_GetAttitude (self,other) == (ATT_FRIENDLY || ATT_NEUTRAL))
		{
			 Npc_SetTempAttitude (self,ATT_ANGRY);
		}
		else if (Npc_GetAttitude (self,other) == ATT_ANGRY)
		{
			Npc_SetTempAttitude (self, ATT_HOSTILE);
		};
		
	} 
	else if (Npc_IsInRoutine(self,ZS_Guard) || Npc_IsInRoutine(self,ZS_Guard_Loop)) 
	{
		AI_OutputSVM	(self,	"$EndGuard");
		if (Npc_GetAttitude (self,other) == (ATT_FRIENDLY || ATT_NEUTRAL))
		{
			 Npc_SetTempAttitude (self,ATT_ANGRY);
		}
		else if (Npc_GetAttitude (self,other) == ATT_ANGRY)
		{
			Npc_SetTempAttitude (self, ATT_HOSTILE);
		};
		
	} 
	else if (Npc_IsInRoutine(self,ZS_Eat)) 
	{
		AI_OutputSVM	(self,	"$EndEat");
		if (Npc_GetAttitude (self,other) == (ATT_FRIENDLY || ATT_NEUTRAL))
		{
			 Npc_SetTempAttitude (self,ATT_ANGRY);
		}
		else if (Npc_GetAttitude (self,other) == ATT_ANGRY)
		{
			Npc_SetTempAttitude (self, ATT_HOSTILE);
		};
		
	}
	else if (Npc_IsInRoutine(self,ZS_GotoWP)) 
	{
		AI_OutputSVM	(self,	"$EndGotoWP");
		if (Npc_GetAttitude (self,other) == (ATT_FRIENDLY || ATT_NEUTRAL))
		{
			 Npc_SetTempAttitude (self,ATT_ANGRY);
		}
		else if (Npc_GetAttitude (self,other) == ATT_ANGRY)
		{
			Npc_SetTempAttitude (self, ATT_HOSTILE);
		};
		
	}
	else  
	{
		AI_OutputSVM	(self,	"$EndTalk");
		if (Npc_GetAttitude (self,other) == (ATT_FRIENDLY || ATT_NEUTRAL))
		{
			 Npc_SetTempAttitude (self,ATT_ANGRY);
		}
		else if (Npc_GetAttitude (self,other) == ATT_ANGRY)
		{
			Npc_SetTempAttitude (self, ATT_HOSTILE);
		};
	};		
};
