The Trials: No 3rd Trial


#1

Been trying to complete the Trials. I can kill the 2nd Trial Guardian with little effort, but the 3rd Trial never triggers. Specifically, when I kill the 2nd Guardian, the Trial Master doesn’t even give me a message. I am doing this in JavaScript. My code should not be a factor as it runs with no errors and doesn’t target anything specifically. Here it is for good measure:

var destination, target;

loop {
    destination = target = null;
    if (this.gold >= 20) {
        this.summon("soldier");
    }
    gFlag = this.findFlag("green");
    bFlag = this.findFlag("black");
    vFlag = this.findFlag("violet");

    if (gFlag) {
        destination = gFlag.pos;
        if (this.distanceTo(gFlag) < 3) {
            this.pickUpFlag(gFlag);
        }
    }
    
    arrEnemies = this.findEnemies();
    nearest = this.findNearest(arrEnemies);
    target = nearest;
    
    allies = this.findFriends();
    if (!!(iFriend = allies.length)) {
        while (--iFriend >= 0 && !!(cFriend = allies[iFriend])) {
            if (target) {
                this.command(cFriend, "attack", target);
            }
            else if (this.distanceTo(cFriend) > 10) {
                this.command(cFriend, "move", this.pos);
            }
        }
    }
    
    if (target) {
        while (target.health> 0) {
            this.attack(target);
        }
    }
    else if (destination) {
        this.move(destination);
    }
    else {
        target = this.findNearest(this.findItems());
        if (target) {
            this.move(target.pos);
        }
    }
    
}

UPDATE:

I have noticed that sometimes it doesn’t register a completed 1st Trial either. This happens most often when I submit after a code change.

UPDATE 2:

It should also be noted that it mostly works during a normal “run”, just not during a “submit”.


#2

i had problems with not killing “all” enemies. Than means every single thrower… U noticed something with that?


#3

OK. The code was written before minions and so doesn’t know not to count them as enemies.
If you kill all the enemies in an oasis trial stage, but have minions left alive, no success. If they are all dead success. I have submitted a patch.


#4

I was killing all minions… I mean everything on the stage… Sometimes before finshing the second trial and sometimes after. Has the patch been accepted and should I try again?


#5

I was referring to YOUR minions (“kill all enemies but have minions left”). It has been accepted. I’m not sure about going “live” yet.


#6

I see… OK. So just do the level without minions. I can do that. They just made it easier.


#7

Ive had no problems with my Own Minions, but i just spawned them at the really end… but with the right eq its pretty easy even without minions


#8

It is. I just use the same script for most levels, so I like to avoid changing code unless needed (I do a lot of config type vars). Additionally, as a strong gamer, I also limit actions that I manually have to perform (since UI is very limited and slow response).

In other words: I like my minions :frowning:


#9

I have confirmed that the patched level is live and works with minions as well as independently.