1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Resource Determining if a drop originally belongs to LocalPlayer

Discussion in 'Tutorials & Resources' started by generalsensei, Jul 10, 2021.

  1. generalsensei

    Joined:
    Apr 21, 2019
    Messages:
    43
    Likes Received:
    9
    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?
     
  2. tyb51

    tyb51 Niche bots at your disposal

    Joined:
    Dec 23, 2015
    Messages:
    1,098
    Likes Received:
    439
    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.
     
  3. CuppaJava

    CuppaJava cuppa.drink(java);

    Joined:
    Mar 13, 2018
    Messages:
    6,121
    Likes Received:
    1,378
    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
     
    blisterz and generalsensei like this.

Share This Page

Loading...