hero.moveXY(64, 70)
while True:
enemies = hero.findEnemies()
enemy = hero.findNearest(enemies)
if enemy.type=="soldier" or enemy.type=="knight" or enemy=="scout":
if enemy:
if hero.isReady("bash"):
hero.bash(enemy)
else:
hero.cast if ready("chain-lightning", enemy)
else:
if hero.health>hero.maxHealth/4:
hero.shield()
else:
hero.moveXY(42, 77)
Not quite, the method for checking is a spell is ready to be used is hero.canCast("spell", target), in this case spell should be chain-lightning, and target should be enemy.
hero.moveXY(64, 70)
while True:
enemies = hero.findEnemies()
enemy = hero.findNearest(enemies)
if enemy.type=="soldier" or enemy.type=="knight" or enemy=="scout":
if enemy:
if hero.isReady("bash"):
hero.bash(enemy)
else:
hero.canCast("chain-lightning", enemy)
else:
if hero.health>hero.maxHealth/4:
hero.shield()
else:
hero.moveXY(42, 77)
@Ryan_Wong, posting solutions is prohibited, however, we can give you help. Use hero.findNearestEnemy() first and define the variable as enemy. Next you should find if there is an enemy. If you can bash, the bash. Otherwise of you can cast chain-lightning, cast chain-lightning. If you can’t do both of these, then attack the enemy. Only bash, cast chain-lightning, and attack if the enemy’s type is not a sand-yak type. Your allies will help greatly, and try to kill your clone first.