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

Feature: AFK Questing Loop #93

Merged
merged 28 commits into from
Jan 29, 2023
Merged

Conversation

daredoes
Copy link
Collaborator

The following Pull Request adds an App that allows the user to go in an infinite loop on their quests.

It will first check for a Boss Level, followed by checking for any stars to pick a level, followed by checking for any empty stars to pick a level, followed lastly by checking for any level flags to go to the next level.

When it finds a level, it confirms so by looking for an energy icon. It then begins the level. It will rerun levels until the player is out of energy, and then move to the next app.

It has been placed at the start of the apps, as leveling up refills the energy bar, so we want to run it first in our AFK auto-run.

This PR also modifies the scanning for an image function by allowing the number of columns scanned to be changed, a helper function is then used to allow scanning the screen horizontally. Combined, this allows for a complete scan of the screen for a desired icon. To reduce error rates in finding a quest, and avoiding infinite loops, it looks for all possible images to click when scanning the whole screen, and returns all possible points.

A script has been added to the sample scripts so that the a user can change between characters and run the AFK loop on each character.

All of this could be a bit cleaner, but it works pretty well!

@9-9-9-9
Copy link
Owner

9-9-9-9 commented Jan 27, 2023

Were the bmp files imported via tp app?

@daredoes
Copy link
Collaborator Author

daredoes commented Jan 27, 2023

Were the bmp files imported via tp app?

That's a thing?

I took a screenshot with windows paint, and then copied an existing TP image, opened that copied image in paint, and copied the new cropped image directly into the file. Saving that seemed to work.

Some images gave me trouble, so I messed around with things or resizing until it worked.

@9-9-9-9
Copy link
Owner

9-9-9-9 commented Jan 27, 2023

tp (ImportTpImageApp.java) supports remove excess borders, which help improve performance multiple times (sometime hundreds or thousands times) and some check as well

Please take a look at this article
(It's out-dated but it has the main idea)

@daredoes
Copy link
Collaborator Author

I added some new commits that update the image quality, including for the character app. It also adds a small task to make sure to exit the "Are you sure you want to leave this dungeon?" dialog, as sometimes my mouse seems to automatically click it during bot activity.

@9-9-9-9
Copy link
Owner

9-9-9-9 commented Jan 29, 2023

@daredoes great job ty, please pump to v3.6.0 and feel free to merge into master branch

So all images are now imported via tp?

@9-9-9-9 9-9-9-9 added the enhancement New feature or request label Jan 29, 2023
@daredoes
Copy link
Collaborator Author

@9-9-9-9 all images are now imported via TP. That's a neat little program. I think it's missing from the Wiki. I'll bump the version

@daredoes daredoes merged commit 84e879b into 9-9-9-9:master Jan 29, 2023
@daredoes daredoes deleted the feature/questing branch January 29, 2023 03:15
@9-9-9-9
Copy link
Owner

9-9-9-9 commented Jan 30, 2023

Which Zone should I choose? I'm at T19, zone Sauxon Attack and it does nothing

  • I selected Heroic in profile
  • I'm basic hero, no NFT

@daredoes
Copy link
Collaborator Author

@9-9-9-9 There is an issue with the confirm button offset. Testing in a windows 7 VM has been helpful. I have a new branch to update this. I'll open a PR later today

@daredoes
Copy link
Collaborator Author

@9-9-9-9 just letting you know I'm having another issue with questing where I believe the changes to the energy image are causing some sort of mismatch. I gotta do some debugging. Works for quests with Heroic difficulty, giving me some bugs on levels with no difficulty. It keeps selecting item find 200% 😦

@daredoes
Copy link
Collaborator Author

NVM. I was just running the wrong version 🤦

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

Successfully merging this pull request may close these issues.

2 participants