hero.moveXY(92, 55);
hero.attack('Catapult');
hero.attack('Catapult');
hero.moveXY(92, 12);
hero.attack('Catapult 1');
hero.attack('Catapult 1');
hero.moveXY(60, 34);
hero.jumpBash = function () {
var enemy = hero.findNearest(hero.findEnemies());
if (enemy && hero.isReady("jump") && hero.isReady("bash")) {
hero.jumpTo(enemy);
hero.bash(enemy);
}
};
hero.kill = function () {
var enemy = hero.findNearest(hero.findEnemies());
if (enemy) {
hero.attack(enemy);
}
if (enemy && hero.canCast("chain-lightning", enemy)) {
hero.cast("chain-lightning", enemy);
}
};
hero.summonSoldier = function () {
if (hero.gold >= hero.costOf("griffin-rider")) {
hero.summon("griffin-rider");
}
};
hero.commandSoldier = function () {
var friend = hero.findFriends();
var enemy = hero.findNearest(hero.findEnemies());
if (friend) {
for (var i = 0; i < friend.length; i += 1) {
if (enemy) {
hero.command(friend[i], "attack", enemy);
}
}
}
};
hero.commandPaladin = function () {
var friend = hero.findByType("paladin");
var enemy = hero.findNearest(hero.findEnemies());
if (friend) {
for (var s = 0; s < friend.length; s += 1) {
hero.command(friend[s], "cast", "heal", hero);
}
}
};
hero.PickupItems = function () {
var item = hero.findNearest(hero.findItems());
if (item) {
hero.move(item.pos);
}
};
hero.Wait = function () {
if (hero.pos.x > 216) {
hero.wait(10);
}
};
while (true) {
hero.summonSoldier();
hero.commandSoldier();
hero.commandPaladin();
hero.jumpBash();
hero.kill();
if (hero.pos.x > 249) {
break;
}
}
var tt = true;
while (tt) {
var enemy = hero.findNearest(hero.findEnemies());
if (enemy && enemy.type === 'Warlock') {
hero.attack(enemy);
}
if (hero.pos.x > 272) {
hero.moveXY(277, 57);
hero.attack('Vax');
hero.attack('Vax');
hero.moveXY(276, 8);
hero.attack('Vyrryx');
hero.attack('Vyrryx');
hero.attack('Yzzrith');
}
var tt = false;
}
while (true) {
hero.PickupItems();
hero.summonSoldier();
hero.commandSoldier();
hero.commandPaladin();
hero.jumpBash();
hero.kill();
}
You have a semicolon when there is not supposed to be one.
Other than that, what is the issue you are experiencing?