Results 1 to 7 of 7

Thread: Checking for charms

  1. #1
    Join Date
    May 2012
    Posts
    44
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default Checking for charms

    How would I go about making a loot function that checks as many loot stacks as possible for charms?

    The issue is that the monster I want to loot does drop things that cover charms 90% of the time.

    Basically, I don't want it to check other piles of loot that I didn't generate, because it is a high traffic area.
    Last edited by shiningwhite; 12-24-2012 at 10:44 AM.
    "A child of five would understand this. Send someone to fetch a child of five."

  2. #2
    Join Date
    Dec 2011
    Location
    The Netherlands
    Posts
    1,631
    Mentioned
    47 Post(s)
    Quoted
    254 Post(s)

    Default

    Two options
    1) The most accurate option. Make a list of all charm colors and try to find for those colors. If there are any red dots on the minimap within a 40 pixel range of MMCX, MMCY then search for the colors of the other items that are dropped and cover charms. Right click if you find anything and check if the list contains Charms.

    2) Another viable option. Make a list of all charm colors and try to find for those colors. If there are any red dots on the minimap within a 40 pixel range of MMCX, MMCY then use MMToMS to convert those points to mainscreen points. Hover the mouse there, check if the uptext contains something to loot, if it does then right click & check if there are charms.

    Script source code available here: Github

  3. #3
    Join Date
    Nov 2011
    Posts
    335
    Mentioned
    0 Post(s)
    Quoted
    68 Post(s)

    Default

    Doing sth like it in one of my scripts, but it fails to detect the option to loot an item i want. Is it still the OCR issue?

  4. #4
    Join Date
    May 2012
    Posts
    44
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    How can I keep it from checking piles more than once when it has checked it?
    "A child of five would understand this. Send someone to fetch a child of five."

  5. #5
    Join Date
    Jun 2012
    Location
    Howell, Michigan
    Posts
    1,585
    Mentioned
    34 Post(s)
    Quoted
    553 Post(s)

    Default

    This is exactly my issue with my waterfiend script :P I would love to find the answer!

  6. #6
    Join Date
    Mar 2012
    Location
    Canada
    Posts
    442
    Mentioned
    4 Post(s)
    Quoted
    67 Post(s)

    Default

    PMed you the code for it

  7. #7
    Join Date
    Mar 2012
    Location
    Canada
    Posts
    442
    Mentioned
    4 Post(s)
    Quoted
    67 Post(s)

    Default

    Code:
    with wObject[13] do
      begin
        name:='Gold Charms';
        uptext:=['harm'];
        waitTime:=200;
        x:= MSCX;
        y:= MSCY;
        xs:= MSX1;
        xe:= MSX2;
        ys:= MSY1;
        ye:= MSY2-50;
        tol:= 2;
        dist:= 12;
        mouseModX:= 0;
        mouseModY:= 0;
        mouseRandX:= 1;
        mouseRandY:= 1;
    
        color.colorX:= MSCX;
        color.colorY:= MSCY;
        color.xs:= MSX1;
        color.xe:= MSX2;
        color.ys:= MSY1;
        color.ye:= MSY2-50;
        color.CTSModOne:= 0.59;
        color.CTSModTwo:= 1.05;
        color.startColor:= 6397359;
        color.colorTol:= 4;
        color.xModS:= 28.01;
        color.xModE:= 34.28;
        color.yModS:= 30.37;
        color.yModE:= 37.11;
        color.zModS:= 14.2;
        color.zModE:= 17.84;
      end;
    
      with wObject[14] do
      begin
        name:='Crim Charms';
        uptext:=['hatm'];
        waitTime:=200;
        x:= MSCX;
        y:= MSCY;
        xs:= MSX1;
        xe:= MSX2;
        ys:= MSY1;
        ye:= MSY2-50;
        tol:= 2;
        dist:= 12;
        mouseModX:= 0;
        mouseModY:= 0;
        mouseRandX:= 1;
        mouseRandY:= 1;
    
        color.colorX:= MSCX;
        color.colorY:= MSCY;
        color.xs:= MSX1;
        color.xe:= MSX2;
        color.ys:= MSY1;
        color.ye:= MSY2-50;
        color.CTSModOne:= 0;
        color.CTSModTwo:= 0;
        color.startColor:= 3821188;
        color.colorTol:= 0;
        color.xModS:= 12.91;
        color.xModE:= 13.11;
        color.yModS:= 10.56;
        color.yModE:= 10.76;
        color.zModS:= 5.28;
        color.zModE:= 5.48;
      end;
    
      with wObject[15] do
      begin
        name:='Green Charms';
        uptext:=['harm'];
        waitTime:=200;
        x:= MSCX;
        y:= MSCY;
        xs:= MSX1;
        xe:= MSX2;
        ys:= MSY1;
        ye:= MSY2-50;
        tol:= 2;
        dist:= 12;
        mouseModX:= 0;
        mouseModY:= 0;
        mouseRandX:= 1;
        mouseRandY:= 1;
    
        color.colorX:= MSCX;
        color.colorY:= MSCY;
        color.xs:= MSX1;
        color.xe:= MSX2;
        color.ys:= MSY1;
        color.ye:= MSY2-50;
        color.CTSModOne:= 0.03;
        color.CTSModTwo:= 0.49;
        color.startColor:= 8167561;
        color.colorTol:= 8;
        color.xModS:= 20.08;
        color.xModE:= 34.19;
        color.yModS:= 25.77;
        color.yModE:= 38.95;
        color.zModS:= 15.64;
        color.zModE:= 34.24;
      end;
    Code:
    procedure pickUpGolds();
    var
      x,y: integer;
    begin
      wFindObjectMulti([wObject[13],wObject[14],wObject[15]],mouse_left,true,false);
    end;

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •