Unless you use RoS (Ring of Speed) and hero.drink('speed')
but i need to stand infront of the tower
Look:
pet.on("spawn", onSpawn)
tower = self.findNearest(self.findFriends())
self.jumpTo({"x": 80, "y": 43})
self.moveXY(73, 51)
self.cast("earthskin", self)
self.summon("peasant")
def onSpawn():
while True:
if pet.isReady("shape-shift"):
pet.shapeShift()
pet.moveXY(36, 52)
else:
pet.moveXY(66, 50)
def commandPeasants():
peasants = self.findByType("peasant")
for i, peasant in enumerate(peasants):
if self.gold >= peasant.costOf('decoy'):
self.command(peasant, "buildXY", "decoy", peasant.pos.x - 2, peasant.pos.y)
else:
item = peasant.findNearestItem()
if item:
self.command(peasant, "move", item.pos)
while True:
commandPeasants()
enemy = hero.findNearestEnemy()
if hero.distanceTo(enemy) < 10:
if hero.isReady("stomp"):
hero.stomp()
elif hero.isReady("flash"):
hero.flash()
elif hero.isReady("bash"):
hero.bash(enemy)
elif hero.isReady("chain-lightning"):
hero.cast("chain-lightning", enemy)
else:
hero.shield()
1 Like