What are the variables that you're using for the time system? What are their values at 12am and 5pm?
You will either set up different event pages/tabs on each event, using variables in the event page conditions, or you will use conditional branches to determine what needs to happen based on those variables.
You need to show HOW you're doing stuff, not just say that you ARE doing stuff. Then we might be able to help you.
I would not make all the NPCs on parallel processes - that's going to cause a whole lot of lag.
Please show the entire event page. The parts you have cropped out are just as important (if not more important) than the event commands.
Also clarify what is the GameTime.hour? set to when you're running this, what you expect to happen, and what is actually happening.
I suggest you go back to basics and refresh your understanding of event pages and page triggers. What you have above will never work.
Your first page is set to parallel process, so if the condition is true, it's going to show the shop as soon as the map loads, you will exit the shop, and then it will loop to the start and show the shop again. If the condition isn't true, it will activate page 2. It will only go back to page 1 if the player interacts with the event (action button) which is unlikely because there is no sprite.
The conditions in the conditional branch on both pages are the same. This means if the time is > 5PM the event will disappear, but then you can interact with it and it will appear again, and then disappear again straight away. And if the time is 0, then the time IS less than 18, so your two parts to the conditional branch are also redundant.
I suggest you do the following ... allocate a variable to keep track of the game time. Create a new common event, set it to parallel process, and add the following commands:
Wait 60 Frames
Control Variables: (time variable) = Script: GameTime.hour?
This common event will cause the hour to be put into the variable every second while the game is running. You will need to allocate a switch, and turn on that switch at the start of the game, so it's always active. A parallel common event with a 60 frame (1 second) wait will not affect performance.
Now on your NPC event, create the first page with your NPC sprite and shop processing. Leave its trigger as Action Button.
Create a second event page with no sprite and no event commands. Leave its trigger as Action Button. In the event conditions, put Variable (time variable) >= 18.
So before 5:00 the NPC will be there, and you need to go up and interact with him to see the shop window. And after 5:00 the NPC will not be there. If the NPC happens to be on the screen, visible, when the hour changes from 4:00 to 5:00, the NPC will just disappear. Likewise, if the player is on the screen and near that spot when the hour goes from 11:00 to midnight, the NPC will just appear.
Note - without looking at the time system, wouldn't 5PM be 17 rather than 18? If it's hours since midnight, 18 would be 6PM.
You shouldn't do any page of that event as a parallel process, unless you want it to come up automatically, without interacting with the NPC.
Common events are pretty much the same as map events, with a few small differences. The beauty of common events is that you can set up stuff to run over multiple maps. You could do the same thing with a map event set to parallel process (which would then not need a switch to be turned on to activate), but if you have events on a lot of maps that will appear and disappear or do different things based on the time of day, it's really better/easier to have a single common event rather than duplicate events on lots of maps.
And if you had set that second page to parallel process, it would continually be switching back and forth between the two pages prior to 5pm (or 6pm). You wouldn't see anything, but it might affect performance.
Sorry - not into that sort of thing (plus my cat pulled my hard drive off the desk and broke it and I can't even run RPG Maker right now). I think I explained it pretty well, so go back over my previous instructions, try it, and see how you go. If you get confused after trying, or it doesn't work, take a screenshot of the event and post it here and we'll take a look at it. To do a screenshot, use Alt+PrintScreen and don't crop anything away. This will provide the event in the best format, with all of the necessary information and nothing extra, which will save us a heap of time.
Sure. Just make sure you capture the entire event window, including all the tabs and conditions and stuff. Don't crop it to just the event commands. Otherwise we'll have to ask you to do it again because some of that other stuff is really important too. But don't get the entire desktop background, because then that makes it too small to see the good stuff and we have to squint 🙂