while True:
enemy = hero.findNearestEnemy()
if enemy:
distance = hero.distanceTo(enemy)
if distance < 15:
# Cast “drain-life” on the enemy.
self.cast(“drain-life”, enemy)
else:
# Attack the enemy with your staff.
hero.attack(enemy)
it’s not letting me cast drain life I do not know what I’m doing wrong!
The reason is because it is not Unholy Tome III. You have the Elemental Codex III. Instead of using the Elemental Codex books, use the Unholy Tome. You should have the first one, which allows you to cast drain-life. The Unholy Tome I looks like this: