Help with Kelvintaph-Defiler

Now my archers do not move and my paladin will not heal:

def commandPaladin():
    friends = hero.findFriends()
    for friend in friends:
        if friend.type == "paladin":
            hero.command(friend, "move", {'x': 22, 'y': 40})
            hero.command(friend, "move", {'x': 22, 'y': 66})
            hero.command(friend, "move", {'x': 42, 'y': 66})
            hero.command(friend, "move", {'x': 42, 'y': 82})
            hero.command(friend, "move", {'x': 74, 'y': 82})
            hero.command(friend, "move", {'x': 85, 'y': 74})
            enemy = friend.findNearestEnemy()
            if enemy and friend.pos.x == 85 and friend.pos.y == 74:
                hero.command(friend, "shield")
                
                if friend.canCast("heal") and friend.health < friend.maxHealth:
                    hero.command(friend, "cast", "heal", friend)
                    


def commandHero():
    hero.moveXY(34, 15)
    hero.moveXY(34, 22)

def commandHelpers():
    friends = hero.findFriends()
    
    for friend in friends:
        enemy = friend.findNearestEnemy()
        
        if friend.type == "archer":
            hero.command(friend, "move", {'x': 22, 'y': 40})
            hero.command(friend, "move", {'x': 22, 'y': 66})
            hero.command(friend, "move", {'x': 42, 'y': 66})
            hero.command(friend, "move", {'x': 42, 'y': 82})
            hero.command(friend, "move", {'x': 74, 'y': 82})
            hero.command(friend, "move", {'x': 75, 'y': 68})
            if enemy and enemy.type != "yeti":
                
                hero.command(friend, "attack", enemy)
        
            


def commandOthers():
    friends = hero.findFriends()
    for friend in friends:
        if friend.type == "soldier":
            enemy = friend.findNearestEnemy()
            if enemy:
                hero.command(friend, "attack", enemy)
                


commandHero()
while True:
    commandPaladin()
    commandHelpers()
    commandOthers()

Your friend’s y will never be 85 and 74.

2 Likes

ok (20 charrrarrrrrrrs!!!)

what i did was make the paladin shield as I ran to a safe spot. if you time it correctly you can get the paladin to a safe spot like this
Screenshot 2020-08-16 at 10.51.59
the graphics on my computer are bad but that is the paladin with a shaman and in the end I had the paladin kill the shaman near him.
with the paladin safe you can hurt the necromancer to make him flee so good luck I wont give away any more

1 Like

ok @tv337 let me try that

1 Like

Nothing new really happens and the archers do not move:

def commandPaladin():
    friends = hero.findFriends()
    for friend in friends:
        if friend.type == "paladin":
            hero.command(friend, "move", {'x': 22, 'y': 40})
            hero.command(friend, "move", {'x': 22, 'y': 66})
            hero.command(friend, "move", {'x': 42, 'y': 66})
            hero.command(friend, "move", {'x': 42, 'y': 82})
            hero.command(friend, "move", {'x': 74, 'y': 82})
            hero.command(friend, "move", {'x': 85, 'y': 66})
            enemy = friend.findNearestEnemy()
            if enemy and friend.pos.x == 85 and friend.pos.y == 66:
                hero.command(friend, "shield")
                hero.command(friend, "attack", enemy)
                hero.command(friend, "shield")
                if friend.canCast("heal") and friend.health < friend.maxHealth:
                    hero.command(friend, "cast", "heal", friend)
                    
                    


def commandHero():
    hero.moveXY(34, 15)
    hero.moveXY(34, 22)

def commandHelpers():
    friends = hero.findFriends()
    
    for friend in friends:
        enemy = friend.findNearestEnemy()
        
        if friend.type == "archer":
            hero.command(friend, "move", {'x': 22, 'y': 40})
            hero.command(friend, "move", {'x': 22, 'y': 66})
            hero.command(friend, "move", {'x': 42, 'y': 66})
            hero.command(friend, "move", {'x': 42, 'y': 82})
            hero.command(friend, "move", {'x': 74, 'y': 82})
            hero.command(friend, "move", {'x': 75, 'y': 68})
            if enemy and enemy.type != "yeti":
                
                hero.command(friend, "attack", enemy)
        
            


def commandOthers():
    friends = hero.findFriends()
    for friend in friends:
        if friend.type == "soldier":
            enemy = friend.findNearestEnemy()
            if enemy:
                hero.command(friend, "attack", enemy)
                


commandHero()
while True:
    commandPaladin()
    commandHelpers()
    commandOthers()

1 Like

you keep trying to tell your friend to move on slippery ice. he can’t

1 Like

can you tell me where that is exactly @tv337?

1 Like

at the start of the code you say for the paladin to move. at the start of the level the paladin is on slippery ice and cant move well. BTW sorry for the late reply I cant get on very often so sorry.

How do I tell if it is slippery ice?

it is weird everything in a box here is slippery ice:Screenshot 2020-08-31 at 15.45.18 and this is not:Screenshot 2020-08-31 at 15.45.26 if you look closely there is a difference smooth ice does not have as many cracks.

1 Like

oohhhh, Bu how will that help me

they cant move well on smooth ice if you move them off of that they can then do stuff. I have been told that if they get caught in the fling spells they will have one oppurtunity to attack before the fear spells kick in so you might want to try that

I do not know how I would do that because the they cast the fear spells so fast