One of the biggest problems (imho) in mIRC scripting are variable conflicts (ie, mp3 player has %sayinchan and away script has %sayinchan). Below are two possible solutions to this problem, the first is probably easier, but the second is more comprehensive.

1.) Script level variables
/svar %sayinchan = 1
An svar works sorta in the middle of a local var and a global var. What I mean by this is, it is accessible by ALL events/aliases/etc that are in the same file that originally created the variable with /svar. This means for example, I can have all my configuration variables and never have to worry about variable name conflicts, because /svar guarantees that if I have %sayinchan in mp3.mrc and in away.mrc, if they are created with /svar, then they are different variables. Additionally, for scripts that span multiple files, there could be an identifier, $svar(filename,varname) that allows you to retreive the /svar's of another file.

2.) Namespaces
namespace mp3 {
....
}

This is something that is available in other languages. The purpose of it is to resolve ALL name conflicts, not just variables. For example, I have inside namespace mp3 an identifier called isplaying, to access this I could (from inside namespace mp3) do $isplaying, but from outside namespace mp3 I'd do $namespace(mp3).isplaying (similar to using $scon stuff). A similar thing could be implemented for variables so that you know you are getting the correct variable. This would also resolve the "I want multiple ON TEXT in the same file":

namespace text1 {
ON *:TEXT:blah:*:{
.....
}
}

namespace text2 {
ON *:TEXT:blah2:*:{
.....
}
}

Then, even though they are in the same file, mIRC would be able to recognize them as seperate scripts because of the different namespaces.

Crazy? Of course! But still a nice idea imho.