Yeah! I haven't jog down more variables for a while but I assume 0x40E9 is a free space variable (I've seen FireRed's list stopped before 0x4090 so, I think higher than those are free and unused).
Oh! You should tell too to change the Repels' type into 02 (by pressing Select) from 04 (outside the battle). Repels are originally as 04 and when I pointed to the Item Script routine, it froze. Turning them into 02 works fine.
Your Repel implementation is so far the best thing I've seen implementing it to Emerald. I have tested them, confirming it to be working, and finally in my hack. Thanks to you dude! :D