Hi all. Having a headache over this one.
NPC is a wanderer, he gets around but on Mondays at 4.00am he sets off into the town market. It's quite a distance, arrives around 7.00am. The quest tied to him asks player to find this NPC with the objective "Check the market for NPCx". So far I've scripted that today IS a Monday between 0.00am and 7.00am and a note is enabled on top of a market stall informing player that NPCx only attends the market on Mondays, player didn't know this prior to the note being read/enabled. As I said if today is, and it is, Monday and the above timeframe is relevant then the objective says "NPCx is due here today. Come back later." This works as it should. Script so far...
Quest Property myQuest AutoInt Property PreReqStage AutoInt Property StageToSet AutoGlobalVariable Property GameHour AutoInt Function GetDayOfWeek() Int GameDaysPassed GameDaysPassed = GetPassedGameDays() return GameDaysPassed % 7EndFunctionInt Function GetPassedGameDays() Float GameTime Int GameDaysPassed GameTime = Utility.GetCurrentGameTime() GameDaysPassed = GameTime As Int Return GameDaysPassedEndFunctionEvent OnTriggerEnter(objectreference akactionref)Float fTime = GameHour.GetValue()If MyQuest.GetStage() == PreReqStageIf((akactionref == game.getplayer()) && (GetDayOfWeek() == 1))If fTime > 0.0 && fTime < 6.0MyQuest.SetStage(StageToSet) EndIfEndifEndifEndEvent
I'm not good at combining conditions in scripts, what I need is to add to the script that if today is not Monday (timeframe I'm guessing is irrelevant here), do I use <> or =!, then do nothing. Nothing i.e. not enabling NPCx's goods for sale - this is taken care of by a similar script.
Thanks for your time.