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!");

Yeah...more info needed there buddy. You've kinda given us a whole lot of nothing to go on. Without knowing how the game works and without seeing the games code or the URL it's going to be next to impossible to tell you how to do it, not to mention it's little immoral.

Good luck with that though.

The games URL is www.syrnia.com, and the game screen url is www.syrnia.com/game.php/ Its a text based game and fighting works like this.

You have a food bar on top that you click to heal.
A timer every time the timer hits 0 you attack the creature your fighting and the creature back hits.