PDA

View Full Version : Very Simple Cow Killer



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

npenfold
03-02-2013, 04:40 PM
Thank you

daily500
03-02-2013, 07:20 PM
Couldn't seem to find the cows more than twice.

Toasterss
03-02-2013, 10:34 PM
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
03-02-2013, 11:43 PM
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
03-03-2013, 09:00 AM
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
03-03-2013, 09:51 AM
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
03-05-2013, 12:44 AM
[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
03-18-2013, 01:56 AM
Finally a script that works. <3 thank you so much

Optimus maul
03-18-2013, 03:37 PM
Every time i try to start the script it highlights Program Cowkiller; What do i do?:duh:

mortician
07-18-2013, 11:05 PM
nice

UnReaL69
08-02-2013, 01:48 PM
for me it doesn't log in, it makes like 2 clicks and thats all

Ashaman88
11-27-2013, 07:20 PM
P07include outdated. Please use official one - shoot me a PM when/if this is updated.