Since it doesn't seem possible to do this using regular scripting, I hear the only way to do this would be with using CSQC. Either that or adding the option directly in nexuiz (or the engine?) to sort weapons in any order you want when using weapprev/weapnext binds.
Yes I know it's better in many ways to bind each weapon impulses to a different keys but there are many players that still prefer to use weapprev/next binds for many reasons, and it's not always bound to the scrollwheel. I didn't make this post to argue about why/which way is better.
This problem was addressed when cycleweapon and bestweapon commands were added in nexuiz. However, unlike with using weapnext/weapprev, when pressing quickly a bind 2 times in order to skip the weapon in-between and go directly to the next, it doesn't work.
Example: You have mortar, nex and RL. You're currently using the RL and want to switch to mortar. If you press the weapprev bind 2 times quickly, it will go directly to mortar and skip nex. If you try to do the same thing using cycleweapon, it will switch to nex before you can switch to mortar.
It is possible to do a script that works just like cycleweapon (to "sort" weapons in a different order), however there is no way for it to know which weapons you have in your possession. So if you only have MG/RL and you want to switch from MG to RL, you'll have to press the key many many times if don't have any other weapons between them.