qwerty
November 12, 2020, 6:16pm
1
I don’t know why it’s not working
while (true) {
var flag = this.findFlag();
var enemy = this.findNearestEnemy();
if (flag) {
this.pickUpFlag(flag);
} else {
hero.shield();
}
if (enemy) {
if (this.distanceTo(enemy) < 50) {
if (this.isReady("cleave")) {
this.cleave(enemy);
} else {
this.attack(enemy);
}
}
}
}
it is in JavaScript
id recomend going to the wizard to heal but if you have over 1500 health then you dont need to
qwerty
November 12, 2020, 6:25pm
3
it also won’t let me attack the boss
you don’t need to attack thokar
qwerty
November 12, 2020, 6:46pm
5
That helps a lot I thought you had to defeat him; because of the mission tab
I’ll try that
Try to delete the
else {
hero.shield();
}
And change
if (flag) {
this.pickUpFlag(flag);
}
if (enemy) {
if (this.distanceTo(enemy) < 50) {
if (this.isReady("cleave")) {
this.cleave(enemy);
} else {
this.attack(enemy);
}
}
}
into
if (flag) {
this.pickUpFlag(flag);
} else if (enemy) {
if (this.distanceTo(enemy) < 50) {
if (this.isReady("cleave")) {
this.cleave(enemy);
} else {
this.attack(enemy);
}
}
}
qwerty
November 12, 2020, 7:19pm
7
Thank you! (20crcter)
I was so close then this:
Sorry if its small
You are welcome! Glad to help!
qwerty
November 12, 2020, 7:53pm
9
I was typing new code because i had 4 health left and I somehow managed to win
system
Closed
November 13, 2020, 7:53am
10
This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.