SRL Archive - Help and Support

SRL Stats error.


Tickyy

2010-06-27 10:32:45

Hi Guys…

i need some help, i'm pretty rusty, and i'll be on vocation after 1 July, so i thought i just release something and go.

Well here's my Script:


{------------------------------------------------------------------------------]
___________.__ __ Ver 0.40
\__ ___/|__| ____ | | __ ___.__. ___.__. ______
| | | |_/ ___\ | |/ /< | |< | | / ___/
| | | |\ \___ | < \___ | \___ | \___ \
|____| |__| \___ >|__|_ \ / ____| / ____| /____ >
\/ \/ \/ \/ \/

Varrock East Miner
By Tickyy


[------------------------------------------------------------------------------]
[- DESCRIPTION ]
[------------------------------------------------------------------------------]

Varrock east miner, works with all available ores(Copper, tin, iron).
The script is fully Colored, expect the walking is reflection.
Breaks, Progress report, TPA etc etc etc.

[------------------------------------------------------------------------------]
[ INSTRUCTIONS ]
[------------------------------------------------------------------------------]

You need the Last available revision of SRL and Reflection, Links:
[url]http://simbareflection.googlecode.com/svn/trunk/[/url]
[url]http://villavu.com/repositories/srl-opendev/[/url]

Also, Please take your time to register at :
[url]http://scriptmanager.freehostia.com/register.php[/url]
Its cool, and also keeps telling me how's the script going on...
If you need help on register and stuff then please take a look on:
[url]http://villavu.com/forum/showthread.php?p=687074[/url]

[------------------------------------------------------------------------------]
[ Credits ]
[------------------------------------------------------------------------------]

o mastaraymond, this is WIN, WIN ^_^!
o mixster
o Niki, Testing.

[------------------------------------------------------------------------------]

F.A.Q.:

Question:
Answer:

[------------------------------------------------------------------------------}

{$Define Reflection}
Program VEM;
{$i SRL/SRL/Misc/SMART.scar}
{$i SRL/SRL.Scar}
{$ifDef Reflection}
{$i SRL/SRL/Reflection/Reflection.simba}
{$EndIf}

type currentRock = record
col : TintegerArray;
tol : TintegerArray;
ColorTS : TintegerArray;
hues : TextendedArray;
sats : TextendedArray;
xp : Extended;
x : Integer;
y : Integer;
end;

Var
Rock: CurrentRock;
x, y, WaitTime, loads, ores, lvl_gained, BreakTime, Breaked, Stats_LastTime, TExp, TExpp: Integer;
TotalExp: Extended;
Reasonn, Stats_UserID, Stats_Password, Stats_ScriptID, Stats_Link, s: String;
Wielding: Boolean;
Stats_CustomVars: array [1..20] of Integer;
Stats_GlobalVars: array[1..24] of Integer;

// Setup -->
Const
ScriptVersion = '0.40';

YourStatsUserID = '453'; //User UID from scriptmanager.freehostia.com
YourStatsPass = ''; //Your pass from scriptmanager.

JoinWithFavoriteWorld = True; // Will Login using your first Favorite World(if you have one)
{/// SMART Setup ///}
WORLD = 32;
MEMBERS = false;
SIGNED = true;
{///////////////////}

procedure DeclarePlayers;
begin
HowManyPlayers := 1; // How many players declared?
CurrentPlayer := 0; // Number of player to start with.
NumberOfPlayers(HowManyPlayers);

Stats_UserID := '999';
Stats_Password := 'YourPassHere';

with Players[0] do
begin
Name := ''; // Characters full RS username.
Pass := ''; // Characters RS password.
Nick := ''; // 3 non-caps letters of char's RS username.
Active := True;
Players[0].Strings[1] := 'copper'; // Which kind of rock (tin, copper or iron.) lowercase, and only one at a time(will try to add more later)
end;

{ // Remove this if you like to try it with more then just one player
with Players[1] do
begin
Name := '';
Pass := '';
Nick := '';
Active := True;
Players[1].Strings[1] := '';
end;

with Players[2] do
begin
Name := '';
Pass := '';
Nick := '';
Active := True;
Players[2].Strings[1] := '';
end;

with Players[3] do
begin
Name := '';
Pass := '';
Nick := '';
Active := True;
Players[3].Strings[1] := '';
end;

}

end;

{==============================================================================]

- DON'T HAVE TO TOUCH ANYTHING BELOW HERE -

[==============================================================================}

Procedure MiningSetup(Which : String);
begin
case which of
'tin' : begin
rock.ColorTS := [2];
rock.col := [8355973];
rock.tol := [4];
rock.hues := [0.70];
rock.sats := [0.11];
rock.xp := 17.5;
end;

'copper':begin
rock.ColorTS := [2];
rock.col := [4154510];
rock.tol := [7];
rock.hues := [0.04];
rock.sats := [0.10];
rock.xp := 17.5;
end;

'iron' : begin
rock.ColorTS := [2];
rock.Col := [2699593];
rock.tol := [4];
rock.hues := [0.07];
rock.sats := [0.13];
rock.xp := 35;
end;
end;
end;

{*******************************************************************************
procedure Stats_CheckOutput(s: string);
By: Nielsie95.
Description: ???
*******************************************************************************}
procedure Stats_CheckOutput(s: string);
var
i: Integer;
sa: TStringArray;
begin
sa := Explode(#10, s);
for i := 0 to High(sa) do
if (Trim(sa[i]) <> '') then
if StartsWith('ERROR(1)', sa[i]) then
begin
WriteLn('STATS: "' + sa[i] + '"');
Stats_UserID := '';
Stats_Password := '';
end
else if StartsWith('ERROR(2)', sa[i]) then
begin
WriteLn('STATS: "' + sa[i] + '"');
Stats_ScriptID := '';
end
else
WriteLn('STATS: "' + sa[i] + '"');

end;

{*******************************************************************************
function Stats_GetScriptInfo(out Version, News, Link: string; out OutDated: Boolean; out LastUpdate_HoursAgo: Integer): Boolean;
By: Nielsie95.
Description: Gets script info from the online server.
*******************************************************************************}
function Stats_GetScriptInfo(out Version, News, Link: string; out OutDated: Boolean; out LastUpdate_HoursAgo: Integer): Boolean;
var
Client: Integer;
s: string;
sa: TStringArray;
begin
Result := False;
if (Stats_ScriptID = '') then
Exit;

Client := InitializeHTTPClient(False, False);
ClearPostData(Client);
AddPostVariable(Client, 'do', 'getinfo');
AddPostVariable (Client, 'sID', Stats_ScriptID);

s := PostHTTPPageEx(Client, Stats_Link);
sa := Explode(#10'GLUE'#10, s);
if (Length(sa) = 5) then
begin
Result := True;
Version := sa[0];
News := sa[1];
Link := sa[2];
OutDated := sa[3] = '1';
LastUpdate_HoursAgo := StrToIntDef(sa[4], -1);
end
else
Stats_CheckOutput(s);

FreeHTTPClient(Client );
end;

{*******************************************************************************
procedure Stats_SendReport;
By: Nielsie95.
Description: Sends global vars to server.
*******************************************************************************}
procedure Stats_SendReport;
var
i, Client, Time: Integer;
s: string;
begin
if (Stats_UserID = '') and (Stats_Password = '') and (Stats_ScriptID = '') then
Exit;

Client := InitializeHTTPClient(False, False);
ClearPostData(Client);
AddPostVariable(Client, 'do', 'submit');

Time := (GetTimeRunning - Stats_LastTime) div 1000 div 60;
if (Time < 5) then
Time := 0
else
Stats_LastTime := GetTimeRunning;
AddPostVariable(Client, 'sTime', IntToStr(Time));

if (Stats_UserID <> '') and (Stats_Password <> '') then
begin
AddPostVariable(Client, 'uID', Stats_UserID);
AddPostVariable(Client, 'uPass', Stats_Password);
end
else
begin
AddPostVariable(Client, 'uID', '-1');
AddPostVariable(Client, 'uPass', '');
end;

if (Stats_ScriptID <> '') then
begin
AddPostVariable (Client, 'sID', Stats_ScriptID);

for i := Low(Stats_CustomVars) to High(Stats_CustomVars) do
begin
AddPostVariable(Client, 'rndCustom' + IntToStr(i), IntToStr(Stats_CustomVars[i]));
Stats_CustomVars[i] := 0;
end;
end
else
begin
AddPostVariable (Client, 'sID', '-1');
end;

for i := Low(Stats_GlobalVars) to High(Stats_GlobalVars) do
begin
case i of
1: s := IntToStr(SRL_Logs - Stats_GlobalVars[i]);
2: s := IntToStr(Banks - Stats_GlobalVars[i]);
3: s := IntToStr(RandSolved[rand_Death] - Stats_GlobalVars[i]);
else if ((i - 3) < Length(RandSolved) - 1 {for Death}) then
s := IntToStr(RandSolved[i - 3] - Stats_GlobalVars[i]);
end;
AddPostVariable(Client, 'rndGlobal' + IntToStr(i), s);
Stats_GlobalVars[i] := Stats_GlobalVars[i] + StrToInt(s);
end;

s := PostHTTPPageEx(Client, Stats_Link);
Stats_CheckOutput(s);
FreeHTTPClient(Client);

if (SRL_Procs[srl_OnSendStats] <> nil) then
SRL_Procs[srl_OnSendStats]();
end;

{*******************************************************************************
procedure Stats_SendAccountInfo;
By: Nielsie95.
Description: Sends your personal player info to server.
*******************************************************************************}
procedure Stats_SendAccountInfo;
var
i, Client: Integer;
Accounts: TStringArray;
begin
if (Stats_UserID = '') and (Stats_Password = '') then
Exit;

Client := InitializeHTTPClient(False, False);
ClearPostData(Client);
AddPostVariable(Client, 'do', 'setaccounts');
AddPostVariable(Client, 'uID', Stats_UserID);
AddPostVariable(Client, 'uPass', Stats_Password);
if (Stats_ScriptID <> '') then
AddPostVariable (Client, 'sID', Stats_ScriptID)
else
AddPostVariable (Client, 'sID', '-1');

SetLength(Accounts, HowManyPlayers);
for i := 0 to HowManyPlayers - 1 do
Accounts[i] := Implode('.|&#8364;stat&#8364;|.', [Players[i].Name, Players[i].Loc, IntToStr(Integer(Players[i].Active))]);

AddPostVariable(Client, 'accInfo', Implode(#10'ACC'#10, Accounts));
Stats_CheckOutput(PostHTTPPageEx(Client, Stats_Link));
FreeHTTPClient(Client);
end;

{*******************************************************************************
procedure Stats_ManageAccounts;
By: Nielsie95.
Description: ????
*******************************************************************************}
procedure Stats_ManageAccounts;
var
i, ii, Client: Integer;
s: string;
Accounts, Stats: TStringArray;
begin
if (Stats_UserID = '') and (Stats_Password = '') then
Exit;

Client := InitializeHTTPClient(False, False);
ClearPostData(Client);
AddPostVariable(Client, 'do', 'getaccounts');
AddPostVariable(Client, 'uID', Stats_UserID);
AddPostVariable(Client, 'uPass', Stats_Password);
AddPostVariable (Client, 'sID', '-1');

s := PostHTTPPageEx(Client, Stats_Link);
Accounts := Explode(#10'ACC'#10, s);
for i := 0 to High(Accounts) do
begin
Stats := Explode('.|&#8364;stat&#8364;|.', Accounts[i]);
if (Length(Stats) = 3) then
begin
for ii := 0 to HowManyPlayers - 1 do
if (LowerCase(Players[ii].Name) = LowerCase(Stats[0])) then
begin
Players[ii].Loc := Stats[1];
Players[ii].Active := Stats[2] = '1';
Break;
end;
end
else
begin
Stats_CheckOutput(s);
Break;
end;
end;

FreeHTTPClient(Client);
stats_SendAccountInfo;
end;

Procedure Bling_Bling;
begin
ClearDebug;
Wait(1000)
WriteLN(' Varrock East Minner')
Wait(1500)
WriteLN(' Made By ')
WriteLN(' ___________ __ __ ')
Wait(250)
WriteLN(' \__ ___/|__| ____ | | __ ___ __ ___ __ ')
Wait(250)
WriteLN(' | | | |_/ ___\ | |/ /< | |< | |')
Wait(250)
WriteLN(' | | | |\ \___ | < \___ | \___ |')
Wait(250)
WriteLN(' |____| |__| \___ >|__|_ \ / ____| / ____|')
Wait(250)
WriteLN(' \/ \/ \/ \/ ')
Wait(2500);
end;

Function JoinFavoriteWorld: Boolean;
Var
x, y: integer;
B : TBox;
Begin
If(not(LobbyScreen))then
LoginPlayerToLob;
While(not(LobbyScreen)) Do (Wait(100));
Wait(2500); // Extra wait I.S.H. (Incase Shit Happens(Lag or something...))
If(FindColorTolerance(x, y, 6525549, 605, 443, 649, 478, 29))Then
Begin
Writeln('Favorite world found.');
Wait(RandomRange(1000, 1500));
B := IntToBox(610, 453, 649, 478)
MouseBox(B.X1, B.Y1, B.X2, B.Y2, 1);
While(not(LoggedIn)) Do (Wait(100));
Wait(2500); // Extra wait I.S.H. (Incase Shit Happens(Lag or something...))
Result := (LoggedIn);
If (Result) then
begin
if (SRL_Logs < 1) then
SRL_Logs := 1;
Exit
End Else
LoginPlayer;
end else
Writeln('Favorite World was not found, turning normal mode');
LoginPlayer;
end;

procedure AntiBan;
begin
case Random(140) of
0: IdleTime(2000, 1000, 0.2);
1: HoverSkill('Mining', False);
2: RandomRClick;
3: PickUpMouse;
4: RandomMovement;
5: BoredHuman;
6: MMouse(RandomRange(-100, 800), RandomRange(-100, 800), 0, 0);
7: SleepAndMoveMouse(2000+Random(1000));
8: GameTab(RandomRange(20, 36));
9: ExamineInv;
end;
end;


Procedure ProgressReport;
var
S, S2, S3, S4, Active : string;
I : Integer;
begin

S := ' ';
S2:= 'Varrock East Miner ~ By Tickyy';
S3:= 'Ver 0.40';
S4:= 'Players Report';

Writeln('');
Writeln('');
Writeln('');
WriteLn('[----------------------------------------------------------------------------]');
WriteLn('[' + padr(padl(S3, 38 + Length(S3) / 2), 76) + ']');
WriteLn('[----------------------------------------------------------------------------]');
WriteLn('[' + Padr(Padl(TheDate(2) + s + (TheTime), 38 + Length(TheDate(2) + s + TheTime) / 2), 76) + ']');
WriteLn('[----------------------------------------------------------------------------]');
WriteLn('[' + Padr(padl(S2, 38 + Length(S2) / 2), 76) + ']');
WriteLn('[----------------------------------------------------------------------------]');
WriteLn(padr('[ Total Time Running: ' + TimeRunning, 77) + ']');
WriteLn(PadR('[ Total Loads Done: ' + IntToStr(loads), 77) + ']');
WriteLn(PadR('[ Total Ores Mined and Banked: ' + IntToStr(Ores), 77) + ']');
WriteLn(PadR('[ Mining Rate: ' + IntToStr(Round((Ores * 3600) / (GetTimeRunning / 1000))) + ' Ores/Hr', 77) + ']');
WriteLn(PadR('[ Total Experience Gained: ' + FloatToStr(TotalExp), 77) + ']');
WriteLn(PadR('[ Mining Levels Gained: ' + IntToStr(lvl_Gained), 77) + ']');
WriteLn(PadR('[ The Script Breaked : ' + IntToStr(Breaked) + ' Times', 77) + ']');
WriteLn(Padr('[ Reason Why It Stopped: ' + Reasonn, 77) + ']');
WriteLn('[----------------------------------------------------------------------------]');
Writeln('[' + padr(padl(S4, 38 + Length(S4) / 2), 76) + ']');
Writeln('[----------------------------------------------------------------------------]');
Writeln(Padr('[ Player Number | Nick | Active | Loads', 77) + ']');

for i:= 0 to High(Players) do
begin
if (Players[I].Active = True) then
Active := 'T'
else
Active := 'F';
Writeln(Padr(Padr(Padr(Padr(Padr(Padr(Padr(Padr('[', 12) + (IntToStr(I)), 24) + '|', 31) + (players[I].nick), 39) + '|', 47) + (Active), 55)
+ '|', 64) + (IntToStr(Players[I].Integers[20])), 77) + ']');
end;
Writeln('[----------------------------------------------------------------------------]');
Writeln('');
end;

Procedure StopReason(TehReason : String);
begin
Reasonn := TehReason;
ProgressReport;
Wait(10);
Logout;
Wait(10);
NextPlayer(False);
if (AllPlayersInActive) then
begin
Writeln('Terminating Script');
FreeSRL;
TerminateScript;
end;
end;

Procedure DidWeLvlupp;
var
Nlvl, i : integer;
begin
if (not(LoggedIn)) then Exit;

Gametab(22);
Wait(2000);
Nlvl := GetSkillInfo('mining', False);
i := (Nlvl - Players[CurrentPlayer].Integers[10]);
if (i > 0) then
begin
Writeln(IntToSTR(i) + ' Level(s) Gained')
IncEx(lvl_gained, i);
IncEx(Players[CurrentPlayer].Integers[10], i);
Inc(Stats_CustomVars[lvl_gained])
end;
end;

Procedure TimeToLogout;
var
I: Integer;
begin
If GetSystemTime > BreakTime then
begin
FindNormalRandoms;
Inc(Breaked);
Inc(Stats_CustomVars[Breaked]);
Case Random(2) of
0: begin
I := Round(RandomRange(800000, RandomRange(1000000, 1200000)));
Logout;
Writeln('Taking a Break for: ' + IntToStr(i) + ' MiliSeconds');
Wait(i);
Writeln('Going back to work');
If (JoinWithFavoriteWorld) then
JoinFavoriteWorld
else
LoginPlayer;
end;

1: begin
I := Round(RandomRange(800000, RandomRange(1000000, 1200000)));
Writeln('Taking a Break for: ' + IntToStr(i) + ' MiliSeconds');
Wait(i);
Writeln('Going back to work');
If (JoinWithFavoriteWorld) then
JoinFavoriteWorld
else
LoginPlayer;
end;
end;
end;
end;


Function WalkMinePath: TTileArray;
begin
SetLength(Result, 18);
Result := [
Tile(3254, 3426), Tile(3261, 3428), Tile(3267, 3428),
Tile(3272, 3428), Tile(3279, 3428), Tile(3283, 3423),
Tile(3288, 3420), Tile(3288, 3416), Tile(3288, 3411),
Tile(3289, 3406), Tile(3291, 3402), Tile(3290, 3397),
Tile(3292, 3393), Tile(3292, 3388), Tile(3292, 3382),
Tile(3291, 3376), Tile(3288, 3373), Tile(3285, 3366)
];
end;

Function WalkBankPath: TTileArray;
begin
SetLength(Result, 17);
Result := [
Tile(3287, 3372), Tile(3291, 3377), Tile(3292, 3383),
Tile(3290, 3389), Tile(3292, 3396), Tile(3291, 3402),
Tile(3292, 3408), Tile(3289, 3413), Tile(3287, 3419),
Tile(3284, 3424), Tile(3280, 3425), Tile(3276, 3427),
Tile(3269, 3426), Tile(3262, 3429), Tile(3256, 3429),
Tile(3254, 3424), Tile(3254, 3420)
];
end;

Procedure WalkTo(MorB : string);
var
TTA, TTAA: TTileArray;
i, ii, Timer: integer;
begin
TTA := WalkMinePath;
TTAA := WalkBankPath
Timer := GetSystemTime;

Case MorB of

'mine' : begin
Writeln('Lets take a walk to the mine...');
Repeat

Inc(ii);

For I := 0 to High(TTA) do
begin
WalkToTile(TTA[i], RandomRange(0, 1), 1);
if(ii > 3)then
FindNormalRandoms;
end;
Wait(1000);
if(TileOnMM(Tile(3285, 3366)))then
Writeln('Mine Tile Found.');
Until(TileOnMM(Tile(3285, 3366)) or (ii > 9));
ii := 0;
If(Players[CurrentPlayer].Strings[1] = ('tin')) then
MakeCompass('s');
if(Players[CurrentPlayer].Strings[1] = ('copper')) then
MakeCompass('100');
end;

'bank' : begin
Writeln('lets take a walk to the bank');
Repeat

Inc(ii);

For I := 0 to High(TTAA) do
begin
WalkToTile(TTAA[i], RandomRange(0, 1), 1);
if(ii > 3)then
FindNormalRandoms;
end;
Wait(1000);
if(TileOnMM(Tile(3253, 3407)))then
Writeln('Bank Tile Found.');
Until(TileOnMM(Tile(3253, 3407)) or (ii > 9));
ii := 0;
end;
End;
end;

Function PickAva: Boolean;
begin
MMouse(50, 106, 0, 0);
Wait(300);
If(IsUpText('pickaxe'))then
begin
GetMousePos(x, y);
Wait(50);
Mouse(x, y, 0, 0, True);
Wait(50);
Closebank;
Result := True;
exit;
end else
CloseBank;
StopReason('No Pickaxe Was Found');
end;

Function FPick(EQorINV : String): Boolean;
begin
case EQorINV of
'eq' : begin
Gametab(26);
MMouse(584, 305, 0, 0);
Wait(2000);
If(IsUpText('pickaxe')) then
begin
Wielding := True;
Result := True;
Writeln('Pickxe found at your equipment...');
Exit;
end else
Writeln('No pickaxe found at your equipment...');
end;

'inv' : Begin
Gametab(25);
MMouseItem(1);
Wait(2000);
If(IsUpText('pickaxe')) then
begin
Wielding := False;
Result := True;
Writeln('Pickaxe found at your inventory...');
exit;
end else
Writeln('No pickaxe found at your inventory...');
end;
end;
end;

Function GetNewPickFromBank: Boolean;
var
i : Integer;
begin
FindNormalRandoms;
WriteLn('Bank searching...');

if(not(TileOnMM(Tile(3253, 3407))))then
WalkTo('bank');
for i:=1 to 4 do
begin
OpenBankFast('veb');
if ((BankScreen) or (pinScreen)) then Break;
if i=4 then
StopReason('Couldn''t find the bank!');
Wait(RandomRange(200, 500));
end;
if PinScreen then InPin(Players[CurrentPlayer].Pin);
FixBank;
DepositAll;
SearchBank('pickAxe');

PickAva
Gametab(25);
Wait(1000);
MouseItem(1, True);

Wait(RandomRange(2500, 3000));

If(IsChatBoxTextAnyLine('high enough level', clMessage))Then
StopReason('You can''t wear that pickaxe that i''ve found.')
else
Begin
Writeln('Found teh pick HA!');
Result := True;
Exit;
end;
end;


procedure Bankit;
var
i : Integer;
begin
if (not(LoggedIn)) then Exit;
FindNormalRandoms;

if(Not(TileOnMM(Tile(3253, 3407))))then
WalkTo('bank');

for i:=0 to 6 do
begin
OpenBankFast('veb');
if ((bankscreen) or (pinscreen)) then break;
if i=5 then
StopReason('Couldn''t Find The bank!');
wait(RandomRange(200, 500));
end;
FixBank;
if Wielding then
begin
IncEx(Ores, 28);
TotalExp := TotalExp + (28 * Rock.xp);
DepositAll
TExpp := Round(TotalExp);
IncEx(Stats_CustomVars[Ores], 28)
end else

begin
IncEx(Ores, 27);
TotalExp:= TotalExp + (27 * Rock.xp);
Deposit(2, 28, True);
TExpp := Round(TotalExp);
IncEX(Stats_CustomVars[TExp], Texpp);
IncEx(Stats_CustomVars[Ores], 27)
end;
Inc(loads);
Inc(Stats_CustomVars[loads]);
inc(Players[CurrentPlayer].Integers[20]);
CloseBank;
SetRun(True);
end;

Function WaitforOre : Boolean;
var
i, c : integer;
Begin
i := InvCount;
c := 0;
while((InvCount = i) and (c < 50)) do
begin
Wait(WaitTime);
c := c + 1;
if Random(9) = 1 then
Antiban;
end;
Result := ((InvCount > i) or (FindBlackChatMessage('vailable')));
FindNormalRandoms;
end;

Procedure GetStarted;
begin
if (not(LoggedIn)) then
Begin
If (JoinWithFavoriteWorld) then
JoinFavoriteWorld
else
LoginPlayer;
end;
Wait(1000);
ClearDebug;
Bling_bling;
Writeln('');
Writeln('...');
Writeln('');
Wait(1000);
If (Smart_Members = False) then
Writeln('In Hell! (You are in a free world server)!')
Else
Writeln('In Paradise! (You are in a member world server)!');
Wait(1000);
Writeln('');
Wait(900);
Writeln('Its about time to check your account...');
FindNormalRandoms;
Wait(100);
ClickNorth(true);
BreakTime := GetSystemTime + RandomRange(90000 * (40-RandomRange(4, 10)), 90000 * (40+RandomRange(4, 10)));
MiningSetup(Players[CurrentPlayer].Strings[1])
Writeln('Mining Setup...');
Wait(RandomRange(1000, 1500));
FindNormalRandoms;
GameTab(22);

Writeln('Skill Checking.....');

Wait(1000);

Players[CurrentPlayer].Integers[10] := GetSkillInfo('mining', False);
Writeln('Your Mining Level is ' + IntToStr(Players[CurrentPlayer].Integers[10]) );
if (Players[CurrentPlayer].Integers[10] > 59) then
Writeln('Nice!');
Wait(200);

Case (Players[CurrentPlayer].Integers[10]) of
1..14 : IncEx(WaitTime, 190);
15..29 : IncEx(WaitTime, 165);
30..49 : IncEx(WaitTime, 100);
50..99 : IncEx(WaitTime, 50);
end;

Wait(500);

Writeln('Pickaxe check...');
Wait(500);

If(Not(FPick('eq'))) and(not(FPick('inv'))) then
begin
Writeln('No Pick was found, Script Termination ACTIVATED!');
Wait(2000);
Writeln('Just Kidding, still got a failsafe');
GetNewPickFromBank;
end;

SetRun(True);
If(invFull)then
begin
if(not(TileOnMM(Tile(3253, 3407))))then
WalkTo('bank');
Bankit;
end;
Wait(500);
end;

Function ClickRock : Boolean;
var
Tpa, NTpa: TPointArray;
T2pa: T2DpointArray;
z, n, RX, RY: Integer;
begin
if (not(LoggedIn)) then Exit;
if (InvFull) then Exit;

Rock.x := RX;
Rock.y := RY;

for N := 0 to high(Rock.Col) do
begin
Try
ColorToleranceSpeed(Rock.ColorTS[n]);
If (Rock.ColorTS[n] = 2) then
(SetColorSpeed2modifiers(rock.hues[n], rock.sats[n]));

FindColorsTolerance(Tpa, Rock.Col[z], msx1 + 10, msy1 + 20, msx2 - 5, msy2, Rock.Tol[n]);
T2pa := TPAtoATPAEx(Tpa, 20, 20);
for z := 0 to high(T2pa) do
begin
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.04, 0.27);
FindColorsTolerance(NTpa, 1262160, T2pa[z][0].x - 12, T2pa[z][0].y - 12, T2pa[z][0].x + 12, T2pa[z][0].y + 12, 5);
T2pa[z] := combineTPA(T2pa[z], NTpa);
if (MiddleTPAex(T2pa[z], RX, RY)) then
begin
MMouse(RX, RY, 1, 1);
Wait(50 + Random(100));
If (Pos('ine', rs_getuptext) <> 0) Then
begin
Mouse(RX, RY, 0, 0, True);
Result := WaitForOre;
Wait(10);
end;
If (Not(InvFull)) then Exit;
end;
end;
Finally
ColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.2, 0.2);
end;
end;
end;

begin
Stats_ScriptID := '62';
Stats_Link := 'http://scriptmanager.freehostia.com/submit.php';
SetupSRL;
SetupReflectionEx(true);
Smart_Members := MEMBERS;
Smart_Server := WORLD;
Smart_Signed := SIGNED;
ActivateClient;
DeclarePlayers;
ClearDeBug;
Wait(2000);
GetStarted;
Repeat
WalkTo('mine');
Repeat
Wait(200);
If(Not(ClickRock))Then
FindNormalRandoms;
Until(InvFull);
DidWeLvlupp;
WalkTo('bank');
Wait(RandomRange(2000, 3000));
BankIt;
TimeToLogout;
Wait(100);
SRLRandomsReport;
Stats_SendReport;
Stats_ManageAccounts;
Wait(100);
ProgressReport;
Until(false);

Disguise('IM A BIG FAT CHEATER BAN ME PL0X!');
end.

This script is made by Tickyy, Please DO NOT Copy anything Without my permission.
If you do, then Credit Tickyy ...

Regards, Tickyy.

The error:

Error: Out Of Range at line 790
The following DTMs were not freed: [SRL - Lamp bitmap]
The following bitmaps were not freed: ……. BLA BLA BLA….

Here's the part where the error appears.


procedure Bankit;
var
i : Integer;
begin
if (not(LoggedIn)) then Exit;
FindNormalRandoms;

if(Not(TileOnMM(Tile(3253, 3407))))then
WalkTo('bank');

for i:=0 to 6 do
begin
OpenBankFast('veb');
if ((bankscreen) or (pinscreen)) then break;
if i=5 then
StopReason('Couldn''t Find The bank!');
wait(RandomRange(200, 500));
end;
FixBank;
if Wielding then
begin
IncEx(Ores, 28);
TotalExp := TotalExp + (28 * Rock.xp);
DepositAll
TExpp := Round(TotalExp);
IncEx(Stats_CustomVars[Ores], 28)
end else

begin
IncEx(Ores, 27);
TotalExp:= TotalExp + (27 * Rock.xp);
Deposit(2, 28, True);
TExpp := Round(TotalExp);
IncEX(Stats_CustomVars[TExp], Texpp); // The line
IncEx(Stats_CustomVars[Ores], 27)
end;
Inc(loads);
Inc(Stats_CustomVars[loads]);
inc(Players[CurrentPlayer].Integers[20]);
CloseBank;
SetRun(True);
end;

And tbh, the SRL stats we're copy pasted, so i am not sure how they work.

Sir R. M8gic1an

2010-06-27 10:41:50

You've set up TExp as a variable.

If you're using it as an index, you should set it up as a constant. Then all you have to make sure is that the TExp is within range.

~RM

Tickyy

2010-06-27 17:13:07

From: Rasta Magician
You've set up TExp as a variable.

If you're using it as an index, you should set it up as a constant. Then all you have to make sure is that the TExp is within range.

~RM


Working, Thx.