my equipment
new code:
# Should fill in some default source
hero.wait(5.8)
hero.buildXY("bear-trap", 12, 27)
hero.buildXY("bear-trap", 13, 27)
hero.buildXY("bear-trap", 12, 28)
hero.buildXY("bear-trap", 13, 28)
hero.buildXY("bear-trap", 14, 27)
hero.buildXY("bear-trap", 13, 28)
hero.buildXY("bear-trap", 15, 28)
hero.buildXY("bear-trap", 15, 27)
hero.buildXY("bear-trap", 14, 28)
hero.buildXY("bear-trap", 13, 26)
hero.buildXY("bear-trap", 15, 26)
hero.buildXY("bear-trap", 15, 25)
hero.buildXY("bear-trap", 14, 26)
hero.moveXY(12, 14)
hero.moveXY(20, 27)
hero.buildXY("bear-trap", 15, 28)
hero.buildXY("bear-trap", 17, 28)
hero.buildXY("bear-trap", 17, 27)
hero.buildXY("bear-trap", 16, 28)
hero.moveXY(25, 27)
hero.buildXY("bear-trap", 17, 28)
hero.buildXY("bear-trap", 19, 28)
hero.buildXY("bear-trap", 19, 27)
hero.buildXY("bear-trap", 18, 28)
hero.moveXY(30, 27)
hero.buildXY("bear-trap", 19, 28)
hero.buildXY("bear-trap", 21, 28)
hero.buildXY("bear-trap", 21, 27)
hero.buildXY("bear-trap", 20, 28)
hero.buildXY("bear-trap", 21, 27)
paladin = hero.findFriends()
while True:
hero.shield()
if hero.gold >= hero.costOf("paladin"):
hero.summon("paladin")
enemy = hero.findNearestEnemy
if enemy:
hero.command(paladin, "attack", enemy)
elif paladin.health < paladin.maxHealth / 2:
hero.command(paladin, "heal", paladin)
elif hero.health < hero.maxHealth / 2:
hero.command(paladin, "heal", hero)
else:
while True:
hero.command(friend, "shield")
else:
hero.cast("invisibility", hero)