Open an event file that has an NPC with a normal trainer and a normal script NPC
Ex Pewter Gym
Click on the script NPC, then the trainer, then the NPC again
It'll appear to "wipe" the NPC's script to 0
But if you don't save and reload the map, it'll be normal again.
How to avoid:
Don't click on trainers and then click on other NPCs and then hit save.
As per stated in discord by Plat:
Major glitch on DSPRE:
Open an event file that has an NPC with a normal trainer and a normal script NPC Ex Pewter Gym Click on the script NPC, then the trainer, then the NPC again It'll appear to "wipe" the NPC's script to 0 But if you don't save and reload the map, it'll be normal again.
How to avoid: Don't click on trainers and then click on other NPCs and then hit save.
Creating the issue to reference in PR with fix.