# Kelvintaph Burgler helpp\[SOLVED\]

**URL:** <https://discourse.codecombat.com/t/kelvintaph-burgler-helpp-solved/31045>\
**Category:** Level Help\
**Created:** [October 24, 2021, 10:08am UTC](https://discourse.codecombat.com/t/kelvintaph-burgler-helpp-solved/31045 "2021-10-24T10:08:40Z")\
**Posts on this page:** 15\
**Page:** 2

<div class="post-metadata">

**Author:** ![Anonym](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/anonym/32/47546_2.png) [@Anonym](https://discourse.codecombat.com/u/Anonym)\
**Post date:** [October 24, 2021, 1:10pm UTC](https://discourse.codecombat.com/t/kelvintaph-burgler-helpp-solved/31045/21 "2021-10-24T13:10:15Z")

</div>

Ok, let me test your code now.Give me a couple of seconds.

---

<div class="post-metadata">

**Author:** ![Haris](https://avatars.discourse-cdn.com/v4/letter/h/ccd318/32.png) [@Haris](https://discourse.codecombat.com/u/Haris)\
**Post date:** [October 24, 2021, 1:11pm UTC](https://discourse.codecombat.com/t/kelvintaph-burgler-helpp-solved/31045/22 "2021-10-24T13:11:55Z")

</div>

i try send full code

```python

def lowHp():
    friends = hero.findFriends()
    for friend in friends:
        if friend.health <= friend.maxHealth / 2:
            pass

def comPal(paladin):
    lH = lowHp()
    friends = hero.findFriends()[0]
    enemy = paladin.findNearestEnemy()
    for friend in friends:
        if friend.health <= lH:
            if paladin.canCast("heal", friend):
                hero.command(paladin, "cast", "heal", friend)
            elif enemy.health > 0:
                hero.command(paladin, "attack", enemy)

def comGriff():
    if hero.gold >= hero.costOf("griffin-rider"):
        # lesgoo command giffin-rider
        hero.summon("griffin-rider")
        friends = hero.findFriends()
        enemy = hero.findNearestEnemy()
    for friend in friends:
        if enemy.health > 0:
            hero.command(friend, "attack", enemy)

while True:
    flag = hero.findFlag("green")
    friends = hero.findFriends()
    enemy = hero.findNearestEnemy()
    if flag:
        hero.move(flag.pos)
        
    for friend in friends:
        if friend.type == "griffin-rider":
            if enemy.type == "robot-walker":
                comGriff()
        elif friend.type == "paladin":
            comPal()
        elif friend.type == "archer" and friend.type == "soldier":
            if enemy.type == "chieftain":
                hero.command(friend, "attack", enemy)
        
    hero.command(friend, "move", {'x': 32, 'y': 57})
    hero.command(friend, "move", {'x': 26, 'y': 57})
    hero.command(friend, "move", {'x': 30, 'y': 52})
    hero.command(friend, "move", {'x': 54, 'y': 59})
    hero.command(friend, "move", {'x': 76, 'y': 57})
    hero.command(friend, "move", {'x': 78, 'y': 40})
    if enemy.type == "robot-walker" and enemy.health == 0:
        hero.moveXY(76, 14)
    
    
        

```

---

<div class="post-metadata">

**Author:** ![Anonym](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/anonym/32/47546_2.png) [@Anonym](https://discourse.codecombat.com/u/Anonym)\
**Post date:** [October 24, 2021, 1:13pm UTC](https://discourse.codecombat.com/t/kelvintaph-burgler-helpp-solved/31045/23 "2021-10-24T13:13:07Z")

</div>

aha, so your main problem is line 13.

---

<div class="post-metadata">

**Author:** ![Haris](https://avatars.discourse-cdn.com/v4/letter/h/ccd318/32.png) [@Haris](https://discourse.codecombat.com/u/Haris)\
**Post date:** [October 24, 2021, 1:13pm UTC](https://discourse.codecombat.com/t/kelvintaph-burgler-helpp-solved/31045/24 "2021-10-24T13:13:40Z")

</div>

```python
LH = lowHp()??

```

---

<div class="post-metadata">

**Author:** ![Anonym](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/anonym/32/47546_2.png) [@Anonym](https://discourse.codecombat.com/u/Anonym)\
**Post date:** [October 24, 2021, 1:14pm UTC](https://discourse.codecombat.com/t/kelvintaph-burgler-helpp-solved/31045/25 "2021-10-24T13:14:06Z")

</div>

no,

```python
enemy = paladin.findNearestEnemy()

```

---

<div class="post-metadata">

**Author:** ![Anonym](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/anonym/32/47546_2.png) [@Anonym](https://discourse.codecombat.com/u/Anonym)\
**Post date:** [October 24, 2021, 1:14pm UTC](https://discourse.codecombat.com/t/kelvintaph-burgler-helpp-solved/31045/26 "2021-10-24T13:14:54Z")

</div>

Gotcha!I found the mistake!

---

<div class="post-metadata">

**Author:** ![Haris](https://avatars.discourse-cdn.com/v4/letter/h/ccd318/32.png) [@Haris](https://discourse.codecombat.com/u/Haris)\
**Post date:** [October 24, 2021, 1:15pm UTC](https://discourse.codecombat.com/t/kelvintaph-burgler-helpp-solved/31045/27 "2021-10-24T13:15:18Z")

</div>

whatt ?? 20ccharssssss

---

<div class="post-metadata">

**Author:** ![Anonym](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/anonym/32/47546_2.png) [@Anonym](https://discourse.codecombat.com/u/Anonym)\
**Post date:** [October 24, 2021, 1:15pm UTC](https://discourse.codecombat.com/t/kelvintaph-burgler-helpp-solved/31045/28 "2021-10-24T13:15:50Z")

</div>

Your function comPal() has an argument.When you use the function, you must specify the argument.

---

<div class="post-metadata">

**Author:** ![Anonym](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/anonym/32/47546_2.png) [@Anonym](https://discourse.codecombat.com/u/Anonym)\
**Post date:** [October 24, 2021, 1:16pm UTC](https://discourse.codecombat.com/t/kelvintaph-burgler-helpp-solved/31045/29 "2021-10-24T13:16:22Z")

</div>

Same thing with comGriff

---

<div class="post-metadata">

**Author:** ![Haris](https://avatars.discourse-cdn.com/v4/letter/h/ccd318/32.png) [@Haris](https://discourse.codecombat.com/u/Haris)\
**Post date:** [October 24, 2021, 1:16pm UTC](https://discourse.codecombat.com/t/kelvintaph-burgler-helpp-solved/31045/30 "2021-10-24T13:16:51Z")

</div>

oooohhhhhhh 2000charss

---

<div class="post-metadata">

**Author:** ![Anonym](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/anonym/32/47546_2.png) [@Anonym](https://discourse.codecombat.com/u/Anonym)\
**Post date:** [October 24, 2021, 1:17pm UTC](https://discourse.codecombat.com/t/kelvintaph-burgler-helpp-solved/31045/31 "2021-10-24T13:17:18Z")

</div>

Okay, so now your code is without mistakes, I think, but you should still figure out how to win it!Good luck!

---

<div class="post-metadata">

**Author:** ![Anonym](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/anonym/32/47546_2.png) [@Anonym](https://discourse.codecombat.com/u/Anonym)\
**Post date:** [October 24, 2021, 1:27pm UTC](https://discourse.codecombat.com/t/kelvintaph-burgler-helpp-solved/31045/32 "2021-10-24T13:27:49Z")

</div>

Please, mark the post, that helped you the most, as solved, if you don’t have any other questions.

---

<div class="post-metadata">

**Author:** ![Haris](https://avatars.discourse-cdn.com/v4/letter/h/ccd318/32.png) [@Haris](https://discourse.codecombat.com/u/Haris)\
**Post date:** [October 24, 2021, 1:34pm UTC](https://discourse.codecombat.com/t/kelvintaph-burgler-helpp-solved/31045/33 "2021-10-24T13:34:17Z")

</div>

wait i will put solved 20charss

---

<div class="post-metadata">

**Author:** ![Haris](https://avatars.discourse-cdn.com/v4/letter/h/ccd318/32.png) [@Haris](https://discourse.codecombat.com/u/Haris)\
**Post date:** [October 24, 2021, 1:36pm UTC](https://discourse.codecombat.com/t/kelvintaph-burgler-helpp-solved/31045/34 "2021-10-24T13:36:31Z")

</div>

finnaly working thankyou s much for helping @Anonym @Aya

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/codecombat/original/2X/a/a9445509d1a758c41b5ddcddc8c8e20a5dedb67f.png) [@system](https://discourse.codecombat.com/u/system)\
**Post date:** [October 25, 2021, 1:36am UTC](https://discourse.codecombat.com/t/kelvintaph-burgler-helpp-solved/31045/35 "2021-10-25T01:36:35Z")

</div>

Closed on October 25, 2021, 1:36am UTC

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

[Previous page](https://discourse.codecombat.com/t/kelvintaph-burgler-helpp-solved/31045.md?page=1)
