Giter Club home page Giter Club logo

Comments (2)

hanzi avatar hanzi commented on July 18, 2024 1

question to solve this:
why is or 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!

from pokebot-gen3.

Terasol avatar Terasol commented on July 18, 2024

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:
image

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:

case MapRSE.SAFARI_ZONE_SOUTH | MapRSE.SAFARI_ZONE_SOUTHEAST:
self._in_safari_zone = True
while (
get_player_avatar().map_group_and_number == MapRSE.SAFARI_ZONE_SOUTH
and get_player_avatar().local_coordinates in ((32, 33), (32, 34))
) or get_global_script_context().is_active:
yield
yield from wait_for_player_avatar_to_be_standing_still()

from pokebot-gen3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.