This is my code:
while True:
flag = hero.findFlag()
enemy = hero.findNearestEnemy()
friend = hero.findFriends()
if flag:
hero.moveXY(flag.pos.x, flag.pos.y)
hero.pickUpFlag(flag)
if hero.canCast("summon-burl"):
hero.cast("summon-burl")
if hero.canCast("summon-undead"):
hero.cast("summon-undead")
if hero.canCast("raise-dead"):
hero.cast("raise-dead")
if enemy:
if enemy.type != "yak":
if hero.canCast("summon-burl", enemy):
hero.cast("summon-burl")
if hero.canCast("summon-undead", enemy):
hero.cast("summon-undead")
if hero.canCast("raise-dead", enemy):
hero.cast("raise-dead")
if hero.canCast("poison-cloud", enemy):
hero.cast("poison-cloud", enemy)
if hero.canCast("mana-blast", enemy):
hero.manaBlast()
if hero.canCast("reset-cooldown", enemy):
hero.resetCooldown("mana-blast")
else:
hero.attack(enemy)
I get to the skeleton - king every time and on the first potion the raven drops the game freezes.
Please help