SRL Archive - OSR Outdated / Broken Scripts

Very Simple Cow Killer


Evilemporor

2013-03-02 11:34:55

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

npenfold

2013-03-02 11:40:44

Thank you

daily500

2013-03-02 14:20:17

Couldn't seem to find the cows more than twice.

Toasterss

2013-03-02 17:34:48

Not bad at all for a simple script, could definitely be built upon.

- Ignore cows already being fought
- Ignore dairy cows
- Less lag between death of a cow / finding the next one. Could sit there for 10-20 seconds after
- Not running antiban / turning on run when NOT fighting a cow, wastes a lot of time.

I'll be trying to build on it myself, i'll PM you if I come up with anything.

Evilemporor

2013-03-02 18:43:04

It does ignore the dairy cows here

if P07_ContainsText(P07_GetUpText,['airy']) = False then

@daily500 make sure the brightness is on the second notch that could be why you cant find the cows

wogtaz ryder

2013-03-03 04:00:11

I changed the colours to kill zombies , but zombies are too high a lvl for me so they dont show up when the mouse hovers over them (so it doesnt click).. is there a easy way to make it right click when it detects there colour?

Had it working sweet on rats . good simple script.

Evilemporor

2013-03-03 04:51:24

Yea, basically this if here

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;

if the random comes out at 1 it just clicks, if 2 it will right click. if you only want it to right click take out the the if and the option to left click like this.

begin
Mouse(RandomRange(X - 5, x + 5), RandomRange(y - 5, y + 5), random(5), random(5), false); //clicks it
P07_ChooseOptionMulti(['ttac']);
checkstats;
end;

augesrob

2013-03-04 19:44:15

[Hint] (34:10): Variable 'Result' never used at line 33
[Hint] (46:10): Variable 'Result' never used at line 45
Compiled successfully in 1420 ms.
Checking P07Include VersionNumber
Local : 1.7 / Latest : 1.7
You Have The Latest Version of P07Include

this suppose to log into log into 07 client?

pen123is

2013-03-17 21:56:13

Finally a script that works. <3 thank you so much

Optimus maul

2013-03-18 11:37:45

Every time i try to start the script it highlights Program Cowkiller; What do i do?:duh:

mortician

2013-07-18 19:05:36

nice

UnReaL69

2013-08-02 09:48:05

for me it doesn't log in, it makes like 2 clicks and thats all

Ashaman88

2013-11-27 14:20:04

P07include outdated. Please use official one - shoot me a PM when/if this is updated.