As @Lydia_Song has said you need to check if there is an enemy first like this
while True:
enemy = hero.findNearestEnemy()
#if enemy
#type the rest of your code here
As @Lydia_Song has said you need to check if there is an enemy first like this
while True:
enemy = hero.findNearestEnemy()
#if enemy
#type the rest of your code here
try shielding and bash and try going to 87,71
guys!!! I already checked if there is an enemy using enemy = hero.findNearestEnemy()
!!! See:
while True:
enemy = hero.findNearestEnemy()
if enemy.type != "sand-yak":
hero.attack(enemy)
else:
pass
See!!!
No you didnāt you need to Wright if enemy
on that line add: and enemy
it doesnāt work @Eric_Tang! Here is the code:
while True:
enemy = hero.findNearestEnemy()
if enemy and enemy.type != "sand-yak":
hero.attack(enemy)
else:
pass
I keep dying. Please help @Eric_Tang!
Delete the else pass I donāt think you need it
ok. Iāll tryā¦ brbā¦
Itās still not working! Same result. Hereās the code:
while True:
enemy = hero.findNearestEnemy()
if enemy and enemy.type != "sand-yak":
hero.attack(enemy)
Is your hero attacking the sand yakes?
no. I think the problem is the Brawlers.
Use the precious 20 chars
ok, then. I will. I will send you the results and the code after I am doneā¦brbā¦
actually same results. Hereās the code:
while True:
enemy = hero.findNearestEnemy()
if enemy and enemy.type != "sand-yak":
if hero.canCast("invisibility", hero):
hero.cast("invisibility", enemy)
else:
hero.attack(enemy)
Did your hero use it? if he did make him move somewhere to avoid the brawlers
And I see you have boss star 4 so you could summon some troops.
I do have Boss Star IV, but I have no idea how to use it!