Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Resource Determining if a drop originally belongs to LocalPlayer

Joined
Apr 21, 2019
Messages
40
Does anyone got a good piece of code they use for determining if a drop originated for the LocalPlayer? Something to prevent iron mans from clicking on loot that doesn't belong to them and thus cant collect?
 
Niche bots at your disposal
Joined
Dec 23, 2015
Messages
1,099
Does anyone got a good piece of code they use for determining if a drop originated for the LocalPlayer? Something to prevent iron mans from clicking on loot that doesn't belong to them and thus cant collect?
No reliable way to do this sadly. You could make some intricate listener system to track dying NPC's to see if it was your target and try to figure out what it drops by creating a ground item listener. But even then, when similar items stack, you're fucked.
And if something works most of the time, but not all of the time you're bound to get stuck and banned and have wasted a lot of effort.
 
cuppa.drink(java);
Joined
Mar 13, 2018
Messages
7,097
Basically what Tyb said, just keep checking for new items on your last target's coordinate. Possibly especially taking note of items on a dying target's coord (is there a DeathListener or something? I seem to remember seeing one).

I think you could also just add a chatbox listener to keep an eye out for "You can't pick this up you're an ironman" or whatever the exact message is (note it might be different for iron "women" accounts). And then a simple implementation would be to just blacklist the last item clicked on that coord, or even that coord overall until the items disappear. That way if it ever gets confused, it'll fix itself
 
Top