Evilemporor
03-02-2013, 04:34 PM
Hi guys,
I just put together this script, I haven't written for RS for years so I used a few elements from one of the Woodcutting scrips so props for them for helping me remember a few things.
Very simple cow killer, does NOT eat, it doesn't care what cow it attacks so it will attack other players cows (I will get this fixed when I have time)
No anti leach because its very simple
I have only tested it at the cows below Falador.
I'm really looking forward to creating some MUCH better scripts in the future when some official includes are released.
program CowKiller;
{$I SRL/SRL.Simba}
{$I P07Include.Simba}
Procedure P07_DeclarePlayer;
Begin
P07_PlayerName:='';
P07_PlayerPass:='';
end;
procedure WaitHumanClick;
begin
case random(600) of
1..450: Wait(RandomRange(0, 100));
451..570: Wait(RandomRange(0, 200));
571..590: Wait(RandomRange(0, 600));
591..600: Wait(RandomRange(400, 1100));
end;
end;
procedure TurnOnRun;
var x, y: integer;
begin
Mouse(671, 482, random(5), random(5), true);
WaitHumanClick;
if(FindColorTolerance(x, y, 4803917, 651, 422, 659, 430, 10)) then
begin
Mouse(640, 426, random(5), random(5), true);
end;
Mouse(644, 184, random(5), random(5), true);
end;
Function AntiBan: Boolean;
begin
case random(100) of
0: P07_HoverSkill('strength', random(5000));
1: TurnOnRun;
2: P07_MakeCameraAngleLow;
3: P07_MakeCompassSouth;
4: P07_MakeCompassEast;
5: P07_MakeCompassWest;
end;
end;
Function checkstats: Boolean;
begin
case random(10) of
0: P07_HoverSkill('strength', random(5000));
1: P07_HoverSkill('hitpoints', random(5000));
end;
end;
Function isFighting: Boolean;
var
PBox: TBox;
begin
PBox := IntToBox(245, 130, 285, 195);
Result := (AveragePixelShift(PBox, 250, 2000) > 100);
end;
procedure killCow;
var x, y: integer;
begin
P07_MakeCameraAngleHigh;
P07_MakeCompassNorth;
If P07_FindObjCustom(x, y, ['ow'], [4087173,3620426,10725806,2175559,3620426,3620426], 3) Then
begin
WaitHumanClick;
MMouse(x, y, Random(2), Random(2));
WaitHumanClick;
if P07_ContainsText(P07_GetUpText,['airy']) = False then
begin
GetMousePos(x, y);
if(random(2) = 1) then
begin
Mouse(RandomRange(X - 5, x + 5), RandomRange(y - 5, y + 5), random(5), random(5), True);
checkstats;
end
else
begin
Mouse(RandomRange(X - 5, x + 5), RandomRange(y - 5, y + 5), random(5), random(5), false); //clicks it
P07_ChooseOptionMulti(['ttac']);
checkstats;
end;
end
end
else
end;
begin
P07_DeclarePlayer;
SetupP07Include;
ActivateClient;
If (Not P07_LoggedIn) Then
begin
P07_LogInPlayer;
end;
P07_MakeCameraAngleHigh;
P07_MakeCompassNorth;
TurnOnRun;
repeat
antiBan;
if isFighting = False then
killCow;
until (not P07_LoggedIn)
end.
Thanks
I just put together this script, I haven't written for RS for years so I used a few elements from one of the Woodcutting scrips so props for them for helping me remember a few things.
Very simple cow killer, does NOT eat, it doesn't care what cow it attacks so it will attack other players cows (I will get this fixed when I have time)
No anti leach because its very simple
I have only tested it at the cows below Falador.
I'm really looking forward to creating some MUCH better scripts in the future when some official includes are released.
program CowKiller;
{$I SRL/SRL.Simba}
{$I P07Include.Simba}
Procedure P07_DeclarePlayer;
Begin
P07_PlayerName:='';
P07_PlayerPass:='';
end;
procedure WaitHumanClick;
begin
case random(600) of
1..450: Wait(RandomRange(0, 100));
451..570: Wait(RandomRange(0, 200));
571..590: Wait(RandomRange(0, 600));
591..600: Wait(RandomRange(400, 1100));
end;
end;
procedure TurnOnRun;
var x, y: integer;
begin
Mouse(671, 482, random(5), random(5), true);
WaitHumanClick;
if(FindColorTolerance(x, y, 4803917, 651, 422, 659, 430, 10)) then
begin
Mouse(640, 426, random(5), random(5), true);
end;
Mouse(644, 184, random(5), random(5), true);
end;
Function AntiBan: Boolean;
begin
case random(100) of
0: P07_HoverSkill('strength', random(5000));
1: TurnOnRun;
2: P07_MakeCameraAngleLow;
3: P07_MakeCompassSouth;
4: P07_MakeCompassEast;
5: P07_MakeCompassWest;
end;
end;
Function checkstats: Boolean;
begin
case random(10) of
0: P07_HoverSkill('strength', random(5000));
1: P07_HoverSkill('hitpoints', random(5000));
end;
end;
Function isFighting: Boolean;
var
PBox: TBox;
begin
PBox := IntToBox(245, 130, 285, 195);
Result := (AveragePixelShift(PBox, 250, 2000) > 100);
end;
procedure killCow;
var x, y: integer;
begin
P07_MakeCameraAngleHigh;
P07_MakeCompassNorth;
If P07_FindObjCustom(x, y, ['ow'], [4087173,3620426,10725806,2175559,3620426,3620426], 3) Then
begin
WaitHumanClick;
MMouse(x, y, Random(2), Random(2));
WaitHumanClick;
if P07_ContainsText(P07_GetUpText,['airy']) = False then
begin
GetMousePos(x, y);
if(random(2) = 1) then
begin
Mouse(RandomRange(X - 5, x + 5), RandomRange(y - 5, y + 5), random(5), random(5), True);
checkstats;
end
else
begin
Mouse(RandomRange(X - 5, x + 5), RandomRange(y - 5, y + 5), random(5), random(5), false); //clicks it
P07_ChooseOptionMulti(['ttac']);
checkstats;
end;
end
end
else
end;
begin
P07_DeclarePlayer;
SetupP07Include;
ActivateClient;
If (Not P07_LoggedIn) Then
begin
P07_LogInPlayer;
end;
P07_MakeCameraAngleHigh;
P07_MakeCompassNorth;
TurnOnRun;
repeat
antiBan;
if isFighting = False then
killCow;
until (not P07_LoggedIn)
end.
Thanks