Can some one have a look at my codes of LONG ROAD

what is wrong with my codes?
They all look Ok for me.
Can someone please help.

remove the pass at the start of the function and remove the else

1 Like

Still not working. Not sure what is wrong with my codes.

Nothing wrong, the dps you take is round(maxHealth / 10) You might be just too unlucky that your health is too low and the number it rounded is too high. Your code is fine for me.

Buy better armor, or equip nothing that increases health.

1 Like

Even with better armor, still not working-see below snips

Use literally nothing that gives you health (gloves, leatherbelts, boots, armor). And see if it works.

Works for me.

1 Like

Still not working.

I have been stuck in LONG ROAD for 2 weeks :frowning:

What boots do you have in your inventory, like all of them?

Equip your best armor and do

if item and <= hero.maxHealth / 6:
    pet.moveXY(hero.pos.x, hero.pos.y)

it should work then

@willingtolearn Just eqiup ABSOULUTELY nothing and it should work.

Remember to equip boots and a pet.

My code works with more health but not with less…

Still not working even equipped more health
Normally what health do you guys equip with?

Hey, I’m telling you to use nothing. Equip nothing and it should work

Try doing hero.maxHealth / 3 instead

Your code is right but remove else and pass.

You just need better armor to boost your health.
I see you have a good helmet from your inventory, just pick the best armour you have, helmet,shield etc.

do not equip armor that gives you little health like +25 or +40.

My hero have 2997 health, I managed to complete this level without any problems remaining with only 372 of health.

Just have a minimun of 2997 health for finish this level.

else is must-needed because you want the pet to go in the exact place of your hero to fetch faster. pass is a placeholder to avoid errors, I still recommand putting it on.

@willingtolearn, check the hero’s hp like what @moonwatcher348 told you. So you can get the potion at the optimal moment.

1 Like

My hero could survive with 63 health at the start. I’ll try the code just a min

I GOT IT!!! Get the pet to say something at the start of the while loop. It creates a delay. The problem was that you were collecting the health potions too fast, so you have to use regen or wait before each potion.

If this works, remember to mark this as the solution, which will prevent further unneeded replies.

Using hero health effectively creates a delay @MarmiteOnToast