Page 1 of 2 12 LastLast
Results 1 to 25 of 30

Thread: Thieves Guild - Coshing

  1. #1
    Join Date
    Feb 2014
    Location
    Pierite Ship
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default Thieves Guild - Coshing

    Hi guys,
    This script is for coshing training in the thieves guild.
    All you have to do is get anyone (volunteer or trainer) in a tight spot (blocked in at 3 sides, can use corridors with closed doors, etc.) and do the following:

    1. Dropper their shirt / scarf colour into "SearchColour"
    2. If they are to your right set MM_DIR to MM_DIRECTION_NORTH
    3. If they are to your left set MM_DIR to MM_DIRECTION_SOUTH


    I would recommend watching this script for the first 10min to make sure it is working, as I only know of 2 people who have tested it (both successfully).
    Because of how click intensive this method of training is I would not recommend running this script for more than 3-4 hours.

    Currently the script will auto-fail if the volunteer disappears,
    this is a because the volunteer does randomly disappear when i'm not looking (tiny, tiny chance of happening).

    This started as a direct adaptation of Wu-Tang-Clans script so thanks to him for the great base script.
    All other external references are referenced in the code.

    This script has gotten me 100k exp/hr at lvl 72 thieving. The only limiter being how much you fail knockouts.

    Added more randomness by using 'mouseoval',
    please tell me if it fails to click as I've done only a little testing on it.

    Simba Code:
    program Cosher;

      {$Define SMART}
      {$I SRL-6/SRL.Simba}
      {$i srl-6/lib/misc/srlplayerform.simba}
      {$I SPS/lib/SPS-RS3.Simba}

    // -----------------------------------------------------------------------------
    // ---------          customize user values here              ------------------
    // -----------------------------------------------------------------------------
    var
      StartingXP : Integer;
      FoundColours : TPointArray;
      SortedColours : T2DPointArray;
      SearchBox : TBox;

    const
      Version := '1.1';

      MiniBreak := 20000;
      MiniBreakDelta := 15000;
      MiniBreakChance := 6;

      SessionTime := 240;

      SearchColour := 3490645;
      BirdColour := 4521983;
      ColourAdj := ColorSetting(2, 0.05, 0.18);

      MM_DIR := MM_DIRECTION_NORTH;

    // -----------------------------------------------------------------------------
    // FindVolunteer()
    //
    // Attmepts to find the trainer and lure him
    // -----------------------------------------------------------------------------
    function FindVolunteer: Boolean;
    var
      i, h: Integer;
      p: Tpoint;
    begin

      FindColorsTolerance(FoundColours, SearchColour, SearchBox, 7, ColourAdj);

      if (Length(FoundColours) < 1) then
      begin
        Writeln('Volunteer Not Found');
        Exit(false);
      end;

      SortedColours := FoundColours.ToATPA(20, 20);
      SortATPAFromMidPoint(SortedColours, Point(randomRange(mainscreen.playerpoint.x,
          mainscreen.playerpoint.x), mainscreen.playerpoint.y));

      h := High(SortedColours);

      for i := 0 to h do
      begin
        if (Length(SortedColours[i]) < 50) then
          Continue;

        Mouse(SortedColours[i][random(High(SortedColours[i]))], MOUSE_MOVE, MOUSE_HUMAN);
        if IsMouseOverText(['alk', '-to', 'Cosh', 'volun', 'teer'], 500) then
        begin
          fastclick(mouse_right);
          Wait(450+RandomRange(50,100));
          chooseOption._select(['ure', 'Lure'], MOUSE_LEFT, true, 1.00, 300);

          Wait(500+RandomRange(500,1000));
          Exit(true);
        end
        else
        begin
          Writeln('Volunteer Not Found');
          Exit(false);
        end;
      end;
    end;

    // -----------------------------------------------------------------------------
    // GoThruChat()
    //
    // If we are chatting navigate out of the chat and return true.
    // If we are not chatting (lure failed), return false.
    // -----------------------------------------------------------------------------
    function GoThruChat : Boolean;
    begin
      if (conversationBox.areTalking()) then
      begin
        conversationBox.continue(true, true);
        Wait(200+Random(100));

        conversationBox.continue(true, true);
        Wait(500+Random(100));
        Exit(true);
      end;
      Exit(false);
    end;

    // -----------------------------------------------------------------------------
    // KnockKnock()
    //
    // Attempts to knock out the trainer after he has been lured.
    // -----------------------------------------------------------------------------
    function KnockKnock: Boolean;
    var
      i, h: Integer;
      t: TTimeMarker;
    begin


      FindColorsTolerance(FoundColours, SearchColour, SearchBox, 7, ColourAdj);

      if (Length(FoundColours) < 1) then
        Exit;

      SortedColours := FoundColours.ToATPA(20, 20);
      SortATPAFromMidPoint(SortedColours, Point(randomRange(mainscreen.playerpoint.x,
          mainscreen.playerpoint.x), mainscreen.playerpoint.y));

      h := High(SortedColours);

      for i := 0 to h do
      begin
        if (Length(SortedColours[i]) < 50) then
          Continue;

        Mouse(SortedColours[i][random(High(SortedColours[i]))], MOUSE_MOVE, MOUSE_HUMAN);
        if IsMouseOverText(['alk', '-to', 'Cosh', 'volun', 'teer'], 500) then
        begin
          fastclick(mouse_right);
          Wait(500);
          chooseOption._select(['nock', '-out'], MOUSE_LEFT, true, 1.00, 300);
          Exit(true);
        end
        else
        begin
          Writeln('Volunteer Not Found');
          Exit(false);
        end;
      end;
    end;


    // -----------------------------------------------------------------------------
    // TripleLoot()
    //
    // Spam quick option selects for looting.
    // The fifth click has a 70% change of going off.
    // -----------------------------------------------------------------------------
    function TripleLoot : Boolean;
    var
      MouseX, MouseY : Integer;
    begin
      mouseSpeed := 35;
      mouseOval(365, 217, 10, 10, MOUSE_RIGHT);
      chooseOption.select(['oot']);

      mouseSpeed := 32;
      mouseOval(365, 217, 10, 10, MOUSE_RIGHT);
      chooseOption.select(['oot']);

      FindColorsTolerance(FoundColours, BirdColour, SearchBox, 8, ColourAdj);
      if (Length(FoundColours) >= 1) then
      begin
        writeln('Failed Knocking out');
        Exit(false);
      end;

      mouseSpeed := 30;
      mouseOval(365, 217, 10, 10, MOUSE_RIGHT);
      chooseOption.select(['oot']);

      mouseSpeed := 28;
      mouseOval(365, 217, 10, 10, MOUSE_RIGHT);
      chooseOption.select(['oot']);

      mouseSpeed := 25;
      mouseOval(365, 217, 10, 10, MOUSE_RIGHT);
      chooseOption.select(['oot']);

      mouseSpeed := 20;

      Exit(True);
    end;  

    // -----------------------------------------------------------------------------
    // fixScreenSettings()
    //
    // Tries to set the screen the way we want it
    // Adapted from bonsaiPowerMiner
    // -----------------------------------------------------------------------------
    procedure fixScreenSettings();
    begin
      mainscreen.setZoom(false);
      mainscreen.setangle(MS_ANGLE_HIGH);
      minimap.setAngle(MM_DIR);
    end;

    // -----------------------------------------------------------------------------
    // AntiBan()
    //
    // Performs random Anti-Ban movements
    // Adapted from limoCosher
    // -----------------------------------------------------------------------------
    procedure AntiBan;
    begin
      Case Random(200) Of
        1: begin
          writeln('Antiban activated: Hovering Thieving.');
          HoverSkill(SKILL_THIEVING);
        end;
        2: begin
          writeln('Antiban activated: Hovering random skill.');
          hoverRandomSkill();
        end;
        4: begin
          writeln('Antiban activated: MiniWait');
          Wait(2500 + random(4500));
        end;
        6: begin
          writeln('Antiban activated: PickUpMouse');
          PickUpMouse();
        end;
        7: begin
          writeln('Antiban activated: Random Movement');
          wait(randomRange(400,900));
          smallRandomMouse(randomRange(50, 230));
          wait(randomRange(400,900));
        end;
        8: begin
          writeln('Antiban activated: RandomRClick');
          mouseOffClient(OFF_CLIENT_RANDOM);
          wait(randomRange(5500, 10400));
        end;
      end;
    end;

    // -----------------------------------------------------------------------------
    // mainFunction()
    //
    // main loop that runs the program
    // -----------------------------------------------------------------------------
    var
      found, i : Boolean;
      TotalBreak, fail : Integer;
    begin
      fail := 0;
      disableSRLDebug := true;

      SetupSRL();
      fixScreenSettings();

      SearchBox := IntToBox(
                  mainscreen.playerpoint.x,
                  mainscreen.playerpoint.y-70,
                  mainscreen.playerpoint.x+200,
                  mainscreen.y2
                  );

      while (true) do
      begin
        if(fail > 10) then
        begin
          Writeln('Too many failures, Exiting');
          Break;
        end;
        if(GetTimeRunning() >= SessionTime*60000) then
        begin
          writeln('Session Ended');
          Exit();
        end;

        found := FindVolunteer();
        Wait(350+RandomRange(20,350));

        if(found = true) then
        begin
          if(GoThruChat() = true) then
          begin
            Wait(100+RandomRange(50,150));

            KnockKnock();
            Wait(700+RandomRange(50,100));

            if(TripleLoot() = true) then
            begin
              Wait(950+RandomRange(100,200));
              fail := 0;
            end
            else
              Wait(3050+RandomRange(100,400));
          end
          else
            Wait(1000+RandomRange(500,1000));
        end
        else
        begin
          fail := fail + 1;
          Writeln('Failed: ', fail, ' times');
        end;

        if(RandomRange(1,200) < MiniBreakChance) then
        begin
          TotalBreak := MiniBreak+Random(MiniBreakDelta);
          Writeln('MiniBreak Active For: ', TotalBreak, 'ms');
          Wait(TotalBreak);
        end;

        AntiBan();
      end;
    end.

    Enjoy!

    Be sure to report any bugs, this is a 'new' script.
    Last edited by Pierite; 03-05-2014 at 06:44 AM.

  2. #2
    Join Date
    Apr 2012
    Location
    Land of the Rising Sun
    Posts
    207
    Mentioned
    0 Post(s)
    Quoted
    77 Post(s)

    Default

    Working well. I had to change the search color, but that might be cause i'm using DirectX.

    Oh - and I'm thieving from the trainer. Was the original search color for the volunteers?
    My Scripts: DWT Iron Miner

  3. #3
    Join Date
    Feb 2014
    Location
    Pierite Ship
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Hi,
    That's good to know,
    Yes the original colour was for the volunteers jacket, not the trainer.
    I Should have specified.

    Glad you're enjoying it.

  4. #4
    Join Date
    Dec 2012
    Location
    London
    Posts
    22
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default

    Hey,
    Cheers for the script, love it. My only issue would be that it only ever gets one or two loots per knock-out. Could use some tightening up, but once again, thanks.

  5. #5
    Join Date
    Feb 2014
    Location
    Pierite Ship
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by gothkun View Post
    Hey,
    Cheers for the script, love it. My only issue would be that it only ever gets one or two loots per knock-out. Could use some tightening up, but once again, thanks.
    Really? O.o, what PC are you running it on, Mine always gets 2-3, never ever 1.
    Maybe you need to increase simba / runescape clients priority to high / realtime if your computer is scheduling it too slowly.

    Because I use waits between each click, it would cause the script to run much slower then intended if the scheduling was slow.

    Edit:

    I've now removed the waits, the script is consistently doing 2-3 loots for me and scheduling shouldn't make a difference (if that was the cause).
    Also removed the negative x offset on the search box since the victim will always be in front of the character and to the right.
    Last edited by Pierite; 02-27-2014 at 02:24 PM.

  6. #6
    Join Date
    May 2013
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    Working like a charm, after I picked out the advanced volunteer's scarf! The looting phase is very precise, and kind of botlike. I haven't really looked over the code, but it looks like it goes to the exact same spots each time. Thank you for the script!

  7. #7
    Join Date
    Feb 2014
    Location
    Pierite Ship
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by sculpt0r View Post
    Working like a charm, after I picked out the advanced volunteer's scarf! The looting phase is very precise, and kind of botlike. I haven't really looked over the code, but it looks like it goes to the exact same spots each time. Thank you for the script!
    You were correct! Though I didn't realise it, I thought 'mouse' did both negative and positive offsets.
    NOPE, for that I need to use mouseOval!

    Script is now updated, all 'mouse' calls are now 'mouseOval',
    Should make this much less bot like.
    I'm Bot, Ding Ding!

  8. #8
    Join Date
    May 2013
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    Now it's not clicking through the lure chat...? I.e. it's not hitting the spacebar in order to advance the lure chat phase.

  9. #9
    Join Date
    Feb 2014
    Location
    Pierite Ship
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by sculpt0r View Post
    Now it's not clicking through the lure chat...? I.e. it's not hitting the spacebar in order to advance the lure chat phase.
    Hi there!

    It seems that another part of the SRL was broken, I have submitted a bug report Here,

    You can implement the hot fix yourself if you wish,
    But one of the more experienced guys might have better values later.
    I'm Bot, Ding Ding!

  10. #10
    Join Date
    Feb 2012
    Location
    Atlanta
    Posts
    31
    Mentioned
    0 Post(s)
    Quoted
    18 Post(s)

    Default

    yeah same problem as sculpt0r. Had to change the color on the scarf, zoomed all the way in, trapped him, but fails at lure loop. just keeps clicking lure w/o progressing through chat. Hope SRL will have a fix soon!
    Salute Me or Shoot Me!

  11. #11
    Join Date
    Feb 2013
    Posts
    45
    Mentioned
    0 Post(s)
    Quoted
    23 Post(s)

    Default

    nice script
    It works reasonably well for me (crashes every hour or so because of lag and such i think)

    Any chance you could add progress reports?

  12. #12
    Join Date
    Mar 2013
    Location
    Shaolin
    Posts
    863
    Mentioned
    24 Post(s)
    Quoted
    519 Post(s)

    Default

    Grats on release, I have to update mine still
    You have permission to steal anything I've ever made...

  13. #13
    Join Date
    Jan 2014
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Hi, all works fine up till clicking on the trainer to loot him. It clicks on the top of the wall on the right instead.

  14. #14
    Join Date
    Jan 2011
    Posts
    151
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    I managed to get it working by changing the loot potion mouse click to :

    function TripleLoot : Boolean;
    var
    MouseX, MouseY : Integer;
    begin
    mouseSpeed := 35;
    mouseOval(280, 280, 10, 10, MOUSE_RIGHT);
    chooseOption.select(['oot']);

  15. #15
    Join Date
    Dec 2011
    Posts
    134
    Mentioned
    1 Post(s)
    Quoted
    20 Post(s)

    Default

    Currently getting about 120k/h at 86 thieving, great script.
    One of the only scripts I don't feel the need to check on every 5 minutes, as I have never seen it fail

  16. #16
    Join Date
    Apr 2012
    Posts
    31
    Mentioned
    1 Post(s)
    Quoted
    11 Post(s)

    Default

    I'm having the problem where the script won't move past the 'lure' dialog. Has anyone implemented a successful fix for this yet?

  17. #17
    Join Date
    Feb 2012
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Great script man! I only get one loot per knock out, seems to click too fast. Could be my computer or something, but other then that it works great.

  18. #18
    Join Date
    Aug 2012
    Posts
    52
    Mentioned
    1 Post(s)
    Quoted
    28 Post(s)

    Default

    whats the min. requirement lvl for this to work?

  19. #19
    Join Date
    Jun 2012
    Posts
    122
    Mentioned
    0 Post(s)
    Quoted
    40 Post(s)

    Default

    Does not work, even after picking the color myself.

  20. #20
    Join Date
    Jan 2012
    Location
    New Zealand
    Posts
    331
    Mentioned
    4 Post(s)
    Quoted
    94 Post(s)

    Default

    Working as of 8/28/14 . Thank you
    Current Rank Supreme Master First Class

  21. #21
    Join Date
    Aug 2012
    Posts
    52
    Mentioned
    1 Post(s)
    Quoted
    28 Post(s)

    Default

    works pretty good!

    first tries were not so long maybe 30 min then failed. 1-2 loots at a time

    but now its running great! its been 2 hours now and it loots 2-3

    started out from 40 and now im 59!

    thx!

  22. #22
    Join Date
    May 2014
    Posts
    633
    Mentioned
    8 Post(s)
    Quoted
    322 Post(s)

    Default

    This script still runs wonderfully, but the volunteer disappearing happens more often than I would like is there a way or place where it happens least often? I usually trap in the alleyway on the left.

  23. #23
    Join Date
    Aug 2012
    Posts
    52
    Mentioned
    1 Post(s)
    Quoted
    28 Post(s)

    Default

    yezzz

    made it to lvl 75! ran it for a hole day! (babysitting) it can fail sometimes but that was not a problem for me, got my lvl i wanted ^^

    thx for this awesome script! will use it again!

  24. #24
    Join Date
    Sep 2014
    Posts
    112
    Mentioned
    5 Post(s)
    Quoted
    55 Post(s)

    Default

    I assume no changes will come to this script based off the author's last activity. Anyways, this script seems to run anywhere from 5 minutes up to a few hours if I'm lucky.

    For no reason at all it will fail after it right clicks and then just say it can't find the volunteer. Any suggestions on how to fix, apart from obviously fixing the bot when I check it the next time.

  25. #25
    Join Date
    Aug 2014
    Location
    Michigan, USA
    Posts
    138
    Mentioned
    1 Post(s)
    Quoted
    68 Post(s)

    Default

    Having issues!

    Spent a good 3 hours setting up for this script.

    Start script, and it doesnt even bother looking for Volenteer.

    Updates colors using ACA.

    It only wants to Right click and loot x3.

    Wont lure or knock out.. :/

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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