SRL Archive - RS3 Outdated / Broken Scripts

[COLOR]Duff's Ultimate Dwarf


PatDuffy

2011-11-04 23:45:56

Duff's Ultimate Dwarf, In Color!
Mines all ores in the mining guild resource dungeon
Current version: 1.2 Working(Kinda, as in really buggy)




Only Mith mining tested! I do not have an account with high enough mining to have tested addy or rune mining, but it 'should' work



[LEFT]In V1_2[/LEFT]
  • Fixed the ladder climbing error(and added a failsafe using PercentBlackMM, thanks to Flight)
  • Fixed Variable counting
  • Adding a version checker
  • Fixed the spam-like clicking of a rock if your already mining it
  • Major stability increase

[LEFT]What Does It do?[/LEFT]

~This script was designed to mine every ore in the mining guild resource dungeon. Fully Color, and nuke-proof.

[LEFT]Requirements[/LEFT]

  • 60+ Mining
  • 45+ Dungeoneering
  • Pickaxe in inventory or equipped

[LEFT]Features![/LEFT]

  • Semi-Advanced Color Method for Rock Finding
  • Anti-Ban, Anti-Randoms
  • MultiPlayer Support
  • Progress Reports
  • Cool Paint Proggy
  • SRL Stats
  • Usable after the bot nuke!
  • Breaking!(Future update is world-switching)
  • Able to mine Rune(Surprisingly a lot of rune isnt mined after the bot nuke)
  • Prioritizes higher ores first
  • Version checker

[LEFT]So How Do I Use It?[/LEFT]

Very Simple Setup!
  1. Download the script at the bottom of this post
  2. Open the script in Simba
  3. Fill out SRL Stats(leave Anonymous if you are not registered)
  4. Fill out player information, make sure to check for proper location!!
  5. Hit run, Sit Back, and Enjoy!

[LEFT]Future Updates[/LEFT]

  1. Coal support for the mining guild
  2. More efficient timing and mining
  3. (Insert YOUR suggestion here!)

[LEFT]Bug & Fixes Needed[/LEFT]

  1. Sometimes fails to climb down the ladder Fixed!
  2. The paint progress report only updates ore count after a bank
  3. Spends too much time idle Fixed!
  4. Counting is messed up as of V1_1(fixed in V1_2) Fixed!
  5. More To Come…


[LEFT]Credits![/LEFT]

  • The SRL Community
  • BobboHobbo(Used his design for paint proggy)
  • Camaro'(Used his color walking method)
  • Flight(Copied his version checker and he suggested use PercentBlackMM)
  • YOU! The User!
  • Myself, Please Comment if you liked it or not, possibly even Rep+ if you liked it?;)

View Next Post For Progress Reports!

PatDuffy

2011-11-04 23:46:56

Progress Reports


Flight

2011-11-04 23:52:29

This is really nice mate! Sounds like you did a good job with it. How much have you tested it?

PatDuffy

2011-11-04 23:59:15

From: Flight
This is really nice mate! Sounds like you did a good job with it. How much have you tested it?


I kind of rushed to get it out, but it has a solid body from the mining guild miner I used for my member's application. It occasionally gets stuck going up or down the ladder into the guild, but I'm working on some failsafes for when that happens. I honestly have no idea how addy or rune mining will work, though it should work, just probably not efficiently.

dislocated

2011-11-05 00:01:53

Exception in Script: Unable to find file 'sps/sps.simba' used from ''

Does not want to open for me :O

PatDuffy

2011-11-05 00:03:02

Oh silly me, I forgot to remove SPS as an include after I deleted it from the script, give me 5 minutes and redownload the link as V1_1 and I'll have that fixed

dislocated

2011-11-05 00:03:26

Ok thanks mate :D

Flight

2011-11-05 00:05:07

For the ladder issue I'd make a loop to check your position.


ClickLadder;
FFlag(1); //Wait until we're within 1 distance of the red flag
MarkTime(T);
While InMiningArea do //I assume you have a way to tell? PercentBlackMM maybe?
begin
//Maybe search for randoms?
if (TimeFromMark(T) > 5000) then //If we don't climb up the ladder by 5 seconds, let's exit and try again
Exit;
Wait(1);
end;
AboveGround := True; //Success!

Aegis

2011-11-05 00:08:08

Awesome release! I'm probably not going to use this, however, I actually have a couple accounts laying around with 85+ mining. I would absolutely LOVE to see World Switching, and wouldn't mind lending you an account to help out get things tested.

PatDuffy

2011-11-05 00:09:26

From: Flight
For the ladder issue I'd make a loop to check your position.

That might work, I'll try it tomorrow because I'm getting a little too tired to comprehend my code:duh:

YoHoJo

2011-11-05 00:13:27

You should add an image of the map of the dungeon to first post.
Also what level dung do you need to access it?

PatDuffy

2011-11-05 00:16:02

From: YoHoJo
You should add an image of the map of the dungeon to first post.
Also what level dung do you need to access it?


Doh, I was going to put a Requirements section on the first post and forgot. As for the image, do you mean the minimap or of the whole dungeon? Updated first post now with requirements.

mika

2011-11-05 00:16:48

How do you Rep+

YoHoJo

2011-11-05 00:25:06

http://images2.wikia.nocookie.net/__cb20101209020308/runescape/images/2/2e/MiningGuildRD.png
Put this!
Where does it bank at? Falador East I assume?

PatDuffy

2011-11-05 00:27:48

done, and as to the rep, you hit that little blue checkmark in the top right corner of the post you want to rep+.

bolshak25

2011-11-05 00:46:02

ill test it out when i get my main back from random solvers, and suggestion/request would be the other resource dungeon, just mine coal and deposit in the box right there.

KingKong

2011-11-05 01:42:10

Shouldn't this be in the members/juniors + section, the script is too good for any leecher to come and dl and use, other than that, nice script!

PatDuffy

2011-11-05 10:03:44

From: KingKong
Shouldn't this be in the members/juniors + section, the script is too good for any leecher to come and dl and use, other than that, nice script!


I make my scripts for people to use. Unless we go back to the system of banking scripts being junior+ I will keep it public.

PatDuffy

2011-11-06 18:00:28

Updated to Version 1.2

[LEFT]In V1_2[/LEFT]
  • Fixed the ladder climbing error(and added a failsafe using PercentBlackMM, thanks to Flight)
  • Fixed Variable counting
  • Adding a version checker(modeled after Flight's)
  • Fixed the spam-like clicking of a rock if your already mining it
  • Major stability increase

Also first 3 hour+ proggy has been accomplished! And its still running strong.

Appletart

2011-11-08 01:27:35

You should add hop worlds! It would make it get rune soo much faster!

'Toxin

2011-11-08 09:18:08

From: PatDuffy
Updated to Version 1.2

[LEFT]In V1_2[/LEFT]
  • Fixed the ladder climbing error(and added a failsafe using PercentBlackMM, thanks to Flight)
  • Fixed Variable counting
  • Adding a version checker(modeled after Flight's)
  • Fixed the spam-like clicking of a rock if your already mining it
  • Major stability increase

Also first 3 hour+ proggy has been accomplished! And its still running strong.


This looks fairly promising, I will give it a try later on when I am at home. Hopefully I no longer get errors when attempting to run a script. Those damn access violation errors are tickin' me off. :( Lookin' good bud.

Edit: Well, I tried it out with an account of mine that has 99 mining, and once it enters the dungeon (which it has troubles doing sometimes), it doesn't go around the dungeon at all, just sits infront of the same 4 addy rocks, even though I am 99 mining.

doublex8

2011-11-08 15:09:19

It says it doesn't detect a pickaxe when I have my drag pick equipt
Also says that I am lost when I am standing in the middle of Fally east bank
The debug disappears too fast so I couldn't copy it for you, but there really isn't much else in the debug that I didn't say above

PatDuffy

2011-11-08 15:33:49

The reason a dragon pick wont work is because I used a universal pickaxe dtm for detection, and a dragon pick has a different shape. As for the other issues ill look into them, but since MW3 came out I'm kinda playing that

doublex8

2011-11-08 22:41:53

From: PatDuffy
The reason a dragon pick wont work is because I used a universal pickaxe dtm for detection, and a dragon pick has a different shape. As for the other issues ill look into them, but since MW3 came out I'm kinda playing that


I don't blame you haha, I'll use my rune pick for now.

dennisl400c

2011-11-10 21:14:22

coal bag support later on for mining coal would be amazing

doublex8

2011-11-10 23:56:38

From: dennisl400c
coal bag support later on for mining coal would be amazing


this script does not mine coal

EDIT: Quick question, any way I can get it so it will only mine Mith?

iicorey

2011-11-11 00:31:23

this script does nothing but walks to the ladder

dennisl400c

2011-11-11 12:38:07

From: doublex8
this script does not mine coal

EDIT: Quick question, any way I can get it so it will only mine Mith?


i know it was a suggestion since he said he will add update it to do coal soi coal bag support would be a good idea to when he does it

Decision

2011-11-11 13:25:40

looks awesome nice banking feature ;)

mika

2011-11-16 17:26:17

does not work for me when starting at the bank. Walks to the ladder finds it but misclicks it and keeps looking for something. When started inside the mine it mined the addy without a problem. plz fix the ladder problem

wantonman

2011-11-18 17:19:54

This script runs good on a programing basis but what it actually does is something im not into. it has super long pauses in between. it stood idle for too long so i decided to use msi…

sidishere

2011-11-20 00:58:18

Yep, as soon as it goes down ladder, it starts looking for something and just stands there :S

divad82

2011-11-20 08:15:41

“Failed to walk to mine
Failed to walk to mine
Failed to walk to mine
Failed to walk to mine”
。。。。。

Im in the Dwarven Mine resource dungeon

What would i do?

'Toxin

2011-11-21 10:52:03

From: divad82
“Failed to walk to mine
Failed to walk to mine
Failed to walk to mine
Failed to walk to mine”
。。。。。

Im in the Dwarven Mine resource dungeon

What would i do?


Read the instructions next time, you need to make sure you start the script at bank.

wantonman

2011-11-21 18:20:03

i think u should find a way to test addy, the script gets stuck on addy!!!!!!!

omegaangelz

2011-11-30 10:14:30

I appreciate the effort you put into the script, but the angles are sometimes lowered too low that the script cannot see the ore, and other times it idles for so long between ore mining that I have been surprised to not be logged out yet

wantonman

2011-12-02 21:24:32

it might be an easy fix , maybe the colors are off, but i think it shouldent be an isssue

PatDuffy

2011-12-04 20:28:20

From: dweg
"Player is lost"

I swear, I'm about to smash my lcd to pieces.


Yea sorry about that, I am aware that this script needs some updating, but I'm currently a little low on time to fix it up.

dweg

2011-12-04 21:15:04

I've added the dragon pickaxe DTMs to the script, here's a modified version. It's my nooby scripting ofc, so it now reports that pickaxe is in invy when its actually equipped. :redface:

program DuffsUltimateDwarf;//by PatDuffy
{$DEFINE SMART}
{$i SRL\SRL.scar}
{$i SRL\SRL\Misc\stats.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 = false;
Signed = true;
//just leave the stats as it is if you don't have a username for it
SRLStats_UserID = 'Anonymous';//your SRL stats name
SRLStats_Password = 'anon1337';//your SRL stats password

var
TimePlayer, MithM, AddyM, RuneM,
AntiBanUsed, GemM, Loads,
TMith,TAddy,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,PickDTM2,x,y: Integer;
begin
if not LoggedIn then
Exit;
PickDTM := DTMFromString('78DA63FCC7CCC090CEC8800A98C0244C94919' +
'185812193809ABF40738A89302783801A56A09A18026AFE00ED8AC6A' +
'F0600C7A80594');
PickDTM2 := DTMFromString('mrAAAAHic42BgYPBiZmAIBuIgIHYGYkcgtgNibyA2BeJ0RgaGGCAuAOIkIC4C4jyoWDUQ2/JwAE1hwoPxA0YCGAYAIyEGDQ==');
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
if FindDTM(PickDTM2,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(PickDTM2);
Exit;
end else
begin
GameTab(tab_Equip);
Wait(1000+Random(200));
if FindDTM(PickDTM2,x,y,MIX1,MIY1,MIX2,MIY2) then
begin
Players[CurrentPlayer].Booleans[1] := False;
Writeln('Pick found Equipped');
Result:=True
GameTab(tab_Inv);
FreeDTM(PickDTM2);
Exit;
end else
begin
Writeln('Could not find pick');
Result:=False
FreeDTM(PickDTM);
Exit;
end;
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([' Duffs Ultimate Dwarf V1_2'],Point(15, 30), 16760576, 131072);
PrintOnSmart([
'Time Running: ' + TimeRunning,
'Players active: ' + ToStr(PlayersActive) + '/' + ToStr(HowManyPlayers),
'Mined: ' + IntToStr(TMith) + ' Mith',
'Mined: ' + IntToStr(TAddy) + ' Addy',
'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(True);
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(True);
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
MithDTM, AddyDTM,RuneDTM: Integer;
begin
MithDTM := DTMFromString('78DA632C66666050656440069696A10CD2401' +
'A24FA1F44E703D588A0AA61606002933051C624A01A75026A72806A0' +
'C09A8A905AAD1C0AF06005A1D04EE');
AddyDTM := DTMFromString('78DA639CCFCCC0A0CAC8800CEC3DED19A4813' +
'448F43F889E06542381AA868181094CC244197B806AB408A8990D546' +
'34040CD0AA01A25026A1602D588E35703009EFD0685');
RuneDTM := DTMFromString('78DA639CC2CCC050C8C8800CDCC36219B8803' +
'448F43F889E0D549386AA86818109AE060418DB816A3208A8E901AAA' +
'925A0662E504D097E35005DEA0761');
MithM := CountItems('dtm',MithDTM,[]);
AddyM := CountItems('dtm',AddyDTM,[]);
RuneM := CountItems('dtm',RuneDTM,[]);
FreeDTM(MithDTM);
FreeDTM(AddyDTM);
FreeDTM(RuneDTM);
end;

procedure StatsCommit;
begin
IncEx(Players[CurrentPlayer].Integers[5],MithM);
IncEx(Players[CurrentPlayer].Integers[6],AddyM);
IncEx(Players[CurrentPlayer].Integers[7],RuneM);
IncEx(Players[CurrentPlayer].Integers[8],GemM);
IncEx(TMith,MithM);
IncEx(TAddy,AddyM);
IncEx(TRune,RuneM);
IncEx(TGems,GemM);
stats_IncVariable('Mithril Ore (Mined)',MithM);
stats_IncVariable('Adamant Ore (Mined)',AddyM);
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 (TMith > 0) then//only writes if mith was mined
Writeln('[ Total Number of Mith Mined: ' + Padr(IntToStr(MithM),37) + ']');
if (TAddy > 0) then//only writes if mith was mined
Writeln('[ Total Number of Addy Mined: ' + Padr(IntToStr(AddyM),37) + ']');
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('[ Player: ' + Padr(IntToStr(i),2) + ': ' + Padr(Players[i].Nick,53) + ']');
Writeln('[ Loads: ' + Padr(IntToStr(Players[i].Integers[4]),58) + ']');
Writeln('[ Mith Mined: ' + Padr(IntToStr(Players[i].Integers[5]),53) + ']');
if (Players[i].Integers[6] > 0) then
Writeln('[ Addy Mined: ' + Padr(IntToStr(Players[i].Integers[6]),53) + ']');
if (Players[i].Integers[7] > 0) then
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('78DA633CC6CCC020C5C8800A98C0244C94711' +
'7508D2A0135A7816AF409A8390F54A34440CD1EA01A6DFC6A00F12E0' +
'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(True);
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 DidRedClick then
begin
Fails:=0;
Result:=True;
Wait(2000+Random(1000));
Exit;
end;
end else
begin
Inc(Fails);
end;
end;
end;
if (Fails >=7) then
Result:=False;
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);
if DidRedClick then
Fails:=0;
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);
Fails:=0;
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
var
T,Fails:Integer;
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));
MarkTime(T);
if (PercentBlackMM > 60) then
begin
Writeln('Climbed down the ladder');
Players[CurrentPlayer].Loc :='in mine';
Exit;
end else
Exit;
end else
Inc(Fails);
If (Fails > 6) then
begin
Writeln('Player did not climb down ladder');
Players[CurrentPlayer].Loc:='lost';
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(True);
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 MineMith: Boolean;//finds and mines mith with TPA's and ATPA's
var
MithColors: 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;
MithColors:=[9860211, 9840211];
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
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX,MSCY,TPA,MithColors[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
Result:=False;
Exit;
end;

function MineAddy: Boolean;//finds and mines addy with TPA's and ATPA's
var
AddyColors: 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;
AddyColors:=[8295038,60565540];
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(False);
MakeCompass('W');
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX,MSCY,TPA,AddyColors[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
Result:=False;
Exit;
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(False);
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,MSX1,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 MineMith then
begin
MarkTime(RockTime);
Wait(2000+Random(500));
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;
end;
70..84:begin
if MineAddy 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
begin
Break;
end else
Wait(1500+Random(1000));
end else
if MineMith 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;
end else
Wait(1500+Random(1000));
end;
85..99: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
if MineAddy 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
begin
Break;
end else
Wait(1500+Random(1000));
end else
if MineMith 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;
end else
Wait(1500+Random(1000));
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.

nathan lad

2011-12-11 15:06:25

script is great, only improvement i cud think to make wud be to add mining orfrocks outside the door aswell with the deposit box

PatDuffy

2011-12-11 15:13:05

From: nathan lad
script is great, only improvement i cud think to make wud be to add mining orfrocks outside the door aswell with the deposit box


Wow, it's actually still working? I haven't updated it in a month, and I thought it was barely working.

omegaangelz

2011-12-11 15:17:06

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.

Goku1

2011-12-11 18:36:00

For me it keeps saying fail to walk to mine when i'm already at the mine.

PatDuffy

2011-12-11 18:41:50

From: Goku1
For me it keeps saying fail to walk to mine when i'm already at the mine.


you pm'ed me asking if it worked, I told you it wouldn't…..

Goku1

2011-12-11 18:47:09

From: PatDuffy
you pm'ed me asking if it worked, I told you it wouldn't…..
Oh. Sorry I didn't check my private messages.

Spelletje

2011-12-20 18:31:02

Why not use the deposit box in the dungeon? It saves a whole lot of walking

PatDuffy

2011-12-20 18:31:53

From: Spelletje
Why not use the deposit box in the dungeon? It saves a whole lot of walking


Pssst, This script hasn't been updated in like, 6 months :p

I might get to fixing it eventually, IDK yet.

Jack512

2011-12-28 11:39:55

would be pretty cool if you updated this bro :3

PatDuffy

2011-12-28 13:38:17

From: Jack512
would be pretty cool if you updated this bro :3


On my to-do list, don't worry.

doublex8

2011-12-29 16:23:43

From: Spelletje
Why not use the deposit box in the dungeon? It saves a whole lot of walking


This RD doesn't have a deposit box and the bank is closer iirc

Datank

2012-01-20 04:54:00

From: doublex8
This RD doesn't have a deposit box and the bank is closer iirc


Brooooooooooooo this is for dwarf resource dungeon isnt it???? not mining guild resource dungeon?

unhitable

2012-01-20 19:49:38

From: Datank
Brooooooooooooo this is for dwarf resource dungeon isnt it???? not mining guild resource dungeon?


No it's for the Guild Mine one

PatDuffy

2012-01-20 20:12:20

And it's not in working order :p

kevin33

2012-01-24 22:36:54

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?

PatDuffy

2012-01-24 23:01:53

From: kevin33
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?


Not at all. If you wanted to release it, I could add it to the OP with credits to you, or you could release it on your on.

I encourage people to update my scripts to make it work better for themself.

kevin33

2012-01-24 23:04:17

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.

hader dem2

2012-01-26 16:51:12

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 ''

Kyle Undefined

2012-01-26 18:19:26

Learn to update it, it's not that hard ;)

hader dem2

2012-01-26 19:21:22

From: Kyle Undefined
Learn to update it, it's not that hard ;)


was it to me or what but is it scripts or client you mena for client its update so like he self said he not sure ofter he update it

Tonkah

2012-01-27 01:44:39

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?

Adobe

2012-01-27 01:57:38

From: Tonkah
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?
\

Change to SetAngle(SRL_ANGLE_HIGH);

Tonkah

2012-01-27 02:19:17

From: Adobe
\

Change to SetAngle(SRL_ANGLE_HIGH);

Thanks a ton man! Got it working now =]

Vansarr

2012-01-29 16:30:52

"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?

Tonkah

2012-01-29 17:21:01

From: Vansarr
"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?
use SRL/SRL.simba

Vansarr

2012-01-29 17:51:07

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 :(

tyking77

2012-02-03 22:25:40

doesnt work i climbs down the ladder and stands there :(

PatDuffy

2012-02-03 22:34:07

From: tyking77
doesnt work i climbs down the ladder and stands there :(


Read the OP, this is outdated. I might get to fixing this eventually, I have bigger plans for the time being.

instagib2001

2012-03-02 16:21:16

{$DEFINE SMART}
{$i srl/srl.simba}
{$i sps/sps.simba}
{$i ObjectDTM\ObjDTMInclude.simba}

instagib2001

2012-03-02 16:35:37

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

instagib2001

2012-03-02 16:39:55

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

PatDuffy

2012-03-02 16:41:25

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.

instagib2001

2012-03-02 17:07:21

Lol its on my top list to get to working again =) so far so great

instagib2001

2012-03-03 08:37:22

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('78DA63FCC7CCC090CEC8800A98C0244C94919' +
'185812193809ABF40738A89302783801A56A09A18026AFE00ED8AC6A' +
'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.x;
y := TPA.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, SmallChars, H);
for B := 0 to High(TTP) do
begin
Numb := ((I + 1) * 13);
FastSetPixel(Pic, TTP.x + 1, TTP.y + Numb + 1, Shadow);
FastSetPixel(Pic, TTP.x, TTP.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('78DA639CC2CCC050C8C8800CDCC36219B8803' +
'448F43F889E0D549386AA86818109AE060418DB816A3208A8E901AAA' +
'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.Integers[7]),53) + ']');
Writeln('[ Gems Mined: ' + Padr(IntToStr(Players.Integers[8]),53) + ']');
Writeln('[ BanHammer Evaded: ' + IntToStr(Players.Integers[9]) + Padr(' Times',45) + ']');
Writeln('[ Player Active: ' + Padr(BoolToStr(Players.Active),50) + ']');
Writeln('[==================================================================]')
end;
end;

function CountGems:Integer;//checks to see if gems were mined, and counts them
var
GemDTM: Integer;
begin
GemDTM := DTMFromString('78DA633CC6CCC020C5C8800A98C0244C94711' +
'7508D2A0135A7816AF409A8390F54A34440CD1EA01A6DFC6A00F12E0' +
'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,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,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,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,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,MSX1,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.

nissannut

2012-03-05 19:00:13

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.

Tonkah

2012-03-06 00:49:50

[Error] (659:11): Unknown identifier 'PercentBlackMM' at line 658
Compiling failed.
Any Help/Advice on this?