Jenny's method - stacking while true loops: Summit Gate

# Fight your way into the Inner Sanctum of the ogre chieftain, and defeat her.
while True:
    paladins = []
    enemies = hero.findNearestEnemy()
    flag = hero.findFlag("green")
    if flag:
        hero.pickUpFlag(flag)
    if hero.canCast("invisibility", hero):
        hero.cast("invisibility", hero)
    friends = hero.findFriends()
    for friend in friends:
        if friend.type == "paladin": 
            paladins.append(paladin)
    for enemy in hero.findEnemies():
        if enemy.type == "catapult":
            while enemy.health > 0:
                hero.attack(enemy)
                hero.shield()
        friends = hero.findFriends()
        for friend in friends:
            e = friend.findNearestEnemy()
            if e:
                hero.command(friend, "attack", e)
    fire = hero.findNearestEnemy()
    if fire:
        while fire.health > 0:
            hero.attack(fire)
            hero.shield()
        if fire.type == "tower":
            pass
        if hero.pos.x > 160:
            hero.moveXY(175, 35)
            hero.moveXY(175, 8)
            hero.moveXY(245, 14)
            hero.moveXY(245, 34 )
            while hero.health < hero.maxHealth:
                hero.moveXY(245, 35)
                if hero.gold > hero.costOf("soldier"):
                    hero.summon("soldier")
                paladin = hero.findByType("paladin")
                for paladin in paladins:
                    if paladin:
                        if paladin.canCast("heal",paladin):
                            hero.command(paladin, "cast", "heal", hero)
            if hero.maxHealth <= hero.health:
                if fire:
                    hero.moveXY(277, 34)
                    hero.moveXY(277, 5)
                    poop = hero.findNearestEnemy()
                    if poop:
                        while poop.health > 0:
                            hero.bash(poop)
                        hero.moveXY(277, 48)
                        dumb = hero.findNearestEnemy()
                        if dumb:
                            while dumb.health > 0:
                                hero.bash(dumb)
                        while True:
                            n00B = hero.findNearestEnemy()
                            if n00B:
                                if hero.isReady("bash"):
                                    hero.bash(n00B)
                                else:
                                    hero.attack(n00B)

this is my code

And do you use green flags, when you submit?

yes

Strange. So where does your hero die?

he doesn’t die he freezes

1 Like

Where does he freeze?

at the place he spawns the soldiers

1 Like

Lol, where? Like “Near the first door” or “at the beggining”.

this is the place
freeze

Hmm. Try to comment summoning soldiers and see what will happened. Maybe the problem is with soldiers. I don’t see it though.

ok will try it

1 Like

is there a thing you can command that heals?

Only paladins and Senick can heal. Also, concesrate ring

Consecrate heals many units.

how does the consecrate ring look like?

Order of Palains, costs 5500 or something like this

is it from 37 or higher?

I don’t remember, I bought it when I was level 41. You can check that in the shop

cause i cant see it so maybe i need to be for it a higher level

Maybe. You can check all items in the “chest”.