Well, in fact that's not hard at all and since we know Jimbodude I'll give you a not-tested-but-should-work-if-I-didn't-forgot-anything (=NTBSHIIDFA
) script:
code:
var Active = false;
//This will toggle the script when you press F6 (keycode 0x75) in a chat window
function OnEvent_ChatWndEditKeydown(ChatWnd, KeyCode, CtrlKeyDown, ShiftKeyDown) {
if(KeyCode == 0x75 && !CtrlKeyDown && !ShiftKeyDown) {
Active = !Active;
}
}
//This will add '/all' in front of a message when the script is active and the message is not a command
function OnEvent_ChatWndSendMessage(ChatWnd, Message) {
if(Active && !/^\/[^\/\s\n\t]+([\/\s\n\t]|$)/.test(Message)) return "/all "+Message;
}