SRL Archive - SRL Snippets

[Antiban] HoverMovingObject


Olly

2013-01-13 16:31:06

I know Flight did something like this but i came up with this and then remembered Flights…. Regardless maybe it will help someone out.
What it does is split the screen up into boxes, then measures the pixelshift over 150ish ms and hovers the biggest shift area (will also ignore your player).

procedure HoverMovingObject;
var
TBA: tboxarray;
TIA: tintegerarray;
i, L: integer;
Rows: Integer;
ATPA, ATPA2: T2DPointArray;
Player, TPA: TPointArray;
begin
if not (LoggedIn) then
Exit;

// if actionbar is open we dont need track it
if (IsActionBarOpen) then
Rows := 13
else
Rows := 16;

TBA := Grid(27, Rows, 19, 20, 19, 20, Point(13, 14));
TIA := PixelShiftMulti(TBA, 150 + Random(100));
TPAFromBoxWrap(IntToBox(232, 194 - SRL_NAVBAR_INGAME_Y, 289, 254 - SRL_NAVBAR_INGAME_Y), Player);

for i := 0 to High(TBA) do
if TIA[i] > 5 then
begin
Inc(L);
SetArrayLength(ATPA, L + 1);
TPAFromBoxWrap(TBA[i], ATPA[L]);
end;

MergeATPAWrap(ATPA, TPA);
ClearTPAFromTPAWrap(TPA, Player, TPA);
SplitTPAExWrap(TPA, 1, 1, ATPA2);
SortATPASize(ATPA2, True);

if Length(ATPA2) > 1 then
begin
MouseTBox(GetTPABounds(ATPA2[0]), Mouse_Move);
if Random(2) = 1 then
if WaitUpTextMulti(['option', 'tion'], 60 + Random(60)) then
WaitOptionMulti(['xamine', 'ancel'], 60 + Random(60));
end;
end;

Ian

2013-01-13 16:33:06

This would be incredibly useful for so many things, thank you! +

Could even be used as antiban, just hovering moving things out of curiosity

Kevin

2013-01-13 16:37:09

Nice. This could be pretty useful.