StarRailCopilot
StarRailCopilot copied to clipboard
Currently, this implementation focuses on collecting achievements.
Like I said on Discord, Im adding this because its such a headache to collect them manually. :D
Currently, this implementation focuses on collecting achievements. The structure is designed to be extensible, allowing for future enhancements such as collecting event rewards or other in-game rewards as needed.
- Core routine for navigating to achievement areas. -Image-based detection and interaction with claim buttons. Logic to handle scrolling and processing multiple sets of rewards. Ensured screen state is up-to-date for image detection by adding self.device.screenshot() calls after screen-changing actions.
i update later
read dev docs first https://github.com/LmeSzinc/AzurLaneAutoScript/wiki/1.-Start
using sleep is not allowed, run python -m dev_tools.button_extract and python -m module.config.config_updater to generate assets and gui settings
Okay thanks sir, I will stick to not using sleep and those two files for generating assets and GUI settings.
I adding universe rewards too, but I am on holiday now - will update when I am back.
@LmeSzinc Had a bit of time before holiday, reworked main collector, achievement collector, simulated universe collector and more... check it out.
Still some left for automatic reward collecting, but not yet - if I get more time, I will add more.
read this also https://github.com/LmeSzinc/AzurLaneAutoScript/wiki/4.4.-State-loop
- To write a robust bot you need to imagine every operation have a chance to fail, every clicks may not be responded, every sleep may not lead to the next game page. We use the state loop to ensure everything must success or raise error, which contains retry mechanics and wait mechanics.
- Don't use
adb_shell(['input', 'keyevent', '111']). SRC has several underlaying device control implementation not just adb, to go back you need to click the back button and confirm it reached the target page. Also, KEYCODE_ESCAPE is vary on game clients. cloud games and some apps would treat as close app. - Coordinates should not be manually written, unless they are arbitary values that don't need to be exact, they should be maintained by assets