SRL Archive - OSR Help

please help with cow killer script


pcap

2013-03-01 21:46:21

It compiles then attacks first cow but now its saying Error: Out Of Range at line 2138
The following DTMs were not freed: [0, 1, 2, 3] and before it was saying something about a bit map error.

program Cow_Killer;

{$I SRL/SRL.Simba}
{$I SRL/SRL/Misc/Debug.Simba}
{$I P07Include.Simba}



var
x, y: Integer;
Test: Tstringarray;


Procedure P07_DeclarePlayer;
Begin
P07_PlayerName:='username';
P07_PlayerPass:='password';
End;

procedure Kill_Cow;
Begin
repeat
If P07_FindObjCustom (x,y, ['ow'], [1848381, 11975615],3) then
ClickMouse2(Mouse_left);
Wait(4500)
until(HPPercent <10);
End;

Procedure Eat_Food;
Begin
Repeat
If (HPPercent <10) then
if P07_FindObjcustom(x,y, ['rout'], [7238283], 2) then
Clickmouse2(mouse_left);
until(HPPercent > 50)
End;

begin
ClearDebug;
SetupP07Include;
P07_DeclarePlayer;
P07_LoginPlayer;
Repeat
Kill_Cow;
Eat_Food;
Until(false);

end.

Sjoe

2013-03-01 21:50:55

You're not solving your anti-leeches correctly.


Procedure Eat_Food;
Begin
Repeat
If (HPPercent <10) then
if P07_FindObjcustom(x,y, ['rout'], [7238283], 2) then
Clickmouse2(mouse_left);
until(HPPercent > 50)
End;

Check this loop eg.