SCAR Code:
program New;
{.include srl/srl.scar}
{.include srl/srl/skill/fighting.scar}
var
x,y,i,TheRoadColor,cowskilled: integer;
cowcolor: array [0..3] of integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 4;
CurrentPlayer := 0;
NumberOfPlayers(HowManyPlayers);
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := true;
Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := '';
Players[1].Active := False;
Players[2].Name := '';
Players[2].Pass := '';
Players[2].Nick := '';
Players[2].Active := False;
Players[3].Name := '';
Players[3].Pass := '';
Players[3].Nick := '';
Players[3].Active := False;
end;
function randclick(item , option:string): boolean;
begin
if isuptext(item) then
begin
case random(4) of
0,1,2: mouse(x,y,10,10,true);
3: begin
mouse(x,y,10,10,false);
chooseoption(option);
end;
end;
Result := true;
end;
end;
procedure killdacow;
begin
Writeln('now to own some cows');
CowColor[0] := 12238787;
CowColor[1] := 2307389;
CowColor[2] := 9812173;
CowColor[3] := 2765117;
if not(loggedin) then Exit;
makecompass('s');
setangle(true);
if findcolortolerance(x,y,Cowcolor[i],0,0,518,339,4) then
begin
mmouse(x,y,10,10);
wait(100);
if isuptext('ow')=true then
begin
randclick('ow','ttack');
flag;
wait(100+random(1000));
if infight then
begin
repeat
wait(500);
until (not(InFight));
end;
cowskilled:=cowskilled+1
end;
wait(500);
end;
end;
//stolen off men_tal's script, thanks bud
procedure CollectHide;
var hidebmp:integer;
var acc:extended;
begin
hidebmp := BitmapFromString(6, 5, 'z78DA7331747674767419522400C' +
'8192CA7');
FindDeformedBitmapToleranceIn( hidebmp, x, y, MSX1, MSY1, MSX2, MSY2, 20, 1, True, acc)
if acc >= 0.9 then
begin
mouse(x, y, 0, 0, false);
ChooseOption('ide');
freebitmap(hidebmp)
end;
end;
procedure ToPen;
var
z:integer;
begin
Z:=0
Makecompass('n');
TheRoadColor := findfallyroadColor;
Wait(500);
if radialwalk(TheRoadColor,180,270,40,1,1) then
begin
wait(500);
end else Exit;
repeat
radialroadwalk(TheRoadColor,165,200,50,1,1);
Writeln('lalala');
wait(200);
until(findsymbolin(x,y,'tree',628,8,704,165));
mouse(x + 10,y,10,5,true);
flag;
if findcolortolerance(x,y,235,628,8,705,117,20) then
begin
mouse(x,y + 5,5,5,true);
flag;
wait(500);
end;
if findcolorSpiraltolerance(x,y,5467001,0,0,516,338,10) then
begin
randclick('ate','pen');
Z:= Z + 1;
end else exit;
end;
procedure ToBank;
begin
end;
begin
SetupSRL;
activateclient;
declareplayers;
if not(loggedin) then loginplayer;
Cowskilled:=0
repeat
ToPen;
repeat
KilldaCow;
collecthide;
until(invfull);
until(false);
end.