Frt
2009-02-08 05:59:11
Hi guys.
I'm currently working on a reflection cowkiller, but I really can't figure out to click the cow every time. I tried the ClickNPC function in the D-Include but that seems to be missing almost all the time.
This is my current Cow Finder procedure:
Quite simple but I couldn't figure out a better way to do it. :)
Can you guys please give me a hint on how to click the cow everytime instead of just sometimes?
I'm currently working on a reflection cowkiller, but I really can't figure out to click the cow every time. I tried the ClickNPC function in the D-Include but that seems to be missing almost all the time.
This is my current Cow Finder procedure:
procedure CowFinder;
var
i: integer;
a: array of TNPC;
tp: TPoint;
begin
a := GetNPCsByID(81);
for i := 0 to High(a) do
begin
if (not (a[i].InFight)) then
begin
WalkToTile(a[i].Tile, 2, 2);
R_FFlag(0);
if (FindObjCustom(x, y, ['Cow', 'ow', 'Co'], [4018778, 9870498], 4)) then
begin
MMouse(x, y, 4, 4);
if (IsUpText('ttack')) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, true);
Wait(2500 + Random(500));
if (AreWeInteracting(b)) then
begin
repeat
AntiBan;
Wait(500 + Random(500));
until(not(AreWeInteracting(b)));
Players[CurrentPlayer].Integers[1] := Players[CurrentPlayer].Integers[1] + 1;
CKills := CKills + 1;
Report(False);
end;
Break;
end;
end;
end;
end;
end;Quite simple but I couldn't figure out a better way to do it. :)
Can you guys please give me a hint on how to click the cow everytime instead of just sometimes?