PDA

View Full Version : need help adding in something



Roos4life
02-09-2019, 01:32 AM
hello guys, i have a question, i got a Spawnpk Zulrah Bot, But they implemented a afk guardian, i tryd adding in the clicker for it, but it doesnt click the afk guardian when it spawns, need help with it. need a good programmer,
how can i make it to click the afk guardian.


function isAFKpatrol(): boolean;
var
TPA: TPointArray;
begin
Result := FindTextIn(TPA, 'patrol guard', 'SmallChars07', 0, MSBOXCB2);
end;

function Clickcontinue(): Boolean;
var
TPA: TPointArray;
begin
if FindTextIn(TPA, 'ontinue', 'SmallChars07', 16711680, MSBOXCB3) then
begin
OffsetTPA(TPA, Point(4, 4));
Mouse(TPA[0], MOUSE_LEFT);
writeln('completed afk guy');
end;
end;

function HiddenGuard(): Boolean;
var
x, y,x1,y1:Integer;
c: Int32;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
FindColorsTolerance(TPA, 7383487, 89, 95, 389, 295, 19);
ATPA := ClusterTPA(TPA, 5);
FilterTPAsBetween(ATPA, 0, 25);
FilterTPAsBetween(ATPA, 300, 100000);
SortATPASize(ATPA, True);
if (Length(ATPA) < 1) then
begin
Exit();
end;
middleTPAEx(ATPA[0], x, y);
//top
x1 := (x) ;
y1 := (y+2);
writeln('try top');
MoveMouse(x1, y1);
wait(700, 750);
if IsUpText('Talk') then
begin
FastClick(MOUSE_LEFT);
Didfind := true;
writeln('clicked afk guy');
end;
if IsKeyDown(STOP_KEY) then TerminateScript();
end;

function AFKpatrol(): Boolean; //65535 yello
var
x, y:Integer;
c: Int32;
TPA: TPointArray;
ATPA: T2DPointArray;
Bounds:Tbox;
begin
FindColorsTolerance(tpa, 1315862, 15, 94, 476, 356, 5);
ATPA := ClusterTPA(TPA, 1);
Didfind := false;
SortATPASize(ATPA, True);
if (Length(ATPA) < 1) then
begin
writeln('Didnt find him');
HiddenGuard();
end;
if (Length(ATPA) >= 1) then
begin
middleTPAEx(ATPA[0], x, y);
movemouse(x,y);
if IsUpText('Talk') then
begin
FastClick(MOUSE_LEFT);
Didfind := true;
writeln('clicked afk guy');
end;
end;
if Didfind = true then
begin
Clickcontinue();
exit();
end;
if IsKeyDown(STOP_KEY) then TerminateScript();
end;



this is what i added help me fix it pleas

Hastega
02-09-2019, 03:25 AM
Wrap your code in "["SIMBA"] "["/SIMBA"]" tags
function isAFKpatrol(): boolean;
var
TPA: TPointArray;
begin
Result := FindTextIn(TPA, 'patrol guard', 'SmallChars07', 0, MSBOXCB2);
end;

function Clickcontinue(): Boolean;
var
TPA: TPointArray;
begin
if FindTextIn(TPA, 'ontinue', 'SmallChars07', 16711680, MSBOXCB3) then
begin
OffsetTPA(TPA, Point(4, 4));
Mouse(TPA[0], MOUSE_LEFT);
writeln('completed afk guy');
end;
end;

function HiddenGuard(): Boolean;
var
x, y,x1,y1:Integer;
c: Int32;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
FindColorsTolerance(TPA, 7383487, 89, 95, 389, 295, 19);
ATPA := ClusterTPA(TPA, 5);
FilterTPAsBetween(ATPA, 0, 25);
FilterTPAsBetween(ATPA, 300, 100000);
SortATPASize(ATPA, True);
if (Length(ATPA) < 1) then
begin
Exit();
end;
middleTPAEx(ATPA[0], x, y);
//top
x1 := (x) ;
y1 := (y+2);
writeln('try top');
MoveMouse(x1, y1);
wait(700, 750);
if IsUpText('Talk') then
begin
FastClick(MOUSE_LEFT);
Didfind := true;
writeln('clicked afk guy');
end;
if IsKeyDown(STOP_KEY) then TerminateScript();
end;

function AFKpatrol(): Boolean; //65535 yello
var
x, y:Integer;
c: Int32;
TPA: TPointArray;
ATPA: T2DPointArray;
Bounds:Tbox;
begin
FindColorsTolerance(tpa, 1315862, 15, 94, 476, 356, 5);
ATPA := ClusterTPA(TPA, 1);
Didfind := false;
SortATPASize(ATPA, True);
if (Length(ATPA) < 1) then
begin
writeln('Didnt find him');
HiddenGuard();
end;
if (Length(ATPA) >= 1) then
begin
middleTPAEx(ATPA[0], x, y);
movemouse(x,y);
if IsUpText('Talk') then
begin
FastClick(MOUSE_LEFT);
Didfind := true;
writeln('clicked afk guy');
end;
end;
if Didfind = true then
begin
Clickcontinue();
exit();
end;
if IsKeyDown(STOP_KEY) then TerminateScript();
end;

I'm assuming your issue is it's not actually clicking on the NPC? Are you sure your colors are correct?

You probably need to keep ACA up and keep collecting colors.

Roos4life
02-09-2019, 03:42 AM
hey could ya maybe help me? u got discord? add me STAFFERMAN#4442 ineed ur help

Roos4life
02-09-2019, 03:46 AM
and yes the issue is its not clicking the npc yes

Roos4life
02-09-2019, 04:32 AM
bro pleas

Hastega
02-09-2019, 09:19 PM
I'm a bit busy, you can follow along this guide (https://villavu.com/forum/showthread.php?t=118229).

StickToTheScript
02-10-2019, 02:14 AM
It could just be a problem with the colours selected for the NPC that you are attempting to find. Try using the ACA tool to get the colours again and place them in their respective locations in the script.

Roos4life
02-10-2019, 05:01 PM
could ya help me in any way? pleas

StickToTheScript
02-10-2019, 08:00 PM
could ya help me in any way? pleas

As already mentioned, take some time to look through this guide. (https://villavu.com/forum/showthread.php?t=118229) There is the section on colour finding that you want to look at.

imalama101
02-14-2019, 01:33 PM
I have a fixed copy, also none of this script makes sense without my logic/context behind it.

imalama101
02-14-2019, 01:44 PM
This guy shouldn't be helped or ever trusted from previous experience. He is a user and known scammer. This is from my zulrah script.