Help on summit’s gate!

Hi this is my code. I manage to destroy the beam towers. Then, 2 palidans come out the door and heal me. Then my hero does nothing.
Please help!

This is my gear:

Fight your way into the Inner Sanctum of the ogre chieftain, and defeat her.

Fight your way into the Inner Sanctum of the ogre chieftain, and defeat her.

def attack():
enemy = hero.findNearestEnemy()
if enemy and enemy.type == “catapult”:
hero.moveXY(87, 34)
if enemy and enemy.type == “tower”:
if < 100:
hero.moveXY(167, 34)
if enemy:


def commandArcher(archer):

if > 100:

for friend in hero.findByType("archer"):
    tower = hero.findByType("tower")
    enemy = archer.findNearestEnemy()
    if enemy:
        hero.command(friend, "attack", enemy)

def commandSoldier(soldier):
friends = hero.findFriends()
for friend in hero.findByType(“soldier”):
catapult = hero.findByType(“catapult”)
catapult = hero.findByType(“catapult”) # returns an array
catapult = friend.findNearest(hero.findByType(“catapult”))
if catapult:

        hero.command(friend, "move", {'x': catapult.pos.x, 'y': catapult.pos.y})

def commandPaladin(paladin):
enemy = paladin.findNearestEnemy()
friends = hero.findFriends()
for friend in friends:
if paladin.canCast(“heal”) and <= 2000:
hero.command(paladin, “cast”, “heal”, hero)
elif enemy:
hero.command(paladin, “attack”, enemy)

def commandFriends():
friends = hero.findFriends()
for friend in friends:
if friend.type == “paladin”:
commandPaladin(friend)strong text
if friend.type == “archer”:
if friend.type == “soldier”:

while True:

1 Like

I don’t know how to format!

1 Like

Can you send a screenshot of what happens and when your hero dies.

1 Like

Hero no die. He just stand by the destroyed beam towers

use flags. 20chars. 20ch

Hey @Destroyer636 great question. It seems like the others know what your problem is so I am just going to remind you to format your code properly

So lets say this is your code:


When you properly format your code it would become:

hero.findNearestEnemy() hero.say()

You can format your code by putting one of these:


Before and after you code!

Cya around


You need to format using the </> buttons above the text

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.