fearlesskiller
01-20-2012, 01:37 AM
So this is a part of my pest control script where it should attack the npcs teleporting to void knight. The only problem is that i dont know how to make it shorter, better and how to make it that its when it sees 1 of those 4 color.
procedure AttackNpc;
var x, y:integer;
begin
FindColorTolerance(x, y, 1327672, MSX1, MSY1, MSX2, MMY2, 3)
if FindColorTolerance(x, y, 1327672, MSX1, MSY1, MSX2, MMY2, 3) then
Mouse(x, y, 2, 2, True);
wait(3000+random(75));
FindColorTolerance(x, y, 2902160, MSX1, MSY1, MSX2, MSY2, 3)
if FindColorTolerance(x, y, 2902160, MMX1, MSY1, MSX2, MSY2, 3) then
Mouse(x, y, 2, 2, True);
wait(3000+random(75));
FindColorTolerance(x, y, 792070, MSX1, MSY1, MSX2, MSY2, 3)
if FindColorTolerance(x, y, 792070, MSX1, MSY1, MSX2, MSY2, 3) then
Mouse(x, y, 2, 2, True);
wait(3000+random(75));
FindColorTolerance(x, y, 3935042, MSX1, MSY1, MSX2, MSY2, 3)
if FindColorTolerance(x, y, 3935042, MSX1, MSY1, MSX2, MSY2, 3) then
Mouse(x, y, 2, 2, True);
wait(3000+random(75));
end;
procedure AttackNpc;
var x, y:integer;
begin
FindColorTolerance(x, y, 1327672, MSX1, MSY1, MSX2, MMY2, 3)
if FindColorTolerance(x, y, 1327672, MSX1, MSY1, MSX2, MMY2, 3) then
Mouse(x, y, 2, 2, True);
wait(3000+random(75));
FindColorTolerance(x, y, 2902160, MSX1, MSY1, MSX2, MSY2, 3)
if FindColorTolerance(x, y, 2902160, MMX1, MSY1, MSX2, MSY2, 3) then
Mouse(x, y, 2, 2, True);
wait(3000+random(75));
FindColorTolerance(x, y, 792070, MSX1, MSY1, MSX2, MSY2, 3)
if FindColorTolerance(x, y, 792070, MSX1, MSY1, MSX2, MSY2, 3) then
Mouse(x, y, 2, 2, True);
wait(3000+random(75));
FindColorTolerance(x, y, 3935042, MSX1, MSY1, MSX2, MSY2, 3)
if FindColorTolerance(x, y, 3935042, MSX1, MSY1, MSX2, MSY2, 3) then
Mouse(x, y, 2, 2, True);
wait(3000+random(75));
end;