[SOLVED] Sarven Brawl 7 help

For some reason, as it started, it said “success” but when I submitted it, it went lag mode.

Is this a bug or is my internet bad?


This is the code:

# Stay alive for two minutes.
# If you win, it gets harder (and more rewarding).
# If you lose, you must wait a day before you can resubmit.
# Reme
'''
while True:
    friends = hero.findByType("peasant")
    enemy = hero.findNearestEnemy()
    flag = hero.findFlag()
    if hero.isReady("heart-shield"):
        hero.heartShield()
        hero.shield()
        hero.shield()
        hero.shield()
        hero.shield()
        
        hero.shield()
        hero.shield()
        
    for friends in friends:
        coin = friends.findNearestItem()
        if coin:
            
            hero.command(friends, "move", coin.pos)
    if enemy and hero.canCast("chain-lightning"):
        hero.cast("chain-lightning", enemy)
    if hero.gold >= 20:
        hero.summon("soldier")
    if hero.isReady("flash"):
        hero.flash()
        
    if hero.canCast("earthskin"):
        hero.cast("earthskin", hero)
'''






























hero.cast("invisibility", hero)
hero.moveXY(77, 68)
hero.summon("soldier")
hero.summon("soldier")
hero.summon("soldier")

def findInRangeEnemies():
    enemies = hero.findEnemies()
    inRange = []
    if enemies:
        for enemy in enemies:
            if enemy and hero.isPathClear(hero.pos, enemy.pos):
                inRange.append(enemy)
    return inRange
def findEnemy(units):
    goodOne = None
    goodOnes = []
    for unit in units:
        if unit.pos.x < 75 and unit.type != "sand-yak":
            goodOnes.append(unit)
    goodOne = hero.findNearest(goodOnes)
    return goodOne
while True:
    enemy = hero.findNearestEnemy()
    
    if hero.canCast("summon-undead"):
        hero.cast("summon-undead")
    elif hero.gold >= hero.costOf("soldier"):
        hero.summon("soldier")
    friends = hero.findFriends()
    soldiers = hero.findByType("soldier", friends)
    skells = hero.findByType("skeleton", friends)
    sacrifices = skells + soldiers
    enemies = hero.findEnemies()
    enemy = findEnemy(enemies)
    lameEnemy = hero.findNearestEnemy()
    nearest = hero.findNearest(sacrifices)
    for sol in soldiers:
        enemyS = sol.findNearestEnemy()
        if enemyS:
            hero.command(sol, "attack", enemyS)
    if hero.canCast("raise-dead"):
        hero.cast("raise-dead")
    if enemy and hero.canCast("poison-cloud"):
        hero.cast("poison-cloud", enemy)
    if nearest and hero.canCast("sacrifice"):
        hero.cast("sacrifice", nearest, hero)
    if enemy and hero.canCast("chain-lightning"):
        hero.cast("chain-lightning", enemy)
    elif enemy and hero.canCast("lightning-bolt"):
        hero.cast("lightning-bolt", enemy)
    elif enemy:
        hero.attack(enemy)
    elif lameEnemy:
        hero.attack(lameEnemy)
'''
hero.moveXY(45, 69)
hero.cast("invisibility", hero)
hero.moveXY(87, 71)



while True:
    if hero.time > 1000:
        break
    inRangeEnemies = findInRangeEnemies()
    if inRangeEnemies:
        enemy = hero.findNearest(findInRangeEnemies())
    soldiers = hero.findByType("soldier")
    if hero.canCast("invisibility", hero):
        hero.cast("invisibility", hero)
    if hero.gold > hero.costOf("soldier"):
        hero.summon("soldier")
    for soldier in soldiers:
        soldierE = soldier.findNearest(findInRangeEnemies())
        if soldierE:
            hero.command(soldier, "attack", soldierE)
    if hero.isReady("heal") and hero.health <= hero.maxHealth - 200:
        hero.heal(hero)
    elif enemy:
        if hero.canCast("chain-lightning", enemy):
            hero.cast("chain-lightning", enemy)
        elif hero.isReady("throw") and hero.distanceTo(enemy) < hero.throwRange:
            if hero.distanceTo(enemy) >= 10:
                hero.throw(enemy)
            else:
                continue
            
        elif hero.distanceTo(enemy) < hero.attackRange:
            hero.scattershot(enemy)
enemy = hero.findNearestEnemy()
hero.cast("shockwave", enemy)
hero.cast("invisibility", hero)
targets = hero.findByType("soldier")[0]
hero.cast("swap", targets)
hero.moveXY(67, 83)
hero.resetCooldown("swap")
hero.buildXY("soldier", 60, 86)
hero.cast("swap", soldier)
while True:
    hero.cast("windstorm", hero)
enemy = hero.findNearestEnemy()
hero.cast("chain-lightning", enemy)
hero.moveXY(50, 69)
hero.moveXY(92, 69)
while True:
    enemy = hero.findNearestEnemy()
    friend = hero.findFriends()
    if enemy:
        hero.cast("drain-life", enemy)
    if hero.canCast("summon-undead"):
        hero.cast("summon-undead")
    if hero.canCast("summon-burl"):
        hero.cast("summon-burl")
    if hero.canCast("poison-cloud",enemy):
        hero.cast("poison-cloud", enemy)
        hero.cast("raise-dead")
        
    if hero.gold >= 35 and hero.isReady("drink"):
        hero.drink("heal")
    if hero.isReady("earthskin"):
        hero.cast("earthskin", hero)
    if hero.canCast("chain-lightning", enemy):
        hero.cast("chain-lightning", enemy)    
hero.drink("damage")
while True:
    enemy = hero.findNearestEnemy()
    if enemy:
        hero.attack(enemy)
    if hero.isReady("heal"):
        hero.heal(hero)

This is just CoCo being stupid, try putting a

for i in range(3):
    hero.wait(0);

at the end of the while loop

Ok, and I just found out all I had to do is watch it for 2 minutes. I guess I did it the hard way. :sweat:

1 Like

Nope, I think. I think, the harder brawl level gets the bigger quantity of enemies are spawning. So the more resourses it needs and computer just freezes.

Oh. Well, my computer (or should I say PC) is compatible with codes though. But that does make sense, as the computer might overwork, trying to process all the data

You just have to submit and wait there all the time. If you press skip, then it will only holds until level 6. If you submit and wait all the way, you can even pass level 10

Didn’t see that message, but that’s what I do too :slight_smile:

Oh, and Backwoods Brawl 11 too. I used the code and put it at the end, but it says the same error message, only this time, there’s no submitting. I just happens. :expressionless:

And when I submit it, it just “ends” at 33.9 s. Why? Is it CoCo being, well, like what moonwatcher348 said?

Check this topic. It is the problem of the amount of ogres. If dead ogres would be removed (as it is in new arena levels) then, probably, you could get higher. I have Backwoods Brawl 14 and when I submit I can’t even get more than 0.1s.

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