Instead of relying on XPath, it is recommended to use jQuery for a simpler solution.
If simply clicking on the link redirects you to the desired page, the script can be as straightforward as:
// ==UserScript==
// @name Attack!
// @include http://YOUR_SITE/YOUR_PATH/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js
// ==/UserScript==
//--- contains is case-sensitive.
var attackLink = $("a:contains('Attack This Player')");
//--- Easily "click" the link.
window.location.href = attackLink[0].href;
Alternatively, if the link's action is controlled by the page's JavaScript (although this seems unlikely based on the provided example link):
// ==UserScript==
// @name Attack!
// @include http://YOUR_SITE/YOUR_PATH/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js
// ==/UserScript==
//--- contains is case-sensitive.
var attackLink = $("a:contains('Attack This Player')");
//--- Simulate a click event if the link's action was overridden by JavaScript.
var evt = document.createEvent ("HTMLEvents");
evt.initEvent ("click", true, true);
attackLink[0].dispatchEvent (evt);
Update for comment(s):
Are there multiple links or do they always begin with "/attack/index/"?
If that's the case, you can use:
var attackLink = $("a[href^='/attack/index/']");
If the situation is more complex, it is advisable to ask a separate question providing detailed information about the target pages' code. Including links to the pages would be helpful.
Selecting elements on a target page is a nuanced process that is highly dependent on the specific page.
jQuery simplifies this process with CSS-like selection; here is a useful jQuery selector reference.