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

Item Pickup revision #622

Merged
merged 5 commits into from
Jan 13, 2025
Merged

Conversation

elobo91
Copy link
Contributor

@elobo91 elobo91 commented Jan 7, 2025

  • Following corrections on ClearAreaAroundPosition wich now doesnt return until everything under giving radius is dead (item in this case). It shouldnt pickup item anymore when surrounded by monsters.
  • Added a line of sight check inside pickup_item action in case item dropped on the other side of a wall and we cant pickup from here even if we can hover it. If ErrNoLOSToItem , it will try to move further the item because if we simply move at item position it wont work. we still will have no line of sight.
  • func moveBeyondItem is similar to the one in EnsureEnemyIsInrange to overshoot distance, might consider moving this to utils.
  • new ItemSpiral that is more precise to items instead of using generic Spiral currently used by everything else . Prevents misclick on UI bar( belt, unbinding skills by accident) being less wide

Logic is : after detecting item, we clear around item with a radius of 4 . If we havent moved away to much from item (distance <=4) we can attempt to pickup item directly. otherwize we try to move closer with a distancetofinishmovement of 3 (thats perfect melee and interaction range). Now its passed to Pickup_item step wich verify if we have line of sight, also double check distance and attempt to pickup item. If we get ErrNoLOSToItem it will go back to action item_pickup and moveBeyondItem (item position +2 distance). it will attempt to step pickup_item again after. If for some reason it failed to pickup item, added a second ClearAreaAroundPosition with smaller radius (3) just in case some monsters added/were undetected before giving up.

If all attempts failed.. blacklist =(

@elobo91
Copy link
Contributor Author

elobo91 commented Jan 7, 2025

image
Important

@elobo91
Copy link
Contributor Author

elobo91 commented Jan 7, 2025

legacy spacing compared to resurrected . since we hover item model on ground to pickup, we need space for bot to spiral correctly
Q20trjy

elobo91 and others added 4 commits January 7, 2025 20:36
just like first original implementation we need most updated data to detect hovered item.
@artosimonyan artosimonyan merged commit f9100a2 into hectorgimenez:main Jan 13, 2025
1 check passed
@elobo91 elobo91 deleted the itempickup_final branch January 16, 2025 15:11
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

Successfully merging this pull request may close these issues.

2 participants