The script above is flawed in a few ways and it seems that much of it is unnecessary. A much more concise code block that does that has the same function with some fixes would be as follows;
scn ScriptName
int DoOnce
Begin GameMode
If GetDayOfWeek == 2
set DoOnce to 0
endif
If GameHour >= 12 && GameHour <= 13 && GetDayOfWeek == 0 || GetDayOfWeek == 3 && DoOnce == 0
ShowMessage TestMSG1
If ActorRef1.GetDead == 1
ActorRef1.Resurrect
endif
If ActorRef2.GetDead == 1
ActorRef2.Resurrect
endif
If ActorRef3.GetDead == 1
ActorRef3.Resurrect
endif
set DoOnce to 1
endif
end
First off, integers must be defined outside of the "Begin" function, or an error will follow. Second, the "respawn" integers you currently have serve no real purpose, as they are immediately redefined to fit all perimeters. Lastly, say the player were to kill the NPCs during that hour of gametime; the NPCs would immediately respawn. I simple fix is running this code once, and setting it up to run again on the day before the scheduled respawn cycle.