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

Restless Dead, I need Help in Building Strategy

Hi, I had been trying this for quite a while. But undone! Feeling pretty lost. What else can I do? Moreover, the enemy= soldier.findNearestEnemy() shows error. I got no clue why as i worked with that line before.

# This level is supposed to be VERY hard! You may need a great strategy and or gear to complete it!

# Find and defeat the yeti then gather its essence for the ritual.
# You might want to gather the coins the yeti leaves behind, you'll need them to summon an army
# Stand at the summoning stone (red x) to begin summoning
# Now you just have to survive the undead hoard
def pickUpCoin():
    item = hero.findNearestItem()
    while item:
        hero.move(item.pos)
        item = hero.findNearestItem()
        
def summonSoldier():
    if hero.gold > hero.costOf("soldier"):
        hero.summon("soldier")
def commandSoldier():
    for soldier in hero.findByType("soldier"):
    enemy = soldier.findNearestEnemy()
    if enemy:
        hero.command(soldier, "attack", enemy)
        
def attackEnemy(enemy):
    if enemy:
        while (enemy.health > 0):
            if hero.distanceTo(enemy) > 10:
                hero.move(enemy.pos)
            elif (hero.isReady("bash")):
                hero.bash(enemy)
            elif (hero.canCast('chain-lightning', enemy)):
                hero.cast("chain-lightning", enemy)
            else:
                hero.attack(enemy)
                
hero.moveXY(55, 15)
hero.wait(2)
attackEnemy(hero.findNearestEnemy())
pickUpCoin()
hero.moveXY(50, 45)
hero.moveXY(19, 40)
hero.wait(2)
hero.moveXY(55, 48)
for i in range(1,20):
    summonSoldier()
commandSoldier

while True:
    attackEnemy(hero.findNearestEnemy())
    commandSoldier()
    pickUpCoin()

break

Seems like an indentation error inside commandSoldier(). Indent these lines

    enemy = soldier.findNearestEnemy()
    if enemy:
        hero.command(soldier, "attack", enemy)

The rest of the code works fine. :slight_smile:

I fixed it but the overwhelming skeletons defeats everything !!!

Yeah the gear is really important in this level. Can you send a screenshot of what it looks like? (The gear)

Ah alright. Since you have 8510 gems, you might want to buy a faster sword such as Sword of the Temple Guard or Sword of the Forgotten. Runesword has the highest damage per hit, but the attack speed is slow enough to get you overwhelmed.

I would also recommend replacing the ring of flowers with something a little more beneficial :wink:

which one should I take ? The forgotten or the sword of the templ ?

Probably the Sword of the Temple Guard due to having the highest DPS and Attack Speed allowing you to take down swarms easily.

let me try and get back.

still dead!!! The hit got a bit faster, thats all… the skeletons are too many and the soldiers die in seconds …

What hero are you currently using?

OMG!!! I did it … Thanks a ton mate. I just changed the place of the the summoning soldier a bit and the fight changed. I really appreciate the help. was stuck with it for last 3 days … Thank you very much… :sweat_smile: could’nt do it without the sword … Thanks again …

1 Like

No problem :slightly_smiling_face: