Code:
program MonkFighter;
{.include srl/srl.scar}
{.include srl/srl/skill/fighting.scar}
const MissedColor = 16728128;
const HitColor = 192;
//////SETUP///////////////////////////////////////////////////////////////////////
Const //
MonkColor = 12172221; //color of the monks robes //
Betweentime = 5000; //Time between finding monks (in millisecs) //
FoodColor = 1598653; //color of the food you are using //
tokill = 20; // //
//////////////////////////////////////////////////////////////////////////////////
Var killed:Integer;
function FindMonk: Boolean;
begin
if(FindColorSpiral(x,y,MonkColor,5,5,760,495)) then
Result:= True;
end;
Function InFightAt(x, y: Integer):Boolean;
var
dx, dy: Integer;
begin
if ( FindColor(dx, dy, GreenStatusColor, x - 20, y - 10, x + 20, y + 10) or
FindColor(dx, dy, RedStatusColor, x - 20, y - 10, x + 20, y + 10) or
FindColor(dx, dy, MissedColor, x - 20, y - 10, x + 20, y + 10) or
FindColor(dx, dy, HitColor, x - 20, y - 10, x + 20, y + 10) ) then
Result:=True;
end;
Begin
SetUpSRL;
ActivateClient;
MouseSpeed := 8;
repeat
if(findmonk) then
begin
if(not infightat(x,y)) then
begin
mouse(x,y,2,2,True);
killed := killed + 1;
end;
end;
flag;
wait(100);
repeat
wait(random(100));
until(not infight)
until (killed >= tokill)
end.
hope this helps ive got to go now but ill explain the changes later.