Timer
2008-04-03 00:12:49
When Holding Down Your Mouse, SRL Is Pre-Set For Every One, Hence, If Your Normal Is Defferent, Ban?
Well. I Thought Today…
Includes\SRL\SRL\Core\Globals.scar
Includes\SRL\SRL\Core\Mouse.Scar
Includes\SRL\SRL.scar
Replaced All That? - Try It Out!
Well. I Thought Today…
Includes\SRL\SRL\Core\Globals.scar
//-----------------------------------------------------------------//
//-- Scar Standard Resource Library --//
//-- » Global Variables --//
//-----------------------------------------------------------------//
// * procedure LoadSRLBitMaps; // * by SRL Dev Team
// * procedure FreeSRLBitMaps; // * by Ron
// * procedure WaitUntilNoMouse; // * by Timer
{ const SRLVersionNumber;
Description: Repository Version Number. }
var
TalkAfterRandoms: Boolean;
{ var bmpAdmin, bmpMod, Lamp, BoxMask: Integer;
Description: Global Bitmaps. Need to be Global because of SCAR Memory leaks. }
var
bmpAdmin, bmpMod, Lamp, BoxMask: Integer;
{ var RoadColor, WaterColor, BankColor: Integer;
Description: Three variables you will almost always use. :) }
var
RoadColor, WaterColor, BankColor: Integer;
{ var LampSkill: String;
Description: Set Lamp skill. }
var
LampSkill: string;
{ const MMX1, MMY1, MMX2, MMY2;
Description: MiniMap Edge Points. }
const
MMX1 = 550;
MMY1 = 8;
MMX2 = 703;
MMY2 = 161;
{ const MMCX, MMCY;
Description: MiniMap Centre Point. }
const
MMCX = 627;
MMCY = 85;
{ const MSX1, MSY1, MSX2, MSY2;
Description: Main Screen EdgePoints. }
const
MSX1 = 1;
MSY1 = 1;
MSX2 = 516;
MSY2 = 338;
{ const MSCX, MSCY;
Description: Main Screen Centre Points. }
const
MSCX = 259;
MSCY = 170;
{ const MIX1, MIY1, MIX2, MIY2;
Description: Inventory EdgePoints. }
const
MIX1 = 547;
MIY1 = 202;
MIX2 = 737;
MIY2 = 466;
{ const MICX, MICY;
Description: Inventory Centre Points. }
const
MICX = 642;
MICY = 334;
{ const MCX1, MCY1, MCX2, MCY2;
Description: Chat Screen EdgePoints. }
const
MCX1 = 4;
MCY1 = 342;
MCX2 = 496;
MCY2 = 460;
{ const MCCX, MCCY;
Description: Chat Screen Centre Points. }
const
MCCX = 250;
MCCY = 401;
{ var MouseDownTime: Integer;
Description: Your Normal Held Down Time, Less Bannable! }
Var
MouseDownTime: Integer;
{
Var
C, D, Dar: Integer;
I: Array [0..2] Of Integer;
zContinue: String;
Description: Setting Your Mouse Time Down.
}
Var
C, D, Dar: Integer;
I: Array [0..2] Of Integer;
zContinue: String;
//****************************************************************************//
// * I tried to make these Bitmaps Local, but I got after a couple of hours
// * running scripts, CTB and DB handle errors. So sorry, declared them global
//****************************************************************************//
{*******************************************************************************
procedure LoadSRLBitMaps;
By: SRL Dev Team
Description: Loads SRL Bitmaps into memory.
*******************************************************************************}
procedure LoadSRLBitMaps;
begin
bmpMod := BitmapFromString(9, 6, 'beNqbPn0RWeDBgwdAkgEMkBnT' +
'p0+HS6GR+KVwAgAGXFQr');
bmpAdmin := BitmapFromString(9, 6, 'beNqbp/j9PwcZ6P//FiDJAA' +
'bIjGvzFOFSaCR+KZwIALniVEk=');
Lamp := BitmapFromString(6, 6, 'beNrzdWpr4a2qBCEZGQYGBkYgAr' +
'KLCnmtLKHczRtF8nJ5/f05dHVBIgYKCkAyPY3DzZUDogUoEubrBFE' +
'M4UJEIAwICvGyDgMAG0ERxQ==');
BoxMask := BitmapFromString(25, 25, 'beNpjYMAF/mMABtIBLo0km' +
'UyS7bhMJtsLyCbASQoBJUFKSeCMGjVq1KhRw94ouCFUKfFwcck2h4' +
'wqgCQHEDSZEo8QdjYABzDsFA==');
end;
{*******************************************************************************
procedure FreeSRLBitMaps;
By: Ron
Description: Frees SRL Bitmaps into memory.
*******************************************************************************}
procedure FreeSRLBitmaps;
begin
FreeBitmap(bmpMod);
FreeBitmap(bmpAdmin);
FreeBitmap(Lamp);
FreeBitmap(BoxMask);
end;
{*******************************************************************************
procedure WaitUntilNoMouse;
By: Timer
Description: Waits Until Not Mouse Buttons Are Down.
*******************************************************************************}
Procedure WaitUntilNoMouse;
Begin
If ((IsMouseButtonDown(True)) Or (IsMouseButtonDown(False))) Then
Begin
Wait(100 + Random(50));
WaitUntilNoMouse;
End;
End;Includes\SRL\SRL\Core\Mouse.Scar
//-----------------------------------------------------------------//
//-- Scar Standard Resource Library --//
//-- » Mouse Routines --//
//-----------------------------------------------------------------//
// * procedure WindMouse(xs, ys, xe, ye, gravity, wind, minWait, maxWait, maxStep, targetArea: extended) // * by BenLand100
// * procedure MMouse(x, y, rx, ry: integer); // * by BenLand100
// * procedure Mouse(mousex, mousey, ranx, rany: Integer; left: Boolean); // * by Mutant Squirrle
// * procedure SleepAndMoveMouse(Time: Integer); // * by RsN
// * procedure MouseBox(xs, ys, xe, ye: Integer; click: Integer); // * by SKy Scripter and Nielsie95
// * procedure IdleTime(Time, Rand: integer; Gravity: extended); // * by BenLand100
var
MouseSpeed: Integer;
{*******************************************************************************
procedure WindMouse(xs, ys, xe, ye, gravity, wind, minWait, maxWait, maxStep, targetArea: extended);
By: Benland100
Description:
*******************************************************************************}
procedure WindMouse(xs, ys, xe, ye, gravity, wind, minWait, maxWait, maxStep, targetArea: extended);
var
veloX, veloY, windX, windY, veloMag, dist, randomDist, lastDist, step: extended;
lastX, lastY: integer;
sqrt2, sqrt3, sqrt5: extended;
begin
sqrt2:= sqrt(2);
sqrt3:= sqrt(3);
sqrt5:= sqrt(5);
while hypot(xs - xe, ys - ye) > 1 do
begin
dist:= hypot(xs - xe, ys - ye);
wind:= minE(wind, dist);
if dist >= targetArea then
begin
windX:= windX / sqrt3 + (random(round(wind) * 2 + 1) - wind) / sqrt5;
windY:= windY / sqrt3 + (random(round(wind) * 2 + 1) - wind) / sqrt5;
end else
begin
windX:= windX / sqrt2;
windY:= windY / sqrt2;
if (maxStep < 3) then
begin
maxStep:= random(3) + 3.0;
end else
begin
maxStep:= maxStep / sqrt5;
end;
end;
veloX:= veloX + windX;
veloY:= veloY + windY;
veloX:= veloX + gravity * (xe - xs) / dist;
veloY:= veloY + gravity * (ye - ys) / dist;
if hypot(veloX, veloY) > maxStep then
begin
randomDist:= maxStep / 2.0 + random(round(maxStep) / 2);
veloMag:= sqrt(veloX * veloX + veloY * veloY);
veloX:= (veloX / veloMag) * randomDist;
veloY:= (veloY / veloMag) * randomDist;
end;
lastX:= Round(xs);
lastY:= Round(ys);
xs:= xs + veloX;
ys:= ys + veloY;
if (lastX <> Round(xs)) or (lastY <> Round(ys)) then
MoveMouse(Round(xs), Round(ys));
step:= hypot(xs - lastX, ys - lastY);
wait(round((maxWait - minWait) * (step / maxStep) + minWait));
lastdist:= dist;
end;
if (Round(xe) <> Round(xs)) or (Round(ye) <> Round(ys)) then
MoveMouse(Round(xe), Round(ye));
end;
{*******************************************************************************
procedure MMouse(x, y, rx, ry: integer);
By: Benland100
Description: Moves the mouse.
*******************************************************************************}
//Randomness is just added to the x,y. Might want to change that.
procedure MMouse(x, y, rx, ry: integer);
var
cx, cy: integer;
randSpeed: extended;
begin
randSpeed:= (random(MouseSpeed) / 2.0 + MouseSpeed) / 10.0;
if randSpeed = 0.0 then
randSpeed := 0.1;
getMousePos(cx,cy);
x:= x + random(rx);
y:= y + random(ry);
WindMouse(cx,cy,x,y,9.0,3.0,10.0/randSpeed,15.0/randSpeed,10.0*randSpeed,10.0*randSpeed);
end;
{*******************************************************************************
procedure Mouse(mousex, mousey, ranx, rany: Integer; left: Boolean);
By: Mutant Squirrle
Description: Moves then clicks mouse.
*******************************************************************************}
procedure Mouse(mousex, mousey, ranx, rany: Integer; left: Boolean);
var
a, b, c: Integer;
begin
MMouse(mousex, mousey, ranx, rany);
Wait(60 + Random(30));
GetMousePos(b, c);
HoldMouse(b + 1, c, left);
Repeat
Wait(MouseDownTime / 3 + Random(3));
a := a + 1;
Until (A >= 3);
GetMousePos(b, c);
ReleaseMouse(b, c, left);
Wait(100 + Random(100));
end;
{*******************************************************************************
procedure SleepAndMoveMouse(Time: Integer);
By: RSN
Description: Waits for specified time and moves mouse around like bored human would.
*******************************************************************************}
procedure SleepAndMoveMouse(Time: Integer);
var
Moving: Boolean;
mx, my: Integer;
x, y, xv, yv: Extended;
gx, gy: Extended;
T: Integer;
begin
GetMousePos(mx, my);
x := mx;
y := my;
if (Random(2) = 0) then
Moving := False
else
Moving := True;
gx := 130 + Random(500);
gy := 130 + Random(300);
T := GetTickCount;
repeat
Sleep(10);
if (Moving) then
begin
if (gx > x) then
xv := xv + 0.1
else
xv := xv - 0.1;
if (gy > y) then
yv := yv + 0.1
else
yv := yv - 0.1;
x := x + xv;
y := y + yv;
MoveMouse(Round(x), Round(y));
end;
if (Random(100) = 0) then
Moving := not Moving;
if (Random(30) = 0) then
begin
gx := 130 + Random(500);
gy := 130 + Random(300);
end;
until (Abs(GetTickCount - T) >= Time);
end;
{*******************************************************************************
procedure MouseBox(x1, y1, x2, y2: Integer; Click:(True, False, None));
By: SKy Scripter and Nielsie95
Description: Moves mouse into a random position in the box. Clicks if told to.
*******************************************************************************}
procedure MouseBox(x1, y1, x2, y2: Integer; ClickType: Integer);
begin
case ClickType of
1 : Mouse(RandomRange(x1, x2), RandomRange(y1, y2), 0, 0, True);
2 : Mouse(RandomRange(x1, x2), RandomRange(y1, y2), 0, 0, False);
3 : MMouse(RandomRange(x1, x2), RandomRange(y1, y2), 0, 0);
end;
end;
{*******************************************************************************
procedure IdleTime(Time, Rand: integer; Gravity: extended);
By: BenLand100
Description: Randomly moves the mouse (Rand, and Gravity) for Time milliseconds
*******************************************************************************}
procedure IdleTime(Time, Rand: Integer; Gravity: Extended);
var
H, W, Cx, Cy, i, n, St: Integer;
Controls, Path: TPointArray;
LastC, LastP: TPoint;
begin
St := GetSystemTime;
GetClientDimensions(W, H);
SetArrayLength(Controls, 4);
GetMousePos(Cx, Cy);
LastP.x := Cx;
LastP.y := Cy;
LastC.x := LastP.x + (Random(Rand * 2) - Rand)
LastC.y := LastP.y + (Random(Rand * 2) - Rand)
repeat
Controls[0].x := LastP.x;
Controls[0].y := LastP.y;
Controls[1].x := LastP.x + -(LastC.x - LastP.x);
Controls[1].y := LastP.y + -(LastC.y - lastP.y);
Controls[2].x := Controls[1].x + (Random(Rand * 2) - Rand);
Controls[2].y := Controls[1].y + (Random(Rand * 2) - Rand);
Controls[3].x := Controls[2].x + (Random(Rand * 2) - Rand);
Controls[3].x := Controls[3].x + Round(-(Controls[3].x - (W / 2)) *
(Gravity));
Controls[3].y := Controls[2].y + (Random(Rand * 2) - Rand);
Controls[3].y := Controls[3].y + Round(-(Controls[3].y - (H / 2)) *
(Gravity));
LastC.x := Controls[2].x;
LastC.y := Controls[2].y;
LastP.x := Controls[3].x;
LastP.y := Controls[3].y;
Path := MakeSplinePath(Controls, 0.01);
Path := MidPoints(Path, 5);
n := GetArrayLength(Path);
for i := 0 to n - 1 do
begin
MoveMouse(Path[i].x, Path[i].y);
Wait(Random(2) + 2);
if (GetSystemTime - St >= Time) then Break
end;
until (GetSystemTime - St >= Time)
end;Includes\SRL\SRL.scar
//----------------------------------------------------------------------------//
//-- Scar Standard Resource Library --//
//----------------------------------------------------------------------------//
//-- by: Azeroth, Bebemycat2, BenLand100, benleegt, Boreas, c0de, --//
//-- Cheesehunk, Dankness, driger1592, Flyboy, Freddy1990, --//
//-- inferno, Kernel Klink, Knightstreak, Krazy_Meerkat, Krichevskoy, --//
//-- Lorax, Mad Cow, masquerader, moparisthebest, Mutant Squirrle, --//
//-- nielsie95, phantombmx, pups, Pyro, realrune, Renax, Ron, RsN, --//
//-- Solemn wishes, Spky, SRL, Starblaster100, Stupid3ooo, Sumilion, --//
//-- tarajunky, Wizzup?, WT-Fakawi, XxKanexX, Yakman, _ChArMz....... --//
//-- --//
//-- ....... and the SRL Community. --//
//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
// -- SRL Level 1 Includes --//
// -- --//
// -- Low Level SCAR Math, Mouse Movement and Color Clicking routines. --//
//----------------------------------------------------------------------------//
{.include SRL/SRL/Core/Globals.scar}
{.include SRL/SRL/Core/Math.scar}
{.include SRL/SRL/Core/Mouse.scar}
{.include SRL/SRL/Core/Color.scar}
{.include SRL/SRL/Core/Players.scar}
//----------------------------------------------------------------------------//
// -- SRL Level 2 Includes --//
// -- --//
// -- Interface, Object and OCR routines. --//
//----------------------------------------------------------------------------//
{.include SRL/SRL/Core/Timing.scar}
{.include SRL/SRL/Core/GameTab.scar}
{.include SRL/SRL/Core/Text.scar}
{.include SRL/SRL/Core/Inventory.scar}
{.include SRL/SRL/Core/Object.scar}
//----------------------------------------------------------------------------//
// -- SRL Level 3 Includes --//
// -- --//
// -- MapWalking, AntiRandoms, Bank, Symbol and many more... --//
//----------------------------------------------------------------------------//
{.include SRL/SRL/Misc/Bitmaps.scar}
{.include SRL/SRL/Core/FlagChat.scar}
{.include SRL/SRL/Core/Login.scar}
{.include SRL/SRL/Core/Mapwalk.scar}
{.include SRL/SRL/Core/Bank.scar}
{.include SRL/SRL/Core/Symbol.scar}
{.include SRL/SRL/Core/RC.scar}
{.include SRL/SRL/Core/AutoColor.scar}
{.include SRL/SRL/Core/AntiRandoms/Common.scar}
{.include SRL/SRL/Core/Globalstats.scar}
{.include SRL/SRL/Core/CAutoRespond.scar}
{.include SRL/SRL/Core/AntiRandoms/Box.scar}
{.include SRL/SRL/Core/AntiRandoms/Certer.scar}
{.include SRL/SRL/Core/AntiRandoms/Demon.scar}
{.include SRL/SRL/Core/AntiRandoms/Frog.scar}
{.include SRL/SRL/Core/AntiRandoms/Quiz.scar}
{.include SRL/SRL/Core/AntiRandoms/Sandwich.scar}
{.include SRL/SRL/Core/AntiRandoms/EvilBob.scar}
{.include SRL/SRL/Core/AntiRandoms/ChatRandoms.scar}
{.include SRL/SRL/Core/AntiRandoms/AntiRandoms.scar}
{.include SRL/SRL/Core/AntiBan.scar}
{.include SRL/SRL/Core/Amount.scar}
{*******************************************************************************
procedure SetupSRL;
by: SRL Dev Team & Timer
Description: Sets up all variables needed to run SRL.
*******************************************************************************}
procedure SetupSRL;
begin
Repeat
WaitUntilNoMouse;
For C := 0 To 2 Do
I[C] := 0;
Writeln('Please, Click 3 Your Mouse Three Normal Times Like You Do In Runescape!');
For C := 0 To 2 Do
Repeat
While IsMouseButtonDown(True) Do
Begin
I[C] := I[C] + 1;
Wait(1);
End;
Until (I[C] > 0);
For C := 0 To 2 Do
D := D + I[C];
D := (D / 3);
WriteLn('Holding Mouse Down For ' + IntToStr(D) + ', Your Normal Mouse Millisec. Down Time. Plus A Random 0 - 9 Milliseconds!');
WriteLn('');
zContinue := Readln('Try Again? [Yes, No]');
Until ((zContinue = 'No') Or (zContinue = 'no'));
Dar := GetTimeRunning;
MouseDownTime := D;
MouseSpeed := 15;
CheckHPFirst := True;
Reincarnate := False;
TalkAfterRandoms := False;
RoadColor := 0;
WaterColor := 0;
BankColor := 0;
LampSkill := 'mining';
SetUpSRLReport;
LoadCosineArrays;
SymbolAccuracy:= 0.8;
LoadNPCArray;
LoadSRLBitMaps;
SolveChatRandoms := True;
SetupSRLAutoResponder
UseSandWichSolver := True;
UseBoxSolver := True;
UseCerterSolver := True;
UseFindmod := True;
UseFindtrade := True;
Screenshots := False;
TheFile := RewriteFile(ScriptPath + 'ChatLog.txt', False);
Writeln ('SRL Compiled in '+ IntToStr((GetTimeRunning - Dar)) + ' msec');
end;
Replaced All That? - Try It Out!
{.Include SRL\SRL.Scar}
Begin
SetupSRL;
End.