I found this script on the nwvault. It sounds interesting but sadly it was not mentionent where it should be placed in the mod:
int GetTimeSeconds();
void DoHideCheck(object oPC, int nCurrentTime);
float THINK_THINK_DECREMENT = 0.1; //10 Checks per second...
void ThinkChecks(float nTimeLeft);
void ThinkChecks(float nTimeLeft)
{
int nCurrentTime = GetTimeSeconds();
object oObject = GetFirstPC();
while(oObject!=OBJECT_INVALID)
{
DoHideCheck(oObject, nCurrentTime);
oObject = GetNextPC();
}
DelayCommand(THINK_THINK_DECREMENT, ThinkChecks(nTimeLeft-THINK_THINK_DECREMENT));
}
void main()
{
ThinkChecks(8.0); //think throughout HB
}
int GetTimeSeconds()
{
return (GetCalendarYear())*12*28*24*60*60 +
(GetCalendarMonth()-1)*28*24*60*60 +
(GetCalendarDay()-1)*24*60*60 +
GetTimeHour()*60*60 +
GetTimeMinute()*60 +
GetTimeSecond();
}
void DoHideCheck(object oPC, int nCurrentTime)
{
if (!GetHasFeat(FEAT_HIDE_IN_PLAIN_SIGHT, oPC))
return;
talent tHide = TalentSkill(SKILL_HIDE);
string VAR_LAST_HIDDEN = "TIME_LAST_HIDDEN";
string VAR_LAST_VIS = "TIME_LAST_VISIBLE";
int nHideDelay = 6; //you can only hide once per round
int nLastHide = GetLocalInt(oPC, VAR_LAST_HIDDEN);
if (!GetActionMode(oPC, ACTION_MODE_STEALTH))
{
SetLocalInt(oPC, VAR_LAST_VIS, TRUE);
}
else if (GetLocalInt(oPC, VAR_LAST_VIS) && nLastHide > nCurrentTime)
{
string sHideTime = IntToString(nLastHide-nCurrentTime);
ActionUseSkill(SKILL_HIDE, oPC); //toggle
SetActionMode(oPC, ACTION_MODE_STEALTH, FALSE);
FloatingTextStringOnCreature("*You cannot hide for "+sHideTime+" seconds*", oPC, FALSE);
}
else
{
SetLocalInt(oPC, VAR_LAST_VIS, FALSE);
SetLocalInt(oPC, VAR_LAST_HIDDEN, nCurrentTime + nHideDelay);
SetActionMode(oPC, ACTION_MODE_STEALTH, TRUE);
}
}
if anyone has a clue where this script fits into please let me know