Need help implementing looting grapes + banking at Varrock palace running to and from G.E whenever it detects a full backpack.
P.S. Anything I've added is commented out. Also, forgive my noobness.
varrockFighter.simba
Need help implementing looting grapes + banking at Varrock palace running to and from G.E whenever it detects a full backpack.
P.S. Anything I've added is commented out. Also, forgive my noobness.
varrockFighter.simba
Looting is actually quite complex. After reading through your code, I'm not entirely quite sure of your skill level, as I'm not sure which parts you wrote, but there are a few ways to try and tackle this problem. I tried to solve it a couple years ago, but never really managed to get it working.
It'd be easy to use a color finding function to search for the purple color of grapes, but this will not work if something is on top of the grapes. So, if you want to always pick up grapes, here are a couple of ideas (all of which are quite complicated for a beginner).
1. Search the minimap for red dots. There is a function whose name is, once expanded, minimap point to mainscreen point. It's not entirely accurate, but what you can try to do is to try and convert a minimap point to a mainscreen point, and if mouseover text exists, then right click the pile, and loot.
2. While you are attacking an NPC, try and find a box where the npc will most likely drop something. Then, mouse over it parts of the box, and if mouseover text exists, then right click the pile, and loot.
3. Nowadays, there is a little box that appears (I think it's in options) so that every time something drops an item, a message says "Stack Value: 5k" or something. Once you kill something (when the golden lock goes away), you can try to search the mainscreen for that box (using a bitmap or dtm), and then guess where the pile is going to be.
I tried #2 here: https://villavu.com/forum/showthread...151&highlight=
And it worked, but wasn't perfect. Anyways, for looting to be consistent, you'd have to put in a lot of work and learn a lot more about color finding with SRL.
The looting was what got me confused as I wasn't quite sure how to pick up grapes and grapes only. I'll experiment with the second thing you mentioned and try to make it consistent.
Thanks again for the help!
By getting a TPA of the monster & saving that in a tBox once you found it, then getting a TPA of the region floor within the search bounds of the monsters bounds +/- 25 pixels. Then return everything not inside the region TPA and theres your drop
But what if you want to steal other people's drops?
In my old roached script I used the minimap dots -> mainscreen point method with a slight twist.
First I would track the roach onscreen and the drops on the minimap WHILE fighting.
When the roach died I would wait until a new red dot(drop) showed up on the minimap, with a timeout of course.
Then if a new dot showed up(meaning my roach dropped something), I would walk to the dot(if it was far away, roaches were big) and create a mainscreen point from the dot using minimap to mainscreen.
Since the floor/walls/roaches were all colors that were fairly easy to create filters for, I would create a medium sized box around the mainscreen point. In that box I would find all of the colors that were NOT the floor/walls/roaches, and then split into TPAs based on distance/size. This gave me semi-reliable mouse-overs. Since I trusted that I would mostly be mousing over only MY drop piles, I would right click and see if there were any valuables in the drop and if there were, pick them up.
I also wanted to steal other people's drops if they were valuable so occasionally in the main loop I would just try to pick things up.
GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!
<BenLand100> we're just in the transitional phase where society reclassifies guns as Badâ„¢ before everyone gets laser pistols
There are currently 1 users browsing this thread. (0 members and 1 guests)