Simba Code:
program new;
{$Define SMART}
{$I SRL-6/SRL.simba}
procedure declarePlayers();
begin
players.setup([''], '');
currentPlayer := 0;
end;
function FindVolunteer: Boolean;
var
i, h: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
t: TTimeMarker;
p: Tpoint;
begin
//FindColorsTolerance(TPA, 6192020, IntToBox(mainscreen.playerpoint.x - 140, mainscreen.playerpoint.y, mainscreen.playerpoint.x + 110, mainscreen.y2), 5, ColorSetting(2, 0.12, 0.31));
FindColorsTolerance(TPA, 3810166, IntToBox(mainscreen.playerpoint.x - 140, mainscreen.playerpoint.y - 70, mainscreen.playerpoint.x + 200, mainscreen.y2), 7, ColorSetting(2, 0.05, 0.18));
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]) < 50) 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
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, 6192020, IntToBox(mainscreen.playerpoint.x - 140, mainscreen.playerpoint.y, mainscreen.playerpoint.x + 110, mainscreen.y2), 5, ColorSetting(2, 0.12, 0.31));
FindColorsTolerance(TPA, 3810166, IntToBox(mainscreen.playerpoint.x - 140, mainscreen.playerpoint.y - 70, mainscreen.playerpoint.x + 200, mainscreen.y2), 7, ColorSetting(2, 0.05, 0.18));
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]) < 50) 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
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']));
end;
begin
setupSRL();
repeat
FindVolunteer;
Wait(750+Random(100));
GoThruChat;
Wait(350+Random(250));
KnockKnock;
TripleLoot;
Wait(750+Random(100));
until (False);
end.