safari zone rock smash walking issue
Closed this issue · 2 comments
if you are walking in the rocksmash safari zone you get stuck between routes
https://discord.com/channels/1057088810950860850/1139190426834833528/1228288850858872873
Teras mentioned to use a bike and it seems to resolve the issue , but walking the bot will stop after 4 or 5 loops at the same place each time
looking a bit more into it.. it seems to be a bug in emerald
when using rock smash and then getting a battle the global script context does not shut down completely:
so when the last rock the bot smashes starts a battle the global script context never shuts down completely.
instead sGlobalScriptContextStatus
stays on 1 (CONTEXT_WAITING
) instead of 0 (CONTEXT_SHUTDOWN
)
and what the bot currently checks to see if the script context is active (self._data[1] != 0
) is 1 (SCRIPT_MODE_BYTECODE
) instead of 0 (SCRIPT_MODE_STOPPED
)
question to solve this:
why is or get_global_script_context().is_active
needed here:
pokebot-gen3/modules/modes/rock_smash.py
Lines 159 to 166 in 4460cce
question to solve this:
why isor get_global_script_context().is_active
needed here:
That code is responsible for handling the scripted scene where the player exits the entrance building, walks past the security guard and waits for the security guard to go and block the door -- since during that sequence you cannot control the player avatar, so the navigation function would fail.
It only needs to be active in the 'South' section of the Safari Zone (where the entrance building is located) but it didn't seem to be a problem to also have it run in the 'South-East' section. But that's obviously not true due to the in-game bug you've found.
Thanks for pointing it out!