// ==UserScript== // @name JHunz's KOL Insult tracker // @namespace hunsley@gmail.com // @version 1 // @description Tracks which insults have been received for Insult Beer Pong in KOL kingdom of loathing kingdomofloathing // @include *kingdomofloathing.com/fight.php* // @include http://127.0.0.1:60*/fight.php* // @include *kingdomofloathing.com/cove.php* // @include http://127.0.0.1:60*/cove.php* // @include *kingdomofloathing.com/charpane.php* // @include http://127.0.0.1:60*/charpane.php* // @include *kingdomofloathing.com/beerpong.php* // @include http://127.0.0.1:60*/beerpong.php* // @include *kingdomofloathing.com/choice.php* // @include http://127.0.0.1:60*/choice.php* // @include *kingdomofloathing.com/valhalla.php* // @include http://127.0.0.1:60*/valhalla.php* // @downloadURL https://update.greasyfork.icu/scripts/4090/JHunz%27s%20KOL%20Insult%20tracker.user.js // @updateURL https://update.greasyfork.icu/scripts/4090/JHunz%27s%20KOL%20Insult%20tracker.meta.js // ==/UserScript== // // Version 1.0 02/02/2008 First release. Features: Tracks which, and how many, insults you have received. Displays this on the cove, when you get an insult, and on the Beer Pong Step up button. Also automatically selects the correct retort if you have it. // Version 1.1 02/25/2008 Updated to reset tracking upon ascension instead of the previous inferior trigger. // const VERSION=11; //auto-update checking code var lastUpdateCheck = GM_getValue('lastUpdateCheck','NEVER'); var curTime = new Date().getTime(); if ((lastUpdateCheck == 'NEVER') || (parseInt(lastUpdateCheck) < (curTime - 86400000))) { GM_setValue('lastUpdateCheck',''+curTime); GM_xmlhttpRequest({method: 'GET',url: 'http://userscripts.org/scripts/source/22178.user.js', onload: function(responseDetails) { var bodyText = responseDetails.responseText; var curVersionNum = parseInt((bodyText.split("const VERSION="))[1].split(";")[0]); if (curVersionNum > VERSION) { GM_setValue('outOfDate','true'); } else { GM_setValue('outOfDate','false'); } } }); } var curVersion = GM_getValue('curVersion','0'); if (parseInt(curVersion) != VERSION) { GM_setValue('curVersion',VERSION); GM_setValue('outOfDate','false'); } //Nag user with update link if the script is out of date var outOfDate = GM_getValue('outOfDate'); if((outOfDate == 'true') && (window.location.pathname != "/charpane.php")) { var newElement = document.createElement('tr'); newElement.innerHTML = '