Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with 2.lua #4

Open
ilzachli opened this issue Dec 26, 2022 · 1 comment
Open

Issue with 2.lua #4

ilzachli opened this issue Dec 26, 2022 · 1 comment

Comments

@ilzachli
Copy link

1.lua works great. I have ran 2.lua twice. Every time I get stuck on a Pidgey right above the Daycare after beating Misty.. The script moves up and down endlessly in a wild battle with Pidgey.

@KeeyanGhoreshi
Copy link
Owner

The script should stop execution after beating Misty, it shouldn't continue to go anywhere until you run 3.lua. The relevant code starts here. If you are entering a wild battle with a pidgey near the daycare, it's likely an issue with applying a repel prior to entering the grass.

I would assume that if it is moving up and down endlessly in a wild battle, the problem occurs either before Charizard or Magikarp are put in the daycare for training. On my end this section of code works fine, so it's difficult for me to pinpoint a reason why it doesn't work for you, but my assumption is usually that an input gets skipped due to occurring too soon after a previous input. If you can identify when the issue happens, you can probably add some delay to the inputs where it fails.

To troubleshoot I would:

  1. Create a second list of inputs b that is a copy of the inputs in a up to the point you want to test at
  2. replace m.executeOrders(a) with m.executeOrders(b) here to make the script execute inputs up to that point
  3. Make a save state in your emulator
  4. Copy the inputs from a past this point, up until Charizard finishes daycare training here, and put it into b, then run it again
  5. Make another save state if the code succeeds, and do the same thing for magikarp by copying inputs from line 666 to here
  6. If it succeeds, problem solved, if it fails, now you know when the problem occurs.
  7. Use save states to diagnose the problem by watching the game at the relevant time, right before it enters the daycare either before magikarp or charmander
  8. Either try to fix the problem (by adding delay to inputs) or let me know your findings and I can try to help further

Sorry it's not working for you right out of the box, I wish I could help further but without more info it's hard for me to diagnose the issue. Trust me I know how tedious it can be to debug this stuff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants