Thank you for this handy script.
There's a little bug though that doesn't allow you to switch weapons via mouse wheel after the game start. You should press either [1], [2] or [3] key for mouse wheel to start working as supposed (until the full game restart). To fix this just add
@slot1
as the last line of the script.
#12: And you forgot
bind MWHEELUP "prevslot"
bind MWHEELDOWN "nextslot"
when answering Aoshima's question.