func void ZS_MoveNpcWait ()
{
Hlp_PrintConsole(Str_Format(" ZS_MoveNpcWait [%s %i]",self.name, self.id));
Perception_Set_MoveNpcWait(); // G1
// Perception_Set_Minimal (); // G2 - нет реакции на вытаскивание оружия
AI_StandUp (self);
// C_LookAtNpc (self, other); // G1
B_LookAtNpc (self, other); // G2
//B_TurnToNpc (self, other);
// ------ aNSCs warnen ------
Npc_SendPassivePerc (self, PERC_ASSESSWARN, self, other);
// ------ aivars resetten -------
self.aivar[AIV_TAPOSITION] = FALSE; //PlayerHasBeenWarnedTwice
self.aivar[AIV_StateTime] = 0;
};
func int ZS_MoveNpcWait_Loop ()
{
if (other.aivar[AIV_INVINCIBLE] == true) // герой с кем то заговорил
|| (Npc_GetDistToNpc(self, other) > DIST_MoveNpc) // герой уступил дорогу
//|| (Npc_IsWayBlocked(self) == false) // НПС решил что путь свободен
|| (self.aivar[AIV_StateTime] >= 10)
//|| (Npc_GetStateTime(self) >= 10)
{
Npc_ClearAIQueue(self);
//C_StopLookAt (self); // da in ZS_MoveNpc() der Blockierer nach dem Waffenziehen angeguckt wird!
B_StopLookAt (self);
B_RemoveWeapon (self);
AI_ContinueRoutine (self);
Hlp_PrintConsole(Str_Format(" ZS_MoveNpcWait [%s %i] -- > return LOOP_END [AIV_StateTime %i]",self.name, self.id, self.aivar[AIV_StateTime]));
return LOOP_END;
};
if (self.aivar[AIV_StateTime] >= 7)
//else if (Npc_GetStateTime(self) >= 7)
{
if (C_AmIStronger(self, other) == true) // общая проверка
&& (self.aivar[AIV_TAPOSITION] == true)
{
Npc_SetTempAttitude (self,ATT_HOSTILE);
// B_Say (self, other, "$YOUASKEDFORIT"); // реплика есть в ZS_Attack
Npc_SetTarget (self, other);
//AI_StartState (self, ZS_Attack, 1, "");
B_Attack (self, other, AR_ReactToWeapon , 0);
return LOOP_END;
};
}
else if (self.aivar[AIV_StateTime] >= 3)
//else if (Npc_GetStateTime(self) >= 3) // 0,1,2,3. итого 4.
{
if (C_AmIStronger(self, other) == true) // общая проверка
&& (self.aivar[AIV_TAPOSITION] == FALSE)
{
B_SelectWeapon (self, other);
//B_Say (self, other, "$YOUDEAFORWHAT"); // G1 MDK
B_Say (self, other, "$ThenIBeatYouOutOfHere"); //Сейчас я вышвырну тебя отсюда!
self.aivar[AIV_TAPOSITION] = TRUE; //PlayerHasBeenWarnedTwice
Hlp_PrintConsole(Str_Format(" ZS_MoveNpcWait [%s %i] -- > B_SelectWeapon [AIV_StateTime %i]",self.name, self.id, self.aivar[AIV_StateTime]));
};
}
else if (self.aivar[AIV_StateTime] == 0)
//if (Npc_GetStateTime(self) == 0)
{
if (C_AmIStronger(self, other) == true)
{
B_Say (self, other, "$WhatDidYouDoInThere"); //Что тебе здесь надо, а?!
}
else
{
B_Say (self, other, "$GetOutOfHere"); //Убирайся отсюда!
};
};
// ------ Alle 2 Sekunden zu other ausrichten ------
if (Npc_GetStateTime (self) != self.aivar[AIV_StateTime])
{
if (!Npc_CanSeeNpc (self, other))
{
B_TurnToNpc (self, other);
};
//Hlp_PrintConsole(Str_Format(" ZS_MoveNpcWait [%s %i] -- > return LOOP_CONTINUE [AIV_StateTime %i]",self.name, self.id, self.aivar[AIV_StateTime]));
self.aivar[AIV_StateTime] = Npc_GetStateTime (self);
};
//AI_Wait (self,1);
return LOOP_CONTINUE;
};
func void ZS_MoveNpcWait_End ()
{
};
// G1 mdk
/*
func void ZS_MoveNpcWait ()
{
PrintDebugNpc (PD_ZS_FRAME, "ZS_MoveNpcWait" );
Npc_PercEnable (self, PERC_ASSESSDAMAGE, ZS_ReactToDamage);
Npc_PercEnable (self, PERC_ASSESSMAGIC, B_AssessMagic);
Npc_PercEnable (self, PERC_ASSESSWARN, B_AssessWarn );
Npc_PercEnable (self, PERC_ASSESSFIGHTSOUND, B_AssessFightSound);
Npc_PercEnable (self, PERC_CATCHTHIEF, ZS_CatchThief );
Npc_PercEnable (self, PERC_ASSESSTALK, B_AssessTalk );
Npc_PercEnable (self, PERC_ASSESSTHREAT, B_AssessFighter);
Npc_PercEnable (self, PERC_ASSESSENTERROOM, B_AssessEnterRoom);
C_LookAtNpc (self, other);
};
func void ZS_MoveNpcWait_Loop ()
{
PrintDebugNpc( PD_ZS_LOOP, "ZS_MoveNpcWait_Loop" );
if (Npc_GetStateTime ( self) > 2 )
{
if Npc_IsWayBlocked(self) // Weg immer noch blockiert?
&& (Npc_GetDistToNpc(self, other)<200) // kцnnte ja auch ein anderer NSC sein, also checken, ob SC noch in der Nдhe!
&& (other.aivar[AIV_INVINCIBLE] == FALSE) // SC kцnnte mittlerweile reden
{
B_DrawWeapon (self, other);
B_Say (self, other, "$YOUDEAFORWHAT");
AI_StartState (self, ZS_MoveNpcWait1, 0, "");
return;
}
else
{
AI_ContinueRoutine (self);
return;
};
};
AI_Wait (self,1);
};
func void ZS_MoveNpcWait_End ()
{
PrintDebugNpc (PD_ZS_FRAME, "ZS_MoveNpcWait_End" );
};
func void ZS_MoveNpcWait1 ()
{
PrintDebugNpc (PD_ZS_FRAME, "ZS_MoveNpcWait1" );
Npc_PercEnable (self, PERC_ASSESSDAMAGE, ZS_ReactToDamage);
Npc_PercEnable (self, PERC_ASSESSMAGIC, B_AssessMagic);
Npc_PercEnable (self, PERC_ASSESSWARN, B_AssessWarn );
Npc_PercEnable (self, PERC_ASSESSFIGHTSOUND, B_AssessFightSound);
Npc_PercEnable (self, PERC_CATCHTHIEF, ZS_CatchThief );
Npc_PercEnable (self, PERC_ASSESSTALK, B_AssessTalk );
Npc_PercEnable (self, PERC_ASSESSTHREAT, B_AssessFighter);
Npc_PercEnable (self, PERC_ASSESSENTERROOM, B_AssessEnterRoom);
};
func void ZS_MoveNpcWait1_Loop ()
{
PrintDebugNpc( PD_ZS_LOOP, "ZS_MoveNpcWait1_Loop" );
if (Npc_GetStateTime ( self) > 2 )
{
if Npc_IsWayBlocked(self) // Weg immer noch blockiert?
&& (Npc_GetDistToNpc(self, other)<200) // kцnnte ja auch ein anderer NSC sein, also checken, ob SC noch in der Nдhe!
&& (other.aivar[AIV_INVINCIBLE] == FALSE) // SC kцnnte mittlerweile reden
{
Npc_SetTempAttitude (self,ATT_HOSTILE);
B_Say (self, other, "$YOUASKEDFORIT");
Npc_SetTarget (self, other);
AI_StartState (self, ZS_Attack, 1, "");
return;
}
else
{
C_StopLookAt (self); // da in ZS_MoveNpc() der Blockierer nach dem Waffenziehen angeguckt wird!
AI_ContinueRoutine (self);
return;
};
};
AI_Wait (self,1);
};
func void ZS_MoveNpcWait1_End ()
{
PrintDebugNpc (PD_ZS_FRAME, "ZS_MoveNpcWait1_End" );
B_RemoveWeapon (self);
};
*/