okay i was asking a friend why the error occurred and he told me and it was fixed.
program New;
{.include SRL/SRL.scar} {.include SRL/SRL/skill/Mining.scar} {.include SRL\SRL\misc\VarrockWestColorFinder.scar} {/----------------------------------------------------------------------------//
// Ranger135xp's West Varrock:
// Miner and Banker!
//
// 1. This is a miner and banker for the West Varrock mines.
// 2. START in the South-Most bank slot.
// 3. AntiBan included.
// 4. For best/any results, Please download the VarrockWestColorFinder.scar
// attachment that I have included. AntiBan.scar is Optional(I tweaked
// the time settings in the antiban so they work sooner and it does keep
// yoou from being banned(at least for me so far...))
// 5. Enjoy!
//----------------------------------------------------------------------------/}
//----------------------------------------------------------------------------// var BLadder,BLadder2,MineTree,MineSymbol,StartPlayer
OreTol,J,H,G,SecondsToWait,Clay,PickaxeMask,
OreMask,VBank,banksC,TotalOres: Integer; acc2: Extended;
EquipPick2,AutoColor,NewOres: Boolean;
RunDir: String;
//----------------------------------------------------------------------------// Procedure SetVars;
begin
OreTol:=20; //Tamper with this to get the best results for you
AutoColor:=True; //Leave this on
MouseSpeed:=10; //Seems to be best speed... Leave alone
BenMouse:=False; //Leave False
StartPlayer:=0; //Leave at 0
HowManyPlayers:=1; //Leave at 1
NewOres:=True; //Tamper True/False on this, see which 1 works best for you
SecondsToWait:=3; //Seconds to wait to click ores
RunDir:='E'; //Run Direction for fights/fight randoms end;
//----------------------------------------------------------------------------//
Procedure DeclarePlayers;
Begin
NumberOfPlayers( HowManyPlayers );
CurrentPlayer := StartPlayer;
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :=''; // Short version of your username to spot randoms
Players[0].Active:=True; //Leave true
Players[0].String1 := 'Iron'; // Primairy Ore Color
Players[0].String2 := 'Iron'; // Secondairy Ore Color wont be mined as much as 1.
Players[0].String3 := 'Iron'; // Third Ore Color, won't be mined as much as 1 and 2.
Players[0].Boolean1 := False; // Is The Pick Equipped?
Writeln( IntToStr ( HowManyPlayers ) + ' Players' );
End;
//----------------------------------------------------------------------------//
Const
VersionNumber = '1.0';
CopperColor = 4879520;
TinColor = 9277080;
ClayColor = 4553880;
IronColor = 2898528;
SilverColor = 12434885;
CoalColor = 2834753;
GoldColor = 1881051;
MithrilColor = 7359564;
AdamantColor = 6322272;
RuniteColor = 0;
//----------------------------------------------------------------------------// // Mine To Bank; By: Ranger135xp //----------------------------------------------------------------------------//
procedure MinetoBank;
var RX,RY,EX,EY: Integer; Result2: Boolean;
begin
PerfectNorth;
repeat
MineTree := BitmapFromString(3, 3, '938D5322290D533815B2A6A7' +
'22290D533815B2A6A7B2A6A7B2A6A7');
//While(D<1000) do begin //D:=D+5; If FindDeformedBitmapToleranceIn(MineTree,RX,RY,554,12,746,92,50,1,False,acc2) then begin
Result2:=True;
MoveMouse(RX,RY-13);
Wait(300);
GetMousePos(EX,EY);
ClickMouse(EX,EY,True);
HumanFlag(0);
Mouse(625,20,2,2,True);
HumanFlag(0);
end else SendArrowSilentWait((Random(2)*2)+1, 20 + Random(10));
end; until(Result2=True);
end; //----------------------------------------------------------------------------// // Almost1; By Ranger135xp //Walks to the bank part-way //----------------------------------------------------------------------------// Procedure Almost1;
var AX,AY,BX,BY: Integer; Result3: Boolean;
begin
PerfectNorth;
repeat
BLadder:= BitmapFromString(2, 12, 'z78DAB370B5303332B1C04B' +
'9A3A1B391B1843483713572737030869E668626164862C0B21891' +
'187B031490009A11FB2');
begin repeat if FlagPresent then Wait(2000);
until(not(FlagPresent));
if FindDeformedBitmapToleranceIn(BLadder,AX,AY,554,12,746,92,50,1,False,acc2) then begin
Result3:=True;
MoveMouse(AX-18,AY-25);
Wait(600);
GetMousePos(BX,BY);
ClickMouse(BX,BY,True);
end else SendArrowSilentWait((Random(2)*2)+1, 20 + Random(10));
end; until(Result3=True);
end; //----------------------------------------------------------------------------// // Almost2; Finishes the Walk-To-Bank //----------------------------------------------------------------------------// Procedure Almost2;
var CX,CY,DX,DY,D: Integer; Result4: Boolean;
begin
PerfectNorth;
repeat
BLadder2:= BitmapFromString(4, 9, 'z78DA337334B13032330393A' +
'E6E6E266E8696A616C64626A6CE46CE06C61012591CA212537CB0' +
'A9070065413016');
begin repeat if FlagPresent then Wait(2000);
until(not(FlagPresent));
MakeCompass('N');
if FindDeformedBitmapToleranceIn(BLadder2,CX,CY,554,12,746,164,50,1,False,acc2) then begin
Result4:=True;
MoveMouse(CX-20,CY);
Wait(600);
GetMousePos(DX,DY);
ClickMouse(DX,DY,True);
Wait(4000);
repeat if FlagPresent then Wait(3000);
until(not(FlagPresent));
HumanFlag(0);
Mouse(678,63,2,2,True);
Wait(5000+Random(500));
repeat
VBank:= BitmapFromString(5, 3, 'z78DAB33036B734B77435713' +
'3703380005367236703630869814316C286C81A200164BD00649B' +
'12DC');
if FindDeformedBitMapToleranceIn(VBank,x,y,MMX1,MMY1,MMX2,MMY2,35,0,False,acc2) then begin
D:=1;
MouseFlag(x-6,y-4,1,1);
//MouseFlag(x-8,y+2,1,1);
HumanFlag(0);
end else SendArrowSilentWait((Random(2)*2)+1, 20 + Random(10));//SendArrowSilentWait(3,3);
Wait(1000);
until(D = 1);
//If FindColor(x,y,BankColor,MMX1,MMY1,MMX2,MMY2) then //begin //HumanMouseFlag(x,y,1,1,1); repeat if FlagPresent then Wait(2000+Random(1000));
until(not(FlagPresent));
//Bank; //end end else SendArrowSilentWait((Random(2)*2)+1, 20 + Random(10));
end; until(Result4=True);
end; //----------------------------------------------------------------------------// // Banking; Pieces by: Wizzup? //----------------------------------------------------------------------------// Procedure Bank;
Var Vx,Vy,kx,ky,LocalOres: integer;
begin
LocalOres:=CountItemBmpTol(Ore,50);
repeat if (FindColorTolerance(kx,ky,BoothColor,MSX1+230,MSY1+137,MSX2-100,MSY2,5)) then begin
Wait(300);
MoveMouse(kx,ky);
end if (IsUpTextMulti('e Booth','Booth','ooth')) then begin
GetMousePos(Vx,Vy);
PopUp2(Vx,Vy,1,2,'uickly');
end if(not(BankScreen)) then Wait(1000+Random(1000));
until(BankScreen);
if BankScreen then begin
Wait(Random(1000)+500);
FixBank;
begin If(EquipPick2=false)then Deposit(2,28,2);
Wait(Random(2000)+200);
if(EquipPick2=true)then begin
ClickAllItemsColorWait('All',65536,1000+Random(100));
Wait(Random(2000)+200);
end; end
CloseBank;
banksC:=banksC+1;
TotalOres:=TotalOres+LocalOres;
end end;
//----------------------------------------------------------------------------// // Progress Report; By: Wizzup? //----------------------------------------------------------------------------//
procedure ProgressReport;
begin
WriteLn(' ');
WriteLn(' ');
WriteLn(' ');
WriteLn('<============== -'+VersionNumber+'- Progress Report ===============>');
writeln('Worked for '+ TimeRunning);
WriteLn('Banked '+IntToStr(banksC)+' loads[s].');
WriteLn('Banked '+IntToStr(TotalOres)+' ores;');
writeln('Mining Level : '+ inttostr(Players[CurrentPlayer].level[15]));
WriteLn('<=====================================================>');
//PlayerStats;
SRLRandomsReport;
end;
//----------------------------------------------------------------------------// // WalkToMines; By: Ranger135xp //----------------------------------------------------------------------------//
Procedure WalkToMines;
var CX,CY,DX,DY,RX,RY,EX,EY,F: Integer; Result5,Result6: Boolean;
begin repeat
VBank:= BitmapFromString(5, 3, 'z78DAB33036B734B77435713' +
'3703380005367236703630869814316C286C81A200164BD00649B' +
'12DC');
if FindDeformedBitMapToleranceIn(VBank,x,y,MMX1,MMY1,MMX2,MMY2,35,0,False,acc2) then begin
F:=1;
//MouseFlag(x-6,y-6,1,1);
MouseFlag(x-20,y+6,1,1);
HumanFlag(0);
end else SendArrowSilentWait((Random(2)*2)+1, 20 + Random(10));//SendArrowSilentWait(3,3);
Wait(1000);
until(F = 1);
//If FindColorTolerance(x,y,0,612,37,698,115,0) then Mouse(x,y,1,1,true);
HumanFlag(0);
Mouse(622,115,2,2,true)
HumanFlag(0);
PerfectNorth; MakeCompass('N');
repeat
BLadder2:= BitmapFromString(4, 9, 'z78DA337334B13032330393A' +
'E6E6E266E8696A616C64626A6CE46CE06C61012591CA212537CB0' +
'A9070065413016');
MineTree := BitmapFromString(3, 3, '938D5322290D533815B2A6A7' +
'22290D533815B2A6A7B2A6A7B2A6A7');
if FindDeformedBitmapToleranceIn(BLadder2,CX,CY,554,80,700,167,50,0,False,acc2) then begin
Result5:= True;
MoveMouse(CX-20,CY+15);
Wait(600);
GetMousePos(DX,DY);
ClickMouse(DX,DY,True);
HumanFlag(0);
Mouse(642,150,2,2,True);
repeat if(FlagPresent) then Wait(Random(2000)+600);
until(not(FlagPresent));
if(not(FlagPresent)) then
Mouse(654,129,2,2,True);
HumanFlag(0);
Mouse(674,123,2,2,True);
repeat if(FlagPresent) then Wait(Random(2000)+600);
until(not(FlagPresent));
if(not(FlagPresent)) then
PerfectNorth; MakeCompass('N');
repeat if FindDeformedBitmapToleranceIn(MineTree,RX,RY,554,12,746,165,50,1,False,acc2) then begin
Result6:=True;
MoveMouse(RX,RY-11);
Wait(300);
GetMousePos(EX,EY);
ClickMouse(EX,EY,True);
HumanFlag(0);
repeat
MineSymbol:=GetSymbolColor(x,y,'mining spot');
Writeln('Mining Symbol Color: '+IntToStr(MineSymbol));
Wait(1000+Random(1000));
until(MineSymbol > 0);
ClickMMColorTol(MineSymbol,10);
HumanFlag(0);
end else SendArrowSilentWait((Random(2)*2)+1, 20 + Random(10));
Wait(600);
until(Result6 = True);
end else SendArrowSilentWait((Random(2)*2)+1, 20 + Random(10));
Wait(600);
until(Result5 = True);
end;
//----------------------------------------------------------------------------// // AutoColor; By: Wizzup? //----------------------------------------------------------------------------//
Function AutoSetColor:Boolean;
Var Ax,Ay,TempColor:Integer;
Begin
Wait(4000);
WriteLn('AutoColor is now gathering the colors, please wait.');
Begin If FindObj(Ax,Ay,'ine',OreColor1,9) Then Begin
TempColor := OreColor1;
OreColor1 := GetColor(Ax,Ay);
If Not SimilarColors(TempColor,OreColor1,14) Then Begin
OreColor1 := TempColor;
OreTol := 9;
End Else If Players[0].String1 = Players[0].String2 Then Result := True;
WriteLn('AutoColor OreColor1 = '+IntToStr(OreColor1));
End;
If Players[0].String1 <> Players[0].String2 Then
Begin If FindObj(Ax,Ay,'ine',OreColor2,9) Then Begin
TempColor := OreColor2;
OreColor2 := GetColor(Ax,Ay);
If Not SimilarColors(TempColor,OreColor2,14) Then Begin
OreColor2 := TempColor;
OreTol := 9;
End Else If (Players[0].String1 <> Players[0].String3) Or (Players[0].String2 = Players[0].String3) Then Result := True;
WriteLn('AutoColor OreColor2 = '+IntToStr(OreColor2));
End; End;
If (Players[0].String1 <> Players[0].String3) Or (Players[0].String2 <> Players[0].String3) Then
Begin If FindObj(Ax,Ay,'ine',OreColor3,9) Then Begin
TempColor := OreColor3;
OreColor3 := GetColor(Ax,Ay);
If Not SimilarColors(TempColor,OreColor3,14) Then Begin
OreColor3 := TempColor;
OreTol := 9;
End Else Result := True;
WriteLn('AutoColor OreColor3 = '+IntToStr(OreColor3));
End; End; End End;
//----------------------------------------------------------------------------// // More Auto Color By: Wizzup? //----------------------------------------------------------------------------//
Procedure TheAutoColor;
Begin If AutoColor Then Begin Repeat
Wait(50);
J := J+1;
Until(AutoSetColor Or (J >4));
J := 0;
End; End;
//----------------------------------------------------------------------------// // FindOre; By: Wizzup? //----------------------------------------------------------------------------//
Function FindOre(MaxTol:Integer):Boolean;
Var Tol,Ex,Ey:Integer;
Begin
H:=H+1;
For G := 1 to H do Begin Case G Of 1: OreColor:= OreColor1;
2: OreColor:= OreColor2;
3: OreColor:= OreColor3;
End; End; While (Not (FindColorTolerance(Ex, Ey, OreColor, MSX1, MSY1, MSX2, MSY2, Tol)) And Not (Tol > MaxTol)) Do Begin
Tol:=Tol+1;
End; If ((FindColorTolerance(Ex, Ey, OreColor, MSX1,MSY1 ,MSX2, MSY2, Tol)) And Not (Tol > MaxTol)) Then Result:=True;
Tol:=1;
Wait(10);
End;
//----------------------------------------------------------------------------// // TheMinCount; By: Wizzup? //----------------------------------------------------------------------------//
Function TheMinCount(TheNewRocks:Boolean):Integer;
Begin If Not NewOres Then Result := 6 Else Result := 3;
End;
//----------------------------------------------------------------------------// // ChangeGas; By: WT Fakawi and Wizzup? //----------------------------------------------------------------------------//
Procedure ChangeGasPixels(Var Gasx,GasY:Integer);
Var
TempX, TempY: Integer;
Begin If FlagPresent Then Begin If FindColorSpiralTolerance(x,y,OreColor,MSX1,MSY1,MSX2,MSY2,4) Then Begin
x := TempX;
y := TempY;
If CheckOre(x,y,OreColor,4) > 2 Then Begin If Distance(MSCX,MSCY,TempX,Tempy) < 40 Then Begin
GasX := x;
GasY := y;
End; End; End; End; End;
//----------------------------------------------------------------------------// // Provided by: Wizzup? //----------------------------------------------------------------------------//
Procedure BitMaps;
Begin
Clay := BitmapFromString(4, 4, '86714C89734D8B7650907A52978' +
'1569781569A8357957E55A1895CA38B5D9F875B9C8559AC9262A8' +
'8F60A58D5FA1895C');
PickaxeMask := BitmapFromString(18, 12, 'z78DA3330400037' +
'3030C001F0CB1203DC3000EDEC22D555F4B48B9E3652622FE5AE2' +
'5DE04EA86097E7B89497B948418252AA99B472889714CBDF42C1F' +
'7099498BBC836C26005E85072C');
OreMask := BitmapFromString(11, 11, 'z78DA73730301033070436' +
'2238B60024C35B84CC0A5923C13F0BB937813F0EB22DE04CC5022' +
'CF04CADD404CC890EA0BFCE2F85D4E4C6A212FF470998FCC0600F' +
'B599CC1');
End;
//----------------------------------------------------------------------------// // Randoms; By: Wizzup? //----------------------------------------------------------------------------//
Function FindRandoms(DoFindPick:Boolean):Boolean;
Begin //If HandleTrade Then Result := True; If FindNormalRandoms Then Result := True;
If FindFight Then Begin Result := True; RunTo(RunDir,True); End; If DoFindPick Then Begin Result := True; FindPick; End; If NoGameTab Then Begin Players[CurrentPlayer].Loc := 'InGameTab'; Logout; Result := True; Exit; End; End;
//----------------------------------------------------------------------------// // MultiPick; By: Wizzup? //----------------------------------------------------------------------------//
Function IsMultiPick(Equipped:Boolean):Boolean;
Begin If Equipped Then Begin
GameTab(4);
If CountItemBmpMaskTol(PickaxeMask,20,25) = 0 Then Begin
GameTab(5);
If Not FindBitMapMaskTolerance(PickaxeMask,x,y,MIX1,MIY1,MIX2,MIY2,20,25) Then Result := False
Else Result := True;
End Else Result := True;
End
Else Begin If CountItemBmpMaskTol(PickaxeMask,20,25) = 0 Then Result := True
Else Result := False;
End; End;
//----------------------------------------------------------------------------// // MineIt; By: Ranger135xp, Credit to Wizzup? //----------------------------------------------------------------------------//
Function MineIt:Boolean;
Var
Dx,Dy,Ex,Ey,GX,GY : Integer;
TempCount : Integer;
Begin If FindOre(OreTol) Then Begin
TempCount := InventoryCount;
Result := True;
If FindObjOre(Dx, Dy, 'Mine', OreColor, OreTol, TheMinCount(NewOres)) Then Begin
H:=0;
If Not GasCheck(Dx, Dy) Then
Begin If Random (9) < 7 Then Begin
Mouse(Dx, Dy, 0, 0, True);
ChangeGasPixels(Dx,Dy);
End; Begin
Mouse(Dx, Dy, 0, 0, False);
ChooseOption(Ex, Ey, 'ine');
End;
ChangeGasPixels(Dx,Dy);
If (FlagPresent) Then Begin
Flag;
Wait(500+Random(500));
End;
MarkTime(Mark);
While Not ((TimeFromMark(Mark) > (1000 * SecondsToWait)) Or (TempCount <> InventoryCount)) Do Begin If GasCheck(Dx, Dy) Then Begin Mouse(MMCX, MMCY, 2, 2, True); Wait(5001+Random(5001)); End;
Wait(50);
FindRandoms(True) End End Else Wait(7000+Random(5000)); // If Gas found..... Then wait. End; End Else If H>2 Then H:=0; if FindMMColor(GX,GY,MineSymbol) then Mouse(GX-9,GY+5,2,2,true);
if FlagPresent then Wait(3000+Random(1000));
End;
//----------------------------------------------------------------------------// // SetOre; By: Wizzup? //----------------------------------------------------------------------------//
Procedure SetOreColor;
Begin Case LowerCase(Players[CurrentPlayer].String1) Of 'copper' : OreColor1:=CopperColor;
'tin' : OreColor1:=TinColor;
'clay' : OreColor1:=ClayColor;
'iron' : OreColor1:=IronColor;
'silver' : OreColor1:=SilverColor;
'coal' : OreColor1:=CoalColor;
'gold' : OreColor1:=GoldColor;
'mithril' : OreColor1:=MithrilColor;
'adamant' : OreColor1:=AdamantColor;
'runite' : OreColor1:=RuniteColor;
End; Case Lowercase(Players[CurrentPlayer].String2) Of 'copper' : OreColor2:=CopperColor;
'tin' : OreColor2:=TinColor;
'clay' : OreColor2:=ClayColor;
'iron' : OreColor2:=IronColor;
'silver' : OreColor2:=SilverColor;
'coal' : OreColor2:=CoalColor;
'gold' : OreColor2:=GoldColor;
'mithril' : OreColor2:=MithrilColor;
'adamant' : OreColor2:=AdamantColor;
'runite' : OreColor2:=RuniteColor;
End; Case LowerCase(Players[CurrentPlayer].String3) Of 'copper' : OreColor3:=CopperColor;
'tin' : OreColor3:=TinColor;
'clay' : OreColor3:=ClayColor;
'iron' : OreColor3:=IronColor;
'silver' : OreColor3:=SilverColor;
'coal' : OreColor3:=CoalColor;
'gold' : OreColor3:=GoldColor;
'mithril' : OreColor3:=MithrilColor;
'adamant' : OreColor3:=AdamantColor;
'runite' : OreColor3:=RuniteColor;
End;
WriteLn('Standard OreColor1 = '+IntToStr(OreColor1)+'; and Standard OreColor2 = '+
IntToStr(OreColor2)+'; and Standard OreColor3 = '+IntToStr(OreColor3)+';');
End;
//----------------------------------------------------------------------------// // StartScript; //----------------------------------------------------------------------------//
Procedure StartScript;
Begin
ClearDebug;
SetVars;
BitMaps;
DeclarePlayers;
CurrentPlayer := StartPlayer;
If not(LoggedIn)then LoginPlayer;
If LoggedIn then wait(1000);
EquipPick2 := Players[CurrentPlayer].Boolean1;
FindPickHeadColor;
Players[CurrentPlayer].Level[15] :=GetSkillLevel('mining');
NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
end;
//----------------------------------------------------------------------------// //----------------------------------------------------------------------------//
Procedure DoChat;
Begin
SetChat('On', 1);
SetChat('On', 1);
SetChat('Off', 2);
SetChat('Off', 2);
SetChat('On', 3);
SetChat('On', 3);
End;
//----------------------------------------------------------------------------// //----------------------------------------------------------------------------// Begin
acc2:= 0.85;
SetupSRL;
SetupSRLMining;
SetMouseMode(False);
StartScript;
DoChat;
MakeCompass('N');
AntiBan;
FindWestVarrockColors;
repeat
MakeCompass('N');
WalkToMines;
SetOreColor;
TheAutoColor;
Wait(2000);
SetRun(True);
repeat
MineIt;
Until(InvFull);
SetRun(False);
MinetoBank;
Almost1;
Almost2;
Bank;
ProgressReport;
until(False);
End.
in the lind OreTol,J,H,G,SecondsToWait,Clay,PickaxeMask,
there used to be
,OreTol,J,H,G,SecondsToWait,Clay,PickaxeMask,
simply delete the "," from the begining of OreTol and that'll fix that error.
There was another error after that which I didnt bother to fix cause my friend
said to make my own basically so yeah.