From: Ampd Up
I was reading the intro to the forum and one of the posts was 'How to become an SRL member'. In that post, when talking about scripts, it said to never use FindObject or MoveMouse and to make it custom. I have followed a few guides for scripting and they helped a TON but they all use those functions. I'm not really sure where to start to make my own move mouse functions and find object functions. For finding objects I've just used ACA and it also said not to use that for your SRL membership script.
I'm trying to become a better scripter so any help would be greatly appreciated!
you CAN use ACA and you are invited to use it, what you CANT use, is ACA pre-defined findObject functions.
This is an exmaple of a custom FindObject:
function undorakObjectFinder(hue, sat: extended; W, H, filterATPAmin, filterATPAmax, colour, tolerance, clickType: integer; mouseOverText, chooseOptions: array of string; bounds: Tbox): boolean;
var
x, y, i: integer;
p: Tpoint;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
if not isLoggedIn then
exit;
mainScreen.setAngle(MS_ANGLE_HIGH); //Just to be sure
//if minimap.waitPlayerMoving() then
//begin
if not (findColorsSpiralTolerance(x, y, TPA, colour, bounds, tolerance, colorSetting(2, hue, sat))) then
exit(false);
ATPA := TPA.cluster(W, H);
ATPA.filterBetween(0,4);
ATPA.filterBetween(filterATPAmin,filterATPAmax);
ATPA.sortFromMidPoint(mainscreen.playerPoint);
Antiban(1000);
if drawOnSmart then
smartImage.debugATPA(ATPA);
for i := 0 to high(ATPA) do
begin
if random(10) = 1 then
missMouse(middleTPA(ATPA[i]), true)
else mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if isMouseOverText(mouseOverText, 500) then
begin
if random(20) = 4 then
begin
fastClick(MOUSE_RIGHT);
Result := chooseOption.select(chooseoptions);
result := True;
break;
end;
fastClick(clickType);
result := True;
break;
end;
end;
if drawOnSmart then
smartImage.clearArea(mainscreen.getBounds());
Antiban(800);
claimSpinTicket();
closeAdWindow();
//end;
end;
in regards to MoveMouse, i dont really know what do you refer to, but you can use:
mouse(point, MOUSE_MOVE);
its is expected you use secure methods to do stuff, not things like:
mouse(point(150,150), mouse_move);
mouse(point(128,123), mouse_left);
mouse(point(119,188), mouse_right);
but using colours or BMP's or DTM's to find stuff, because stuff can change place and your script will be broken.