From: JOEbot
I was wondering if the SRL developers were considering a procedure that X-es out the Squeal of fortune button.. it couldn't be extremely hard and I was wondering whether or not it was smart for me to pursue this task myself. The squeal of fortune button gets in front of things in the script and may be beneficial to the community to be out of the way…
function ExitSquealOfFortune(): boolean;
var
w, h, x, y, xs, ys, xe, ye, tmpCTS: integer;
begin
if (SRL_ExitedSquealOfFortune) then
exit;
tmpCTS := getColorToleranceSpeed();
setColorToleranceSpeed(1);
getClientDimensions(w, h);
// green color of the goblin thing
if (findColorTolerance(x, y, 7457955, 1, 1, w - 1, h - 1, 15)) then
begin
// to avoid out of bounds warnings
xs := x;
ys := (y - 30);
if (ys < 0) then
ys := 1;
xe := (x + 100);
if (xe > w) then
xe := (w - 1);
ye := (y + 30);
if (ye > h) then
ye := (h - 1);
// gold color in the X
if (findColorTolerance(x, y, 4770302, xs, ys, xe, ye, 15)) then
begin
mouse(x, y, 3, 3, mouse_Move);
if (waitUptext('elect', 300)) then
begin
getMousePos(x, y);
mouse(x, y, 0, 0, mouse_Left);
result := true;
SRL_ExitedSquealOfFortune := true;
end;
end;
end;
setColorToleranceSpeed(tmpCTS);
end;
Taken from: C:\Simba\Includes\SRL\srl\core\antiban
Credits to Coh3n.