Code:
program MonsterKiller;
{.include SRL/SRL.scar}
function IsInFight:Boolean;
var
x,y,screenDTM:Integer;
begin
screenDTM := DTMFromString('mggAAAHicY2NgYPBkZGBIAuILQPwIiHcAcQUQuwDlIoE4CogdgNgCiC2B+ECxIMPBEhGG7WlCDNszBBhONYoznKwXY1AGymHDjDgwBAAAYO8NxQ==');
Result := FindDtm(screenDTM,x,y,0,0,600,500);
end;
function ClickMonster:Boolean;
var
x,y,MonsterLeft,MonsterRight,MonsterLeftBack,MonsterRightBack:Integer;
begin
Result := True;
MonsterLeft := DTMFromString();
if(not(FindDtm(MonsterLeft,x,y,0,0,600,500)))then
begin
MonsterRight := DTMFromString();
if(not(FindDtm(MonsterRight,x,y,0,0,600,500)))then
begin
MonsterLeftBack := DTMFromString();
if(not(FindDtm(MonsterLeftBack,x,y,0,0,600,500)))then
begin
MonsterRightBack := DTMFromString();
if(not(FindDtm(MonsterRightBack,x,y,0,0,600,500)))then
begin
Result := False;
end;
end;
end;
end;
freeDTM(MonsterLeft);
If (Result) then
begin
Mouse(x,y,1,1,True);
Mouse(x,y,1,1,True);
end;
end;
var
Tries:Integer;
begin
wait(2000);
SetupSRL;
repeat
wait(50);
repeat
wait(100);
until(ClickMonster);
Tries := 0;
repeat
inc(Tries);
if(Tries > 100) then
break;
wait(100);
until(not(IsInFight));
until(false);
end.
Just fill in the desired monster DTMs. Don't forget to use some tollerance. You can make your own DTMs by going to view, extensions, and enable the DTM tool. Then go to tools and click on the DTM tool. Chose a tollerance (10-25) and click 10 times on the monster on different parts with unique colors. copy the DTMs in the fight function, and voilla!