avatar
Eventful Skirmish

luckyman 1,056 13th Jan, 2022

PYTHON 0.58 KB
                                           
                         # Your pet should fetch items when they appear.
# Your pet should respond using say when it hears something.
def onSpawn(event):
    while True:
        pet.moveXY(40, 36)
        item = hero.findNearestItem()
        if item:
            pet.fetch(item)

def onHear(event):
    pet.say("WOOF!!!")

pet.on("spawn", onSpawn)
pet.on("hear", onHear)

while True:
    enemy = hero.findNearestEnemy()
    if enemy:
        if hero.isReady("cleave"):
            hero.cleave(enemy)
        else:
            hero.attack(enemy)
                      
                                       
To share this paste please copy this url and send to your friends
RAW Paste Data

Comments

Authentication required

You must log in to post a comment.

Log in
    There are no comments yet.