Eye of Newt Buyer

Discussion in 'Outdated RS Scripts' started by crapkiller, Apr 14, 2007.

Eye of Newt Buyer
  1. Unread #1 - Apr 14, 2007 at 7:29 PM
  2. crapkiller
    Joined:
    Jul 19, 2006
    Posts:
    426
    Referrals:
    0
    Sythe Gold:
    0

    crapkiller Forum Addict

    Eye of Newt Buyer

    Here is my 4th SRL script. And by far the best.

    UPDATE: i fixed the indenting and made the bitmaps smaller.


    NOTE: thx town for telling me bout BankScreen

    Please rate out of 10 ? (please keep in mind this is my 4th SRL script and only 2nd to be even partially working)

    All you have to do to start it is setup the player nick and stuff and set 2 colors.


    Features​

    • Multi-Players
    • Anti-Randoms
    • RadialRoadWalk
    • Some failsafes
    • Etc.

    Here it is.

    NOTE: can anyone who knows tell me if my indenting is right? Its the first time i tried indenting.

    Code:
    program New;
    {.include SRL\SRL.scar}
    
    
    //  Thanks to Nielsie95 for helping me get the road colors =D
    
    Const
    GPColor = 2149883; //The color of the coins in your bank
    BankSymbolColor = 5691881; // The color of the bank symbol on the MiniMap(this is a failsafe)
    
    Var mage, Bankx, Banky, Eyes, Loads, Gp :integer;
    Var Lost :Boolean;
    
    Procedure DeclarePlayers;
    begin
      HowManyPlayers := 3;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
    
      Players[0].Name := '';
      Players[0].Pass := '';
      Players[0].Nick := ''; //3 - 4 letters of YOUR username, example: zima
      Players[0].Active := True;
      Players[0].Integer1 := 100; //Amount of loads
      Players[0].String1 := 'Mining'; //What skill to pick for lamp
    
      Players[1].Name := '';
      Players[1].Pass := '';
      Players[1].Nick := ''; //3 - 4 letters of YOUR username, example: zima
      Players[1].Active := True;
      Players[1].Integer1 := 100; //Amount of loads
      Players[1].String1 := 'Mining'; //What skill to pick for lamp
    
      Players[2].Name := '';
      Players[2].Pass := '';
      Players[2].Nick := ''; //3 - 4 letters of YOUR username, example: zima
      Players[2].Active := True;
      Players[2].Integer1 := 100; //Amount of loads
      Players[2].String1 := 'Mining'; //What skill to pick for lamp
    end;
    
    Procedure LoadBmps;
    begin
    
      mage := BitmapFromString(38, 15, 'z78DAD5964B0A80300C44AF54' +
           '4D11DD6BEF7F244137959861623FD42EB28821CC6B3E35AE7288A' +
           '4B4AD53BA6DBC3CDA3E62B618240E610DB5587FB80E15330E29C1' +
           '9BEBD7D5D45F076584BC9A02DB9E8C1F6784E843C66329615479E' +
           '343761C798879CC335B8CDAAFE32D55DE7826CFCB6D54DA397C6F' +
           'B7F65B7D5BC2C8D4E5C78C4EF6FF32329BB9456F3B7657A6F331A' +
           'DC64B8A63023C785B62163E8FB5732ADBE277B0F2FBDB8251F312' +
           'FFBD9D1817D9656E4E0DE717F764850ADE8C1D49F9C92DE9C613C' +
           'E97D9EB');
    
    end;
    
    Procedure AntiRandoms;
    begin
      FindNormalRandoms;
      FindLamp(Players[CurrentPlayer].String1);
    end;
    
    
    Procedure StartBank;
    begin
      Bankx := 105 + random(5);
      Banky := 175 + random(5);
      repeat
        MMouse(Bankx, Banky, 5, 5);
        Banky := Banky + 10;
        Wait(100);
        If (Banky > 363) then
        begin
          Bankx := Bankx + 50;
          Banky := 175;
        end;
      Until(IsUpText('Bank booth') = True);
      Mouse(Bankx, Banky, 1, 1, False);
      Wait(1000+Random(500));
      ClickOption('Use-quickly', 1);
      repeat
        Wait(500);
      until(BankScreen);
      FindColorTolerance(x, y, GPColor, 69, 63, 465, 294, 10);
      Mouse(x, y, 1, 1, False);
      wait(100+random(100));
      ClickOption('Withdraw X', 1);
      wait(1000+random(200));
      TypeSend('1000');
      Wait(200+random(500));
      CloseBank;
    end;
    
    Procedure Walk2Shop;
    begin
      PerfectNorth;
      Setrun(True);
      If(Not(RadialRoadWalk(FindFallyRoadColor, 270, 180, 50, 1, 1)))then
      begin
        Mouse(MMCX-20, MMCY+40, 5, 5, True);
        Flag;
      end;
      AntiRandoms;
      Flag;
      If(Not(RadialRoadWalk(FindFallyRoadColor, 200, 160, 50, 1, 1)))then
      begin
        Mouse(MMCX, MMCY+50, 5, 5, True);
        Flag;
      end;
      AntiRandoms;
      Flag;
      If(Not(RadialRoadWalk(FindFallyRoadColor, 200, 160, 50, 1, 1)))then
      begin
        Mouse(MMCX+10, MMCY+50, 5, 5, True);
        Flag;
      end;
      AntiRandoms;
      Flag;
      FindRoadColor;
      If(Not(RadialRoadWalk(RoadColor, 90, 200, 50, 1, 1)))then
      begin
        Mouse(MMCX, MMCY+50, 5, 5, True);
        Flag;
      end;
      AntiRandoms;
      Flag;
      If(Not(RadialRoadWalk(RoadColor, 120, 200, 50, 1, 1)))then
      begin
        Mouse(MMCX, MMCY+50, 5, 5, True);
        Flag;
      end;
      AntiRandoms;
      Flag;
      If(Not(RadialRoadWalk(RoadColor, 120, 200, 50, 1, 1))) then
      begin
        Mouse(MMCX+20, MMCY+50, 5, 5, True);
        Flag;
      end;
      AntiRandoms;
      Flag;
      If(Not(RadialRoadWalk(RoadColor, 120, 200, 50, 1, 1))) then
      begin
        Mouse(MMCX+20, MMCY+50, 5, 5, True);
        Flag;
        FindSymbol(x, y, 'magic shop');
        Mouse(x, y, 1, 1, True);
        Flag;
        repeat
          FindColorTolerance(x, y, 3801403, 0, 0, 492, 324, 5);
          MMouse(x, y, 1, 1);
          Wait(100+random(100));
        until(IsUpText('Betty') = True);
        Mouse(x, y, 1, 1, False);
        Wait(100+random(200));
        ClickOption('Trade', 1);
        repeat
          Wait(500);
          x := x + 1;
          If(x = 20) then
          begin
            repeat
              FindColorTolerance(x, y, 3801403, 0, 0, 492, 324, 5);
              MMouse(x, y, 1, 1);
              Wait(100+random(100));
            until(IsUpText('Betty') = True);
            Mouse(x, y, 1, 1, False);
            Wait(100+random(200));
            ClickOption('Trade', 1);
          end;
        until(FindBitmap(mage, x, y) = True);
        exit;
      end;
      AntiRandoms;
      Flag;
      RadialRoadWalk(RoadColor, 90, 180, 50, 1, 1);
      Flag;
      AntiRandoms;
      RadialRoadWalk(RoadColor, 220, 180, 50, 1, 1);
      Flag;
      AntiRandoms;
      RadialRoadWalk(RoadColor, 270, 180, 50, 1, 1);
      Flag;
      AntiRandoms;
      FindSymbol(x, y, 'magic shop');
      Mouse(x, y, 1, 1, True);
      Flag;
      repeat
        FindColorTolerance(x, y, 3801403, 0, 0, 492, 324, 5);
        MMouse(x, y, 1, 1);
        Wait(100+random(100));
      until(IsUpText('Betty') = True);
      Mouse(x, y, 1, 1, False);
      Wait(100+random(200));
      ClickOption('Trade', 1);
      repeat
        Wait(500);
        x := x + 1;
        If(x = 20) then
        begin
          repeat
            FindColorTolerance(x, y, 3801403, 0, 0, 492, 324, 5);
            MMouse(x, y, 1, 1);
            Wait(100+random(100));
          until(IsUpText('Betty') = True);
          Mouse(x, y, 1, 1, False);
          Wait(100+random(200));
          ClickOption('Trade', 1);
        end;
      until(FindBitmap(mage, x, y) = True);
    end;
    
    Procedure Buy;
    begin
      FindColorTolerance(x, y, 11737620, 0, 0, 515, 334, 10);
      Mouse(x, y, 1, 1, False);
      ClickOption('Buy 10', 1);
      Wait(100+random(200));
      Mouse(x, y, 1, 1, False);
      ClickOption('Buy 10', 1);
      Wait(100+random(200));
      Mouse(x, y, 1, 1, False);
      ClickOption('Buy 10', 1);
      Wait(100+random(200));
      Mouse(485, 40, 1, 1, True);
    end;
    
    Procedure Walk2Bank;
    begin
      FindRoadColor;
      If(Not(RadialRoadWalk(RoadColor, 0, 90, 50, 1, 1)))then
      begin
        Mouse(MMCX+30, MMCY-50, 5, 5, True);
        Flag;
      end;
      AntiRandoms;
      Flag;
      If(Not(RadialRoadWalk(RoadColor, 300, 390, 50, 1, 1)))then
      begin
        Mouse(MMCX-40, MMCY-50, 5, 5, True);
        Flag;
      end;
      AntiRandoms;
      Flag;
      If(Not(RadialRoadWalk(RoadColor, 270, 390, 50, 1, 1)))then
      begin
        Mouse(MMCX-50, MMCY, 5, 5, True);
        Flag;
      end;
      AntiRandoms;
      Flag;
      If(Not(RadialRoadWalk(RoadColor, 300, 390, 50, 1, 1)))then
      begin
        Mouse(MMCX, MMCY-50, 5, 5, True);
        Flag;
      end;
      AntiRandoms;
      Flag;
      If(Not(RadialRoadWalk(RoadColor, 300, 390, 50, 1, 1)))then
      begin
        Mouse(MMCX, MMCY-50, 5, 5, True);
        Flag;
      end;
      AntiRandoms;
      Flag;
      RadialRoadWalk(RoadColor, 300, 390, 50, 1, 1);
      Flag;
      AntiRandoms;
      RadialRoadWalk(RoadColor, 300, 390, 50, 1, 1  );
      Flag;
      AntiRandoms;
      If(Not(RadialRoadWalk(FindFallyRoadColor, 330, 370, 50, 1, 1)))then
      begin
        Mouse(MMCX, MMCY-50, 5, 5, True);
        Flag;
      end;
      AntiRandoms;
      Flag;
      If(Not(RadialRoadWalk(FindFallyRoadColor, 330, 370, 50, 1, 1)))then
      begin
        Mouse(MMCX, MMCY-50, 5, 5, True);
        Flag;
      end;
      AntiRandoms;
      Flag;
      If(Not(RadialRoadWalk(FindFallyRoadColor, 330, 370, 50, 1, 1)))then
      begin
        Mouse(MMCX, MMCY-50, 5, 5, True);
        Flag;
      end;
      AntiRandoms;
      Flag;
      If(Not(FindSymbol(x, y, 'bank')))then
      begin
        If(Not(FindColorTolerance(x, y, 5691881, MMX1, MMY1, MMX2, MMY2, 10)))then
        begin
          Lost := True;
          Exit;
        end;
      end;
      Mouse(x, y, 1, 1, True);
      Flag;
    end;
    
    Procedure EndBank;
    begin
      Bankx := 105 + random(5);
      Banky := 175 + random(5);
      repeat
        MMouse(Bankx, Banky, 5, 5);
        Banky := Banky + 10;
        Wait(100);
        If (Banky > 363) then
        begin
          Bankx := Bankx + 50;
          Banky := 175;
        end;
      Until(IsUpText('Bank booth') = True);
      Mouse(Bankx, Banky, 1, 1, False);
      Wait(1000+Random(500));
      ClickOption('Use-quickly', 1);
      repeat
        Wait(500);
      Until(BankScreen);
      FindColorTolerance(x, y, 11737620, 559, 209, 625, 230, 10);
      Mouse(x, y, 5, 5, False);
      PopUp('Store All');
      Wait(200+random(500));
      FindColorTolerance(x, y, GPColor, 559, 209, 625, 230, 10);
      Mouse(x, y, 5, 5, False);
      PopUp('Store All');
      Wait(200+random(500));
      CloseBank;
    end;
    
    Procedure ProggyReport;
    begin
         Eyes := Loads * 28;
         Gp := Eyes * 3;
         Writeln('----------Crapkillers Eye of Newt Buyer----------');
         Writeln('Worked for ' + TimeRunning);
         Writeln('Bought ' + IntToStr(Loads) + ' Loads of Eyes');
         Writeln('Bought About ' + IntToStr(Eyes) + ' Eye of Newts');
         Writeln('Spent about ' + IntToStr(Gp) + ' Coins');
         Writeln('-------------------------------------------------');
         SRLRandomsReport;
    end;
    
    begin
      SetupSRL;
      DeclarePlayers;
      NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
      LoginPlayer;
      Lost := False;
      ActivateClient;
      Wait(3000);
      PerfectNorth;
      LoadBmps;
      repeat
        repeat
          PerfectNorth;
          AntiRandoms;
          StartBank;
          Walk2Shop;
          If(Lost = True) then Break;
          Buy;
          Walk2Bank;
          If(Lost = True) then Break;
          EndBank;
          Loads := Loads + 1;
          ProggyReport;
        until(Loads = Players[CurrentPlayer].Integer1);
        If(Lost = True) then
        begin
          Writeln(Players[CurrentPlayer].Name + ' is lost, switching to next player...');
          NextPlayer(False);
        end;
        If(Lost = False) then
        begin
          Writeln(Players[CurrentPlayer].Name + ' has finished his/her loads, switching players...');
          If(Players[CurrentPlayer].Active = True) then NextPlayer(True);
          If(Players[CurrentPlayer].Active = False) then NextPlayer(False);
        end;
      until(False);
    end.

    Because this is the first version there are bound to be bugs. If your player gets stuck or something happens to stop the flow of things tell me so i can try to fix it.
     
  3. Unread #2 - Apr 14, 2007 at 7:37 PM
  4. Abu.
    Joined:
    Mar 23, 2007
    Posts:
    177
    Referrals:
    0
    Sythe Gold:
    0

    Abu. Active Member
    Banned

    Eye of Newt Buyer

    i might give it a shot
     
  5. Unread #3 - Apr 14, 2007 at 8:40 PM
  6. Town
    Joined:
    Jan 21, 2007
    Posts:
    3,776
    Referrals:
    3
    Sythe Gold:
    5

    Town Grand Master
    Scar Programmers

    Eye of Newt Buyer

    The LampSkill Random is in FindNormalRandoms and the LampSkill is in SetupSRL so you don't need either of those. You probably don't need a bitmap for finding the bank, it isn't all that hard. Your scripting is somewhat inconsistent, I'm guessing you had a good bit of help.
     
  7. Unread #4 - Apr 14, 2007 at 8:53 PM
  8. crapkiller
    Joined:
    Jul 19, 2006
    Posts:
    426
    Referrals:
    0
    Sythe Gold:
    0

    crapkiller Forum Addict

    Eye of Newt Buyer

    No actually i didnt. I learned the FindRandoms from a tut. and FindFallyRoadColor from nielsie(something like that) and the MMCX im not sure where i learned. But thats all. The only direct help i had (not counting tuts) was FindFallyRoadColor. I guess im just an inconsistent person lol.


    EDIT: isnt there some kind of command that checks if bank is open?
     
  9. Unread #5 - Apr 14, 2007 at 9:02 PM
  10. Town
    Joined:
    Jan 21, 2007
    Posts:
    3,776
    Referrals:
    3
    Sythe Gold:
    5

    Town Grand Master
    Scar Programmers

    Eye of Newt Buyer

    If(BankScreen) Then

    BankScreen results true if the bank is open.
     
  11. Unread #6 - Apr 14, 2007 at 9:09 PM
  12. crapkiller
    Joined:
    Jul 19, 2006
    Posts:
    426
    Referrals:
    0
    Sythe Gold:
    0

    crapkiller Forum Addict

    Eye of Newt Buyer

    Sweet. Thanks.
     
  13. Unread #7 - Apr 15, 2007 at 7:56 AM
  14. jizzums666
    Joined:
    Mar 22, 2007
    Posts:
    165
    Referrals:
    0
    Sythe Gold:
    0

    jizzums666 Active Member

    Eye of Newt Buyer

    any progress reports :D...
    and i love you for ever if it works <3
     
  15. Unread #8 - Apr 15, 2007 at 1:11 PM
  16. jizzums666
    Joined:
    Mar 22, 2007
    Posts:
    165
    Referrals:
    0
    Sythe Gold:
    0

    jizzums666 Active Member

    Eye of Newt Buyer

    Ok i checked it out. Have set 3 chars to run around but all 3 got lost pretty fast(like in 2-7 loads each)- they are sometimes getting lost on teh road

    BUT THE SCRIPT HAS A GREAT POTENTIAL!!! Keep up the good work.

    <3 and waiting for improvements
     
  17. Unread #9 - Apr 16, 2007 at 5:39 PM
  18. crapkiller
    Joined:
    Jul 19, 2006
    Posts:
    426
    Referrals:
    0
    Sythe Gold:
    0

    crapkiller Forum Addict

    Eye of Newt Buyer

    Do you know where exactly they got lost?
     
  19. Unread #10 - Apr 21, 2007 at 6:01 PM
  20. pkd so fast
    Referrals:
    0

    pkd so fast Guest

    Eye of Newt Buyer

    Okay well ive gotten this far, i only want to use 1 person and i set the colors. all its doing it closing the SCAR page and then nothing happens?

    [​IMG]
     
  21. Unread #11 - Apr 22, 2007 at 5:01 PM
  22. crapkiller
    Joined:
    Jul 19, 2006
    Posts:
    426
    Referrals:
    0
    Sythe Gold:
    0

    crapkiller Forum Addict

    Eye of Newt Buyer

    Fill your name in name := 'here'
    fill your pass in pass := 'here'
    fill 3 r 4 letters of your name in nick := 'here'

    And also, it starts in falador not drynor.
     
  23. Unread #12 - Apr 22, 2007 at 9:43 PM
  24. xSlaughteRx
    Joined:
    Apr 21, 2007
    Posts:
    270
    Referrals:
    0
    Sythe Gold:
    0

    xSlaughteRx Forum Addict
    Banned

    Eye of Newt Buyer

    what are eye of newts for anyway.. if your a non-member sides the quest
     
  25. Unread #13 - Apr 24, 2007 at 10:53 PM
  26. Sorrowstfu
    Joined:
    Apr 24, 2007
    Posts:
    754
    Referrals:
    0
    Sythe Gold:
    0

    Sorrowstfu Apprentice

    Eye of Newt Buyer

    I don't think its any good for non members Slaughter =(!
     
  27. Unread #14 - Apr 28, 2007 at 11:58 AM
  28. Abu.
    Joined:
    Mar 23, 2007
    Posts:
    177
    Referrals:
    0
    Sythe Gold:
    0

    Abu. Active Member
    Banned

    Eye of Newt Buyer

    they are used for making attack and super attack potions. The only use i f2p is the Imp Catcher quest, which you only need one
     
  29. Unread #15 - Apr 30, 2007 at 4:00 PM
  30. akwardsaw5
    Referrals:
    0

    akwardsaw5 Guest

    Eye of Newt Buyer

    [​IMG]

    it keeps saying that and i have no clue whats wronge =p just tell me what to fix on line 27
     
  31. Unread #16 - Aug 10, 2007 at 4:23 AM
  32. DarkMasta
    Referrals:
    0

    DarkMasta Guest

    Eye of Newt Buyer

    Hi there,

    Does this script actually work ??? I cant get it to work no matter how hard I tried...

    Oh and tells me that it tries to access the log file in scar folder or something, is that normal ??

    Whats up ??
     
  33. Unread #17 - Aug 10, 2007 at 12:06 PM
  34. redfox
    Referrals:
    0

    redfox Guest

    Eye of Newt Buyer

    They are 150-250gp each... thats a really good script if only it would work :)
     
  35. Unread #18 - Aug 10, 2007 at 2:41 PM
  36. DarkMasta
    Referrals:
    0

    DarkMasta Guest

    Eye of Newt Buyer

    Did anyone try it yet ??

    I wanna know :)
     
  37. Unread #19 - Aug 14, 2007 at 2:59 AM
  38. kedrot
    Joined:
    May 25, 2005
    Posts:
    22
    Referrals:
    0
    Sythe Gold:
    0

    kedrot Newcomer

    Eye of Newt Buyer

    Script complies and logs in. Nothing happens after. I have the latest version of Scar divi and SRL. Ive updated that bank.scar file to fix that update jagex made with banking. Nobody has actually confirmed this script still works..can somebody besides me try it and see if it worked for them?
     
  39. Unread #20 - Aug 14, 2007 at 6:05 AM
  40. unkn0wn
    Joined:
    Feb 25, 2006
    Posts:
    473
    Referrals:
    0
    Sythe Gold:
    0

    unkn0wn Forum Addict
    Banned

    Eye of Newt Buyer

    Bah, just realised that the script would only run at fally bank, not draynor >.<
     
< Ashur2good And Haxor's MonkBSER | Stop Autoing Untill SRL is tweaked >

Users viewing this thread
1 guest


 
 
Adblock breaks this site