purerange86
2014-01-20 16:34:59
Hey, I am coding a nmz script that I'll be releasing to the public. I currently have this procedure:
It's functional but there's gotta be a better way to do this. Anyone able to show me how?
procedure drinkpray;
begin
if finddtm(pray1,x,y,mix1,miy1,mix2,miy2) then begin
mouse(x+randomrange(-4,4),y+randomrange(-8,3),1,1,true);
end else if finddtm(pray2,x,y,mix1,miy1,mix2,miy2) then begin
mouse(x+randomrange(-4,4),y+randomrange(-8,3),1,1,true);
end else if finddtm(pray3,x,y,mix1,miy1,mix2,miy2) then begin
mouse(x+randomrange(-4,4),y+randomrange(-8,3),1,1,true);
end else if finddtm(pray4,x,y,mix1,miy1,mix2,miy2) then begin
mouse(x+randomrange(-4,4),y+randomrange(-8,3),1,1,true);
end else if findcolortolerance(10933076,x,y,744,488,904,738,3) then begin
mmouse(x,y,1,1);
wait(133+random(222));
if isuptext('rink') then clickmouse2(mouse_left);
end else writeln('no more pray');
end;
It's functional but there's gotta be a better way to do this. Anyone able to show me how?