Cloudrip brawl help

This works. The only error is the fact that i had to add command() again but its fine it all works

def command():
    friends = hero.findFriends()
    for friend in friends:
        if friend.type == 'soldier':
            badGuy = friend.findNearestEnemy()
            if badGuy:
                hero.command(friend, "attack", badGuy)
def summon():
    item = hero.findNearestItem()
    
    if hero.gold > 20:
        hero.summon("soldier")
    elif item:
        hero.move(item.pos)
while True:
    command()
    summon()
    enemy = hero.findNearestEnemy()
    if enemy:
        command()
        hero.attack(enemy)
        if hero.canCast("chain-lightning", hero.findNearestEnemy()):
            hero.cast("chain-lightning", enemy)
        if hero.isReady("consecrate") == True:
            hero.consecrate()

You aren’t supposed to give codes.

Nah, I was just giving some very rudimentry code.
It’s very basic, and he should know it, if he’s doing cloudrip brawl in the first place.
You know, just a gentle prod in the right direction…

1 Like

Next time, you should probably help improve their code rather than providing one of the answers. It’s not really helpful otherwise.

2 Likes

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