Sir R. M8gic1an
2009-08-12 14:54:15
This is here for people to give opinions. Do take into account this was for #30 or something.
~RM
{------------------------------------------------------------------------------]
__________.__ __________
\______ \__| _____ _____\______ \ ____ _____ ______ ___________
| _/ |/ \ / \| _// __ \\__ \ \____ \_/ __ \_ __ \
| | \ | Y Y \ Y Y \ | \ ___/ / __ \| |_> > ___/| | \/
|____|_ /__|__|_| /__|_| /____|_ /\___ >____ / __/ \___ >__|
\/ \/ \/ \/ \/ \/|__| \/
By ****
[------------------------------------------------------------------------------]
[ >>>> DESCRIPTION <<<< ]
[------------------------------------------------------------------------------]
This script was made for the Srl Junior Member's Competition #1. It's
suppoused to mine all 4 ores in the Rimmington Mines, and sell them at
the shop.
[------------------------------------------------------------------------------]
[ >>>> CURRENT FEATURES <<<< ]
[------------------------------------------------------------------------------]
o Mine all 4 ores plus clay
o Antiban
o Antirandoms
o Multi-player
o Selling in Rimmington General Shop
o Possibility to use Pickaxe in Inventory or Equipped
o Progress Report
o Banking at draynor
o Dropping ores
o Srl Stats
o Auto Detect Player Position
o Auto Detect Highest Pickaxe
o Auto Detect Best Rock we can mine
o Failsafes
[------------------------------------------------------------------------------]
[ >>>> INSTRUCTIONS <<<< ]
[------------------------------------------------------------------------------]
1. Start with pickaxe in your inv or equipped.
2. Make sure you are either at the shop, at the bank or at the mines.
3. Have extra pickaxes in your bank
4. Declare your players.
[------------------------------------------------------------------------------]
[ >>>> NOTE <<<< ]
[------------------------------------------------------------------------------]
- If you choose to bank, at it fails the first try, give it another run,
I'm sure it will manage to bank stuff and bank, as i got a 2 hour
proggy from this, with banking enabled.
[------------------------------------------------------------------------------]
[ ]
[------------------------------------------------------------------------------}
program RimmReaper;
{.include SRL/SRL/misc/SMART.scar}
{.include SRL/SRL.scar}
{.include SRL/SRL/Skill/Mining.scar}
const
SmartWorldNo = 119; //The world on which you want to auto.
Signed = True; //Signed Java Client?
SRLStatsID = ''; //SRL Stats ID
SRLStatsPass = ''; //SRL Stats Password
procedure DeclarePlayers;
begin
NumberOfPlayers(1);
CurrentPlayer := 0;
Players[0].Name := ''; //Player username
Players[0].Pass := ''; //Player password
Players[0].Nick := ''; //4 - 5 chars
Players[0].Loc := 'autodetect'; //Player Location (Shop - Mine - Autodetect)
Players[0].Pin := ''; //Bank Pink, leave as '' for no bank pin
Players[0].Active := True; //Is the player active?
Players[0].Integers[0] := 1000; //Loads before switching. Less loads = less randoms
Players[0].Strings[0] := 'bronze'; //What pick to use? 'Bronze, Iron, Steel, Mith, Addy, Rune, Highest'
Players[0].Strings[1] := 'Iron'; //What rock to mine? 'Tin, Copper,
//Clay, Iron, Gold,Highest'
Players[0].Strings[2] := 'drop'; //Bank, Drop, Sell.
end;
type
TPick = record
Lvl, DTM, WieldLvl,Color: Integer;
Name, UpText: string;
Equipable: boolean;
end;
type
TRock = record
Lvl,Color1,color2,color3,DTM,waittime: Integer; //colors could be a TintegerArray?
Name: string;
end;
var
Pick : Tpick;
Rock : Trock;
AntibanTime,CurLoads,BrokenPickaxe,TinCount,Slvl : Integer;
SwitchTabsTime,x,y,orecount,totalore,ClayCount,Glvl : Integer;
TotalLoads,IronCount,GoldCount,CopperCount,I,Elvl : Integer;
LevelsGained,GemDtm,GrassBMP,Grass2BMP,Grass3BMP : Integer;
Banked, Dropped, Sold, Picks : Integer;
BankPick: Boolean;
Procedure LoadDtms;
begin
BrokenPickaxe := DTMFromString('78DA6314606660D8CAC8800C02BCBD18FE036' +
'990E87F206004A9D98CAA06220B23813407A639C86AC09815A866' +
'3B01353C40353B09A86107AA394A845DE709A8E104AA3949400D3' +
'F50CD3E026A44816AF61050230554B397801A3922CC9106AAD94D' +
'847B08842100A7BC1179');
gemdtm := DTMFromString('78DA6314626660F8C8C8800A18914820CD0A5' +
'4F380801A36A09AD704D47001D5DC25A0861FA8E60E0135624035' +
'F708A81107AA7944408D2450CD5B22EC22143E3C84D5000062630' +
'9E9');
end;
Procedure FreeDtms;
begin
FreeDtm(BrokenPickaxe);
FreeDTM(Pick.DTM);
FreeDTM(gemDTM);
end;
function FindDraynorRoadColor: Integer;
var
GC, a, l, TestColor, Red, Green, Blue : integer;
var
P:array of Tpoint;
begin
GC := 5659990;
Flag;
FindColorsSpiralTolerance(MMX1, MMY1, P, GC, MMX1, MMY1, MMX2, MMY2, 60);
l:=GetArrayLength(P);
for a:= 0 to l-1 do
begin
if rs_OnMinimap(P[a].x,P[a].y) then
begin
TestColor := GetColor(P[a].x,P[a].y);
if SimilarColors(TestColor,GC,60) then
begin
ColorToRGB(TestColor,Red,Green,Blue);
if InRange((Red - Green),5,10) then
if InRange((Red - Blue),4,10) then
if GetColor(P[a].x + 5, P[a].y + 5) = TestColor then
if GetColor(P[a].x + 3, P[a].y + 3) = TestColor then
if GetColor(P[a].x, P[a].y + 5) = TestColor then
if GetColor(P[a].x + 5, P[a].y) = TestColor then
if GetColor(P[a].x, P[a].y + 3) = TestColor then
if GetColor(P[a].x + 3, P[a].y) = TestColor then
if GetColor(P[a].x + 5, P[a].y + 3) = TestColor then
if GetColor(P[a].x + 3, P[a].y + 5) = TestColor then
begin
Result := TestColor;
RoadColor := TestColor;
WriteLn('Draynor RoadColor = ' + IntToStr(TestColor));
Exit;
end;
end;
end;
end;
WriteLn('Could not find Draynor Road Color!');
Result := 0;
end;
procedure Next;
begin
Players[CurrentPlayer].Active := False;
Logout;
end;
procedure FSymbol(x,y:integer;symbol:string);
begin
SymbolAccuracy := 0.5;
If FindSymbol(x,y,symbol) then
begin
Writeln('Walking to '+Capitalize(symbol)+' Symbol');
Mouse(x,y,4,4,true);
FindNormalRandoms;
FFlag(0);
end else
begin
Writeln('Couldn''t Find '+Capitalize(symbol)+' Symbol');
Next;
end;
end;
function FindOurObject(x,y:integer;uptextmulti:TstringArray;color:TIntegerArray;ErrorMsg,UpText,Option:string):boolean;
var
tries:integer;
begin
Result := False;
tries:=0;
repeat
if (not (FindObjCustom(x, y, uptextmulti, color, 10))) then
begin
Wait(100+random(100));
Tries := Tries + 1;
if(Tries = 20)then
begin
Result := False;
Writeln(ErrorMsg);
Exit;
end;
end else
if (FindObjCustom(x, y, uptextmulti, color, 10)) then
begin
Mouse(x, y, 2, 2,false);
Wait(200 + random(100));
If IsUpText(UpText) then
Mouse(x, y, 4, 4, False);
ChooseOption(Option);
FindNormalRandoms;
FFlag(0);
Wait(2000 + Random(1000));
Result := True;
Break;
end;
until(False);
end;
procedure RWE(color,tol,startangle,endangle,radius,mx,my:integer);
var
tpa:TpointArray;
var x,y:integer;
begin
If RadialWalKEx(TPA, MMCX, MMCY, color, tol, startangle, endangle, radius) Then
Begin
MiddleTPAex(TPA, X, Y);
MFF(X, Y, 1, 0);
FFlag(0);
End Else
Begin
Writeln('Couldn''t walk!');
mouse(mx, my,6,6,true);
FFlag(0);
End;
end;
procedure ChangeLoc(loc:string);
begin
Writeln('Our Loc is ' +loc);
Players[CurrentPlayer].Loc := Capitalize(loc);
end;
procedure DoAB;
var
Mx, My, C: Integer;
begin
if (not(LoggedIn)) then Exit;
if (TimeFromMark(AntiBanTime) < 40000 + Random(5000)) then Exit;
C := Random(30);
case (c) of
0: begin
Status('Antiban 0');
Wait(1000 + Random(500));
end;
1: begin
Status('Antiban 1');
MMouse(Random(MSX2), Random(MSY2), 0, 0);
Wait(200 + random(100));
if (IsUpText('opt')) then
begin
GetMousePos(mx, my);
Mouse(mx, my, 1, 1, false);
Wait(100 + random(200));
ChooseOption('amine');
end;
Wait(1000 + Random(400));
end;
2: begin
if (Random(5) = 1) then
begin
Status('Antiban 2');
HoverSkill('Mining', false);
GameTab(4);
end;
end;
3: begin
if (InvCount < 1) then Exit;
Status('Antiban 3');
MouseBox(MIX1,MIY1,MIX2,MIY2,3);
Wait(200 + random(100));
if not IsUpText('ption') then Exit;
GetMousePos(mx,my);
Mouse(mx,my,1,1,false);
ChooseOption('xamine');
end;
4: begin
Status('Antiban 4');
MMouse(Random(MSX2) + 1, Random(MSX2) + 1, 1, 1);
Wait(500 + random(500));
end;
5: begin
Status('Antiban 5');
GameTab(Random(14) + 1);
Wait(500 + Random(500));
GameTab(4);
end;
6: begin
Status('Antiban 6');
SleepAndMoveMouse(4000 + Random(1000));
end;
7: begin
Status('Antiban 7');
FixChat;
end;
8: begin
Status('Antiban 8');
BoredHuman;
end;
else Exit;
end;
MarkTime(AntiBanTime);
end;
function gotpick:boolean;
begin
Result := false;
Gametab(5);
Wait(500 + Random(500));
IF FindDTM(pick.dtm,x,y,MIX1,MIY1,MIX2,MIY2) then
Result := true
else
begin
Gametab(4);
Wait(500 + Random(500));
IF FindDTM(pick.dtm,x,y,MIX1,MIY1,MIX2,MIY2) then
Result := True;
end;
end;
function lostpick:boolean;
begin
Result:= false;
If(FindColor(X, Y, 16711680, 190, 440, 205, 455))Then
If(FindText(X, Y, 'ickax', NPCChars, 125, 375, 180, 400))Then
if not Gotpick then
Begin
Result:= True;
Writeln('We Lost Our Pick - Back To Bank');
End;
end;
Procedure dothewait(howlong:integer;uptextmulti:TstringArray;color:TintegerArray;FindObj:boolean);
var
waittime,x,y:integer;
begin
MarkTime(SwitchTabsTime);
MarkTime(WaitTime);
if FindObj then
repeat
if (not(LoggedIn)) then Exit;
if (TimeFromMark(SwitchTabsTime) >= 13000 +Random(5000)) then
begin
Status('Switching Tabs');
GameTab(Random(14)+1);
Wait(500 + Random(500));
GameTab(4);
MMouse(Random(MSX2), Random(MSX1), 1, 1);
DoAb;
MarkTime(SwitchTabsTime);
end;
until((TimeFromMark(WaitTime) >= howlong + Random(5000)) or (FindObjCustom(x, y, uptextmulti, color, 10)))
else
repeat
if (not(LoggedIn)) then Exit;
if (TimeFromMark(SwitchTabsTime) >= 13000 +Random(5000)) then
begin
Status('Switching Tabs');
GameTab(Random(14)+1);
Wait(500 + Random(500));
GameTab(4);
MMouse(Random(MSX2), Random(MSX1), 1, 1);
DoAb;
MarkTime(SwitchTabsTime);
end;
until(TimeFromMark(WaitTime) >= howlong + Random(5000));
Writeln('Succesfully Waited ' + IntToStr(TimeFromMark(WaitTime)/1000) + ' secs');
end;
procedure WalkTo(where:string);
var tries:integer;
begin
if not loggedin then exit;
SetRun(true);
MakeCompass('N');
SetAngle(True);
SymbolAccuracy := 0.45;
FSymbol(x,y,'mining site');
If Not FindOurObject(x,y,['ake', 'pade'], [10988979, 8093829, 10199720],'Coudln''t Find Spade!','pade','alk') then
Next
else
begin
FindNormalRandoms;
case Capitalize(where) of
'Iron Ore': begin
Mouse(596, 83, 4, 4, true);
FFlag(0);
end;
'Gold Ore': begin
Mouse(628, 109, 4, 4, true);
FFlag(0);
end;
'Tin Ore': begin
Mouse(656, 97, 4, 4, true);
FFlag(0);
end;
'Copper Ore': begin
Mouse(628, 56, 4, 4, true);
FFlag(0);
end;
'Clay': begin
Mouse(656, 95, 4, 4, true);
FFlag(0);
end;
'Center': Exit;
end;
Writeln('Succesfully Walked To '+Where);
SymbolAccuracy := 0.8;
end;
end;
procedure WalkToOpposite(where:string);
begin
case Capitalize(where) of
'Clay': WalkTo('Iron Ore');
'Iron Ore': WalkTo('Clay');
'Gold Ore': WalkTo('Copper Ore');
'Copepr Ore': WalkTo('Gold Ore');
'Tin Ore': WalkTo('Iron Ore');
end;
end;
procedure HandleFight;
begin
if FindFight then
begin
WalkToOpposite(Rock.Name);
Wait(10000 + Random(5000));
WalkTo(Rock.Name);
end;
end;
procedure WalkToShop;
var tries:integer;
begin
if not loggedin then exit;
SetRun(true);
MakeCompass('N');
SetAngle(True);
RadialRoadWalk(FindRoadColor, 179, 238, 78, 0, 1);
FFlag(3);
RadialRoadWalk(RoadColor, 251, 289, 68, 1, 0);
FFlag(3);
SymbolAccuracy := 0.45;
FSymbol(x,y,'portal'); //Failsafe, not really needed
If Not FindOurObject(x,y,['ort', 'tal'], [6105166, 10178177, 11088766,5384260],'Coudln''t Find Portal!','ortal','alk') then
Next
else
FSymbol(x,y,'shop');
tries := 0;
Wait(1000 + random(1000));
MakeCompass('E');
If Not FindOurObject(x,y,['limb', 'add'], [2708336, 4419471, 3627637],'Coudln''t Find Ladder!','adder','alk') then
Next;
end;
procedure WalkToMines;
var tries:integer;
begin
if not loggedin then exit;
SetRun(true);
MakeCompass('N');
SetAngle(True);
SymbolAccuracy := 0.45;
FSymbol(x,y,'portal');
If Not FindOurObject(x,y,['ort', 'tal'], [6105166, 10178177, 11088766,5384260],'Coudln''t Find Portal!','ortal','alk') then
Next
else
Wait(2000 + Random(1000));
RadialRoadWalk(FindRoadColor, 55, 116, 70, 1, 0);
FFlag(2);
RadialRoadWalk(FindRoadColor, 0, 90, 80, 0, 0);
FFlag(2);
end;
Procedure WalkFromBankToMine;
var
grass:integer;
TPA : TPointArray;
begin
if not loggedin then exit;
MakeCompass('N');
SetAngle(true);
SetRun(true);
RadialRoadWalk(FindDraynorRoadColor,300,260,60,2,2); //I was getting problems with FindRoadColor
FFlag(2);
SymbolAccuracy := 0.6;
FSymbol(x,y,'quest');
RWE(1863762,60,180,450,70,622,MMCY-15);
RWE(1731412,60,180,450,70,622,MMCY-15);
RadialRoadWalk(FindRoadColor, 270, 360, 70, 1, 1);
FFlag(2);
RadialRoadWalk(FindRoadColor, 200, 334, 46, 1, 1);
FFlag(2);
FSymbol(x,y,'tree');
Fflag(0);
RadialRoadWalk(FindRoadColor, 254, 302, 60, 1, 1);
Fflag(2);
RadialRoadWalk(findRoadColor, 207, 261, 65, 1, 1);
Fflag(2);
FSymbol(x,y,'magic shop');
RWE(6451836,70,220,130,60,mmcx,mmcy+30);
RWE(6451836,70,270,130,60,mmcx,mmcy+30);
RWE(2329711,60,235,300,50,568,104);
RWE(2329719,60,235,300,50,570,90);
RWE(1071749,100,180,360,60,mmcx-30,mmcy);
RWE(1071749,100,180,360,60,mmcx-30,mmcy);
end;
procedure WalkFromMineToBank;
var
grass:integer;
TPA : TPointArray;
begin
if not loggedin then exit;
MakeCompass('N');
SetAngle(true);
SetRun(false);
FindNormalRandoms;
WalkTo('center');
RWE(2329719,60,70,135,60,690,77);
RWE(2329711,60,70,100,60,680,77);
RWE(6451836,70,70,100,60,MMCX + 20,MMCY);
FSymbol(x,y,'jewelery');
FSymbol(x,y,'magic shop');
RadialRoadWalk(FindRoadColor, 90, 35, 60, 1, -1);
FFlag(2);
RadialRoadWalk(findRoadColor, 78, 35, 60, 1, 1);
FFlag(2);
RadialRoadWalk(findRoadColor, 135, 35, 50, 1, 1);
FFlag(0);
RadialRoadWalk(findRoadColor, 135, 35, 30, 1, 1);
FFlag(0);
FSymbol(x,y,'tree');
RadialRoadWalk(findRoadColor, 35, 135, 64, 1, 1);
FFlag(0);
RadialRoadWalk(findRoadColor, 135, 65, 50, 1, 1);
FFlag(0);
FindSymbol(x,y,'dungeon');
RWE(2196856,70,135,225,60,611,130);
RadialRoadWalk(findRoadColor, 180, 230, 60, 1, 1);
FFlag(0);
RadialRoadWalk(findRoadColor, 160, 220, 60, 1, 1);
FFlag(0);
RadialRoadWalk(findRoadColor, 160, 90, 50, 1, 1);
FFlag(0);
FindSymbol(x,y,'bank');
end;
Procedure SellOres;
var tries:integer;
begin
if not loggedin then exit;
MakeCompass('E');
SetAngle(true);
If Not FindOurObject(x,y,['rade', 'hop'], [11713724,13028814,11911103,11187637],'Coudln''t Find Shoppers!','hop','rade') then
Next
else
Wait(5000 + Random(1000));
OreCount := CountItems(Rock.DTM, 'dtm', [20]);
Writeln('We have '+IntToStr(Orecount)+' ores');
IncEx(TotalOre, orecount);
IncEx(Sold, orecount);
IncEx(Players[CurrentPlayer].Integers[1],orecount);
case Rock.Name of
'Clay' : IncEx(ClayCount, orecount);
'Tin Ore' : IncEx(TinCount, orecount);
'Copper Ore' : IncEx(CopperCount, orecount);
'Iron Ore' : IncEx(IronCount, orecount);
'Gold Ore' : IncEx(GoldCount, orecount);
end;
Repeat
If not (FindDTM(Rock.DTM,x,y,MIX1,MIY1,MIX2,MIY2)) then Exit;
If FindDTM(Rock.DTM,x,y,MIX1,MIY1,MIX2,MIY2) then
begin
Mouse(x,y,3,3,false);
ChooseOption('50');
Wait(300+Random(300));
end;
until(not (FindDTM(Rock.DTM,x,y,MIX1,MIY1,MIX2,MIY2)));
If FindDTM(GemDTM,x,y,MIX1,MIY1,MIX2,MIY2) then
begin
Mouse(x,y,3,3,false);
ChooseOption('50');
Wait(300+Random(300));
end;
WriteLn('Succesfully sold '+ Rock.Name);
Mouse(485, 41,3,3,true);
Wait(2000 + Random(1000));
end;
function MineOres:boolean;
var
tries:integer;
begin
if not loggedin then exit;
SetRun(true);
MakeCompass('N');
Status('Mining');
Result := True;
tries := 0;
SetAngle(true);
repeat
if not LoggedIn then Exit;
if (not (FindObjCustom(x, y, ['Mi', 'ne'], [Rock.Color1, Rock.Color2, Rock.Color3], 10))) then
begin
Wait(100+random(100));
Tries := Tries + 1;
if(Tries = 10)then
begin
Writeln('Couldn''t find rock, waiting for respawn...');
If Rock.Name = 'Gold Ore' then
DoTheWait(100000,['Mi', 'ne'], [Rock.Color1, Rock.Color2, Rock.Color3],True)
else DoTheWait(100000,['Mi', 'ne'], [Rock.Color1, Rock.Color2, Rock.Color3],False);
end;
if(Tries = 20)then
begin
Next;
Writeln('Couldn''t find rock');
Exit;
end;
end else
if FindObjCustom(x, y, ['Min', 'ine'], [Rock.Color1, Rock.Color2, Rock.color3], 10) then
begin
case (Random(2)) of
0: begin
Mouse(x, y, 4, 4,false);
ChooseOption('ine');
Wait(100+random(100));
FindNormalRandoms;
end;
1: begin
If IsUpText('ine') then
Mouse(x, y, 4, 4, True);
Wait(100+random(100));
FindNormalRandoms;
end;
end;
tries := 0;
HandleFight;
If FindGas(x,y) then
begin
Writeln('Gas Detected');
WalkTo('center');
Exit;
end;
Wait(Rock.WaitTime);
If FindGas(x,y) then
begin
Writeln('Gas Detected');
WalkTo('center');
Exit;
end;
HandleFight;
FindPick;
end;
until (InvFull or LostPick)
end;
procedure DropProc;
begin
if not loggedin then exit;
DoAb;
FindNormalRandoms;
Status('Dropping Ores');
GameTab(4);
Wait(100+Random(100));
if not FindDTM(Rock.DTM, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Writeln('There''s Nothing to Drop!');
Exit;
end;
if FindDTM(Rock.DTM, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
OreCount := CountItems(Rock.DTM, 'dtm', [20]);
Writeln('We have '+IntToStr(Orecount)+' ores');
IncEx(TotalOre, orecount);
IncEx(Dropped, orecount);
IncEx(Players[CurrentPlayer].Integers[1],orecount);
case Rock.Name of
'Clay' : IncEx(ClayCount, orecount);
'Tin Ore' : IncEx(TinCount, orecount);
'Copper Ore' : IncEx(CopperCount, orecount);
'Iron Ore' : IncEx(IronCount, orecount);
'Gold Ore' : IncEx(GoldCount, orecount);
end;
repeat
ClickAllItems(Rock.DTM, 'dtm', 'rop', (100 + Random(100)), [30]);
until(not FindDTM(Rock.DTM, x, y, MIX1, MIY1, MIX2, MIY2));
end;
WriteLn('Succesfully dropped '+ Rock.Name);
end;
procedure BankProc;
var
x,y,BankTries,WT:integer;
begin
if not loggedin then exit;
BankTries := 0;
MakeCompass('N');
SetAngle(true);
BankPick := GotPick;
Wait(100+Random(100));
GameTab(4);
Wait(100+Random(100));
if not FindDTM(Rock.DTM, x, y, MIX1, MIY1, MIX2, MIY2) and BankPick then
begin
Writeln('There''s Nothing to bank!');
Exit;
end;
repeat
OpenBankFast('db');
Inc(BankTries);
until (BankScreen) or (PinScreen) or (BankTries >= 10);
Wait(1000+Random(1000));
If PinScreen then InPin(Players[CurrentPlayer].Pin);
repeat
if(FindDTM(Rock.DTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
begin
OreCount := CountItems(Rock.DTM, 'dtm', [20]);
Writeln('We have '+IntToStr(Orecount)+' ores');
IncEx(TotalOre, orecount);
IncEx(Banked, orecount);
IncEx(Players[CurrentPlayer].Integers[1],orecount);
case Rock.Name of
'Clay' : IncEx(ClayCount, orecount);
'Tin Ore' : IncEx(TinCount, orecount);
'Copper Ore' : IncEx(CopperCount, orecount);
'Iron Ore' : IncEx(IronCount, orecount);
'Gold Ore' : IncEx(GoldCount, orecount);
end;
FixBank;
Mouse(x + 2, y + 2, 5, 5, False);
wait(100+Random(200));
ChooseOption('ll');
wait(500+Random(400));
WriteLn('Succesfully banked '+ Rock.Name);
end;
until not (FindDTM(Rock.DTM, x, y, MIX1, MIY1, MIX2, MIY2))
If not BankPick then
begin
WriteLn('Withdrawing Pickaxe');
SearchBank(Lowercase(Pick.Name));
Wait(1000 + Random(1000));
if (FindDTM(Pick.DTM, x, y, MSX1, MSY1, MSX2, MSY2)) then
begin
Mouse(x, y, 5, 5, True);
WT := GetSystemTime;
while (not(FindDTM(Pick.DTM, x, y, MIX1, MIY1, MIX2, MIY2))) and (GetSystemTime - WT < 3500) do
Wait(200);
WriteLn('Withdrew ' + Pick.Name);
Inc(picks);
end;
end;
If FindDTM(GemDTM,x,y,MIX1,MIY1,MIX2,MIY2) then
begin
Mouse(x,y,3,3,false);
ChooseOption('ll');
Wait(300+Random(300));
end;
CloseBank;
if BankTries >= 10 then
begin
WriteLn('Couldn''t Find Bank!');
Next;
BankTries := 0;
CloseBank;
Wait(100+random(200));
end;
end;
Procedure SetPickaxe;
begin
if (Players[CurrentPlayer].Strings[0] = 'Highest') then
begin
if (InRange(Players[CurrentPlayer].Level[15], 2, 5)) then
Players[CurrentPlayer].Strings[0] := 'Iron'
else
if (InRange(Players[CurrentPlayer].Level[15], 6, 20)) then
Players[CurrentPlayer].Strings[0] := 'Steel'
else
if (InRange(Players[CurrentPlayer].Level[15], 21, 30)) then
Players[CurrentPlayer].Strings[0] := 'Mith'
else
if (InRange(Players[CurrentPlayer].Level[15], 31, 40)) then
Players[CurrentPlayer].Strings[0] := 'Addy'
else
Players[CurrentPlayer].Strings[0] := 'Rune'
end;
case (Players[CurrentPlayer].Strings[0]) of
'Bronze': with Pick do
begin
Name := 'Bronze Pickaxe';
UpText := 'Bronze';
Lvl := 1;
WieldLvl := 1;
DTM := DTMFromString('78DA63DCCEC4C010C6C8800C0C95D818FE036' +
'990E87F2060DC0454138DAA06220B2381F406A09A24026A3602D5' +
'241350B305A8269E809A6D40355104D4EC02AA0921A0662F508D3' +
'F0135C7806A8208A8390154134C40CD4922CC390254E34B40CD7E' +
'A01A6F22FCE54E44181272CF0EA01A3F026A7612763300560517B' +
'8');
Color := 1649206;
end;
'Iron': with Pick do
begin
Name := 'Iron Pickaxe';
UpText := 'Iron';
Lvl := 1;
WieldLvl := 1;
DTM := DTMFromString('78DA63DCCEC4C010C6C8800C0C95D818FE036' +
'990E87F2060DC0454138DAA06220B2381F406A09A24026A3602D5' +
'241350B305A8269E809A6D40355104D4EC02AA0921A0662F508D3' +
'F0135C7806A8208A8390154134C40CD4922CC390254E34B40CD7E' +
'A01A6F22FCE54E44181272CF0EA01A3F026A7612763300560517B' +
'8');
Color := 3750206;
end;
'Steel': with Pick do
begin
Name := 'Steel Pickaxe';
UpText := 'Steel';
Lvl := 6;
WieldLvl := 5;
DTM := DTMFromString('78DA63DCCEC4C010C6C8800C0C95D818FE036' +
'990E87F2060DC0454138DAA06220B2381F406A09A24026A3602D5' +
'241350B305A8269E809A6D40355104D4EC02AA0921A0662F508D3' +
'F0135C7806A8208A8390154134C40CD4922CC390254E34B40CD7E' +
'A01A6F22FCE54E44181272CF0EA01A3F026A7612763300560517B' +
'8');
Color := 5592411;
end;
'Mith': with Pick do
begin
Name := 'Mithril Pickaxe';
UpText := 'Mithril';
Lvl := 21;
WieldLvl := 20;
DTM := DTMFromString('78DA63DCCEC4C010C6C8800C0C95D818FE036' +
'990E87F2060DC0454138DAA06220B2381F406A09A24026A3602D5' +
'241350B305A8269E809A6D40355104D4EC02AA0921A0662F508D3' +
'F0135C7806A8208A8390154134C40CD4922CC390254E34B40CD7E' +
'A01A6F22FCE54E44181272CF0EA01A3F026A7612763300560517B' +
'8');
Color := 4599856;
end;
'Addy': with Pick do
begin
Name := 'Adamant Pickaxe';
UpText := 'Adamant';
Lvl := 31;
WieldLvl := 30;
DTM := DTMFromString('78DA63DCCEC4C010C6C8800C0C95D818FE036' +
'990E87F2060DC0454138DAA06220B2381F406A09A24026A3602D5' +
'241350B305A8269E809A6D40355104D4EC02AA0921A0662F508D3' +
'F0135C7806A8208A8390154134C40CD4922CC390254E34B40CD7E' +
'A01A6F22FCE54E44181272CF0EA01A3F026A7612763300560517B' +
'8');
Color := 3292722;
end;
'Rune': with Pick do
begin
Name := 'Rune Pickaxe';
UpText := 'Rune';
Lvl := 41;
WieldLvl := 40;
DTM := DTMFromString('78DA63DCCEC4C010C6C8800C0C95D818FE036' +
'990E87F2060DC0454138DAA06220B2381F406A09A24026A3602D5' +
'241350B305A8269E809A6D40355104D4EC02AA0921A0662F508D3' +
'F0135C7806A8208A8390154134C40CD4922CC390254E34B40CD7E' +
'A01A6F22FCE54E44181272CF0EA01A3F026A7612763300560517B' +
'8');
Color := 5590329;
end;
end;
if (Players[CurrentPlayer].Level[15] < Pick.Lvl) then
begin
Writeln('Our Mining level isn''t enough to use '+Pick.Name);
Exit;
end;
if (Players[CurrentPlayer].Level[1] < Pick.WieldLvl) then
begin
Writeln('We can''t wield this pick yet, too low attack level.');
Players[CurrentPlayer].Booleans[0] := False;
end else
begin
Writeln('We can wield this pick!');
GameTab(5);
Wait(1000 + Random(1000));
If FindDtm(Pick.Dtm,x,y,MIX1,MIY1,MIX2,MIY2) then
begin
Players[CurrentPlayer].Booleans[0] := True;
Writeln('Our Pick Is Wielded');
GameTab(4);
end else
begin
GameTab(4);
Wait(1000 + Random(1000));
If FindDtm(Pick.Dtm,x,y,MIX1,MIY1,MIX2,MIY2) then
begin
MMouse(x+5,y+5,3,3);
Wait(200 + random(100));
If IsUpText('ield') then Mouse(x+5,y+5,3,3,true);
Players[CurrentPlayer].Booleans[0] := True;
FindNormalRandoms;
Writeln('Our Pick Is Wielded');
end
else Players[CurrentPlayer].Booleans[0] := False;
end;
end;
Writeln('We are using: ' + Pick.Name);
end;
procedure SetRock;
begin
if (Players[CurrentPlayer].Strings[1] = 'Highest') then
begin
if (InRange(Players[CurrentPlayer].Level[15], 1, 14)) then
Players[CurrentPlayer].Strings[1] := 'Copper'
else
if (InRange(Players[CurrentPlayer].Level[15], 15, 39)) then
Players[CurrentPlayer].Strings[1] := 'Iron'
else
if (InRange(Players[CurrentPlayer].Level[15], 40, 99)) then
Players[CurrentPlayer].Strings[1] := 'Gold';
end;
case (Players[CurrentPlayer].Strings[1]) of
'Tin': with Rock do
begin
Name := 'Tin Ore';
Lvl := 1;
Color1 := 10461356;
Color2 := 10066597;
Color3 := 8092548;
WaitTime := 4000;
DTM := DTMFromString('78DA63BCC0C8C02007C448E07EA315C37F200' +
'D12FD0F048CFB812C59543510591809A40F00596A04D49C02B294' +
'09A8390B64691350739E08736E0259AA04D45C07B2E409A8B9076' +
'44912507315C81224A0E63490254644F80812A186405C00004D9F' +
'12D1');
end;
'Copper': with Rock do
begin
Name := 'Copper Ore';
Lvl := 1;
Color1 := 5344482;
Color2 := 6526952;
Color3 := 4882382;
WaitTime := 4000;
DTM := DTMFromString('78DA63BCC0C8C02007C448E07EA315C37F200' +
'D12FD0F048CFB812C59543510591809A40F00596A04D49C02B294' +
'09A8390B64691350739E08736E0259AA04D45C07B2E409A8B9076' +
'44912507315C81224A0E63490254644F80812A186405C00004D9F' +
'12D1');
end;
'Clay': with Rock do
begin
Name := 'Clay';
Lvl := 1;
Color1 := 7712719;
Color2 := 8698069;
Color3 := 5141641;
WaitTime := 4000;
DTM := DTMFromString('78DA63FCC4C4C030899101192CEC8A653002D' +
'220D1FF40C0F80EA8662AAA1A882C8C04D2AF806A2610500332A7' +
'8F809A2F4035BD04D47C04AAE922A0E62B504D270135DF8930E73' +
'7504D0F0135FF88F0D72FA09A7E026A7E60C605567F4D21A00614' +
'A7D3F0AB0100EF2D1B39');
end;
'Iron': with Rock do
begin
Name := 'Iron Ore';
Lvl := 15;
Color1 := 2635352;
Color2 := 2898527;
Color3 := 2174023;
If (Pick.UpText = 'Rune') or (Pick.UpText = 'Adamant') then
WaitTime := 3000
else WaitTime := 7000;
DTM := DTMFromString('78DA63BCC0C8C02007C448E07EA315C37F200' +
'D12FD0F048CFB812C59543510591809A40F00596A04D49C02B294' +
'09A8390B64691350739E08736E0259AA04D45C07B2E409A8B9076' +
'44912507315C81224A0E63490254644F80812A186405C00004D9F' +
'12D1');
end;
'Gold': with Rock do
begin
Name := 'Gold Ore';
Lvl := 40;
Color1 := 1614535;
Color2 := 1816287;
Color3 := 3526395;
If (Pick.UpText = 'Rune') or (Pick.UpText = 'Adamant') then
WaitTime := 6000
else WaitTime := 12000;
DTM := DTMFromString('78DA63BCC0C8C02007C448E07EA315C37F200' +
'D12FD0F048CFB812C59543510591809A40F00596A04D49C02B294' +
'09A8390B64691350739E08736E0259AA04D45C07B2E409A8B9076' +
'44912507315C81224A0E63490254644F80812A186405C00004D9F' +
'12D1');
end;
end;
if (Players[CurrentPlayer].Level[15] < Rock.Lvl) then
begin
Writeln('Our Mining level is too low to mine '+Rock.Name);
Exit;
end else
Writeln('We Are Mining '+Rock.Name);
end;
Procedure SetLoc;
begin
If (Capitalize(Players[CurrentPlayer].Loc) = 'Autodetect') then
begin
SymbolAccuracy := 0.7;
If FindSymbol(x,y,'store') Then Players[CurrentPlayer].Loc := 'Shop'
else
If FindSymbol(x,y,'bank') Then Players[CurrentPlayer].Loc := 'Bank'
else
If FindSymbol(x,y,'mining spot') Then Players[CurrentPlayer].Loc := 'Mine'
else
begin
Writeln('Couldn''t AutoDetect Player Position!');
end;
end;
end;
procedure ProgressReport;
var
Exp: Integer;
begin
WriteLn('[-------------------------------------------------------------------------------]');
WriteLn('[ RimmReaper By ****** ]');
WriteLn('[-------------------------------------------------------------------------------]');
WriteLn(PadR('[ Script Has Run For: ' + TimeRunning, 80) + ']');
WriteLn(PadR('[ We Did A Total Of ' + IntToStr(TotalLoads) + ' Loads', 80) + ']');
case Capitalize(Players[CurrentPlayer].Strings[2]) of
'Bank' :WriteLn(PadR('[ Banked A Total Of: ' + IntToStr(TotalOre) + ' Ores', 80) + ']');
'Sell' :WriteLn(PadR('[ Sold A Total Of: ' + IntToStr(TotalOre) + ' Ores', 80) + ']');
'Drop' :WriteLn(PadR('[ Dropped A Total Of: ' + IntToStr(TotalOre) + ' Ores', 80) + ']');
end;
if (ClayCount > 0) then
WriteLn(PadR('[ - Clay: ' + IntToStr(ClayCount), 80) + ']');
if (TinCount > 0) then
WriteLn(PadR('[ - Tin: ' + IntToStr(TinCount), 80) + ']');
if (CopperCount > 0) then
WriteLn(PadR('[ - Copper: ' + IntToStr(CopperCount), 80) + ']');
if (IronCount > 0) then
WriteLn(PadR('[ - Iron: ' + IntToStr(IronCount), 80) + ']');
if (GoldCount > 0) then
WriteLn(PadR('[ - Gold: ' + IntToStr(GoldCount), 80) + ']');
WriteLn(PadR('[ Ores Per Hour: ' + IntToStr(Round((TotalOre * 3600) / (GetTimeRunning / 1000))), 80) + ']');
Exp := Round((ClayCount * 5) + (TinCount * 17.5) + (CopperCount * 17.5) + (IronCount * 35) + (GoldCount * 65));
WriteLn(PadR('[ Total Mining Exp Gained: ' + IntToStr(Exp), 80) + ']');
Elvl := Players[CurrentPlayer].level[15];
Glvl := (Elvl - Slvl);
if Glvl < 0 then Glvl := 0;
WriteLn(PadR('[ Mining Levels Gained: ' + IntToStr(Glvl), 80) + ']');
WriteLn(PadR('[ Picks Withdrew ' + IntToStr(Picks), 80) + ']');
WriteLn('[-------------------------------------------------------------------------------]');
WriteLn('[ | Nick | Act | Loc | Lvl | Loads | Ores ]');
for i := 0 to High(Players) do
begin
WriteLn(PadR('[ o |' + (PadR(' ' + Players[i].Nick, 6)) + '|' + (PadR(' ' + BoolToStr(Players[i].Active)[1], 5)) + '|' + (PadR(' ' + Players[i].Loc, 34)) + '|' + (PadR(' ' + IntToStr(Players[i].Level[15]), 6)) + '|' + (PadR(' ' + IntToStr(Players[i].Integers[2]), 7)) + '|' + (PadR(' ' + IntToStr(Players[i].Integers[1]), 6)) + '|', 80) + ']');
end;
WriteLn('[-------------------------------------------------------------------------------]' );
WriteLn('');
ReportVars[0] := TotalLoads;
ReportVars[1] := TotalOre;
ReportVars[2] := ClayCount;
ReportVars[3] := TinCount;
ReportVars[4] := CopperCount;
ReportVars[5] := IronCount;
ReportVars[6] := GoldCount;
ReportVars[7] := Exp;
ReportVars[8] := Glvl;
ReportVars[9] := Banked;
ReportVars[10] := Sold;
ReportVars[11] := Dropped;
ReportVars[12] := Picks;
SRLRandomsReport;
end;
procedure Introduction;
begin
WriteLn('__________.__ __________ ');
Wait(100);
WriteLn('\______ \__| _____ _____\______ \ ____ _____ ______ ___________');
Wait(100);
WriteLn(' | _/ |/ \ / \| _// __ \\__ \ \____ \_/ __ \_ __ \');
Wait(100);
WriteLn(' | | \ | Y Y \ Y Y \ | \ ___/ / __ \| |_> > ___/| | \/');
Wait(100);
WriteLn(' |____|_ /__|__|_| /__|_| /____|_ /\___ >____ / __/ \___ >__|');
Wait(100);
WriteLn(' \/ \/ \/ \/ \/ \/|__| \/');
WriteLn('RimmReaper by Shady?');
Status('RimmReaper by Shady?');
end;
procedure ScriptTerminate;
begin
ProgressReport;
Writeln('Thanks for using RimmReaper!');
FreeDtms;
end;
procedure SetupScript;
begin
ClearDebug;
LoadDtms;
Introduction;
SmartSetupEx(SmartWorldNo, False, Signed, False);
SetTargetDC(SMARTGetDC);
SetupSRL;
ScriptID := '1143';
SRLID := SRLStatsID;
SRLPassword := SRLStatsPass;
DeclarePlayers;
LoginPlayer;
end;
procedure SetupPlayer;
begin
MarkTime(AntibanTime);
CurLoads := 0;
MouseSpeed := 15+random(4);
SetAngle(True);
MakeCompass('n');
GetAllLevels;
WriteLn('Our Mining Level Is ' + IntToStr(Players[CurrentPlayer].level[15]));
Slvl := Players[CurrentPlayer].level[15];
Players[CurrentPlayer].Strings[0] := Capitalize(Players[CurrentPlayer].Strings[0]);
Players[CurrentPlayer].Strings[1] := Capitalize(Players[CurrentPlayer].Strings[1]);
Players[CurrentPlayer].Loc := Capitalize(Players[CurrentPlayer].Loc);
SetPickaxe;
SetRock;
SetLoc;
Writeln('Our Loc Is '+Players[CurrentPlayer].Loc);
SetAllChats('on', 'off', '', '', '');
FindNormalRandoms;
Wielding := Players[CurrentPlayer].Booleans[0];
FindPickHeadColor;
end;
procedure playerloop;
begin
if Players[CurrentPlayer].Loc = 'Shop' then
begin
Writeln('At Shop');
if (invcount <= 26) then
begin
ChangeLoc('Shop To Mine');
Exit;
end else
FindNormalRandoms;
SellOres;
Inc(CurLoads);
Inc(Players[CurrentPlayer].Integers[2]);
Inc(TotalLoads);
GetAllLevels;
ProgressReport;
ChangeLoc('shop to Mine');
end else
if Players[CurrentPlayer].Loc = 'Mine To Bank' then
begin
Writeln('Mine To Bank');
FindNormalRandoms;
WalkFromMineToBank;
ChangeLoc('Bank');
end else
if Players[CurrentPlayer].Loc = 'Bank To Mine' then
begin
Writeln('Bank To Mine');
FindNormalRandoms;
WalkFromBankToMine;
ChangeLoc('Mine');
end else
if Players[CurrentPlayer].Loc = 'Bank' then
begin
Writeln('At Bank');
if (invcount > 1) then
begin
Writeln('Banking...');
BankProc;
Inc(CurLoads);
Inc(Players[CurrentPlayer].Integers[2]);
Inc(TotalLoads);
GetAllLevels;
ProgressReport;
ChangeLoc('Bank To Mine');
Exit;
end else
begin
ChangeLoc('Bank To Mine');
Exit;
end;
end else
if Players[CurrentPlayer].Loc = 'Mine' then
begin
Writeln('At Mines');
if not GotPick then
begin
Writeln('No Pickaxe was found');
Players[CurrentPlayer].Loc := 'Mine To Bank'
end else
if InvFull then
begin
case Capitalize(Players[CurrentPlayer].Strings[2]) of
'Bank' :ChangeLoc('Mine To Bank');
'Sell' :ChangeLoc('Mine To Shop');
'Drop' :ChangeLoc('Drop');
end;
Exit;
end else
begin
Writeln('Mining');
WalkTo(Rock.Name);
MarkTime(SwitchTabsTime);
while MineOres do
begin
if (not(LoggedIn)) then Break;
if (TimeFromMark(SwitchTabsTime) >= 15000 +Random(5000)) then
begin
Status('Switching Tabs');
GameTab(Random(14)+1);
Wait(500 + Random(500));
GameTab(4);
MMouse(Random(MSX2), Random(MSX1), 1, 1);
MarkTime(SwitchTabsTime);
end;
DoAB;
FindNormalRandoms;
HandleFight;
if InvFull then
begin
Writeln('Inventory is Full');
case Capitalize(Players[CurrentPlayer].Strings[2]) of
'Bank' :ChangeLoc('Mine To Bank');
'Sell' :ChangeLoc('Mine To Shop');
'Drop' :ChangeLoc('Drop');
end;
Exit;
end;
if LostPick then
begin
Writeln('Lost Pick!');
ChangeLoc('Mine To Bank');
Exit;
end;
end;
end;
end else
if Players[CurrentPlayer].Loc = 'Drop' then
begin
FindNormalRandoms;
DropProc;
Inc(CurLoads);
Inc(Players[CurrentPlayer].Integers[2]);
Inc(TotalLoads);
GetAllLevels;
ProgressReport;
ChangeLoc('Mine');
end else
if Players[CurrentPlayer].Loc = 'Mine To Shop' then
begin
Writeln('From Mines To Shop');
WalkTo('center');
WalkToShop;
ChangeLoc('Shop');
end else
if Players[CurrentPlayer].Loc = 'Shop To Mine' then
begin
Writeln('From Shop To Mines');
WalkToMines;
ChangeLoc('Mine');
end;
end;
begin
SetupScript;
repeat
SetupPlayer;
repeat
PlayerLoop;
until((CurLoads > (Players[CurrentPlayer].Integers[0] - 1)) or (Not(LoggedIn)));
if (AllPlayersInactive) then Break;
NextPlayer(Players[CurrentPlayer].Active);
until(False);
end.
1. Technique (/100)
2. Individuality (/100)
3. Follow all SRL rules (/100)
4. Creativity (/100)
5. Efficiency (/100)
6. Presentation (/100)
7. Meeting all Requirements (/100)
8. Added Extras (/100)
~RM