Results 1 to 18 of 18

Thread: Help With a thieving script

  1. #1
    Join Date
    Aug 2015
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default Help With a thieving script

    Ignore the constants(i took a base script to edit it to my own one, i want to make the script sell my invy to a shop, once i enter the dtm of the guy of the shop and try to trade it for somereason the mouse just moves to the top left corner of my screen, why does that happen(my current dtm is the bank, if i can get it working to bank the gems its also fine.)(if you think my code is bad(my first script is this) and you can make a good working script that would be awesome).



    Code:
    program IkovThievingBot;
    const
      FIRE_RUNE_COLOR = 12698050;
      AIR_RUNE_COLOR = 14935014;
      EARTH_RUNE_COLOR = 3370131;
      CORNER_TOP_LEFT_X = 0;
      CORNER_TOP_LEFT_Y = 0;
      CORNER_BOTTOM_RIGHT_X = 764;
      CORNER_BOTTOM_RIGHT_Y = 502;
      SHIRT_COLOR_PRIMARY = 1557237;
      SHIRT_COLOR_SECONDARY = 1557237;
      STAFF_ITEM_POS_X = 580;
      STAFF_ITEM_POS_Y = 262;
      SELL_TEN_X = 560;
      SELL_TEN_Y = 380;
      CLOSE_STORE_X = 490;
      CLOSE_STORE_Y = 75;
      INPUT_DELAY = 125;
      CONTINUE_X = 282;
      CONTINUE_Y = 471;
    
    function getDistance(x1, y1, x2, y2 : integer) : extended
    var
      distance : extended;
      linea, lineb : integer;
    begin
      linea := y2 - y1;
      lineb := x2 - x1;
      linea := linea * linea;
      lineb := lineb * lineb;
      distance := sqrt(linea + lineb);
      result := distance;
    end
    
    function getMidPoint2(a, b : TPoint) : TPoint
    var
      x, y : integer;
    begin
      x := a.x + b.x;
      y := a.y + b.y;
      Result := Point(Round(x / 2), Round(y / 2));
    end;
    
    function getMidPoint3(a, b, c : TPoint) : TPoint
    var
      x, y : integer;
    begin
      x := a.x + b.x + c.x;
      y := a.y + b.y + c.y;
      Result := Point(Round(x / 3), Round(y / 3));
    end;
    
    function getRuneTablePosition() : TPoint
    const
      tableColorDistance = 20;
      tableColorTolerance = 0;
    var
      fireRunePoints : array of TPoint;
      i, q, w, j, k : integer;
      midpoint : TPoint;
    begin
     if FindColorTolerance(q,w, 9151924, 0, 0,764, 502,1) then
     begin
    
                midpoint:=Point(q,w);
                Result:=midPoint;
                end;
        end;
    
    procedure clickMagicTable
    var
      tablePos: TPoint;
    begin
      tablePos := getRuneTablePosition();
      MoveMouse(tablePos.x, tablePos.y);
      Wait(40);
      ClickMouse(0, 0, 1);
    end;
    
    function getSellerPosition() : TPoint
    const
      shirtColorDistance = 5;
      shirtColorTolerance = 3;
    var
      primaryShirtPoints : array of TPoint;
      secondaryShirtPoints : array of TPoint;
      i, j, x, y, Bank : integer;
      midpoint : TPoint;
    begin
    
    Bank := DTMFromString('mbQAAAHicY2VgYBAEYkUgVmZAAH4gZgRiUSgGgTvrRBgKo/QZJhbbMNhaWIDZ2AAjFgwGAHGPBhk=');
    FindDTM(Bank,x,y,0,0,764,502);
    midpoint:=Point(x,y);
    Result:=midpoint;
    end;
    
    procedure clickSeller
    var
      sellerPosition : TPoint;
      o, e: Integer;
    begin
      sellerPosition := getSellerPosition();
      MoveMouse(sellerPosition.x, sellerPosition.y);
      Wait(1000);
      ClickMouse(sellerPosition.x, sellerPosition.y, 0);
      wait(4000);
      FindColorTolerance(o,e, 1655412, 0, 0,764, 502,1);
      MoveMouse(o,e);
      ClickMouse(0,0,1);
    end;
    
    type
      botState = (FirstStallClick, NormalStallClick, SellerClick, SellItem, CloseStore);
    
    var
      continue : boolean;
      state : botState;
      staffCount : integer;
      loops : integer;
    
    begin
      continue := true;
      state := FirstStallClick;
    
      while not isKeyDown(27) do
      begin
        if (state = FirstStallClick) then
        begin
          clickMagicTable;
          staffCount := 1;
          wait(5000);
          state := NormalStallClick;
        end;
    
        if (state = NormalStallClick) then
        begin
          clickMagicTable;
          staffCount := staffCount + 1;
          wait(3000);
          if (staffCount >= 1) then
            state := SellerClick;
        end;
    
        if (state = SellerClick) then
        begin
          clickSeller;
          wait(4500);
          state := SellItem;
        end;
    
        if (state = SellItem) then
        begin
          MoveMouse(STAFF_ITEM_POS_X, STAFF_ITEM_POS_Y);
          Wait(1000);
          ClickMouse(0, 0, 0);
          Wait(100);
          MoveMouse(SELL_TEN_X, SELL_TEN_Y);
          Wait(100);
          ClickMouse(0, 0, 1);
          Wait(100);
          state := CloseStore;
        end;
    
        if (state = CloseStore) then
        begin
          MoveMouse(CLOSE_STORE_X, CLOSE_STORE_Y);
          Wait(100);
          ClickMouse(0, 0, 1);
          Wait(100);
          state := FirstStallClick;
        end;
      end;
    end.
    Last edited by mohana; 11-18-2016 at 08:01 PM.

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

    Default

    clickMagicTable; is your problem

    Downloaded alora.io, do you want to sell stuff to Ali Morrisane?

  3. #3
    Join Date
    Aug 2015
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by jstemper View Post
    clickMagicTable; is your problem

    Downloaded alora.io, do you want to sell stuff to Ali Morrisane?
    yes that is what i want to do

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

    Default

    Quote Originally Posted by mohana View Post
    yes that is what i want to do
    what stall are you using, are you doing the big gem stall?

  5. #5
    Join Date
    Aug 2015
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by jstemper View Post
    what stall are you using, are you doing the big gem stall?
    yes doing the big one

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

    Default

    Quote Originally Posted by mohana View Post
    yes doing the big one
    couldn't test it that specific stall cause I am not 90 thieving. But this should work (tested on a different one)
    Simba Code:
    program new;
    {$I AeroLib/AeroLib.simba}

    function ShopOpen(): boolean;
    begin
      result := findTextTPA(2070783, 3, IntToBox(210, 30, 315, 52), 'ievin', UpChars07, - 1);
    end;

    procedure SellStuff();
    var
      TPA: TPointArray;
      ATPA: T2DPointArray;
      tCol: TColEx;
      I: Integer;
    begin
      tCol.create(11449257, 26, 0.97, 0.12);
      if (not tCol.findAllIn(AREA_MS, TPA)) then
        exit;
      ATPA := FloodFillTPA(TPA);
      SortATPASize(ATPA, true);
      HumanMMouse(middleTPA(ATPA[0]), 0, 0);
      if (waitUptext('orrisa', 100)) then
      begin
        fastClick(Mouse_Right);
        if waitOption('Trade Ali', 300) then
          if waitFunc(@ ShopOpen, 25, 4000) then
            for I := 1 to 28 do
              if ItemInSlot(I) then
                if interactSlot(I, Mouse_Right) then
                  waitOption('-250', 250);
      end;
    end;

    procedure ClickBigStall();
    var
      TPA: TPointArray;
      ATPA: T2DPointArray;
      tCol: TColEx;
    begin
      tCol.create(9150637, 9, 0.06, 0.55);
      if (not tCol.findAllIn(AREA_MS, TPA)) then
        exit;
      ATPA := FloodFillTPA(TPA);
      SortATPASize(ATPA, true);
      HumanMMouse(middleTPA(ATPA[0]), 0, 0);
      if (waitUptext('em stall', 100)) then
        fastClick(Mouse_Left);
    end;

    procedure Main();
    begin
      sleep(50);
      if (ShopOpen()) then
        MouseBox(IntToBox(481, 38, 488, 43), mouse_left);
      if (not (IsInvFull())) then
        ClickBigStall()
      else
        SellStuff();
    end;

    begin
      initAL();
      while (IsLoggedIn()) do
        Main();
    end.

    Make sure you are on max brightness. Used aerolib because all of the text functions work on that server (it's a copy of 07)

    newer one found here : https://villavu.com/forum/showthread.php?t=117030
    Last edited by jstemper; 01-13-2017 at 03:46 AM. Reason: Adding link to new one

  7. #7
    Join Date
    Aug 2015
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    where do i get {$I AeroLib/AeroLib.simba}

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

    Default

    https://villavu.com/forum/showthread.php?t=108953

    you might be out of luck if the plugins download is truly empty though

  9. #9
    Join Date
    Aug 2015
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by jstemper View Post
    https://villavu.com/forum/showthread.php?t=108953

    you might be out of luck if the plugins download is truly empty though
    it is empty can u send me urs?

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

    Default

    There are multiple ones on that thread

  11. #11
    Join Date
    Aug 2015
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by jstemper View Post
    https://villavu.com/forum/showthread.php?t=108953

    you might be out of luck if the plugins download is truly empty though
    got it thank you sooo much man really appreciate it

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

    Default

    Quote Originally Posted by mohana View Post
    got it thank you sooo much man really appreciate it
    let me know if it works... kinda just threw it together

  13. #13
    Join Date
    Jun 2012
    Posts
    21
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    im getting this how i fix it Error: Plugin(AND_TPA32) has not been found

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

    Default

    Quote Originally Posted by Pukka View Post
    im getting this how i fix it Error: Plugin(AND_TPA32) has not been found
    you are missing the aerolib plugins, go to the couple last pages of the aerolib thread and get them from one of the links

  15. #15
    Join Date
    Aug 2015
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by jstemper View Post
    you are missing the aerolib plugins, go to the couple last pages of the aerolib thread and get them from one of the links
    thank you for the help man

  16. #16
    Join Date
    Jun 2012
    Posts
    21
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by mohana View Post
    thank you for the help man
    I guess this script wont be as useful now as hes added bob random and banned 4 of my accounts

  17. #17
    Join Date
    Jan 2013
    Posts
    86
    Mentioned
    0 Post(s)
    Quoted
    25 Post(s)

    Default

    Quote Originally Posted by Pukka View Post
    I guess this script wont be as useful now as hes added bob random and banned 4 of my accounts
    What were you doing when you got banned? I'm trying to work on a script to help get past the macro detection. How long were you running the script and was it the chatbox antimacro that got you banned?
    Last edited by deejaay; 12-09-2016 at 10:35 AM.

  18. #18
    Join Date
    Jan 2017
    Posts
    1
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Could I get some help with this please?

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
  •