Play Home Contribute Github Join Us! Discourse Staff Members Github Contribution Guides Team

Help! Code error


I used a code for Sarven Treasure one but doesn’t work again, nor will it tell me why…
Here it is:
loop {
var flag = this.findFlag();
var enemy = this.findNearest(this.findEnemies());
var item = this.findNearest(this.findItems());
if (flag){
this.moveXY(5, 19);
if (enemy){
if (this.isReady(“bash”)){
else {
if (item){
var pos=item.pos;
var x=pos.x;
var y=pos.y;
this.moveXY(x, y);


Please format your code according to the FAQ in order to give us an easier job of helping you. Also provide more information. Does your hero move? Does he just stand there?

1 Like