I am currently looking for a way not go get caught using an auto healing scipt for a text based game. Here is the script code. I will not give the website name.
// ==UserScript==
// @name Auto eat script
// @namespace
// @author Private
// @include http://www.xxx.com/game.php
// @version 1.3a
// @description Auto heals.
// ==/UserScript==
var autoEat = true;
var foodId = 34071864;
var minHp = 15;
var messageChannel = 5;
function checkHps() {
if (needToEat()) {
message("*********Auto eating food***********");
unsafeWindow.useItem(foodId, 'F');
}
if (autoEat) setTimeout(checkHps, 4000);
}
function needToEat() {
var hps = getHps();
return hps<minHp;
}
function getHps() {
var hps = parseInt(unsafeWindow.$('statsHPText').innerHTML);
//message("Hps: "+hps);
return hps;
}
function message(txt) {
unsafeWindow.addChat(messageChannel, txt);
}
if (autoEat) checkHps();
unsafeWindow.messagePopup("Auto eating script","Active!");