SRL Archive - SRL Archives

ClickRandomQuest;


Naum

2008-09-05 11:51:31

Hello Ladies and Gentalmen,
Today I'm going to release my ClickRandomQuest anti-ban procedure which I have used a few times before:
{*******************************************************************************
Procedure ClickRandomQuest
By: NaumanAkhlaQ
Description: Goes to the quest guide and will click/ hover on quests.
Usage : gtx, gty are the Variables
Waitime is the time it will wait while in the quest guide or whilst
having a quest open.
ClickIt:
1. True = Clicks Quest, waits (waitime), back to Previous GameTab, Exits.
2. False = Doesn't click quest, hovers mouse over random one's, Exits.
Note : WaiTime is in miliseconds
*******************************************************************************}

Procedure ClickRandomQuest(gtx, gty, waitime : Integer; ClickIt : Boolean);
Label Operator;
Var OrigTab, Count3r : Integer;
Begin
OrigTab := GetCurrentTab;
Wait(200 + Random(300));
MouseBox(597, 170, 620, 199, 1);
Wait(200 + Random(30));

Case Random (4) Of
1 : Wait(1);
2 : Begin
MMouse(729, 445, 4, 4);
GetMousePos(gtx, gty);
HoldMouse(gtx, gty, True);
Wait(1000 + Random(400));
ReleaseMouse(gtx, gty, True);
end;
0, 3 : MouseBox(723, 309, 733, 432, 1);
end;

Begin
Gtx := 610;
Gty := 240;

Case Random(4) Of
0 : MMouse(Gtx - Random(7), Gty + 10 + Random(50), 10, 10);
1 : MMouse(Gtx - Random(7), Gty + 10 + Random(100), 10, 10);
2 : MMouse(Gtx - Random(7), Gty + 10 + Random(140), 10, 10);
3 : MMouse(Gtx - Random(7), Gty + 10 + Random(180), 10, 10);
end;

Wait(400 + Random(500));

If Not ClickIt Then
Goto Operator
else
GetMousePos(gtx, gty);
Begin
If IsUpText('ead') Then
Mouse(gtx, gty, 0, 0, True);

Repeat
Wait(700 + Random(300));
Count3r := Count3r + 1;
Until(GetColor(457, 286) = 2967900) Or (Count3r > 10)
If Count3r > 10 Then
Mouse(gtx, gty, 20, 20, True) //To make sure it clicks.
else
Count3r := 0;
MouseBox(460, 103, 467, 110, 3);
Wait(200 + Random(100));
GetMousePos(gtx, gty);

Repeat
HoldMouse(gtx, gty, True);
Wait(200 + Random(300));
Count3r := Count3r + 1;
Until(GetColor(463, 104) = 2967900) or (Count3r > 7);

ReleaseMouse(gtx, gty, True);
MMouse(Random(MSCX), Random(MSCY), 20, 20);
Wait(waitime + Random(987));
Begin
If FindDTM(DTMFromString('78DA63BCC4C8C0E0CD800266B6C430FC07D24' +
'01986FF40C0781AC8724655B36E6629986684F219AF03596EA86A' +
'564FCDC0541388AA26D2D71255CD294C353D153E986ABC50D5EC5' +
'95A87AAE626116A407E774255B3726A11AA9A0B98EED932AF1245' +
'0D0030AA1D53'), gtx, gty, MSX1, MSY1, MSX2, MSY2) Then
Mouse(gtx, gty, 1, 1, True);
Wait(200 + Random(300));
end;
end;
end;
If GetColor(728, 248) = 2106924 Then
Case Random(2) Of
0 : Wait(1);
else Begin
Mouse(730, 246, 2, 2, True);
Wait(300+Random(100));
end;
end;
Exit;
Operator : Begin
GetMousePos(gtx, gty);
WindMouse(gtx , gty, 616, 454, 1.5, 5.0, 1.0, 9.0, 4.0, 1.0);
If GetColor(728, 248) = 2106924 Then
Case Random(2) Of
0 : Wait(1);
else Begin
Mouse(730, 246, 2, 2, True);
Wait(300+Random(100));
end;
end;
If GameTab(OrigTab) Then
Wait(1);
end;
//WriteLn (' Done! ');
end;

Arguments are in there.

Basically it checks the quest and exits, or it will hover over a few.
Very usefull antiban procedure :).

Usage:

ClickRandomQuest(x, y, 4000, True);
GameTab(4);

Thank- you :)

jakeyboy29

2008-09-05 12:59:29

how would one go about adding this to a script?

Naum

2008-09-05 15:34:01

Paste it at the top of your script under your vars. Then call the procedure in your antiban proc.
Simple.

Nava2

2008-09-06 01:10:26

What is the point of having gTx and gTy as parameters. You never use them as that. You just use them as variables, also, you never return them so… yeah whats the point of them?

Also, I REALLY like this idea for antiban, it just needs some MAJOR refining.

P1nky

2008-09-06 01:25:51

good idea simple but worth it :)

good job naum, its like harry, makes his script hover on the music thingy :)

Naum

2008-09-06 06:15:17

@ Nava:

     Gtx := 610;
Gty := 240;

Read before you post…

Also what major improvements maybe you could be nice enough to tell me, I'd really appreciate it :)

Nava2

2008-09-06 12:04:35

I did read, but you have gTx and gTy as parameters. They aren't variable parameters and you just set them to those numbers. So, I don't get why you have them as parameters rather then just as a Local variable.

@ the improvements -

Just clean it up, its rather hard to follow atm. I think its good though. Sorry, I think I used the wrong word before, should have just said cleaned up, not refined.

I did the cleaning :).

{*******************************************************************************
Procedure ClickRandomQuest(WaitTime: integer; ClickIt : Boolean);
By: NaumanAkhlaQ
Description: Goes to the quest guide and will click/ hover on quests.
Waitime is the time it will wait while in the quest guide or whilst
having a quest open.
ClickIt:
1. True = Clicks Quest, waits (waitime), back to Previous GameTab, Exits.
2. False = Doesn't click quest, hovers mouse over random one's, Exits.
Note : WaiTime is in miliseconds
*******************************************************************************}

Procedure ClickRandomQuest(waitime : Integer; ClickIt : Boolean);

Var
gtx, gty : Integer;
OrigTab, Count3r : Byte;

Label
AntiClick;

Begin
OrigTab := GetCurrentTab;
Wait(RandomRange(200, 300));
MouseBox(597, 170, 620, 199, 1);
Wait(RandomRange(200, 250));

Case Random (4) Of
0 : Wait(1);
1 : Begin
MMouse(729, 445, 4, 4);
GetMousePos(gtx, gty);
HoldMouse(gtx, gty, True);
Wait(1000 + Random(400));
ReleaseMouse(gtx, gty, True);
end;
2, 3: MouseBox(723, 309, 733, 432, 1);
end;

Gtx := 610;
Gty := 240;

{ Case Random(4) Of
0 : MMouse(Gtx - Random(7), Gty + 10 + Random(50), 10, 10);
1 : MMouse(Gtx - Random(7), Gty + 10 + Random(100), 10, 10);
2 : MMouse(Gtx - Random(7), Gty + 10 + Random(140), 10, 10);
3 : MMouse(Gtx - Random(7), Gty + 10 + Random(180), 10, 10);
end; }

MMouse(Gtx - Random(7), Gty + 10 + Random(180), 10, 10); // Is the other needed?
Wait(RandomRange(400, 900));

If Not ClickIt Then
Goto AntiClick;
GetMousePos(gtx, gty);
If IsUpText('ead') Then {im confused what this is...}
Mouse(gtx, gty, 0, 0, True);

Repeat
Wait(RandomRange(700, 1000));
Inc(Count3r);
Until(GetColor(457, 286) = 2967900) Or (Count3r > 10)
If Count3r > 10 Then
Mouse(gtx, gty, 20, 20, True) //To make sure it clicks.
else
Count3r := 0;
MouseBox(460, 103, 467, 110, 3);
Wait(200 + Random(100));
GetMousePos(gtx, gty);

Repeat
HoldMouse(gtx, gty, True);
Wait(RandomRange(200, 500));
Inc(Count3r);
until(GetColor(463, 104) = 2967900) or (Count3r > 7);

ReleaseMouse(gtx, gty, True);
MMouse(Random(MSCX), Random(MSCY), 20, 20);
Wait(waitime + Random(987));
If FindDTM(DTMFromString('78DA63BCC4C8C0E0CD800266B6C430FC07D24' +
'01986FF40C0781AC8724655B36E6629986684F219AF03596EA86A' +
'564FCDC0541388AA26D2D71255CD294C353D153E986ABC50D5EC5' +
'95A87AAE626116A407E774255B3726A11AA9A0B98EED932AF1245' +
'0D0030AA1D53'), gtx, gty, MSX1, MSY1, MSX2, MSY2) Then
begin
Mouse(gtx, gty, 1, 1, True);
Wait(RandomRange(200, 300));
end;
If GetColor(728, 248) = 2106924 Then
Case Random(2) Of
0 : Begin
Mouse(730, 246, 2, 2, True);
Wait(RandomRange(300, 400));
end;
end;
Exit;

AntiClick :

GetMousePos(gtx, gty);
WindMouse(gtx , gty, 616, 454, 1.5, 5.0, 1.0, 9.0, 4.0, 1.0); // why use this?
If GetColor(728, 248) = 2106924 Then
Case Random(2) Of
0 : Begin
Mouse(730, 246, 2, 2, True);
Wait(300+Random(100));
end;
end;
GameTab(OrigTab);
//WriteLn (' Done! ');
end;

Edit: This does compile, haven't checked if it works though.

Naum

2008-09-06 13:54:07

Oh that, meh I really dont mind I made it so other people can use it.
But I like my standards :)

Nava2

2008-09-06 14:11:29

From: NaumanAkhlaQ
Oh that, meh I really dont mind I made it so other people can use it.
But I like my standards :)


Your standards have extra begins and ends, as well, they make it harder for others to understand your procedures.

Naum

2008-09-06 15:34:41

I have a begin before an If statement concerning SRL, I understand so do other people.

Kasi

2008-09-06 17:24:55

i put it in my script
Does It Close The Quest Thing After it opens it

Naum

2008-09-07 04:17:55

Yes it does :)