Log in

View Full Version : SRL Essence Miner 1.13 error



pengu
06-03-2007, 10:31 PM
im trying to use wizzups SRL Essence Miner 1.13 on scar2.03 with srl 3.6 but i keep getting this error

Failed when compiling
Line 758: [Error] (20460:12): Unknown identifier 'GetColors' in script C:\Documents and Settings\Coleman family\Desktop\rs\SRL Essence Miner 1.13 Public.scar

im a noob and dont no what to do to get it to work can someone help also the search function thing doesnt work on my computer on this website so i could not search for the solution for myself

also does anyone know what version of scar and what version of srl is ideal for running this script

edit: heres the script im using

program EssMiner;
{.include SRL/SRL.scar}
{.include SRL/SRL/Skill/Mining.scar}
{.include SRL/SRL/misc/trade.scar}

{
"Stars, Hide your fires, Let not light see my black and deep desires.
The eye wink at the hand; Yet let that be, Which the eye fears when it
is done to see"
Macbeth - Shakespeare
}


Const
StartPlayer = 0;
NumberOfUsers = 6;
MinutesPerLoad = 5;
Loads = 10;
VersionNumber = '1.13';
YourSRLSTATSID = ''; // Stats ID.
YourSRLSTATSPASS = ''; // Stats Pass.
YourRCMASTER = ''; // Remote Control Master.
WizzyDebug = True;

Type
AColor = Record
Color: Integer;
Amount: Integer;
End;

Var
Colors: Array Of AColor;
Var
Position : String;
EssencePoint : Array [0..4] Of TPoint;
MiningMark, Abyss, NOAbyss, AuburyText, RuneShopColor,
RuneEssenceMined, PureEssenceMined, iMark, IdleMark, Aubs, MyMark: Integer;
PortalBool : Boolean;
NormalRandomsTime, FastRandomsTime, FindTalkTime: LongInt;

Procedure DeclarePlayers;

Begin
HowManyPlayers:= NumberOfUsers;
NumberOfPlayers( HowManyPlayers );
CurrentPlayer := StartPlayer;

Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Loc :='Bank';
Players[0].Active:=True;
Players[0].Boolean1 := True; // Is The Pick Equipped?
Players[0].Boolean2 := True; // False for brightness Check Once.
Players[0].String1 := ''; // Bank PIN, If any.

Players[1].Name :='';
Players[1].Pass :='';
Players[1].Nick :='';
Players[1].Loc :='Bank';
Players[1].Active:=True;
Players[1].Boolean1 := True; // Is The Pick Equipped?
Players[1].Boolean2 := True; // False for brightness Check Once.
Players[1].String1 := ''; // Bank PIN, If any.

Players[2].Name :='';
Players[2].Pass :='';
Players[2].Nick :='';
Players[2].Loc :='Bank';
Players[2].Active:=True;
Players[2].Boolean1 := True; // Is The Pick Equipped?
Players[2].Boolean2 := True; // False for brightness Check Once.
Players[2].String1 := ''; // Bank PIN, If any.

Players[3].Name :='';
Players[3].Pass :='';
Players[3].Nick :='';
Players[3].Loc :='Bank';
Players[3].Active:=True;
Players[3].Boolean1 := True; // Is The Pick Equipped?
Players[3].Boolean2 := True; // False for brightness Check Once.
Players[3].String1 := ''; // Bank PIN, If any.

Players[4].Name :='';
Players[4].Pass :='';
Players[4].Nick :='';
Players[4].Loc :='Bank';
Players[4].Active:=True;
Players[4].Boolean1 := True; // Is The Pick Equipped?
Players[4].Boolean2 := True; // False for brightness Check Once.
Players[4].String1 := ''; // Bank PIN, If any.

Players[5].Name :='';
Players[5].Pass :='';
Players[5].Nick :='';
Players[5].Loc :='Bank';
Players[5].Active:=True;
Players[5].Boolean1 := True; // Is The Pick Equipped?
Players[5].Boolean2 := True; // False for brightness Check Once.
Players[5].String1 := ''; // Bank PIN, If any.

Writeln( IntToStr ( NumberOfUsers ) + ' Players' );
End;

Function FindAuburyText: Boolean; // FindTalk by Renax, but adepted.
var
ExitCond, NoMoreYellow: Boolean;
Yint, Xmin, diff, difflast, Xmax, XmidRec, Xmid: Integer;
RawMenuText: string;
begin
x := 0;
y := 0;
Xmid := 0;
Xmin := 0;
Xmax := 0;
NoMoreYellow := False;
if (FindColor(x, y, 65535, 10, 25, 511, 334)) and (not (FindColor(x, y, 65280, 220, 130, 290, 165))) then
begin
Result := False;
if (not (FindBitmapMaskTolerance(AuburyText, x, y, 0, 0, 516, 338, 0, 40)))
then
Exit;
if (FindColorSpiral(x, y, 65535, x - 10, y - 10, x + 10, y + 10)) then
begin
Wait(10);
if (GetColor(x, y) = 65535) then
begin
Status('Spotted aubury text');
Wait(10);
NoMoreYellow := False;
Yint := 0;
repeat
Yint := Yint + 1;
y := y + Yint;
x := 0;
repeat
ExitCond := False;
x := x + 1;
Xmin := x;
if (GetColor(x, y) = 65535) then
ExitCond := True;
if (x > 500) then
begin
x := 0;
ExitCond := True;
NoMoreYellow := True;
end;
until (ExitCond);
ExitCond := False;
x := 520;
while (NoMoreYellow = False) and (ExitCond = False) do
begin
x := x - 1;
Xmax := x;
if (GetColor(x, y) = 65535) then
ExitCond := True;
end;
diff := (Xmax - Xmin);
if (diff > difflast) and (diff > 25) then
begin
XmidRec := ((diff / 2) + Xmin);
end;
difflast := diff;
until (NoMoreYellow)
x := XmidRec;
MMouse(x, y + 6, 3, 0);
Wait(100);
if IsUpTextMulti('Talk', 'lk-to', 'to') Then
begin
GetMousePos(x, y);
Mouse(x, y + 6, 0, 0, False);
if (ChooseOptionGetMenuText(RawMenuText, x, y, 'Teleport')) then
begin
Status('Found Aubury')
FFlag(1);
Wait(1000 + Random(500))
Result := True;
Exit;
end;
end;
end;
end;
end;
end;

{--------------------------------------------------------

Function FindFastRandoms: Boolean; // By WT-Fakawi.

FindFastRandoms is a quicker version of FindNormalRandoms.
It does not include ALL the Anti-Randoms though.

--------------------------------------------------------}

Function FindFastRandoms: Boolean; // By WT-Fakawi.
var
i: Integer;
begin
for i:=1 to 10 do
begin
case I of
1: If FindDead then
Result := True;
2: If FindMod then
Result := True;
3: If FindMime then
Result := True;
4: If FindMaze then
Result := True;
5: If FindQuiz then
Result := True;
6: If FindDemon then
Result := True;
7: if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
8 : If RC Then Result := True;

9: If FindTalk Then Result := True;

10: If HandleTrade Then Result := True;
End;
Wait(1);
end;
end;

// New Randoms Checking.

Function ScanMiniMap(iFrom, iTo, Distance: Integer): Integer;

Var
I, iX,iY: Integer;
Begin
For I := iFrom To ITo Do
Begin
iX := Round(Distance * Sin(I * Pi / 180)) + 648;
iY := Round(-Distance * Cos(I * Pi / 180)) + 80;
If GetColor(iX, iY) = 0 Then
Begin
Result := Result + 1;
End;
End;
End;

Function FindNormalRandomsTimeEx: Boolean;

Var
TempTime, Time1, Time2: LongInt;

Begin
TempTime := GetSystemTime;
If TempTime - NormalRandomsTime > 6000 Then
Begin
NormalRandomsTime := GetSystemTime;
Time1 := GetSystemTime;
Result := FindNormalRandoms;
Time2 := GetSystemTime;
Status('Calling FNRandoms; Took '+IntToStr(Time2-Time1)+'.');
Exit;
End;

If TempTime - FastRandomsTime > 2000 Then
Begin
FastRandomsTime := GetSystemTime;
Time1 := GetSystemTime;
Result := FindFastRandoms;
Time2 := GetSystemTime;
Status('Calling FFRandoms; Took '+IntToStr(Time2-Time1)+'.');
Exit;
End;

If TempTime - FindTalkTime > 500 Then
Begin
FindTalkTime := GetSystemTime;
Time1 := GetSystemTime;
Result := FindTalk;
Time2 := GetSystemTime;
Status('Calling FT; Took '+IntToStr(Time2-Time1)+'.');
Exit;
End;
End;

Function InAbyss: Boolean;

Var
A : Integer;

Begin
A := ScanMiniMap(0, 359, 50);
Status('In Abyss gave '+IntToStr(A)+'.');
If A = 360 Then
Begin
WriteLn('We are in the Abyss random.');
Result := True;
End
End;

Function GuessAbyssRandom: Boolean;

Var
AbyssalMark, iX, iY, I, ChosenColor, Tol, Tries: Integer;
WeirdColors: Array [0..3] Of Integer;
Operate: TPoint;
Begin
WeirdColors[0] := 13751777;
WeirdColors[1] := 4953873;
WeirdColors[2] := 2509833;
Repeat
Case Random(4) Of
0: Begin Operate.X := 252; Operate.Y := 150; End;
1: Begin Operate.X := 278; Operate.Y := 170; End;
2: Begin Operate.X := 238; Operate.Y := 200; End;
3: Begin Operate.X := 215; Operate.Y := 166; End;
End;

For I := 0 To 2 Do
Begin
Tol := 0;
Repeat
Tol := Tol + 1;
iX := MSCX;
iY := MSCY;
If FindColorSpiralTolerance(iX, iY, WeirdColors[I], MSX1, MSY1, MSX2, MSY2, Tol) Then
Begin
ChosenColor := WeirdColors[I];
If (Distance (iX, iY, MSCX, MSCY) < 120) Then Break;
End;
If ChosenColor <> 0 Then Break;
Until Tol > 9;
End;

If ChosenColor <> 0 Then
Begin
MMouse(iX, iY, 0, 0);
Wait(100);
If IsUpText('perate') Then
Begin
GetMousePos(iX, iY);
Mouse(iX, iY, 0, 0, True);
End;
End;

Wait(5000+Random(500));
If Not InAbyss Then
Begin
Abyss := Abyss + 1;
ReportVars[8] := ReportVars[8] + 1;
Result := True;
Wait(1000);
ClickToContinue;
SRLRandomsReport;
Exit;
End;
Tries := Tries + 1;
If TimeFromMark(AbyssalMark) > 60000 * 5 Then Break;
Until Tries > 30;

Tries := 0;
If InAbyss Then
Begin
Repeat
Case Random(4) Of
0: Begin Operate.X := 252; Operate.Y := 150; End;
1: Begin Operate.X := 278; Operate.Y := 170; End;
2: Begin Operate.X := 238; Operate.Y := 200; End;
3: Begin Operate.X := 215; Operate.Y := 166; End;
End;
iX := Operate.X;
iY := Operate.Y;
If FindColorSpiralTolerance(iX, iY, 3393, MSX1, MSY1, MSX2, MSY2, Tol)
Or FindColorSpiralTolerance(iX, iY, 2040150, MSX1, MSY1, MSX2, MSY2, Tol) Then
Begin
If (Distance (iX, iY, MSCX, MSCY) < 80) Then
Begin
MMouse(iX, iY, 0, 0);
Wait(100);
If IsUpText('perate') Then
Begin
GetMousePos(iX, iY);
Mouse(iX, iY, 0, 0, True);
Wait(5000+ Random(500));
If Not InAbyss Then
Begin
Abyss := Abyss + 1;
ReportVars[8] := ReportVars[8] + 1;
Result := True;
ClickToContinue;
SRLRandomsReport;
Exit;
End;
End;
End;
End;
Tries := Tries + 1;
Tol := Tol + 2;
If Tol > 20 Then Tol := 2;
Until Tries > 50;
End;
LogOut;
NOAbyss := NOAbyss + 1;
ReportVars[9] := ReportVars[9] + 1;
Players[CurrentPlayer].Loc := 'Abyss';
SRLRandomsReport;
WriteLn('Abyss Random Event.');
End;

Function GetUpTextBlue:String;

Begin
Result := Trim(GetTextAtEx(7, 7, 140, upchars, true,
true, 0, 2, 14277634, 50, True, tr_AllChars));
End;

Function IsUpTextBlue(Text: String): Boolean;

Begin
Result := (Pos(Text, GetUpTextBlue) <> 0)
End;

Function FindEssence(Var iX, iY: Integer): Boolean;

Var
I, Tolerance : Integer;
Begin
If Not LoggedIn Then Exit;
For I := 0 To 2 Do
Begin
Tolerance := - 1;
While Tolerance < 10 Do
Begin
Tolerance := Tolerance + 1;
iX := EssencePoint[I].X;
iY := EssencePoint[I].Y;
If FindColorSpiralTolerance(iX, iY, 9539996, MSX1, MSY1, MSX2, MSY2, Tolerance) Then
Begin
If Distance(iX, iY, EssencePoint[I].X, EssencePoint[I].Y) < 80 Then
Begin
MMouse(iX, iY, 0, 0);
Wait(100);
If IsUpTextBlue('ssen') Then
Begin
GetMousePos(iX, iY);
Result := True;
Status('Found Essence');
Exit;
End;
End;
End;
End;
End;
WriteLn('Did not find any essence..');
End;

Function WeirdMiddle(TPA: TpointArray): TPoint;

Var
L, I: Integer;
Begin
L := GetArrayLength(TPA) - 1;
For I := 0 To L Do
Begin
Result.X := Result.X + TPA[I].X;
Result.Y := Result.Y + TPA[I].Y;
End;
Try
Result.X := Round(Result.X Div GetArrayLength(TPA));
Result.Y := Round(Result.Y Div GetArrayLength(TPA));
Except WriteLn('Error in WeirdMiddle'); End;
End;

Function UsePortal: Boolean;

Var
Count: Integer;
Portal: TPoint;
PortalTPA: TPointArray;

Begin
ColorToleranceSpeed(2);
Repeat
FindColorsTolerance(PortalTPA, 11059142, MSX1, MSY1, MSX2, MSY2, 9);
If WizzyDebug Then WriteLn(IntToStr(GetArrayLength(PortalTPA)));
Wait(50);
Count := Count + 1;
If Count > 100 Then Break;
Until GetArrayLength(PortalTPA) > 80;
ColorToleranceSpeed(1);
If Not Count > 100 Then
Begin
WriteLn('Portal Popped up');
Portal := WeirdMiddle(PortalTPA);
MMouse(Portal.X, Portal.Y, 0, 0);
GetMousePos(Portal.X, Portal.Y);
Wait(100+Random(50));
If IsUpText('ort') Then
Result := True;
End;
End;


Function ToPortal: Boolean;

Var
iX, iY, C : Integer;
Boolie : Boolean;
Begin
If Not LoggedIn Then Exit;
If FindSymbol(iX, iY, 'transportation') Then
Begin
Mouse(iX, iY, 2, 2, True);
Wait(10);
FFlag(0);
FindNormalRandoms;
iX := MSCX;
iY := MSCY;
Repeat
If Random(4) = 3 Then
Boolie := True;
If Boolie Then
Begin
Case Random(3) Of
0: MakeCompass('E');
1: MakeCompass('S');
2: MakeCompass('W');
End;
End;
Wait(50);
C := C + 1;
If UsePortal Then
Begin
GetMousePos(iX, iY);
Mouse(iX, iY, 0, 0, True);
Wait(10);
Result := True;
FFlag(0);
Exit;
End Else WriteLn('No Portal');
If FindObj(iX, iY, 'rtal', 10731205, 15) Then
Begin
Mouse(iX, iY, 0, 0, True);
Wait(10);
Result := True;
FFlag(0);
Exit;
End Else WriteLn('No Portal');
Wait(1000);
Until C > 2;
End;
End;

Function AtMine: Boolean;

Var
iX, iY: Integer;

Begin
Result := FindColoredAreaTolerance(iX, iY, 0, MMX1, MMY1, MMX2, MMY2, 100, 0);
End;

Function RunToPortal: Boolean;

Begin
MarkTime(iMark);
Repeat
If Not LoggedIn Then Break;
If (TimeFromMark(iMark) > 120000) Then
Begin
WriteLn('Portal Took too long..logging');
LogOut;
Players[CurrentPlayer].Loc := 'Portal';
End;
If ToPortal Then
Begin
FFlag(0);
Wait(6000);
End
Else Wait(100);
Until Not AtMine;
Result := True;
PortalBool := True;
End;

Function HighestBrightNess: Boolean;

Begin
GameTab(11);
Wait(400);
If GetColor(712, 226) <> 16777215 Then
Begin
Mouse(712, 226, 2, 2, True);
Result := True;
Wait(200);
End;
End;

Function GetMiddle:String;

Var
Ex, Ey: Integer;
Begin
If Not LoggedIn Then Exit;

If ScanMiniMap(330, 380, 55) < 35 Then
Begin
Result := 'MiddleSW';
Status(Result);
ReportVars[4] := ReportVars[4] + 1;
Ex := 605;
Ey := 116;
EssencePoint[0].X := 170;
EssencePoint[0].Y := 240;
EssencePoint[1].X := 190;
EssencePoint[1].Y := 290;
EssencePoint[2].X := 200;
EssencePoint[2].Y := 223;
End
Else
Begin
Result := 'MiddleNE';
Status(Result);
ReportVars[3] := ReportVars[3] + 1;
Ex := 690;
Ey := 30;
EssencePoint[0].X := 360;
EssencePoint[0].Y := 40;
EssencePoint[1].X := 450;
EssencePoint[1].Y := 100;
EssencePoint[2].X := 390;
EssencePoint[2].Y := 30;
End;
Mouse(Ex, Ey, 2, 2, True);
Wait(10);
FFlag(0);
Wait(100);
End;

Function GetPositionInMine: String;

Begin
MakeCompass('N');
If Not LoggedIn Then Exit;
If Not FindSymbol(x, y, 'transportation') Then
Begin
Result := GetMiddle;
Exit;
End;

If ScanMiniMap(220, 240, 60) < 15 Then
Begin
Result := 'North-East';
ReportVars[5] := ReportVars[5] + 1;
EssencePoint[0].X := 340;
EssencePoint[0].Y := 61;
EssencePoint[1].X := 295;
EssencePoint[1].Y := 50;
EssencePoint[2].X := 395;
EssencePoint[2].Y := 120;
Status(Result);
Exit;
End;

If ScanMiniMap(125, 155, 60) < 20 Then
Begin
Result := 'North-West';
ReportVars[6] := ReportVars[6] + 1;
EssencePoint[0].X := 140;
EssencePoint[0].Y := 115;
EssencePoint[1].X := 18;
EssencePoint[1].Y := 70;
EssencePoint[2].X := 120;
EssencePoint[2].Y := 150;
Status(Result);
Exit;
End;

If ScanMiniMap(285, 325, 60) < 25 Then
Begin
Result := 'South-East';
ReportVars[7] := ReportVars[7] + 1;
EssencePoint[0].X := 350;
EssencePoint[0].Y := 160;
EssencePoint[1].X := 337;
EssencePoint[1].Y := 210;
EssencePoint[2].X := 362;
EssencePoint[2].Y := 125;
Status(Result);
If (ScanMiniMap(140, 170, 55) <> 31) Then
Exit;
End;

Result := 'South-West';
ReportVars[2] := ReportVars[2] + 1;
EssencePoint[0].X := 190;
EssencePoint[0].Y := 60;
EssencePoint[1].X := 146;
EssencePoint[1].Y := 94;
EssencePoint[2].X := 285;
EssencePoint[2].Y := 54;
Status(Result);

End;

Function SpotAubury: Boolean;
// 10855856, 3005947, 2998011
Var
iX, iY, C: Integer;

Begin
Repeat
CloseWindow;
Wait(50);
If FindAuburyText Then
Begin
Result := True;
Break;
End;
iX := MSCX;
iY := MSCY;
If AtMine Then
Begin
Result := True;
Exit;
End;
If FindColorSpiralTolerance(iX, iY, 2998011, MSX1, MSY1, MSX2, MSY2, 4)
Or FindColorSpiralTolerance(iX, iY, 1888494, MSX1, MSY1, MSX2, MSY2, 4) Then
Begin
MMouse(iX, iY, 0, 0);
Wait(100);
If IsupTextMulti('Talk','bury','alk-to') Then
Begin
Status('Aubury Found..Right Clicking now.');
Mouse(iX, iY, 0, 0, False);
Result := ChooseOption(iX, iY, 'eleport');
If Result Then Exit;
End;
End;
C := C + 1;
Until C > 5;
Wait(500);

If Not LoggedIn Then Exit;
End;

Function AuburyFloorColor: Integer;

Var
Points: TPointArray;
CColors: Array Of Integer;
I, iColor, C, MAmount: Integer;

Begin
ColorToleranceSpeed(2);
FindColorsTolerance(Points, RuneShopColor, 540, 5, 740, 155, 20);
CColors := GetColors(Points);
SetArrayLength(Colors, GetArrayLength(CColors));
For I := 0 To GetArrayLength(CColors) - 1 Do
Colors[I].Color := CColors[I];

For I := 0 To GetArrayLength(CColors) - 1 Do
Begin
For C := 0 To GetArrayLength(Colors) - 1 Do
If CColors[I] = Colors[C].Color Then
Colors[C].Amount := Colors[C].Amount + 1;
End;

For I := 0 To GetArrayLength(Colors) - 1 Do
Begin
If ((MAmount <> Max(Colors[I].Amount, MAmount)) And (Colors[I].Color > 2500000)) Then
iColor := I;
MAmount := Max(Colors[I].Amount, MAmount);
End;

If I <> 0 Then Result := Colors[iColor].Color;
RuneShopColor := Result;
WriteLn('Color: '+IntToStr(Result));
ColorToleranceSpeed(1);
End;

Function AuburyFloor(Var x, y, x1, y1, x2, y2: Integer): Boolean;

Var
Points: TPointArray;
I: Integer;
MinP, MaxP: TPoint;

Begin
MinP.X := 1 Shl 10;
MinP.Y := 1 Shl 10;
FindColorsTolerance(Points, RuneShopColor, 540, 5, 740, 155, 0);
For I := 0 To GetArrayLength(Points) - 1 Do
Begin
MaxP.X := Max(MaxP.X, Points[I].X);
MinP.X := Min(MinP.X, Points[I].X);
MaxP.Y := Max(MaxP.Y, Points[I].Y);
MinP.Y := Min(MinP.Y, Points[I].Y);
End;
x := (MaxP.X + MinP.X) Shr 1;
y := (MaxP.Y + MinP.Y) Shr 1;
Result := (GetArrayLength(Points) <> 0);
x1 := MinP.X;
y1 := MinP.Y;
x2 := MaxP.X;
y2 := MaxP.Y;
End;

Function OpenDoor: Boolean;

Var
x, y: Integer;
Begin
ColorToleranceSpeed(2);
If FindObj(x, y, 'oor', 1525855, 19) Then
// If FindObj(x, y, 'oor', 1525855, 14) Then
Begin
GetMousePos(x, y);
Wait(100);
If IsUpText('pen') Then
Begin
Mouse(x, y, 0, 0, True);
Result := True;
WriteLn('Door Found and Opened');
Wait(50);
FFlag(0);
End
Else Result := IsUpText('lose');
End;
ColorToleranceSpeed(1);
End;

Function ToBank: Boolean;

Var
iX, iY, BankDTM, DoorMark, C: Integer;
AngleVar : Extended;
x, y, x1, y1, x2, y2: Integer;

Begin
MarkTime(DoorMark);
SetRun(True);
Repeat
Mouse(680, 30, 4, 4, True);
Wait(100);
If FlagDistance < 40 Then
Begin
Mouse(MMCX, MMCY, 4, 4, True);
AuburyFloorColor;
AuburyFloor(x, y, x1, y1, x2, y2);
Mouse(x, y2, 0, 0, True);
OpenDoor;
Wait(3000);
FFlag(0);
OpenDoor;
End
Else
Begin
// Wait(7000);
Wait(6000);
FFlag(0);
Break;
End;
If TimeFromMark(DoorMark) > 240000 Then
Begin
LogOut;
Players[CurrentPlayer].Loc := 'DoorMark > 240000';
End;
If Not LoggedIn Then Break;
Until False;

If Not LoggedIn Then Exit;

BankDTM:= DTMFromString('78DA636C666260486140016FDEBC61F80FA 41' +
'981F83F1030B603D5E4A0AA79FB96814103AA060418EB816A B251' +
'D57CFD8AAA0600B6210EA4');
C := 0;
Repeat
C := C + 1;
If FindDTMRotated(BankDTM, iX, iY, MMX1, MMY1, MMX2, MMY2, -1.0, 2.0, 1, AngleVar) Then
Begin
Result := True;
Mouse(iX, iY + 1, 0, 0, True);
Wait(3000);
FFlag(0);
Break;
End
Else
Begin
If C > 19 Then
Begin
LogOut;
Players[CurrentPlayer].Loc := 'ToBank2';
WriteLn('Bank not found');
Break;
End;
End;
MakeCompass('N');
Wait(1000);
Until C > 20;
FreeDTM(BankDTM);
End;


Function ToAubury: Boolean;

Var
x, y, x1, y1, x2, y2: Integer;
Begin

If Not Players[CurrentPlayer].Boolean2 Then
Begin
HighestBrightness;
Players[CurrentPlayer].Boolean2 := True;
//SetRun(True);
End;
SetRun(False);
If Not LoggedIn Then Exit;
// FindPickHeadColor;
Mouse(663, 142, 6, 6, True);
// Wait(7500+Random(2000));
Wait(15000+Random(4000));
FFlag(0);

RuneShopColor := AuburyFloorColor;
AuburyFloor(x, y, x1, y1, x2, y2);
Mouse(x, y, 0, 0, True);
Wait(100);
FFlag(0);
Wait(300 + Random(201));
AuburyFloor(x, y, x1, y1, x2, y2);
If Not FindColor(x, y, 16777215, x1, y1, x2, y2) Then
Begin
WriteLn('We are not in the shop');
AuburyFloor(x, y, x1, y1, x2, y2);
Mouse(x, y + 20, 0, 0, True);
Wait(100);
FFlag(0);
Wait(500);
OpenDoor;
Wait(100);
AuburyFloor(x, y, x1, y1, x2, y2);
Mouse(x, y, 0, 0, True);
Wait(100);
End;
FFlag(0);
Result := True;
If LoggedIn Then Players[CurrentPlayer].Loc := 'Aubury';
End;

Function ToMine: Boolean;

Var
zMark, iX, iY: Integer;
Begin
MarkTime(zMark);
Repeat
FindNormalRandomsTimeEx;
If (TimeFromMark(zMark) > 240000) Then
Begin
WriteLn('Aubury Took too long..logging');
LogOut;
Players[CurrentPlayer].Loc := 'AuburyNF';
End;

If SpotAubury Then
Begin
FFlag(0);
Wait(4000);
End
Else
Begin
Wait(100);
ChooseOption(iX, iY, 'ancel');
End;

If Not LoggedIn Then Break;
Until AtMine;

Result := True;
If LoggedIn Then Players[CurrentPlayer].Loc := 'Mine';
End;

Function MyOpenBank: Boolean;

Begin
Wait(500+Random(500));
OpenBankGlass('veb',False,False);
FFlag(0);
Wait(2000);
If BankScreen Or PinScreen Then
Begin
Result := True;
If PinScreen Then InPin(Players[CurrentPlayer].String1);
Exit;
End;
If OpenBankQuiet('veb') Then Result := True;
If PinScreen Then InPin(Players[CurrentPlayer].String1);
End;

Function BankStuff: Boolean;

Var
RuneEss, PureEss: Integer;
Begin
If Not BankScreen Then Exit;
RuneEss := BitmapFromString(8, 12, 'z78DA8DCD3112C3200C44D1' +
'2BE1B02B9B1288B9FF91222315149107EFCCAFF4B08037BB5 84F0' +
'E0E6F9143D724EBAC5F79BE0F1BABF7DDCEB25374B3925858 BCC1' +
'3BBC78E82AA1DBB07EBFAAC8DA3D3130BC1B8A191DFD8F8A6 C424' +
'57515D945E1C685D35564973FA23DD4D48ED5ABACDB560092 CED4' +
'BB9DF73F7ACE7D1F');
PureEss := BitmapFromString(11, 10, 'z78DAA5CF490E03211003C' +
'02FB1B56D8E0CCBFF9F1492CC012962B2B5251F4B6E451616 192B' +
'ABC8CEA62CC771F6A120AFA638D39594B213841C342F27151 536A' +
'6994110F214A59DB9D1783032FCE39018E8CCF474BF693434 B48F' +
'9C555B1CBAF98A185050BED0963DE8B8DFA3DF689BEF90E16 70EA' +
'4994F9C65D5D38159B736596763AB5D3A362C5B46B46AF5D4 AE57' +
'BD3837C02891A6');
RuneEssenceMined := RuneEssenceMined + CountItemBmpTol(RuneEss, 15);
PureEssenceMined := PureEssenceMined + CountItemBmpTol(PureEss, 15);
ReportVars[1] := ReportVars[1] + 1;
ReportVars[0] := CountItemBmpTol(RuneEss, 15) + CountItemBmpTol(PureEss, 15);
Players[CurrentPlayer].Integer1 := Players[CurrentPlayer].Integer1 + CountItemBmpTol(PureEss, 15) + CountItemBmpTol(RuneEss, 15);
ClickAllItemsBmpTolWait('All', RuneEss, 15, 1500);
ClickAllItemsBmpTolWait('All', PureEss, 15, 1500);
If EquipPick Then Deposit(1, 28, 2)
Else Deposit(2, 28, 2);
FreeBitMap(RuneEss);
FreeBitMap(PureEss);
If BankScreen Then CloseBank;
Players[CurrentPlayer].Banked := Players[CurrentPlayer].Banked + 1;
Banks := Banks + 1;
Result := True;
End;

Procedure PlayerReport;

Var
Active: String;
I:Integer;

Begin
For I := 0 to HowManyPlayers - 1 Do
Begin
If Players[i].Active=True Then Active := 'T' Else Active := 'F';
WriteLn( (IntToStr(I))+' : '+Players[I].nick+ ' = '+
Active+ +'; Loc = '+Players[I].Loc+'; Banked: '+IntToStr(Players[I].Integer1)
+' Ess; M lvl:'+IntToStr(Players[i].Level[15]));
End;
End;

Procedure CurrentPlayerReport;

Begin
WriteLn('----------------------------------------------')
WriteLn(Players[CurrentPlayer].Name+'.');
WriteLn('Mined ' + IntToStr(Players[CurrentPlayer].Integer1) + ' Essence.');
WriteLn('Mining level is ' + IntToStr(Players[CurrentPlayer].Level[15]));
WriteLn('Location is ' + Players[CurrentPlayer].Loc+ '.');
WriteLn('----------------------------------------------')
End;

Procedure ProgressReport;

Begin
WriteLn('----------------------------------------------')
WriteLn('')
WriteLn('Essence Miner by Wizzup?.')
WriteLn('Version: '+VersionNumber)
WriteLn('')
If RuneEssenceMined > 0 Then WriteLn('Rune Essence Mined and Banked : '+IntToStr(RuneEssenceMined)+'.');
If PureEssenceMined > 0 Then WriteLn('Pure Essence Mined and Banked : '+IntToStr(PureEssenceMined)+'.');
If Abyss > 0 Then WriteLn('Solved '+IntToStr(Abyss)+' Abyssal Random Events.');
If NOAbyss > 0 Then WriteLn('Missed '+IntToStr(NoAbyss)+' Abyssal Random Events.');
Writeln('Worked for '+ TimeRunning);
WriteLn('')
WriteLn('----------------------------------------------')
WriteLn('')
PlayerReport;
CurrentPlayerReport;
SRLRandomsReport;
End;

Procedure ClearVars;

Var
I : Integer;
Begin
For I := 1 To 19 Do
ReportVars[I] := 0;
End;

Procedure DoChats;

Begin
SetChat('On', 1);
SetChat('On', 1);
SetChat('Friends', 2);
SetChat('Friends', 2);
SetChat('Friends', 3);
SetChat('Friends', 3);
End;

Procedure RandomGameTab;

Var
A: Integer;
Begin
A := Random(10) + 1;
If A = 4 Then
Begin
GameTab(2);
HoverSkill('mining', False);
End
Else GameTab(a);
GameTab(4);
End;

Procedure SetupScript;

Begin
ClearDebug;
ActivateClient;
Wait(100);
SetupSRL;
SetupSRLMining;
RuneShopColor := 4813956;
DeclarePlayers;
MouseSpeed := 5;
Rcmaster := YourRCMASTER;
RcLoc := 'Bank';
ScriptID := '51';
ClearVars;
SRLID := YourSRLstatsID;
SRLPassword := YourSRLstatsPASS;
CurrentPlayer := StartPlayer;
LoginPlayer;
Wait(1000);
LogOut;
Wait(1000);
LoginPlayer;
Wait(1000);
DoChats;
EquipPick := Players[CurrentPlayer].Boolean1;
AuburyText := CreateBitmapMaskFromText('isthine', upchars);
BenMouse := True;
GetAllLevels;
End;

Function ToEssence: Boolean;

Begin
If FindEssence(X, Y) Then
Begin
Mouse(X, Y, 0, 0, True);
Wait(10);
FFlag(0);
Result := True;
End
Else
Begin
RunToPortal;
End;
End;

begin
ActivateClient;
SetupScript;
Repeat
MakeCompass('N');
If Players[CurrentPlayer].Loc = 'Bank' Then
Begin
Aubs := 0;
ToAubury;
End;

If Players[CurrentPlayer].Loc = 'Aubury' Then
Begin
SetRun(True);
ToMine;
End;

If Players[CurrentPlayer].Loc = 'Mine' Then
Begin
Wait(500);
If InAbyss Then
Begin
GuessAbyssRandom;
BoredHuman;
End;
Wait(1000);
FindNormalRandoms;
SymbolAccuracy := 0.4;
Position := GetPositionInMine;
WriteLn('Our position is '+ Position+'.');
ToEssence;
MarkTime(IdleMark);
MarkTime(MiningMark);
Repeat
If Not LoggedIn Then Break
If PortalBool Then Break;

If TimeFromMark(IdleMark) > (40000+Random(5000)) Then
Begin
Status('Gametabs to avoid logging out.');
RandomGametab;
GameTab(4);
MarkTime(IdleMark);
End;
FindNormalRandomsTimeEx;
If FindFight Then
Begin
RunToPortal;
WriteLn('Going to Portal, FindFight.');
Break;
End;

Wait(50);
Until ((InvFull) Or (TimeFromMark(MiningMark) > 1000 * 60 * MinutesPerLoad));

If Not PortalBool Then
Begin
MarkTime(iMark);
Repeat
If Not LoggedIn Then Break;
If (TimeFromMark(iMark) > 120000) Then
Begin
WriteLn('Portal Took too long..logging');
LogOut;
Players[CurrentPlayer].Loc := 'Portal';
End;
If ToPortal Then
Begin
FFlag(0);
Wait(3000);
End
Else Wait(100);
Until Not AtMine;
End;

WriteLn('Through The portal');
Wait(2000 + Random(500));
MakeCompass('N');
SymbolAccuracy := 0.8;
PortalBool := False;
If LoggedIn Then Players[CurrentPlayer].Loc := 'ToBank';
If InventoryCount <> 28 Then
Begin
Players[CurrentPlayer].Loc := 'Aubury';
If Aubs <> 0 Then WriteLn(IntToStr(Aubs) + ' Aubs');
Aubs := Aubs + 1;
End
Else Aubs := 0;
If Aubs > 9 Then
Begin
LogOut;
WriteLn('9 times and still no ess. stopping player');
Players[CurrentPlayer].Loc := 'TooManyAubs';
End;
End;

If Players[CurrentPlayer].Loc = 'ToBank' Then
Begin
Wait(500);
ToBank;
MyOpenBank;
BankStuff;
If LoggedIn Then Players[CurrentPlayer].Loc := 'Bank';
End;

ProgressReport;
If ( LoggedIn And (Players[CurrentPlayer].Banked Mod Loads = 0 ) And (Players[CurrentPlayer].Banked <> 0) ) Then
Begin
DoChats;
MarkTime(MyMark);
SetChat('off',1);
Repeat
FindNormalRandomsTimeEx;
Wait(10);
If TimeFromMark(MyMark) > 240000 Then Begin Logout; Break; End;
Until Not LoggedIn;
Wait(1000);
NextPlayer(True);
EquipPick := Players[CurrentPlayer].Boolean1;
SetRun(True);
FindPickHeadColor;
GetAllLevels;
End;

If Not LoggedIn Then
Begin
DoChats;
NextPlayer(False);
EquipPick := Players[CurrentPlayer].Boolean1;
SetRun(True);
FindPickHeadColor;
GetAllLevels;
End;
Until False;
end.

dx019
06-04-2007, 12:12 AM
ye i'm getting that problem too i dono whats going on

kautkto
06-04-2007, 05:28 AM
First, don't post the whole script,
Second, download scar 3.06 with srl 3.7,
Third, the script doesn't work properly since the varrock update so wait for Wizzup? to update it. Oh and before I forget, after you enter the player info, erase all the places you enter rsn and password or it won't compile.

To bring up the search option, make sure you delete all your temp internet files and cookies.

Kayze
06-04-2007, 06:58 AM
Learn how to search?

You posted in the wrong forum too.

Just use SCAR 3.06 with SRL 3.7, but with the new varrock update, this script would not work currently.

Post your problems here next time: http://www.srl-forums.com/forum/scripting-help-f140.html

pengu
06-06-2007, 04:48 AM
Learn how to search?

You posted in the wrong forum too.

Just use SCAR 3.06 with SRL 3.7, but with the new varrock update, this script would not work currently.

Post your problems here next time: http://www.srl-forums.com/forum/scripting-help-f140.html

using SCAR 3.06 with SRL 3.7 didnt help it caused two new errors:

Line 26: [Error] (43:1): Duplicate identifier 'UpChars' in
script C:\Program Files\SCAR
3.06\includes\srl\srl\core\Globals.scar

and

access violation at address 004dd68d in module 'scar.exe'
Read of address 02211cc4

that error happens when i try close the script

JWM
07-12-2007, 12:44 AM
it doing the same to me tooo!!!!!!:google:

JWM
07-12-2007, 12:45 AM
it is doing the same thing tome too1111

Harry
07-12-2007, 12:47 AM
Stop double posting, and read some of the upper-posts!!!

jeezy1901
07-14-2007, 12:11 AM
using SCAR 3.06 with SRL 3.7 didnt help it caused two new errors:

Line 26: [Error] (43:1): Duplicate identifier 'UpChars' in
script C:\Program Files\SCAR
3.06\includes\srl\srl\core\Globals.scar

and

access violation at address 004dd68d in module 'scar.exe'
Read of address 02211cc4

that error happens when i try close the script

another script did this to me download the latest srl file>downloadsrl

and also make sure you have the lastest includes downloaded file>download includes