Wow, it's actually still working? I haven't updated it in a month, and I thought it was barely working.
Printable View
ya never know, he could just be complimenting you to hope you will add his requested feature :) honestly the script doesn't work at all for me. Gets stuck outside the ladder usually but anywhere from that to can't find the ores. My account for this script is currently in negative membership credit (someone at paypal disputed something I didn't tell them to) but once I get that cleared up its 45 dung with 99 mining if you would like to update it you can borrow for testing.
For me it keeps saying fail to walk to mine when i'm already at the mine.
Why not use the deposit box in the dungeon? It saves a whole lot of walking
would be pretty cool if you updated this bro :3
And it's not in working order :p
You are okay with us updating it ourselves to use right?
(Just want to make sure cuz I converted it)
Is it alright with you if I share it with other people who would like it or do you not want leeches to have it?
I just updated it to SRL5 combatible cuz I was bored :p
All I had to do really was change the top and the Angle stuff to get it to compile, I havent really tested it with the changes. I will post it if theres a demand.
but you have it in scar and not in simba then you can't find it and it wont work just check it
it said this here
Exception in Script: Unable to find file 'SRL\SRL.scar' used from ''
Learn to update it, it's not that hard ;)
I tried updating but im new to scripting I keep getting this error
[Error] (257:17): Type mismatch at line 256
Compiling failed. and on linw 256 its about set angle SetAngle(True); is what i have inputted. Any help?
"Exception in Script: Unable to find file 'SRL\SRL.scar' used from "
I have everything updated and running. Just problem with this script.
Any ideas?
Hmm, seems there are some parts of code i would have to change, and don't know how.
@edit. Ok i had to change Angles for (SRL_ANGLE_HIGH) as you said before, but now it looks like I'm pressing arrow down, and bot don't see rocks to mine.
@edit2 now it mines, but after mining adamant it won't rotate map, so he stands there waiting for adamant to resp :(
doesnt work i climbs down the ladder and stands there :(
{$DEFINE SMART}
{$i srl/srl.simba}
{$i sps/sps.simba}
{$i ObjectDTM\ObjDTMInclude.simba}
Ok so set up like this so far add on top of script {$DEFINE SMART} {$i srl/srl.simba}
than for all the setangle to (SRL_ANGLE_HIGH); for everyline im guessing its running but then it dosnt really mine anything trying to find out why right atm
ok got it to run now have to start at falador bank but need to find out why its not mineing runite ore or how i make it mine that ore
Holy triple post!
Use the edit button.
Also, I haven't updated this is like 2 months, It's on my list but not high up.
Lol its on my top list to get to working again =) so far so great
Ok i ive made this so far i want it to only mine runite ore but as of right now it only walks to mineing area need help any one start at falador bank
program DuffsUltimateDwarf;//by PatDuffy
{$DEFINE SMART}
{$i SRL\SRL.simba}
{================================================= ============]
[ Duff's Ultimate Dwarf ]
[================================================== ===========]
[ REQUIREMENTS!!!: ~60 Mining
[ ~45 Dung ]
[ ~Pickaxe in inventory or equipped ]
[================================================== ===========]
[ Features: ~Mines Mith, Addy, and Rune With Color! ]
[ ~FULLY COLOR!!! WORKS AFTER BOT NUKE!!! ]
[ ~Multiplayer, Player Switching ]
[ ~SRL Stats, Progress Reports ]
[ ~Awesome Printed Progress Report ]
[================================================== ===========]
[ Set-Up Instruction: 1. Fill out SRL Stats and Players ]
[ 2. Choose a starting location ]
[ 3. Have pick in inventory or equip ]
[ 4. Hit Run and Post Proggy! ]
[================================================== ===========]
[ Valid Locations: Above Ground ]
[ 'ready': In bank with empty inv ]
[================================================== ===========}
const
World = 33;
Members = true;
Signed = true;
//just leave the stats as it is if you don't have a username for it
SRLStats_UserID = '';//your SRL stats name
SRLStats_Password = '';//your SRL stats password
var
TimePlayer, RuneM,
AntiBanUsed, GemM, Loads,
TRune,TGems: Integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1; //how many players to use
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
With Players[0] do
begin
Name :='';
Pass :='';
Nick :=''; //3-4 lowercase letter in the display name
Loc :='ready';
Active := True;
Integers[2]:=260;//time to mine before next player
Integers[3]:=1;//time between player switches
end;
{//remove the '{' if you want more players
With Players[1] do
begin
Name :='';
Pass :='';
Nick :='';
Loc :='ready';
Active := True;
Integers[2]:=45;//time to mine before next player
Integers[3]:=1;//time between player switches
end;
{ With Players[2] do
begin
Name :='';
Pass :='';
Nick :='';
Loc :='ready';
Active := True;
Integers[2]:=30;//time to mine before next player
Integers[3]:=1;//time between player switches
end;
{
With Players[3] do
begin
Name :='';
Pass :='';
Nick :='';
Loc :='';
Active := True;
Integers[2]:=30;//time to mine before next player
Integers[3]:=1;//time between player switches
end;
With Players[4] do
begin
Name :='';
Pass :='';
Nick :='';
Loc :='';
Active := True;
Integers[2]:=30;//time to mine before next player
Integers[3]:=1;//time between player switches
end;
With Players[5] do
begin
Name :='';
Pass :='';
Nick :='';
Loc :='';
Active := True;
Integers[2]:=30;//time to mine before next player
Integers[3]:=1;//time between player switches
end;
}
end;
function CheckPick:Boolean;//checks to see if theres a pick
//currently uses DTM's
var
PickDTM,x,y: Integer;
begin
if not LoggedIn then
Exit;
PickDTM := DTMFromString('78DA63FCC7CCC090CEC8800A98C0244C949 19' +
'185812193809ABF40738A89302783801A56A09A18026AFE00 ED8AC6A' +
'F0600C7A80594');
GameTab(tab_Inv);
Wait(1000+Random(500));
if FindDTM(PickDTM,x,y,MIX1,MIY1,MIX2,MIY2) then
begin
Players[CurrentPlayer].Booleans[1] := True;//means axe is in inv
Writeln('Pick found in inventory');
Result:=True
FreeDTM(PickDTM);
Exit;
end else
begin
GameTab(tab_Equip);
Wait(1000+Random(200));
if FindDTM(PickDTM,x,y,MIX1,MIY1,MIX2,MIY2) then
begin
Players[CurrentPlayer].Booleans[1] := False;
Writeln('Pick found Equipped');
Result:=True
GameTab(tab_Inv);
FreeDTM(PickDTM);
Exit;
end else
begin
Writeln('Could not find pick');
Result:=False
FreeDTM(PickDTM);
Exit;
end;
end;
GameTab(tab_Inv);
end;
procedure CheckLevel;
begin
GameTab(tab_Stats);
Players[CurrentPlayer].Integers[1] := GetSkillInfo('Mining',False);
Writeln('Players Mining Level is: '+IntToStr(Players[CurrentPlayer].Integers[1]));
GameTab(tab_Inv);
end;
//Camero's walking function
function Walking(Color, Tolerance: Integer; SortFrom: tpoint): Boolean;
var
i, x, y, rx, ry: Integer;
TPA: TPointArray;
begin
if not LoggedIn then Exit;
If FindNormalRandoms Then
If Not LoggedIn Then
Exit;
FindColorsSpiralTolerance(MMCX, MMCY, TPA, Color, MMX1, MMY1, MMX2, MMY2, Tolerance);
SortTPAFrom(TPA, SortFrom);
for i := 0 to High(TPA) do
begin
x := TPA[i].x;
y := TPA[i].y;
rx := RandomRange(-6, 6);
ry := RandomRange(-6, 6);
if (not rs_OnMinimap(x + rx, y + ry)) then
Continue;
Mouse(x + rx, y + ry, 0, 0, true);
FFlag(0);
Wait(200 + Random(500));
Result := True;
Break;
end;
end;
//All credit for this goes to BobboHobbo and Nava2(for making some changes)
procedure PrintOnSmart(TP: TStringArray; Placement: TPoint; Colour, Shadow: integer);
var
mx, my, Pic, I, B, H, TPH, Numb: Integer;
TTP: TPointArray;
Canvas: TCanvas;
begin
SmartSetDebug(True);
GetClientDimensions(mx,my);
Pic := BitmapFromString(mx,my,'');
TPH := High(TP);
for I := 0 to TPH do
begin
TTP := LoadTextTPA(TP[i], SmallChars, H);
for B := 0 to High(TTP) do
begin
Numb := ((I + 1) * 13);
FastSetPixel(Pic, TTP[b].x + 1, TTP[b].y + Numb + 1, Shadow);
FastSetPixel(Pic, TTP[b].x, TTP[b].y + Numb, Colour);
end;
end;
Canvas := TCANVAS.Create;
Canvas.Handle := SmartGetDebugDC;
DrawBitmap(Pic, Canvas, Placement.x, Placement.y);
FreeBitmap(Pic);
end;
procedure PrintProggy;//prints proggy on screen to look awesome
begin
PrintOnSmart([' instagib2001 Ultimate Dwarf V1_2'],Point(15, 30), 16760576, 131072);
PrintOnSmart([
'Time Running: ' + TimeRunning,
'Players active: ' + ToStr(PlayersActive) + '/' + ToStr(HowManyPlayers),
'Mined: ' + IntToStr(TRune) + ' Rune',
'Gained: ' + IntToStr(TGems) + ' Gems',
'Loads: ' + IntToStr(Loads),
'',
''], Point(20, 60), 16776960, 131072);
end;
procedure SetUpPlayers;//sets up players and checks for pickaxe
begin
if(not(LoggedIn)) then
LoginPlayer;
Wait(2000+Random(1000));
If FindNormalRandoms Then
If Not LoggedIn Then
Exit;
SetAngle (SRL_ANGLE_HIGH);
SetChat('Hide',1);
SetChat('Friends',2);
if not CheckPick then
Players[CurrentPlayer].Loc:='lost';
CheckLevel;
PrintProggy;
MarkTime(TimePlayer);
end;
function SwitchPlayers:Boolean;//Basic outline used in my SuperChopperDelux
var
BreakTime, BreakFor: Integer;
begin
if (TimeFromMark(TimePlayer) >= (Players[CurrentPlayer].Integers[2]*60000)) then
begin
Writeln('Worked for desired time, breaking');
if (PlayersActive > 0) then
begin
BreakFor:=(Players[CurrentPlayer].Integers[3] + Random(2));
Writeln('Breaking for : ' + MsToTime((BreakFor*60000), Time_Formal));
Wait(6000+Random(5000));
Players[CurrentPlayer].Active := True;
Logout;
MarkTime(BreakTime);
repeat
Wait(30000);
Writeln('Break Ends In : '+MsToTime((BreakFor*60000)-TimeFromMark(BreakTime), Time_Formal));
until(TimeFromMark(BreakTime) > BreakFor*60000)
Writeln('Break Complete!');
NextPlayer(True);
SetUpPlayers;
Result := True;
Exit;
end;
Exit;
end;
Result := False;
Exit;
end;
procedure Walk;
begin
if not LoggedIn or SwitchPlayers then
Exit;
If FindNormalRandoms Then
If Not LoggedIn Then
Exit;
SetAngle(SRL_ANGLE_HIGH);
if RunEnergy(30) then
SetRun(True);
if Players[CurrentPlayer].Loc ='ready' then
begin
if (Walking(1787389,23,Point(651, 149))) then
begin
Wait(5000+Random(2000));
Writeln('Walked to mine');
Players[CurrentPlayer].Loc :='at ladder';
Exit;
end else
Writeln('Failed to walk to mine');
end else
if Players[CurrentPlayer].Loc ='invfull guild' then
begin
if (Walking(12306372,23,Point(597, 21))) then
begin
Wait(5000+Random(2000));
Writeln('Walked to bank');
Players[CurrentPlayer].Loc :='banking';
Exit;
end else
Writeln('Failed to walk to bank');
end;
end;
procedure CountOre;//counts ores mined before banking
var
RuneDTM: Integer;
begin
RuneDTM := DTMFromString('78DA639CC2CCC050C8C8800CDCC36219B88 03' +
'448F43F889E0D549386AA86818109AE060418DB816A3208A8 E901AAA' +
'925A0662E504D097E35005DEA0761');
RuneM := CountItems('dtm',RuneDTM,[]);
FreeDTM(RuneDTM);
end;
procedure StatsCommit;
begin
IncEx(Players[CurrentPlayer].Integers[7],RuneM);
IncEx(Players[CurrentPlayer].Integers[8],GemM);
IncEx(TRune,RuneM);
IncEx(TGems,GemM);
stats_IncVariable('Runite Ore (Mined)',RuneM);
stats_IncVariable('Gems (Mined)',GemM);
Stats_Commit;
PrintProggy;
end;
procedure ProgressReport;
var
i:Integer;
begin
ClearDebug;
Writeln('[================================================== ================]');
Writeln('[ Duffs Ultimate Dwarf by PatDuffy ]');
Writeln('[================================================== ================]');
Writeln('[ Total Time Run: ' + Padr(TimeRunning,41) + ']');
Writeln('[================================================== ================]');
if (TRune > 0) then//only writes if mith was mined
Writeln('[ Total Number of Rune Mined: ' + Padr(IntToStr(RuneM),37) + ']');
if (TGems > 0) then//writes if gems were mined
Writeln('[ Total Number of Gems Mined: ' + Padr(IntToStr(GemM),37) + ']');
Writeln('[ Total Number of Loads: ' + Padr(IntToStr(Loads),42)+ ']');
Writeln('[================================================== ================]');
for i:=0 to High(Players) do
begin
Writeln('[ Rune Mined: ' + Padr(IntToStr(Players[i].Integers[7]),53) + ']');
Writeln('[ Gems Mined: ' + Padr(IntToStr(Players[i].Integers[8]),53) + ']');
Writeln('[ BanHammer Evaded: ' + IntToStr(Players[i].Integers[9]) + Padr(' Times',45) + ']');
Writeln('[ Player Active: ' + Padr(BoolToStr(Players[i].Active),50) + ']');
Writeln('[================================================== ================]')
end;
end;
function CountGems:Integer;//checks to see if gems were mined, and counts them
var
GemDTM: Integer;
begin
GemDTM := DTMFromString('78DA633CC6CCC020C5C8800A98C0244C947 11' +
'7508D2A0135A7816AF409A8390F54A34440CD1EA01A6DFC6A 00F12E0' +
'4BA');
Result := CountItems('dtm',GemDTM,[]);
FreeDTM(GemDTM);
end;
{=========================================]
[ My custom anti-ban procedure that I use ]
[ in all my scripts, with a few edits ]
[ to mesh better with the script ]
[=========================================}
procedure AntiBan;
begin
if (not(LoggedIn)) then
Exit;
Writeln('Performing Anti-BanHammer procedures');
case Random(35) of
0..2: PickUpMouse;
3..5: ExamineInv;
6..8: begin
HoverSkill('woodcutting',false);
Wait(1500+Random(5000));
GameTab(Tab_Inv);
end;
9..11: BoredHuman;
12..14: begin
GameTab(RandomRange(tab_Combat, tab_Notes));
Wait(1800+Random(3000));
GameTab(Tab_Inv);
end;
15..17: RandomRClick;
18..20: RandomAngle(true);
21..23: RandomMovement;
24..26: begin
HoverSkill('fishing',false);
Wait(1000+Random(2500));
GameTab(Tab_Inv);
end;
27..29: PickUpMouse;
30..33: begin
HoverSkill('strength',false);
Wait(1000+Random(4000));
GameTab(Tab_Inv);
end;
34: begin
case Random(6) of//I like a lot to increase variety
0: TypeSend('My hand hurts');
1: TypeSend('only a billion left to mine =p');
2: TypeSend('Awfully botty here today');//I love this one
3: TypeSend('sooo booooreeeddd');
4: TypeSend('...zzz...');
5: begin
TypeSend('lol =p');
Wait(1000+Random(1000));
TypeSend('Oops, meant to be in cc');
end;
end;
end;
end;
SetAngle (SRL_ANGLE_HIGH);
Inc(AntiBanUsed);
Inc(Players[CurrentPlayer].Integers[9]);
end;
Procedure CheckVer;
var
Page,NewVer,Version: String;
PostID: Integer;
begin
PostID :=840369;
Version :='1.2';
Page := GetPage('http://villavu.com/forum/showthread.php?p='+IntToStr(PostID)+'');
NewVer := Between('Current version: ', ' Working', Page);
if Version <> NewVer then
ShowMessage('Your script is out of date!')
else
Exit;
end;
function FindLadder: Boolean;//finds the ladder going down
var
LadColors: TIntegerArray;
x,y,i,a,m,curCTS,Fails,xi,yi: Integer ;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
Result:= False;
if not LoggedIn or IsMoving then
Exit;
curCTS := GetColorToleranceSpeed;
LadColors:=[855309,2631722];
for i := 0 to 1 do
begin
if (IsMoving) then Exit;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX,MSCY,TPA,LadColors[i],MSX1,MSY1,MSX2,MSY2,6 +(i*2));
if Length(TPA) = 0 then Continue;
ColorToleranceSpeed(1);
ATPA:= TPAtoATPAEx(TPA,6,6);
m := High(ATPA);
for a:=0 to m do
begin
if MiddleTPAEx(ATPA[a],x,y) then
begin
MMouse(x,y,6,6);
if (WaitUpText('limb',100+Random(150))) then
begin
Wait(1000+Random(500));
GetMousePos(x,y);
Mouse(x,y,2,2,True);
if (FindText(xi, yi, 'limb down', SmallChars, MCX1, MCY1, MCX2, MCY2)) then
begin
Result:=True;
Wait(2000+Random(1000));
Exit;
end;
end else
begin
Inc(Fails);
end;
end;
end;
if (Fails >=7) then
Result:=False;
Players[CurrentPlayer].Loc:='lost';
Exit;
end;
end;
function FindMLadder: Boolean;//finds the ladder going up
var
LadColors: TIntegerArray;
x,y,i,a,m,curCTS,Fails: Integer ;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
Result:= False;
if not LoggedIn or IsMoving then
Exit;
curCTS := GetColorToleranceSpeed;
LadColors:=[4673619,4541776];
for i := 0 to 1 do
begin
if (IsMoving) then Exit;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX,MSCY,TPA,LadColors[i],MSX1,MSY1,MSX2,MSY2,6 +(i*2));
if Length(TPA) = 0 then Continue;
ColorToleranceSpeed(1);
ATPA:= TPAtoATPAEx(TPA,6,6);
m := High(ATPA);
for a:=0 to m do
begin
if MiddleTPAEx(ATPA[a],x,y) then
begin
MMouse(x,y,6,6);
if (WaitUpText('limb',100+Random(150))) then
begin
Wait(1000+Random(500));
GetMousePos(x,y);
Mouse(x,y,2,2,True);
Result:=True;
Wait(2000+Random(2000));
Exit;
end else
begin
Inc(Fails);
end;
end;
end;
if (Fails>=5) then
Result:=False
end;
end;
function FindDDoor: Boolean;//finds the resource dungeon door
var
DoorColors: TIntegerArray;
x,y,i,a,m,curCTS,Fails: Integer ;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
Result:= False;
if not LoggedIn or IsMoving then
Exit;
curCTS := GetColorToleranceSpeed;
DoorColors:=[1978295, 1779654];
for i := 0 to 1 do
begin
if (IsMoving) then Exit;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX,MSCY,TPA,DoorColors[i],MSX1,MSY1,MSX2,MSY2,6 +(i*2));
if Length(TPA) = 0 then Continue;
ColorToleranceSpeed(1);
ATPA:= TPAtoATPAEx(TPA,6,6);
m := High(ATPA);
for a:=0 to m do
begin
if MiddleTPAEx(ATPA[a],x,y) then
begin
MMouse(x,y,6,6);
if (WaitUpText('yster',100+Random(150))) then
begin
Wait(1000+Random(500));
GetMousePos(x,y);
Mouse(x,y,2,2,True);
Result:=True;
Wait(1000+Random(2000));
Exit;
end else
begin
Inc(Fails);
end;
end;
end;
if (Fails>=5) then
Result:=False
end;
end;
procedure ClimbLadder;//climbs down the ladder at the guild
begin
if not LoggedIn or SwitchPlayers then
Exit;
If FindNormalRandoms Then
If Not LoggedIn Then
Exit;
PrintProggy;
if IsMoving then
Wait(2000+Random(1000));
if not IsMoving then
begin
if FindLadder then
begin
Wait(1500+Random(2000));
Writeln('Climbed down the ladder');
Players[CurrentPlayer].Loc :='in mine';
Exit;
end else
begin
Writeln('Player did not climb down ladder');
end;
end;
end;
procedure OpenDDoor;//opens the door to get into the mine
var
x,y: Integer;
begin
if not LoggedIn or SwitchPlayers then
Exit;
If FindNormalRandoms Then
If Not LoggedIn Then
Exit;
if FindDDoor then
begin
Wait(1500+Random(2000));
//added a bit of color walking here
if (Walking(5856091,23,Point(659, 134)))then
Mouse(x,y,1,1,True);
MakeCompass('E');
Players[CurrentPlayer].Loc :='at ore';
end else
begin
Writeln('Player did not enter the resource mine');
Players[CurrentPlayer].Loc:='lost';
end;
end;
procedure ExitDDoor;//opens the door to get out of the mine
var
x,y: Integer;
begin
if not LoggedIn or SwitchPlayers then
Exit;
If FindNormalRandoms Then
If Not LoggedIn Then
Exit;
x := MMCX;
y := MMCY;
if (Walking(263663,23,Point(607, 76)))then
begin
MakeCompass('N');
SetAngle (SRL_ANGLE_HIGH);
if FindDDoor then
begin
Wait(1500+Random(2000));
Players[CurrentPlayer].Loc :='invfull ladder';
Exit;
end;
end else
Writeln('Player did not exit the mine');
Players[CurrentPlayer].Loc:='lost';
end;
procedure ClimbMLadder;//Climbs out of the guild
begin
if not LoggedIn or SwitchPlayers then
Exit;
If FindNormalRandoms Then
If Not LoggedIn Then
Exit;
PrintProggy;
if FindMLadder then
begin
Wait(1500+Random(2000));
MakeCompass('N');
Players[CurrentPlayer].Loc :='invfull guild';
end else
begin
Writeln('Player did not climb up ladder');
Players[CurrentPlayer].Loc:='lost';
end;
end;
function MineRune: Boolean;//finds and mines rune with TPA's and ATPA's
var
RuneColors: TIntegerArray;
X,Y,I,A,M,curCTS,Fails: Integer ;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
Result:= False;
if not LoggedIn or IsMoving then
Exit;
curCTS := GetColorToleranceSpeed;
RuneColors:=[15787424,10393977];
for I := 0 to 1 do
begin
if (IsMoving) then Exit; //prevents script from attempting to mine even if the player is moving to a rock to mine
SetAngle(SRL_ANGLE_HIGH);
MakeCompass('W');
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX,MSCY,TPA,RuneColors[I],MSX1,MSY1,MSX2,MSY2,6 +(i*2));
if Length(TPA) = 0 then Continue;
ColorToleranceSpeed(1);
ATPA:= TPAtoATPAEx(TPA,6,6);
M := High(ATPA);
for A:=0 to M do
begin
if MiddleTPAEx(ATPA[A],X,Y) then
begin
MMouse(X,Y,6,6);
if (WaitUpText('ine',100+Random(150))) then
begin
GetMousePos(X,Y);
Mouse(X,Y,0,0,True);
if DidRedClick then
begin
Result:=True;
ColorToleranceSpeed(curCTS);
Fails:=0;
Exit;
end;
end else
begin
Inc(Fails);
end;
end;
end;
end;
if (Fails > 6) then
begin
Players[CurrentPlayer].Loc :='lost';
Exit;
end;
end;
function RockIsMined:Boolean;//detects if nearest rock(most likely being mined) is gone
var
x,y,a,m,curCTS: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
Result:=False;
if not LoggedIn then
Exit;
curCTS:=GetColorToleranceSpeed;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX,MSCY,TPA,9860211,MS X1,MSY1,MSX2,MSY2,28);
if Length(TPA) > 0 then
begin
ColorToleranceSpeed(1);
ATPA:=TPAtoATPAEx(TPA,5,5);
M :=High(ATPA);
SortATPAFromFirstPoint(ATPA,Point(MSCX,MSCY));//sorts from middle of screen
for a := 0 to m do
begin
if MiddleTPAEx(ATPA[a],x,y) then
begin
if (Distance(x,y,MSCX,MSCY) > 50) then//if the closest ore is 50 px away from center
begin
Result:=True;
Exit;
end else
Exit;
Break;
end;
end;
end;
ColorToleranceSpeed(curCTS);
end;
{================================================]
[ The Basic Concept of this procedure is from ]
[ my clay softener, with some edits to ]
[ incorporate new techniques and ideas I learned ]
[ since I created the base ]
[================================================}
procedure MineOre;//mines mith only atm, will add addy, possibly rune too
var
MineTime,C,RockTime,PlusOne:Integer;
begin
if not LoggedIn or SwitchPlayers then
Exit;
If FindNormalRandoms Then
If Not LoggedIn Then
Exit;
PrintProggy;
MarkTime(MineTime);
if InvFull then
begin
Writeln('Player has full inv, time to bank');
Players[CurrentPlayer].Loc :='invfull mine';
Exit;
end;
repeat
C := InvCount
if SwitchPlayers then
Exit;
If FindNormalRandoms Then
If Not LoggedIn Then
Exit;
if RunEnergy(30) then
SetRun(True);
PlusOne:=InvCount+1;
case Players[CurrentPlayer].Integers[1] of
60..69:begin
if MineRune then
begin
MarkTime(RockTime);
Wait(2000+Random(1000));
if IsMoving then
Wait(1500+Random(500));
repeat
Wait(500);
if Random(70)=1 then AntiBan;
Wait(500);
until (InvCount = PlusOne) or (TimeFromMark(RockTime) > 60000);
if RockIsMined then
Break;
Wait(1500+Random(1000));
end else
end;
end;
if (InvCount > C) then
Writeln('Mined Some Ore');
until InvFull or (TimeFromMark(MineTime) > (20*60*1000));
end;
procedure BankOre;//banks at fally east
var
Failures: Integer;
begin
if not LoggedIn or SwitchPlayers then
Exit;
CountOre;
GemM:=CountGems;
PrintProggy;
CheckLevel;
if OpenBankFast('feb') then
begin
Deposit(2,28,true);
CloseBank;
Inc(Loads);
Inc(Players[CurrentPlayer].Integers[4]);
Failures := 0;
stats_IncVariable('Loads Done',1);
StatsCommit;
Players[CurrentPlayer].Loc :='ready';
end else
if OpenBankQuiet('feb') then
begin
Deposit(2,28,true);
CloseBank;
Inc(Loads);
Inc(Players[CurrentPlayer].Integers[4]);
Failures := 0;
stats_IncVariable('Loads Done',1);
StatsCommit;
Players[CurrentPlayer].Loc :='ready';
end else
begin
Writeln('Both banking methods failed');
Inc(Failures);
Wait(200+Random(3000));
Exit;
end;
if (Failures >= 3) then
begin
Writeln('Checking Location, Too many failures');
Players[CurrentPlayer].Loc:='lost';
end;
ProgressReport;
end;
procedure MainLoop;
begin
if not LoggedIn then
SetUpPlayers;
repeat
case Players[CurrentPlayer].Loc of
'ready':Walk;
'at ladder':ClimbLadder;
'in mine':OpenDDoor;
'invfull mine':ExitDDoor;
'at ore':MineOre;
'invfull ladder':ClimbMLadder;
'invfull guild':Walk;
'banking':BankOre;
'lost':begin
Writeln('Player is lost, switching to next player');
NextPlayer(False);
SetUpPlayers;
end;
end;
until AllPlayersInactive;
end;
begin
ClearDebug;
CheckVer;
SetupSRLStats(197,SRLStats_UserID, SRLStats_Password);
Smart_Signed := Signed;
Smart_Server := World
Smart_SuperDetail := False;
SetupSRL;
DeclarePlayers;
SetUpPlayers;
PrintProggy;
AddOnTerminate('ProgressReport');
repeat
MainLoop;
until AllPlayersInactive;
end.
There could be some improvement in the paint, it doesent update very often at all. And there appears to be virtually no antiban, but it runs.
[Error] (659:11): Unknown identifier 'PercentBlackMM' at line 658
Compiling failed.
Any Help/Advice on this?