40Cakes / pokebot-gen3

PokéBot Gen3 is a shiny hunting bot, written in Python that runs libmgba + mGBA Python bindings under the hood. Pokémon Ruby, Sapphire, Emerald, FireRed and LeafGreen are supported.
https://www.youtube.com/@40_Cakes/streams
GNU General Public License v3.0
144 stars 47 forks source link

Johto starters emerald japan hanging after picking pokemon #346

Open johnnieb333 opened 1 week ago

johnnieb333 commented 1 week ago

https://github.com/40Cakes/pokebot-gen3/assets/92755174/08a0935e-ac35-485f-b842-efffd123cf10

after picking the pokemon the bot just sits there in the menu , now this could be that the 2nd set of starters have not been worked on if its not then there seems to be an issue tested on all 3 mons

a link to the .sav https://discord.com/channels/1057088810950860850/1139190426834833528/1254494057992818709

wutkaru commented 1 week ago

I found root cause is the task does not exist in Pokemon Emerald and the rival does not pick up starter

modules\modes\starters.py

 # Wait for the rival to pick up their starter
 yield from wait_until_task_is_not_active("ScriptMovement_MoveObjects", button_to_press="B")

Change both line to below

 yield from wait_until_task_is_not_active("Task_Fanfare", "B")
 yield from wait_for_task_to_start_and_finish("Task_DrawFieldMessage", "A")

 yield from wait_for_n_frames(2)
 context.emulator.press_button("A")

Current status: Successful Hunt ✨

image

https://github.com/40Cakes/pokebot-gen3/assets/43336971/5cb16c43-2f91-49c8-8c85-ae4e7f37125e