Cloudrip Siege 3

Can anyone help? No matter what I do, I can’t beat the level! (I need to get at least 100 xp to get to lv 37 to get the earth ring)
My code:

tatic = "tank"
hero.moveXY(38, 42)
hero.buildXY("arrow-tower", 51, 43)
buildtower = 1
def troops():
    if hero.time > 20 and hero.gold > 76 and buildtower == 1:
        hero.buildXY("arrow-tower", 40, 36)
        sus = 0
    friends = hero.findFriends()
    enemy = hero.findNearestEnemy()
    for friend in friends:
        if friend and friend.type == "paladin" and friend.team == hero.team:
            if friend.canCast("heal"):
                hero.command(friend, "cast","heal",friend)
            else:
                if friend.findNearestEnemy():
                    hero.command(friend, "attack",friend.findNearestEnemy() )
        if friend and enemy and friend.type == "griffin-rider" or friend.type == "archer" or friend.type == "soldier" and friend.team== hero.team:
            if friend.findNearestEnemy():
                hero.command(friend, "attack", friend.findNearestEnemy())
    if tatic == "ranged":
        summonTypes = ["griffin-rider","griffin-rider","griffin-rider"]
    if tatic == "tank":
        summonTypes = ["paladin","paladin"]
    summonType = summonTypes[len(hero.built) % len(summonTypes)]
    while hero.gold >= hero.costOf(summonType):
        if hero.pos.y != 42:
            hero.moveXY(hero.pos.x, 42)
        hero.summon(summonType)
        friends = hero.findFriends()
    for friend in friends: 
        if friend.type == "paladin" and friend.team == hero.team:
            if not friend.findNearestEnemy():
                hero.command(friend, "move", hero.pos)
            else:
                hero.command(friend, "attack", friend.findNearestEnemy())
    for friend in friends: 
        if friend.type == "griffin-rider" or friend.type == "archer" or friend.type == "soldier" and friend.team == hero.team:
            if not friend.findNearestEnemy():
                hero.command(friend, "move", hero.pos)
            else:
                hero.command(friend, "attack", friend.findNearestEnemy())
    for friend in friends:
        if friend.type == "griffin-rider" and friend.findNearestEnemy():
            goalPoint = friend.pos
            goal = Vector.subtract(goalPoint, friend.findNearestEnemy().pos)
            goal = Vector.normalize(goal)
            goal = Vector.multiply(goal, 1)
            distance = friend.distanceTo(friend.findNearestEnemy())
            yV = Vector.subtract(friend.pos, friend.findNearestEnemy().pos)
            yV = Vector.normalize(yV)
            yV = Vector.multiply(yV, 1)
            goal = Vector.add(yV, goal)
            if goal and distance <= 10:
                hero.command(friend, "move", goal)
while True:
    troops()
    hero.moveXY(hero.pos.x, hero.pos.y)
    item = hero.findNearestItem()
    if item and hero.isPathClear(hero.pos, item.pos):
        hero.moveXY(item.pos.x, item.pos.y)
    else:
        item = hero.findNearestItem()

My gear:
image
Can anyone help?
Bolt

Because you use the same code as summit’s gate, and it’s not that

does this one allow the boss stars? If so, i know how to help you, if not, i cannot

You should use decoys

Not summoning troops

It’s not. I don’t attack, and I just run around summoning paladins.

i know, but i do better with troops than building

Yeah, it does. (20 Chars sucK)

Pls, so why the game tells you to equip the builder’s hammer, is because for the best solution is summoning decoys.
Maybe peter had an beter idea