SRL Archive - RS3 Outdated / Broken Scripts

Thieves Guild - Coshing


Pierite

2014-02-24 15:02:06

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.


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.

Thief

2014-02-26 09:54:58

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?

Pierite

2014-02-27 01:27:08

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.

gothkun

2014-02-27 03:18:21

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.

Pierite

2014-02-27 08:40:05

From: gothkun
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.

sculpt0r

2014-02-28 02:11:18

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!

Pierite

2014-03-05 01:41:31

From: sculpt0r
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.

sculpt0r

2014-03-05 18:03:03

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.

Pierite

2014-03-06 01:54:55

From: sculpt0r
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.

seniorjulio

2014-03-16 13:59:12

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!

freeplay

2014-03-22 10:37:58

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?

Wu-Tang Clan

2014-03-22 12:12:30

Grats on release, I have to update mine still :)

aliasisthis

2014-03-28 18:13:48

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.

boobooo42

2014-04-04 02:09:03

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']);

stu

2014-04-18 05:37:48

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

jarofhearts

2014-06-28 21:33:54

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

rhino_king

2014-07-25 03:34:40

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.

Nicodemus

2014-08-06 10:21:11

whats the min. requirement lvl for this to work?

Mr. Roboto

2014-08-08 00:45:39

Does not work, even after picking the color myself.

Note

2014-08-27 10:57:34

Working as of 8/28/14 . Thank you

Nicodemus

2014-08-28 12:21:51

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 :D

started out from 40 and now im 59!

thx!

J_R

2014-08-28 21:10:40

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.

Nicodemus

2014-08-30 02:36:44

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!

cbrems

2014-09-22 00:11:37

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.

xSorrels

2014-10-13 21:46:34

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.. :/

The Mayor

2014-10-13 21:53:49

From: xSorrels
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.. :/


Must be because it was written 8 months ago :s

xSorrels

2014-10-13 22:05:16

From: The Mayor
Must be because it was written 8 months ago :s


Lmao, makes sense. -.-

I need to learn. :duh:

Ashaman88

2014-10-13 22:30:45

confirmed outdated?

cbrems

2014-10-21 08:37:21

yes, i can confirm

Ashaman88

2014-10-21 08:55:39

Moved to outdated. PM me if/when this is updated