Results 1 to 11 of 11

Thread: Bet Mtv's Soda Ash Buyer Idea (Screenshots!)

  1. #1
    Join Date
    Mar 2007
    Location
    Eugene, Oregon
    Posts
    195
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Bet Mtv's Soda Ash Buyer Idea (Screenshots!)

    Alright so this idea was presented to me by Bet Mtv. This idea is to have a rs character start at the pest control bank and go to Port Sarim to buy Soda Ash. The only tricky part is the timing.

    1. Start at the bank in the Pest Control area.



    2. Find the brown color of the docks on the minimap and click there. It should be somewhere close to here.



    3. Look for the "Transportation" symbol on the mini map, OR if its easier move the compass angle all the way down and find the man in black. (Sorry no screen shot of the second option...)



    4. Talk to him and tell him you would like to go back to Port Sarim.



    OHH TWO IN A ROW LOL...



    5. Either use coordinates (Bad idea i know...) or find the color of the plank you step off of that is directly in front of you.



    6. When your off the boat, turn the compass to face South and move it all the way down and there is a man in a shiny golden coat. (Hard to miss )



    7. Use his pretty gold coat color and right click him and select "Trade".



    8. You should automatically go there, BUT if you happen to get caught on something make sure you have a boolean or something that will double check. Once you trade him this should pop up.



    9. Now this is the more difficult part. There is white Soda Ash there. But there is only 10 at a time. And the respond does take time. And sometimes they are already bought. So if there is some there, have it buy them. If not have it wait until there is at least 1.



    10. When you done buying exit the shop window and turn the compass back North but still down and find the man in the black cloak. Click "Talk" To him.



    11. Choose the third option while talking to him and tell him to take you to the outpost.



    12. This part was clearly obvious when i realized it (It deserves 2) Use the color on the mini map of the path into the small village. My character is standing on the path.



    13. Find the bank symbol, Bank the ash. Now you might have to wait here for a few minutes while your waiting for the ash to respawn. (Lol Halo slang there...) So make him do some emotes are start talking to himself. Then... REPEAT.

    And there you have it. Another brilliantly plotted script idea. BUT BUT BUT! This was not my idea I only plotted it out. All the credit for this idea goes to Bet Mtv. Kudos to him!

  2. #2
    Join Date
    Oct 2006
    Posts
    207
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Those screen shots are good =) Ill give it a go - probarbly wont finish it but i will start on it.

    Edit: in the first screen shot anyone know what that fire like symbol is called? (i dont play rs)

  3. #3
    Join Date
    Mar 2007
    Location
    Eugene, Oregon
    Posts
    195
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Its a rune shop symbol.

  4. #4
    Join Date
    Oct 2006
    Posts
    207
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok thanks - i think i made the walk to dock and talk to guy - mind if a borrow an account to test it?

  5. #5
    Join Date
    Mar 2007
    Location
    Eugene, Oregon
    Posts
    195
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yea i have a lvl three you can borrow. Ill pm you.

  6. #6
    Join Date
    Oct 2006
    Posts
    207
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    This is what i have done currently:
    SCAR Code:
    program Ash;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/Misc/amount.scar}
    var
      i: integer;

    procedure declarePlayers;
    begin
      HowManyPlayers := 1;            //number of players to use
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;             //player# to start with

      Players[0].Name := '';      //username
      Players[0].Pass := '';      //password
      Players[0].Nick := '';      //nick
      Players[0].Active := True;
    end;

    procedure setupScript;
    begin
      setupSRL;
      declarePlayers;
    end;

    {*******************************************************************************
    procedure BuyCoords(x, y, amount: Integer);
    By: RSN
    Description: Buys the specified amout of the Item at x, y
    *******************************************************************************}


    procedure BuyCoords(x, y, Amount: Integer); // By RSN
    var
      ix, iy: Integer;
      ToBuy: array[1..3] of Integer;
      Done: array[1..3] of Integer;
    begin
      ix := x;
      iy := y;
      ToBuy[1] := Amount div 10;
      ToBuy[2] := (Amount mod 10) div 5;
      ToBuy[3] := (Amount mod 10) mod 5;
      while (done[1] < tobuy[1]) do
      begin
        Mouse(ix, iy, 3, 3, False);
        Wait(450);
        if (ClickOption('Buy 10', 1)) then
          Done[1] := done[1] + 1
        else
          Exit;
        Wait(300);
      end;
      while (done[2] < tobuy[2]) do
      begin
        Mouse(ix, iy, 3, 3, False);
        Wait(450);
        if (ClickOption('Buy 5', 1)) then
          Done[2] := done[2] + 1
        else
          Exit;
        Wait(300);
      end;
      while (done[3] < tobuy[3]) do
      begin
        Mouse(ix, iy, 3, 3, False);
        Wait(450);
        if (ClickOption('Buy 1', 1)) then
          Done[3] := done[3] + 1
        else
          Exit;
        Wait(300);
      end;
    end;

    {*******************************************************************************
    procedure BuyAmount(i, amount: Integer);
    By: RSN
    Description: Buys the specified amount of the Item at assigned row and column
    *******************************************************************************}


    procedure BuyAmount(i, Amount: Integer);
    var
      ix, iy, row, col: Integer;
    begin
      row := i div 8;
      col := i - (row * 8) - 1;
      if (col < 0) then
      begin
        col := 7;
        row := row - 1;
      end;
      ix := 88 + (col * 47) + Random(7);
      iy := 76 + (row * 47) + Random(7);
      BuyCoords(ix, iy, Amount);
    end;

    procedure inactive(reason: string);
    begin
      Writeln(reason);
      Logout;
      nextPlayer(False);
    end;

    function walkBetweenSymbols(symbols: array of string): Boolean;
    var
      i: integer;
      x, y: integer;
      tx, ty: integer;
    begin
      result := True;
      for i := 0 to length(symbols) - 1 do
      begin
        if(not (findSymbolIn(x, y, symbols[i], 570, 11, 716, 163))) then
        begin
          Result := False;
          Exit;
        end;
        tx := tx + x;
        ty := ty + y;
      end;
      x := tx / length(symbols);
      y := ty / length(symbols);
      mouse(x, y, 2, 2, True);
      wait(100 + random(100));
      fFlag(5);
      wait(500 + random(1000));
    end;

    procedure walkToDockColor;
    var
      j, k: integer;
      x, y: integer;
      Points: array of tPoint;
    begin
      for j := 0 to 30 do
      begin
        wait(10);
        findColorsTolerance(Points, 2702170, MSX1, MSY1, MSX2, MSY2, j);
        for k := 0 to length(Points) - 1 do
        begin
          wait(10);
          x := Points[k].x;
          y := Points[k].y;
          if(findColoredAreaTolerance(x, y, 2702170, x - 5, y - 5, x + 5, y + 5, 15, 0)) then
          begin
            mouse(x, y, 2, 2, True);
            wait(100 + random(100));
            fFlag(5);
            wait(500 + random(1000));
            Exit;
          end;
        end;
      end;
    end;

    procedure walkToDock;
    var
      i: integer;
      tempBool: Boolean;
    begin
      for i := 0 to 3 do
      begin
        tempBool := False;
        if(walkBetweenSymbols(['transportation'])) then
        begin
          Exit;
        end;
        if(walkBetweenSymbols(['store', 'anvil', 'archery shop'])) then
        begin
          tempBool := True;
          Break;
        end;
        if(walkBetweenSymbols(['anvil', 'archery shop'])) then
        begin
          tempBool := True;
          Break;
        end;
        if(walkBetweenSymbols(['anvil', 'magic shop'])) then
        begin
          tempBool := True;
          break;
        end;
        walkBetweenSymbols(['magic shop', 'archery shop']);
      end;
      if(not tempBool) then
        inactive('Could not find symbols');
      for i := 0 to 3 do
      begin
        tempBool := False;
        if(walkBetweenSymbols(['transportation'])) then
        begin
          tempBool := True;
          Exit;
        end;
        walkToDockColor;
      end;
      if(not tempBool) then
        inactive('could not find dock!');
    end;

    procedure removePointsByDistance(arr: tPointArray; dist: integer);
    var
      a, b, k: integer;
      tempTPA: tPointArray;
      TPA: tPointArray;
      tempBool: Boolean;
    begin
      setArrayLength(tempTPA, 0);
      for a := 0 to length(arr) - 1 do
      begin
        tempBool := False;
        for b := 0 to length(arr) - 1 do
        begin
          if(a = b) then
            Continue;
          if(distance(arr[a].x, arr[a].y, arr[b].x, arr[b].y) <= 10) then
          begin
            tempBool := True;
            Break;
          end;
        end;
        if(not tempBool) then
        begin
          setArrayLength(tempTPA, length(tempTPA) + 1);
          tempTPA[Length(TempTPA) - 1] := arr[a];
        end
        setArrayLength(TPA, 0);
        for k := 0 to length(arr)-1 do
        begin
          if((arr[k].x = arr[a].x ) and (arr[k].y = arr[a].y)) then
            Continue;
          setArrayLength(TPA, length(TPA) + 1);
          TPA[Length(TPA) - 1] := arr[k];
        end;
        arr := TPA;
      end;
      arr := TempTPA;
    end;

    procedure talkToSquire;
    var
      x, y: integer;
      i, j: integer;
      Points: array of tPoint;
      Arr: array of array of tPoint;
    begin
      for i := 0 to 20 do
      begin
        Wait(10);
        findColorsTolerance(Points, 1908000, MSX1, MSY1, MSX2, MSY2, i);
        //removePointsByDistance(Points, 5);
        arr := splitTPA10(Points);
        for j := 0 to length(Arr) - 1 do
        begin
          x := arr[j][0].x;
          y := arr[j][0].y;
          if(inRange(x, 238, 261) and inRange(y, 173, 203)) then      //remove points on player
            Continue;
          if(findColoredAreaTolerance(x, y, 1908000, x - 5, y - 5, x + 5, y + 5, 8, i)) then
          begin
            MMouse(x, y, 2, 2);
            Wait(100 + random(100));
            getMousePos(x, y);
            if(isUpText('quire')) then
            begin
              Mouse(x, y, 0, 0, True);
              wait(100 + random(100));
              fFlag(0);
              wait(1000 + random(1000));
              Exit;
            end;
          end;
        end;
      end;
    end;

    procedure say(what: array of string);           //ontinue, arrim, ontinue, ontinue
    var
      i, j: integer;
    begin
      for i := 0 to length(what) - 2 do
      begin
        for j := 0 to 30 do
        begin
          wait(100 + random(100));
          if(not clickNpcChatText(what[i])) then
          begin
            if(findNPCChatText(what[i + 1])) then
            begin
              Break;
            end;
          end else
            Break;
        end;
      end;
      //clickNPCChatText(what[i + 1]);
    end;

    procedure waitWhileOnBoat;
    begin
      repeat
        wait(10);
      until(CountColor(0, MSX1, MSY1, MSX2, MSY2) >= 75000)
    end;

    procedure walkOverPlank;
    var
      i, j: integer;
      x, y: integer;
      Points: Array of TPoint;
    begin
      {plank := BitmapFromString(19, 8, 'z78DA73731B18604017306AE3A' +
           '88D43CB460006A1BC05'); }

      {plank := BitmapFromString2(False, 'a768DF78DAC5CF410EC33008' +
           '44D12B0133186F9DD8BEFF9112B78994887555164F482CBE10B92' +
           '7B088CF6AFB69095D3BC752B7538CB9CEB3CA9F26E09D1AE20D23' +
           '5BE8829AF560B19965A059CDBE8AEE93B8BAC9120EB4AC375620C' +
           'B0DDDDA53DB6D3DF42CD6A2E4E50FBA1A4AE9DFD601850');
      if(FindDeformedBitmapToleranceIn(plank, x, y, MSX1, MSY1, MSX2, MSY2, 50, 3, True, Accuracy)) then
      begin
        Writeln('Found!');
        MMouse(x + 10, y + 10, 5, 5);
        if(isUpText('ross')) then
        begin
          getMousePos(x, y);
          Mouse(x, y, 0, 0, True);
        end;
      end;
      freeBitmap(plank); }

      for i := 0 to 30 do
      begin
        findColorsSpiralTolerance(MSCX, MSCY, Points, 3954025, MSX1, MSY1, MSX2, MSY2, i);
        for j := 0 to length(Points) - 1 do
        begin
          x := Points[j].x;
          y := Points[j].y;
          if(not (findColor(x, y, 0,  x - 7, y - 2, x + 7, y + 2))) then
          begin
            if(CountColor(0, x - 9, y - 3, x + 9, y + 2) >= 8) then
            begin
              MMouse(x, y, 5, 5);
              Wait(100 + random(100));
              if(isUpText('ross')) then
              begin
                getMousePos(x, y);
                Mouse(x, y, 0, 0, True);
                repeat
                  wait(10);
                until(CountColor(0, MSX1, MSY1, MSX2, MSY2) <= 75000)
                wait(1000 + random(1000));
                Exit;
              end;
            end;
          end;
        end;
      end;
    end;

    procedure walkToStan;
    var
      i: integer;
    begin
      repeat
        wait(10);
      until(CountColorTolerance(10123368, MSX1, MSY1, MSX2, MSY2, 20) >= 40000)
      for i := 20 downto 0 do
      begin
        if(findSymbolIn(x, y, 'transportation', MMX1, MMCY + i, MMX2, MMY2)) then
        begin
          mouseFlag(x, y, 5, 5);
          fFlag(5);
          wait(500 + random(1000));
          Exit;
        end;
      end;
    end;

    procedure talkToStan;
    var
      i, j: integer;
      x, y: integer;
      Points: array of tPoint;
    begin
      for i := 0 to 30 do
      begin
        findColorsSpiralTolerance(MSCX, MSCY, Points, 942980, MSX1, MSY1, MSX2, MSY2, i);
        for j := 0 to length(Points) - 1 do
        begin
          x := Points[j].x;
          y := Points[j].y;
          wait(10);
          if(findColoredAreaTolerance(x, y, 942980, x - 5, y - 5, x + 5, y + 5, 8, i)) then
          begin
            MMouse(x, y, 5, 5);
            Wait(100 + random(100));
            if(isUpText('rader')) then
            begin
              getMousePos(x, y);
              mouse(x, y, 0, 0, False);
              chooseOptionEx('rade');
              Exit;
            end;
          end;
        end;
      end;
    end;

    procedure randomExamine;
    var
      row, col: integer;
      x, y: integer;
      i: integer;
    begin
      i := random(20) + 1;
      row := i div 8;
      col := i - (row * 8) - 1;
      if (col < 0) then
      begin
        col := 7;
        row := row - 1;
      end;
      x := 88 + (col * 47) + Random(7);
      y := 76 + (row * 47) + Random(7);
      mouse(x, y, 0, 0, False);
      chooseOption(x, y, 'xamin');
    end;

    procedure buyAsh;
    var
      ash: integer;
    begin
      ash := BitmapFromString2(False, 'a5197978DA358A4112C0200803' +
           'BF8452408E24F5FF5FAAD636879DCCCE8AFCBB6CC1A32D46E9FE7' +
           '36CAFDB6BF7376A6865652014CA9B4E3BFED0A787478D64F22B0B' +
           '026147225954F6533ED99');
      repeat
        if(amountBMP('shop', ash, 40) > 0) then
        begin
          buyAmount(21, random(2) * 5 + 5);
        end;
        case random(10) of
          0: randomExamine;
          1: mMouse(0, 0, 764, 502);
          2: randomRClick;
          3: wait(1000 + random(100000));
        end;
      until(invFull)
      freeBitmap(ash);
      repeat
        CloseWindow;
        wait(100 + random(100));
      until(not shopScreen)
    end;

    procedure walkToBoat;
    var
      i: integer;
    begin
      for i := 20 downto 0 do
      begin
        if(findSymbolIn(x, y, 'transportation', MMX1, MMY1, MMX2, MMCY - i)) then
        begin
          mouseFlag(x, y, 5, 5);
          fFlag(5);
          wait(500 + random(1000));
          Exit;
        end;
      end;
    end;

    begin
      setupScript;
      if(not LoggedIn) then
        loginPlayer;
      highestAngle;
      walkToDock;
      i := 0;
      repeat
        talkToSquire;
        wait(500 + random(1000));
        inc(i);
      until(clickToContinue or (i >= 3))
      say(['arim', 'ontinue', 'ontinue']);
      waitWhileOnBoat;
      walkOverPlank;
      walkToStan;
      talkToStan;
      buyAsh;
      walkToBoat;
      i := 0;
      repeat
        talkToSquire;
        wait(500 + random(1000));
        inc(i);
      until(clickToContinue or (i >= 3))
      say(['outpo', 'ontinue', 'ontinue']);
      waitWhileOnBoat;
      walkOverPlank;
    end.

    problems:
    Doesnt find the plank as fast as i would like.
    Doesnt find the squire as fast as i would like.
    When talking to trader, because his name has trade in it it sometimes clicks his name, need to make a bitmap of the trade text.

    I posted this so people could work on this script if they get time, because i might not get enough time to finish it. Also you can post bugs/suggestions. Feel free to post an updated version of this.

  7. #7
    Join Date
    Oct 2006
    Location
    Ireland
    Posts
    855
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    If only all requests were like this. I don't exactly have time to do it atm but I'm sure somebody will with all that info.

  8. #8
    Join Date
    Mar 2007
    Location
    Eugene, Oregon
    Posts
    195
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Wow! Way to go!

  9. #9
    Join Date
    Aug 2007
    Posts
    282
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    another good request from you!

    but, im not members, otherwise i would have tried

  10. #10
    Join Date
    Mar 2007
    Location
    Eugene, Oregon
    Posts
    195
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by danrox2004 View Post
    This is what i have done currently:
    SCAR Code:
    program Ash;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/Misc/amount.scar}
    var
      i: integer;

    procedure declarePlayers;
    begin
      HowManyPlayers := 1;            //number of players to use
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;             //player# to start with

      Players[0].Name := '';      //username
      Players[0].Pass := '';      //password
      Players[0].Nick := '';      //nick
      Players[0].Active := True;
    end;

    procedure setupScript;
    begin
      setupSRL;
      declarePlayers;
    end;

    {*******************************************************************************
    procedure BuyCoords(x, y, amount: Integer);
    By: RSN
    Description: Buys the specified amout of the Item at x, y
    *******************************************************************************}


    procedure BuyCoords(x, y, Amount: Integer); // By RSN
    var
      ix, iy: Integer;
      ToBuy: array[1..3] of Integer;
      Done: array[1..3] of Integer;
    begin
      ix := x;
      iy := y;
      ToBuy[1] := Amount div 10;
      ToBuy[2] := (Amount mod 10) div 5;
      ToBuy[3] := (Amount mod 10) mod 5;
      while (done[1] < tobuy[1]) do
      begin
        Mouse(ix, iy, 3, 3, False);
        Wait(450);
        if (ClickOption('Buy 10', 1)) then
          Done[1] := done[1] + 1
        else
          Exit;
        Wait(300);
      end;
      while (done[2] < tobuy[2]) do
      begin
        Mouse(ix, iy, 3, 3, False);
        Wait(450);
        if (ClickOption('Buy 5', 1)) then
          Done[2] := done[2] + 1
        else
          Exit;
        Wait(300);
      end;
      while (done[3] < tobuy[3]) do
      begin
        Mouse(ix, iy, 3, 3, False);
        Wait(450);
        if (ClickOption('Buy 1', 1)) then
          Done[3] := done[3] + 1
        else
          Exit;
        Wait(300);
      end;
    end;

    {*******************************************************************************
    procedure BuyAmount(i, amount: Integer);
    By: RSN
    Description: Buys the specified amount of the Item at assigned row and column
    *******************************************************************************}


    procedure BuyAmount(i, Amount: Integer);
    var
      ix, iy, row, col: Integer;
    begin
      row := i div 8;
      col := i - (row * 8) - 1;
      if (col < 0) then
      begin
        col := 7;
        row := row - 1;
      end;
      ix := 88 + (col * 47) + Random(7);
      iy := 76 + (row * 47) + Random(7);
      BuyCoords(ix, iy, Amount);
    end;

    procedure inactive(reason: string);
    begin
      Writeln(reason);
      Logout;
      nextPlayer(False);
    end;

    function walkBetweenSymbols(symbols: array of string): Boolean;
    var
      i: integer;
      x, y: integer;
      tx, ty: integer;
    begin
      result := True;
      for i := 0 to length(symbols) - 1 do
      begin
        if(not (findSymbolIn(x, y, symbols[i], 570, 11, 716, 163))) then
        begin
          Result := False;
          Exit;
        end;
        tx := tx + x;
        ty := ty + y;
      end;
      x := tx / length(symbols);
      y := ty / length(symbols);
      mouse(x, y, 2, 2, True);
      wait(100 + random(100));
      fFlag(5);
      wait(500 + random(1000));
    end;

    procedure walkToDockColor;
    var
      j, k: integer;
      x, y: integer;
      Points: array of tPoint;
    begin
      for j := 0 to 30 do
      begin
        wait(10);
        findColorsTolerance(Points, 2702170, MSX1, MSY1, MSX2, MSY2, j);
        for k := 0 to length(Points) - 1 do
        begin
          wait(10);
          x := Points[k].x;
          y := Points[k].y;
          if(findColoredAreaTolerance(x, y, 2702170, x - 5, y - 5, x + 5, y + 5, 15, 0)) then
          begin
            mouse(x, y, 2, 2, True);
            wait(100 + random(100));
            fFlag(5);
            wait(500 + random(1000));
            Exit;
          end;
        end;
      end;
    end;

    procedure walkToDock;
    var
      i: integer;
      tempBool: Boolean;
    begin
      for i := 0 to 3 do
      begin
        tempBool := False;
        if(walkBetweenSymbols(['transportation'])) then
        begin
          Exit;
        end;
        if(walkBetweenSymbols(['store', 'anvil', 'archery shop'])) then
        begin
          tempBool := True;
          Break;
        end;
        if(walkBetweenSymbols(['anvil', 'archery shop'])) then
        begin
          tempBool := True;
          Break;
        end;
        if(walkBetweenSymbols(['anvil', 'magic shop'])) then
        begin
          tempBool := True;
          break;
        end;
        walkBetweenSymbols(['magic shop', 'archery shop']);
      end;
      if(not tempBool) then
        inactive('Could not find symbols');
      for i := 0 to 3 do
      begin
        tempBool := False;
        if(walkBetweenSymbols(['transportation'])) then
        begin
          tempBool := True;
          Exit;
        end;
        walkToDockColor;
      end;
      if(not tempBool) then
        inactive('could not find dock!');
    end;

    procedure removePointsByDistance(arr: tPointArray; dist: integer);
    var
      a, b, k: integer;
      tempTPA: tPointArray;
      TPA: tPointArray;
      tempBool: Boolean;
    begin
      setArrayLength(tempTPA, 0);
      for a := 0 to length(arr) - 1 do
      begin
        tempBool := False;
        for b := 0 to length(arr) - 1 do
        begin
          if(a = b) then
            Continue;
          if(distance(arr[a].x, arr[a].y, arr[b].x, arr[b].y) <= 10) then
          begin
            tempBool := True;
            Break;
          end;
        end;
        if(not tempBool) then
        begin
          setArrayLength(tempTPA, length(tempTPA) + 1);
          tempTPA[Length(TempTPA) - 1] := arr[a];
        end
        setArrayLength(TPA, 0);
        for k := 0 to length(arr)-1 do
        begin
          if((arr[k].x = arr[a].x ) and (arr[k].y = arr[a].y)) then
            Continue;
          setArrayLength(TPA, length(TPA) + 1);
          TPA[Length(TPA) - 1] := arr[k];
        end;
        arr := TPA;
      end;
      arr := TempTPA;
    end;

    procedure talkToSquire;
    var
      x, y: integer;
      i, j: integer;
      Points: array of tPoint;
      Arr: array of array of tPoint;
    begin
      for i := 0 to 20 do
      begin
        Wait(10);
        findColorsTolerance(Points, 1908000, MSX1, MSY1, MSX2, MSY2, i);
        //removePointsByDistance(Points, 5);
        arr := splitTPA10(Points);
        for j := 0 to length(Arr) - 1 do
        begin
          x := arr[j][0].x;
          y := arr[j][0].y;
          if(inRange(x, 238, 261) and inRange(y, 173, 203)) then      //remove points on player
            Continue;
          if(findColoredAreaTolerance(x, y, 1908000, x - 5, y - 5, x + 5, y + 5, 8, i)) then
          begin
            MMouse(x, y, 2, 2);
            Wait(100 + random(100));
            getMousePos(x, y);
            if(isUpText('quire')) then
            begin
              Mouse(x, y, 0, 0, True);
              wait(100 + random(100));
              fFlag(0);
              wait(1000 + random(1000));
              Exit;
            end;
          end;
        end;
      end;
    end;

    procedure say(what: array of string);           //ontinue, arrim, ontinue, ontinue
    var
      i, j: integer;
    begin
      for i := 0 to length(what) - 2 do
      begin
        for j := 0 to 30 do
        begin
          wait(100 + random(100));
          if(not clickNpcChatText(what[i])) then
          begin
            if(findNPCChatText(what[i + 1])) then
            begin
              Break;
            end;
          end else
            Break;
        end;
      end;
      //clickNPCChatText(what[i + 1]);
    end;

    procedure waitWhileOnBoat;
    begin
      repeat
        wait(10);
      until(CountColor(0, MSX1, MSY1, MSX2, MSY2) >= 75000)
    end;

    procedure walkOverPlank;
    var
      i, j: integer;
      x, y: integer;
      Points: Array of TPoint;
    begin
      {plank := BitmapFromString(19, 8, 'z78DA73731B18604017306AE3A' +
           '88D43CB460006A1BC05'); }

      {plank := BitmapFromString2(False, 'a768DF78DAC5CF410EC33008' +
           '44D12B0133186F9DD8BEFF9112B78994887555164F482CBE10B92' +
           '7B088CF6AFB69095D3BC752B7538CB9CEB3CA9F26E09D1AE20D23' +
           '5BE8829AF560B19965A059CDBE8AEE93B8BAC9120EB4AC375620C' +
           'B0DDDDA53DB6D3DF42CD6A2E4E50FBA1A4AE9DFD601850');
      if(FindDeformedBitmapToleranceIn(plank, x, y, MSX1, MSY1, MSX2, MSY2, 50, 3, True, Accuracy)) then
      begin
        Writeln('Found!');
        MMouse(x + 10, y + 10, 5, 5);
        if(isUpText('ross')) then
        begin
          getMousePos(x, y);
          Mouse(x, y, 0, 0, True);
        end;
      end;
      freeBitmap(plank); }

      for i := 0 to 30 do
      begin
        findColorsSpiralTolerance(MSCX, MSCY, Points, 3954025, MSX1, MSY1, MSX2, MSY2, i);
        for j := 0 to length(Points) - 1 do
        begin
          x := Points[j].x;
          y := Points[j].y;
          if(not (findColor(x, y, 0,  x - 7, y - 2, x + 7, y + 2))) then
          begin
            if(CountColor(0, x - 9, y - 3, x + 9, y + 2) >= 8) then
            begin
              MMouse(x, y, 5, 5);
              Wait(100 + random(100));
              if(isUpText('ross')) then
              begin
                getMousePos(x, y);
                Mouse(x, y, 0, 0, True);
                repeat
                  wait(10);
                until(CountColor(0, MSX1, MSY1, MSX2, MSY2) <= 75000)
                wait(1000 + random(1000));
                Exit;
              end;
            end;
          end;
        end;
      end;
    end;

    procedure walkToStan;
    var
      i: integer;
    begin
      repeat
        wait(10);
      until(CountColorTolerance(10123368, MSX1, MSY1, MSX2, MSY2, 20) >= 40000)
      for i := 20 downto 0 do
      begin
        if(findSymbolIn(x, y, 'transportation', MMX1, MMCY + i, MMX2, MMY2)) then
        begin
          mouseFlag(x, y, 5, 5);
          fFlag(5);
          wait(500 + random(1000));
          Exit;
        end;
      end;
    end;

    procedure talkToStan;
    var
      i, j: integer;
      x, y: integer;
      Points: array of tPoint;
    begin
      for i := 0 to 30 do
      begin
        findColorsSpiralTolerance(MSCX, MSCY, Points, 942980, MSX1, MSY1, MSX2, MSY2, i);
        for j := 0 to length(Points) - 1 do
        begin
          x := Points[j].x;
          y := Points[j].y;
          wait(10);
          if(findColoredAreaTolerance(x, y, 942980, x - 5, y - 5, x + 5, y + 5, 8, i)) then
          begin
            MMouse(x, y, 5, 5);
            Wait(100 + random(100));
            if(isUpText('rader')) then
            begin
              getMousePos(x, y);
              mouse(x, y, 0, 0, False);
              chooseOptionEx('rade');
              Exit;
            end;
          end;
        end;
      end;
    end;

    procedure randomExamine;
    var
      row, col: integer;
      x, y: integer;
      i: integer;
    begin
      i := random(20) + 1;
      row := i div 8;
      col := i - (row * 8) - 1;
      if (col < 0) then
      begin
        col := 7;
        row := row - 1;
      end;
      x := 88 + (col * 47) + Random(7);
      y := 76 + (row * 47) + Random(7);
      mouse(x, y, 0, 0, False);
      chooseOption(x, y, 'xamin');
    end;

    procedure buyAsh;
    var
      ash: integer;
    begin
      ash := BitmapFromString2(False, 'a5197978DA358A4112C0200803' +
           'BF8452408E24F5FF5FAAD636879DCCCE8AFCBB6CC1A32D46E9FE7' +
           '36CAFDB6BF7376A6865652014CA9B4E3BFED0A787478D64F22B0B' +
           '026147225954F6533ED99');
      repeat
        if(amountBMP('shop', ash, 40) > 0) then
        begin
          buyAmount(21, random(2) * 5 + 5);
        end;
        case random(10) of
          0: randomExamine;
          1: mMouse(0, 0, 764, 502);
          2: randomRClick;
          3: wait(1000 + random(100000));
        end;
      until(invFull)
      freeBitmap(ash);
      repeat
        CloseWindow;
        wait(100 + random(100));
      until(not shopScreen)
    end;

    procedure walkToBoat;
    var
      i: integer;
    begin
      for i := 20 downto 0 do
      begin
        if(findSymbolIn(x, y, 'transportation', MMX1, MMY1, MMX2, MMCY - i)) then
        begin
          mouseFlag(x, y, 5, 5);
          fFlag(5);
          wait(500 + random(1000));
          Exit;
        end;
      end;
    end;

    begin
      setupScript;
      if(not LoggedIn) then
        loginPlayer;
      highestAngle;
      walkToDock;
      i := 0;
      repeat
        talkToSquire;
        wait(500 + random(1000));
        inc(i);
      until(clickToContinue or (i >= 3))
      say(['arim', 'ontinue', 'ontinue']);
      waitWhileOnBoat;
      walkOverPlank;
      walkToStan;
      talkToStan;
      buyAsh;
      walkToBoat;
      i := 0;
      repeat
        talkToSquire;
        wait(500 + random(1000));
        inc(i);
      until(clickToContinue or (i >= 3))
      say(['outpo', 'ontinue', 'ontinue']);
      waitWhileOnBoat;
      walkOverPlank;
    end.

    problems:
    Doesnt find the plank as fast as i would like.
    Doesnt find the squire as fast as i would like.
    When talking to trader, because his name has trade in it it sometimes clicks his name, need to make a bitmap of the trade text.

    I posted this so people could work on this script if they get time, because i might not get enough time to finish it. Also you can post bugs/suggestions. Feel free to post an updated version of this.

    I can take bitmap pictures for you if you would like. I have a program that does it.

  11. #11
    Join Date
    Aug 2007
    Location
    England
    Posts
    734
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Scar divi 3.11 does it easily, just print screen, then picture to string editor, then zoom in a bunch and select what you want....
    The truth finally came out...


Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Hermpie's Adventures Item Buyer [Ardounge] [Yanixs Idea, thanks]
    By ShowerThoughts in forum RS3 Outdated / Broken Scripts
    Replies: 38
    Last Post: 08-15-2008, 05:43 PM
  2. Ardy Vial Buyer (Request/Idea)
    By SpAz in forum RS3 Outdated / Broken Scripts
    Replies: 11
    Last Post: 10-24-2007, 03:00 AM
  3. Perfect Idea for Lumbridge Flax Spinner (Screenshots!)
    By FuruChan in forum RS3 Outdated / Broken Scripts
    Replies: 31
    Last Post: 09-15-2007, 11:58 PM
  4. How to take screenshots?
    By almost in forum OSR Help
    Replies: 2
    Last Post: 05-13-2007, 11:57 PM
  5. Need Screenshots
    By arti in forum OSR Help
    Replies: 3
    Last Post: 04-22-2007, 12:46 AM

Posting Permissions

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