Results 1 to 3 of 3

Thread: [OSRS] FeatherPack Buyer

  1. #1
    Join Date
    Apr 2016
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default [OSRS] FeatherPack Buyer

    Hello, i've made alot of simple bots but this was my first.


    i've been trying to find ways to improve it. :C


    Only problem is that Osrs client keeps changing the ids of all colors every once inawhile and i have no idea how to bypass this.


    any ideas?





    Code:
    program FeatherPacks;
    
     procedure openPack;
     var xp, yp: integer;
     var countOpens: integer;
    
    begin
      repeat
        if(FindColor(xp, yp, 6654129, 1222, 443, 1414, 699)
        or FindColor(xp, yp, 15790322, 1222, 443, 1414, 699)
        or FindColor(xp, yp, 6654385, 1222, 443, 1414, 699)
        or FindColor(xp, yp, 6522800, 1222, 443, 1414, 699)) then
          MoveMouse(xp+random(11), yp-random(10));
          wait(90);
          ClickMouse(xp+random(11), yp-random(10), mouse_Left);
          wait(400+random(50));
          countOpens:=countOpens+1;
        //writeln('opens = ' + IntToStr(countOpens));
      until(countOpens:=11);
    end
    
    procedure ClickGerrant //opens shop
    
    var x, y: integer;
    var randyClick: integer;
    var count: integer;
    var a: integer;
    var b: integer;
    
    begin
    
    a:=0;
    
    b:=1;
    
    randyClick:=0;
    
      if(FindColor(x, y, 3425869, 0, 1, 1194, 728)
      or FindColor(x, y, 7438248, 0, 1, 1194, 728)
      or FindColor(x, y, 3226937 , 0, 1, 1194, 728)
      or FindColor(x, y, 3228489 , 0, 1, 1194, 728)
      or FindColor(x, y, 7564404 , 0, 1, 1194, 728)
      or FindColor(x, y, 7635626 , 0, 1, 1194, 728)
      or FindColor(x, y, 6582418 , 0, 1, 1194, 728)
      or FindColor(x, y, 15526124, 0, 1, 1194, 728)
      or FindColor(x, y, 15000036, 0, 1, 1194, 728)
      or FindColor(x, y, 15197415, 0, 1, 1194, 728)) then
        begin
        writeln('found gerrant!');
          if(randyClick = 0) then
          begin
            MoveMouse(x-50, y-50);
            wait(90);
            MoveMouse(x-40, y-20);
            wait(90);
            MoveMouse(x-30, y-30);
            wait(90);
            MoveMouse(x-20, y-20);
            wait(90);
            MoveMouse(x-15, y-10);
            wait(90);
            MoveMouse(x-5, y-2);
            wait(90);
            MoveMouse(x, y);
            wait(90);
    
    
            ClickMouse(x, y, mouse_Left);
            wait(1000);
            ClickMouse(x, y, mouse_Right);
            wait(600+random(300));
            MoveMouse(x, y+42);
            wait(500);
            ClickMouse(x, y+42, mouse_Left);
            wait(1000+random(1200));
    
            randyClick:=random(2);
    
          end
    
          else if(randyClick = 1) then
          begin
          writeln('found gerrant');
          a := 788;
          b := 600;
          randyClick:=0;
    
            MoveMouse(14+random(50), 1+random(10));
    
            MoveMouse(x-40, y-20);
            wait(90);
            MoveMouse(x-30, y-15);
            wait(90);
            MoveMouse(x-20, y-10);
            wait(90);
            MoveMouse(x-10, y-5);
            wait(90);
            MoveMouse(x-5, y-2);
            wait(90);
            MoveMouse(x-2, y-2);
            wait(90);
            MoveMouse(x, y);
            wait(90);
    
            ClickMouse(x, y, mouse_Left);
            wait(2000);
            ClickMouse(x, y, mouse_Right);
            wait(1600+random(300));
            MoveMouse(x, y+42);
            wait(1000);
            ClickMouse(x, y+42, mouse_Left);
            wait(1000+random(2200));
            randyClick:=random(2);
          end
        end
    
        else
        begin
        wait(3300);
           writeln('could not find gerrant');
        end
    
    end
    
    procedure Buy;
    var count: integer;
    var xf, yf: integer;
    var randyCount: integer;
    var countPacks: integer;
    begin
    randyCount:=0;
    count:=0;
    countPacks:=0;
       repeat
          if(FindColor(xf, yf, 6654385, 354, 146, 446, 267)
          or FindColor(xf, yf, 6720179, 354, 146, 446, 267)
          or FindColor(xf, yf, 6720178, 354, 146, 446, 267)
          or FindColor(xf, yf, 6785971, 354, 146, 446, 267)
          or FindColor(xf, yf, 65535, 409, 232, 440, 263)
          or FindColor(xf, yf, 6654386, 409, 232, 440, 263)
          or FindColor(xf, yf, 6522800, 409, 232, 440, 263)) then
           begin
              count:=count+1;
    
           //a movement most people do when spam buying items from shops. "up right click, down click, up rightclick down click repeat"
             MoveMouse(xf+random(10), yf+random(10));
              wait(10+random(300));
              ClickMouse(xf, yf, mouse_Right);
              wait(300+10);
              MoveMouse(xf+random(5), yf+72);
              wait(200+10);
              ClickMouse(xf+random(5), yf+72, mouse_left);
              wait(350);
           end
       until(count = 1);
    
       //closes shop interface
           MoveMouse(819, 157);
           wait(90);
           ClickMouse(819, 157, mouse_Left);
    end
    
    var xi, yi: integer;
    var count: integer;
    var xp, yp: integer;
    var countOpens: integer;
    
    begin
    countOpens:=0;
    count:=0;
    
    writeln('Checking your settings....');
     writeln('5');
     wait(1000);
     writeln('4');
     wait(1000);
     writeln('3');
     wait(1000);
     writeln('2');
     wait(1000);
     writeln('1');
     wait(1000);
     writeln('Autobots, roll out!');
     wait(2000);
    
    
    repeat
    //opens packs if inv is full
     if(FindColor(xp, yp, 6654129, 1222, 443, 1414, 699) or FindColor(xp, yp, 15790322, 1222, 443, 1414, 699) or FindColor(xp, yp, 6654385, 1222, 443, 1414, 699) or FindColor(xp, yp, 6654386, 1222, 443, 1414, 699))then  6654386
      begin
         openPack;
      end
      //trades gerrant, buys packs and closes inteface.
      if(FindColor(xp, yp, 6654129, 1222, 443, 1414, 699) or FindColor(xp, yp, 15790322, 1222, 443, 1414, 699) or FindColor(xp, yp, 6654385, 1222, 443, 1414, 699) or FindColor(xp, yp, 6654386, 1222, 443, 1414, 699) or FindColor(xp, yp, 6522800, 1222, 443, 1414, 699) = false) then
      begin
        wait(200);
        ClickGerrant;
        wait(700+random(1000));
        Buy;
        wait(2000+random(400));
        count:=count+1;
      end
    until(count = 100);
    
    end

  2. #2
    Join Date
    Jun 2013
    Location
    Scranton
    Posts
    496
    Mentioned
    5 Post(s)
    Quoted
    220 Post(s)

    Default

    you could use findcolortolerance, and add a tolerance of 10-20

    Code:
    function FindColorTolerance(var x, y: Integer; col, x1, y1, x2, y2, tol: Integer): Boolean;

  3. #3
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default

    Try use ATPA's, account for several sets colors per object.
    See tutorials section for ATPA information/guide

    chhers
    -lj

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
  •