Erm... Isn't a script kinda unnecessary? Just check if the person has a "Confusion" state and if he does, choose a random number for a variable, turn on another common event that fixes it so that if the number is 1, it makes down go up, left go right, etc. and if the number is 2, etc.
Of course, that's just if you want to event it. It's also off the top of my head so it's probably buggy.
Stupid comp won't let me use RMXP/VX. >_>
Anyways, if it works, that's cool but the only problem I have with it is that making a script like that seems too much work (that is if my method works but the guy still aliased so w/e) But I guess I should be taking it up with the guy who made it