anyone have a good set of chat macros?

// ==UserScript== // @name TagPro Chat Macros Userscript // @namespace http://www.reddit.com/user/contact_lens_linux/ // @description Help your team with quick chat macros. // @include http://.koalabeast.com: // @include http://.jukejuice.com: // @include http://.newcompte.fr: // @license GPL version 3 or any later version; http://www.gnu.org/copyleft/gpl.html // @author steppin, Watball // @version 0.3 // ==/UserScript==

(function() {

function contentEval(source) { // Check for function input. if ('function' == typeof source) { // Execute this function with no arguments, by adding parentheses. // One set around the function, required for valid syntax, and a // second empty set calls the surrounded function. source = '(' + source + ')();' }

// Create a script node holding this  source code.
var script = document.createElement('script');
script.setAttribute("type", "application/javascript");
script.textContent = source;

// Insert the script node into the page, so it will run, and immediately
// remove it to clean up.
document.body.appendChild(script);
document.body.removeChild(script);

}

function actualScript() { var macros = {}; macros[103] = "Enemy FC is ---Top-Left---"; // numpad 7 macros[104] = "Enemy FC is ---Top---"; // numpad 8 macros[105] = "Enemy FC is ---Top-Right---"; // numpad 9 macros[100] = "Enemy FC is ---Left---"; // numpad 4 macros[101] = "Enemy FC is ---Center---"; // numpad 5 macros[102] = "Enemy FC is ---Right---"; // numpad 6 macros[97] = "Enemy FC is ---Bottom-Left---"; // numpad 1 macros[98] = "Enemy FC is ---Bottom---"; // numpad 2 macros[99] = "Enemy FC is ---Bottom-Right---"; // numpad 3 macros[82] = "I need another defender at base"; // R macros[67] = "Chase the enemy FC"; // C macros[72] = "I did not mean to send those last macros"; // H macros[89] = "I will play defense"; // Y macros[70] = "Enemy FC has a Rolling Bomb"; // F macros[86] = "We only need 2 defenders, please."; // V macros[74] = "Staying between the enemy flag carrier and his flag"; // J macros[75] = "is the most important concept in TagPro."; // K macros[76] = ""; // L macros[85] = "Fellow defender: Please don't sit on the flag."; // U macros[73] = "It is easy for the enemy offence to grab from you."; // I macros[79] = "Offense: Please don't push the defenders out of the way when you spawn"; // O //macros[66] = "Fellow defender: Please cover the button."; // B macros[78] = "Our base is CLEAR"; // N macros[77] = "Our base is NOT clear"; // M macros[96] = "Where is the enemy FC?"; // numpad 0 macros[49] = "Power ups are very important in this game; please try to get them"; // 1 macros[50] = "Power ups respawn 1 minute after they are taken"; // 2 macros[51] = "Who will get the regrab?."; // 3 macros[52] = "Chasing the enemy flag carrier is more important than guarding yours."; // 4 macros[53] = "Yeah you better run."; // 5 macros[188] = "Offense: Please take power ups on your way out of base."; // , macros[80] = "Power ups within 15 seconds"; // P macros[106] = "Please do not waste boosts; they are important for defense"; // multiply macros[219] = "PLease do not boost into me while I'm on defense"; // [ macros[81] = "Nice"; // Q macros[189] = "If the enemy FC has a Rolling Bomb and you are near their flag,"; // - macros[187] = "try to grab the flag and escape"; // = macros[48] = "I have regrab."; // 0 //macros[220] = "It appears I have just sniped someone. When can I prestige?"; // \ //macros[111] = "If you don't mind, I would like to try playing 1D 3O with me on D."; // divide macros[109] = "Someone ALWAYS has to stay on regrab!"; // subtract macros[107] = "RB defused or expired"; // add macros[110] = "Please have patience when trying to cap the flag."; // decimal point

// Game bindings overriding adapted from JohnnyPopcorn's NeoMacro https://gist.github.com/JohnnyPopcorn/8150909
var handlerbtn = $('#macrohandlerbutton');
handlerbtn.keydown(keydownHandler)
          .keyup(keyupHandler);
handlerbtn.focus();

$(document).keydown(documentKeydown);
function documentKeydown(event) {
  if (!tagpro.disableControls) {
    handlerbtn.focus(); // The handler button should be always focused
  }
}

// Prevent TagPro binds from firing on the same stuff as we have bound
function keyupHandler(event) {
  if (event.keyCode in macros && !tagpro.disableControls) {
    event.preventDefault();
    event.stopPropagation();
  }
}

var lastMessage = 0;

function chat(chatMessage) {
  var limit = 500 + 10;
  var now = new Date();
  var timeDiff = now - lastMessage;
  if (timeDiff > limit) {
      tagpro.socket.emit("chat", {
        message: chatMessage,
        toAll: 0 // 0 for team, 1 for all
      });
      lastMessage = new Date();
  } else if (timeDiff >= 0) {
      setTimeout(chat, limit - timeDiff, chatMessage)
  }
}

function keydownHandler(event) {
  var code = event.keyCode || event.which;
  if (code in macros && !tagpro.disableControls) {
    chat(macros[code]);
    event.preventDefault();
    event.stopPropagation();
    //console.log(macros[code]);
  }
}

}

// This dummy input will handle macro keypresses var btn = document.createElement("input"); btn.style.opacity = 0; btn.style.position = "absolute"; btn.style.top = "-100px"; btn.style.left = "-100px"; btn.id = "macrohandlerbutton"; document.body.appendChild(btn);

contentEval(actualScript); })();

/r/TagPro Thread