Can pet and hero run their code at the same time? (python)

If I have pet fetching potion, I stop attacking, etc. What gives? Thanks in advance

Are you using Python or JS?

His title says python.

Lol, oops, I don’t really read titles

you could define a function for the pet to run once it spawns in the background:

def func(event):
    while True:
        item = hero.findNearestItem()
pet.on("spawn", func)

You could use

def onSpawn():
    #put whatever you want your pet to do
pet.on("spawn", onSpawn)
#Put your hero code down here

1 Like

Yep, that’s what I would do, too!