SCAR Code:
{*******************************************************************************
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;