basically i want to override the msg command so when i do /msg .. i want it to echo me the script name/line number of where it came from and still msg the channel and stuff
$script/$scriptline would return the filename/line of the /msg alias itself. The OP wants the location of the command that called that /msg alias, which is not possible to retrieve currently.
That would return the currently executing script (the MSG alias), the OP wants the name and line number of the script that called the MSG alias, which is currently not possible.