@Septile: Okay, so to enable Running Shoes, setflag 0x82F in FireRed, setflag 0x860 in Ruby/Sapphire, and setflag 0x8C0 in Emerald.
And yes, you are a complete idiot :P
Jk, but next time check the documents and tutorials section. The tut that I've linked for 644 could've given you this information.
@644: First, you shouldn't be using those flags :\ The safe flags are 0x1000 and on (but I've had a similar problem with those flags too).
There are just plain variables, and they're different from flags in that they're more versatile, and can have a wider range of values assigned to them. See this tutorial for more:
[I MAY NOT POST LINKS YET]
Now, in the script you're using, vars would be set up like this:
This is a rough layout, I'm assuming you already are familiar with XSE.