Simba Code:
program Cosher;
{$Define SMART}
{$I SRL-6/SRL.simba}
// If you are getting "nope" in your debug box, change the curly brackets to a different set of Col,Tol,Hue,Sat or make your own new set.
const
{Col = 4137326;
Tol = 5;
Hue = 0.8;
Sat = 0.20;}
Col = 3415915;
Tol = 6;
Hue = 0.05;
Sat = 0.18;
{Col = 2627188;
Tol = 5;
Hue = 0.05;
Sat = 0.18;}
procedure DeclarePlayers;
// I stole this off some random script... logs you in and stuff.
begin
setLength(players, 1);
currentPlayer := 0;
with players[0] do
begin
loginName := '';
password := '';
isMember := True;
isActive := true;
world := -1;
end;
end;
function FindVolunteer: Boolean;
var
i, h: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
t: TTimeMarker;
p: Tpoint;
begin
FindColorsTolerance(TPA, Col, MainScreen.GetBounds, Tol, ColorSetting(2, Hue, Sat));
if (Length(TPA) < 1) then
begin
Writeln('nope');
Exit;
end;
ATPA := TPA.ToATPA(20, 20);
SortATPAFromMidPoint(ATPA, Point(randomRange(mainscreen.playerpoint.x - 100, mainscreen.playerpoint.x + 100), mainscreen.playerpoint.y));
h := High(ATPA);
for i := 0 to h do
//writeln(length(atpa[i]));
begin
if (Length(ATPA[i]) < 25) then
Continue;
Mouse(ATPA[i][random(High(ATPA[i]))], MOUSE_MOVE, MOUSE_HUMAN);
if IsMouseOverText(['alk', '-to', 'vance', 'dvance', 'ickpock'], 500) then
begin
//mouse(p, mouse_Right, MOUSE_ACCURATE);
fastclick(mouse_right);
Wait(500);
chooseOption._select(['ure', 'Lure'], MOUSE_LEFT, true, 1.00, 300);
//if (not DidClick(false)) then
begin
t.Start;
Wait(300 + Random(50));
if (t.getTime > 10000) then
begin
Exit;
end;
Wait(RandomRange(1100, 1300));
Exit(True);
end;
end else
Exit;
end;
end;
procedure GoThruChat;
begin
if (conversationBox.areTalking()) then
WriteLn('GoThruChat');
conversationBox.continue(true, true);
Wait(200+Random(100));
conversationBox.continue(true, true);
Wait(500+Random(100));
end;
function KnockKnock: Boolean;
var
i, h: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
t: TTimeMarker;
begin
FindColorsTolerance(TPA, Col, MainScreen.GetBounds, Tol, ColorSetting(2, Hue, Sat));
if (Length(TPA) < 1) then
begin
Exit;
end;
ATPA := TPA.ToATPA(20, 20);
SortATPAFromMidPoint(ATPA, Point(randomRange(mainscreen.playerpoint.x - 100, mainscreen.playerpoint.x + 100), mainscreen.playerpoint.y));
h := High(ATPA);
for i := 0 to h do
//writeln(length(atpa[i]));
begin
if (Length(ATPA[i]) < 25) then
Continue;
Mouse(ATPA[i][random(High(ATPA[i]))], MOUSE_MOVE, MOUSE_HUMAN);
if IsMouseOverText(['alk', '-to', 'vance', 'dvance', 'ickpock'], 500) then
fastclick(mouse_right);
Wait(500);
chooseOption._select(['nock', '-out'], MOUSE_LEFT, true, 1.00, 300);
begin
//if (not DidClick(false)) then
begin
t.Start;
if (t.getTime > 6000) then
WriteLn('No good');
Exit(True);
end;
end;
end;
end;
procedure TripleLoot;
begin
Wait(200);
mouseBox(inttobox(345,203,399,237), MOUSE_RIGHT);
(chooseOption.select(['oot']));
mouseBox(inttobox(345,203,399,237), MOUSE_RIGHT);
(chooseOption.select(['oot']));
mouseBox(inttobox(345,203,399,237), MOUSE_RIGHT);
(chooseOption.select(['oot']));
conversationBox.continue(true, true);
end;
begin
smartPlugins := ['d3d9.dll']; // Only for DirectX
SetupSRL();
DeclarePlayers;
If Not Players[CurrentPlayer].Login Then
Players[CurrentPlayer].Login;
repeat
FindVolunteer;
Wait(550+Random(100));
GoThruChat;
//Wait(250+Random(250));
KnockKnock;
TripleLoot;
Wait(1000+Random(100));
until (False);
sixHourFix(); // Not tested, probably won't work
end.
If you need any help just hit me up. I can work on it if something is not working, didn't do much testing in DirectX- mostly used it when I had OGL. Great XP too