You cannot use wram space wildly for script flags. There's a reserved area for that. The script flags buffer is a 320-byte area that ends at address D886. Address D887 isn't unused and it's in fact the byte used to store the wild encounter rate of the current map, a value that is updated everytime you enter a new map. You have to either make use of some unused flag (I bet there are a few, but I personally don't know which ones could be unused), remove an existing one from an existing script that you'll no longer want in your hack, or expand the event flags area in memory. This is one of the many advantages that hacking over the pokered dissasembly offers compared to using conventional tools. You can do it by simply replacing line 3056 with ds 321 in wram.asm so that a space of 321 bytes (an extra byte) is reserved. That will give you room for eight more flags (D887 bits 0-7). It will shift everything following that address by one byte, so for example the grass rate that occupied D887 before will now move to D888 and so on. This means that it will break your save, but it shouldn't break anything else unless there's some fixed address in pokered that slipped under the radar, but at this point I don't think so.