SRL Archive - RS3 Outdated / Broken Scripts

Essence Miner [BOOM]


**BANNED The Man

2011-01-14 19:19:55

Essence Miner


What it Does!
- Mines Pure/Rune Essence (Varrock)
Features
- Super accurate TPA Ess Finding w/ Ref Backup
- Lightning fast reactions on the walking w/ Reflection
- Shmexy Proggy w/ Smart Print!
- ALL Axe Detection
- Good Antiban and AntiRandoms
- Humanlike!

How to get the script!
Checkout the url with Git:
https://github.com/Dynamite/BoomEssMiner
Download from here: https://github.com/downloads/Dynamite/BoomEssMiner/Ess%20Miner%20[BOOM]%20V2%20R2.simba


How to Setup
First you will see:
Const // Fill out below:
SRLStats_UserID = ''; // Your SRL Stats user ID, not username.
SRLStats_Password = ''; // Your SRL Stats Password.
DependClick = 4; // 1 in how many clicks is a right click option. (Mining)
DoDebug = False; // Do you want the script to debug?

Register for SRL Stats at: http://Stats.Villavu.com if you havn't already.
DependClick and DoDebug are explained next to themself.

Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with players[0] do
begin
Name := '';
Pass := '';
Active := True;
Pin := ''; //Leave blank if no pin
Loc := 'at trees'; //Read the thread to see valid arguments.
Integers[4]:= 1000; //Amount of loads you want to do.
end;
end;

All explanatory apart from Loc:
Valid arguments:
'at bank' //you are at the bank with stuff (logs) in inventory
'banked' //you are at the bank ready to go to trees
'at aubury' // you are at the trees with a full load ready to bank
'done aubury' // you have just teleported from aubury also if you want to start mining
'at middle' // If you are in the middle of the ess place :)

Shoutouts
- BlumbleBee, his script gave me HUGE inspiration <3

Last be definitely not least!
- Enjoy :)



-Boom

**BANNED The Man

2011-01-14 19:25:15

Reserved :)

Sgt Soul

2011-01-14 19:35:27

EDIT: didn't see the download link.. MY BAD!
Well I am going to give it a run soon :) <3

NCDS

2011-01-14 19:51:08

I see in your AxeWielded function you switch tabs to check, yet you use Reflection. Can't Reflection handle that without ever switching tabs?

I see in your AntiRandoms proc you force the user to select mining if a lamp is found. Perhaps make use of the LampSkill var in Players.scar intended to be used in DeclarePlayers?

I like the fact that even though a lot fo Reflection is used, you still included some color as well. :)

I'm quite busy at the moment, but you asked so I figured I would at least give you something.

Nice job :)

Sgt Soul

2011-01-14 19:53:51

one problem I have come across, after the miner has collected all 28 ess if the client laggs while the script clicks on the teleport and it misses, there is no failsafe and the player will just stay there thinking it is waiting to move through the teleport. I feel you should add a wait 5-10 seconds if not through the teleport then try again or something? I hope this helps :)

EDIT: another thing I have come across, when I went for my second run the player couldn't find the mine even through he is standing right next to it, I don't know if this is due to the mass of players that are there or something else :/

EDIT2: also on the paint that is on SMART it says boom goes the willows or something, shouldn't it print boom goes the essence miner or something? Just thought you should know in case you didn't mean to do that ;)

**BANNED The Man

2011-01-14 19:58:07

Thank you both of you :)
This is where svn/git comes in handy, i can throw out quick updates, but awkwardly it is 1am so i will get an update up in the morning :)

Sgt Soul

2011-01-14 20:02:43

From: Dynamite
Thank you both of you :)
This is where svn/git comes in handy, i can throw out quick updates, but awkwardly it is 1am so i will get an update up in the morning :)


alrighty, just msn me when you update it and I will give it another test for you <3 great work for releasing so many scripts too!!!

**BANNED The Man

2011-01-15 05:02:51

Updated with the important updates.
Will do less important updates soon. :)

-Boom

Wizzup?

2011-01-15 05:22:22

You'll probably want to add a plain version of some kind here because most people probably don't know how to get the latest version of your script.

**BANNED The Man

2011-01-15 05:28:54

From: Wizzup?
You'll probably want to add a plain version of some kind here because most people probably don't know how to get the latest version of your script.


Yes, I was actually just thinking that, cheers for the input :)

Attached R2

-Boom

Kasi

2011-01-15 07:58:24

From: NCDS
I see in your AxeWielded function you switch tabs to check, yet you use Reflection. Can't Reflection handle that without ever switching tabs?


i think reflection still has to switch tabs to update it or something i remember reading it somewhere?

Rich

2011-01-15 10:53:28

In your first post you've got 'tree finding'. Just thought I'd point it out. I'll read over the script later.

**BANNED The Man

2011-01-16 09:40:09

From: Rich
In your first post you've got 'tree finding'. Just thought I'd point it out. I'll read over the script later.


Thank you for pointing that out :)
And thank you, I would really appreciate some feedback :spot:

-Boom

monkeybeer

2011-01-16 16:34:58

I ran it starting in the bank and it got stuck after teleporting from aubury. I then stopped it and re ran it with the location set to "done aubury". It then mined a full bag of essence, ran to the portal, and got stuck again.

**BANNED The Man

2011-01-16 16:58:35

Yeah, I have found some major bugs and have been testing and trying all day.
I should have a working version out in a few hours :)
Re-done practically all the object finding just have to fix the detection to whether you are actually at certain places :)

-Boom

monkeybeer

2011-01-16 22:03:22

Understandable, you have come out with like 20 scripts in the past couple of weeks :P

XRaye

2011-01-17 02:25:48

Do I download https://github.com/Dynamite/BoomEssMiner/zipball/R2 or the attached file?

**BANNED The Man

2011-01-17 02:45:22

From: XRaye
Do I download https://github.com/Dynamite/BoomEssMiner/zipball/R2 or the attached file?


The Git link will be updated more often.

XRaye

2011-01-17 02:48:49

Alright, how come you removed the lamp still option?

**BANNED The Man

2011-01-17 02:52:51

I advise waiting for the next version :)

XRaye

2011-01-17 02:54:38

will do, thanks

p s u d

2011-01-17 02:55:18

Every time I start this script in varrock east bank it goes to the aubury, teles then does nothing. Any help?

Sgt Soul

2011-01-18 02:17:58

wait for Dynamite to release the next version p s u d, by then all current problems shall be resolved :)

Czech SS

2011-01-18 07:31:08

gotta same problem, everything goes right but then tele by arbury and fail :(

Sgt Soul

2011-01-18 07:49:30

as this script is currently not working at its best your closest next bet would be to use BumbleBee's ess miner, it functions quite well but does seem to get stuck sometimes. When using watch it on and off for a while :)

many thanks,
Sgt Soul

**BANNED The Man

2011-01-18 12:10:11

Ok spent some time updating and finally got there.
I think sometimes the Tile finding is off but apart from that it is sweet :)

R3 can be downloaded here: https://github.com/downloads/Dynamite/BoomEssMiner/Ess%20Miner.simba

Or if you have Git then the checkout link is in the MP.

-Boom

**BANNED The Man

2011-01-18 16:30:02

Updated to R4

Minor Fixes.

-Boom

monkeybeer

2011-01-18 16:56:25

Will be testing soon :) Be back with proggy.

**BANNED The Man

2011-01-18 17:03:59

From: monkeybeer
Will be testing soon :) Be back with proggy.


I look forward to it :)

-Boom

monkeybeer

2011-01-18 17:30:59

Not sure what's up, but it gets stuck after teleporting from aubury every time. I then started it in the essence place with the location set to "aubury done" and it mined a full bag of essence, ported, banked, ran back to aubury, teleported, and got stuck in the essence place again.

Here's the proggy

[-----------------------------]
[ Essence Miner ]
[-----------------------------]
We worked for 1 Minutes and 58 Seconds
Mined 28 Essence
Loads Done: 1
Gained: 756 gp
Gained: 0 levels
Antibanned 1
[-----------------------------]

**BANNED The Man

2011-01-18 17:32:01

From: monkeybeer
Not sure what's up, but it gets stuck after teleporting from aubury every time. I then started it in the essence place with the location set to "aubury done" and it mined a full bag of essence, ported, banked, ran back to aubury, teleported, and got stuck in the essence place again.

Here's the proggy

[-----------------------------]
[ Essence Miner ]
[-----------------------------]
We worked for 1 Minutes and 58 Seconds
Mined 28 Essence
Loads Done: 1
Gained: 756 gp
Gained: 0 levels
Antibanned 1
[-----------------------------]


GAHHH, ok I will make some more failsafes tonight or in the morning.

-Boom

**BANNED The Man

2011-01-19 18:12:02

Could someone please test the attached revision (R5).

Thankyoo
-Boom

Sgt Soul

2011-01-19 18:51:01

first time it found arbury straight away but then couldn't find the mine (didn't look for the mine) the cursor just sat there. I started it again and the player took a while to find arbury and was stuck in the middle bit and still couldn't find the mine nor did it look :/ I hope this feedback helps <3

EDIT: (suggestion) you should put more detail in the debug so you can see which functions/parts of the script are failing.

lolbus

2011-01-22 17:43:07

Am I doing wrongly? The script will always run fine, spent awhile reading guide, and it seems to be working, but the script doesn't seem to go along well with my character.

My character, can mine essence, run back to banker, deposit what i mined, and run backs to Aubury to return to the mine field, but everytime he enters mine field, he will just get stucked there and not move 3/4 of the time.. and it said Field not found:e

help? im noob.. thx

**BANNED The Man

2011-01-22 17:45:21

From: lolbus
Am I doing wrongly? The script will always run fine, spent awhile reading guide, and it seems to be working, but the script doesn't seem to go along well with my character.

My character, can mine essence, run back to banker, deposit what i mined, and run backs to Aubury to return to the mine field, but everytime he enters mine field, he will just get stucked there and not move 3/4 of the time.. and it said Field not found:e

help? im noob.. thx


It is "my" fault.
I think I have some "false-positives" in my script which is telling the script it is somewhere it isn't. I will try and get time to fix tomorrow :)

-Boom

Jelloman

2011-01-23 00:46:25

walked to aubrey, teleported to the mine, never started mining… I dont have time to continue testing right now, but I definitely will in the next few days. also, I was wondering if you could give me a simple explanation on how to set up GIT, i downloaded it, couldnt quite figure out how to set up the repository though. I couldn't find any tuts on here for it either, I do have tortoise installed and working on my system…

**BANNED The Man

2011-01-23 12:49:05

Could someone please test this:
program EssMiner;
{$define SMART}
{$i srl/srl.scar}
{$i Reflection/Reflection.simba}
{$i SRL\SRL\Misc\stats.simba}


Const // Fill out below:
SRLStats_UserID = ''; // Your SRL Stats username.
SRLStats_Password = ''; // Your SRL Stats Password.
DependClick = 5; // 1 in how many clicks is a right click option. (Mining)
DoDebug = True; // Do you want the script to debug?

Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with players[0] do
begin
Name := '';
Pass := '';
Active := True;
Pin := ''; //Leave blank if no pin
Loc := 'done aubury'; //Read the thread to see valid arguments.
Integers[4]:= 100; //Amount of loads you want to do.
Strings[1] := 'Mining'; // Lamp Skill
end;
end;

type
TTilesArray = array of TTile;
var
EssCountStart, Price : integer;
const
RUNEESS_ID = 1436;
PUREESS_ID = 7936;
Colour = 0;
Hue = 1;
Sat = 2;
Tol = 3;

function ConvertPrice(input: string): Integer; // Credit to BlumbleBee for these two functions <3
var
f: Extended;
begin
input := Replace(Lowercase(Trim(input)), ',', '');
if (Pos('m', input) > 0) then
f := StrToFloatDef(Copy(input, 1, Pos('m', input) - 1), 0) * 1000000
else if (Pos('k', input) > 0) then
f := StrToFloatDef(Copy(input, 1, Pos('k', input) - 1), 0) * 1000
else
f := StrToFloatDef(Input, 0);
Result := Round(f);
end;

procedure SetPrice(runeEss: Boolean);
var
S: string;
I: Integer;
begin
if runeEss = true then
I := RUNEESS_ID
else
I := PUREESS_ID;

s := getPage('http://services.runescape.com/m=itemdb_rs/Rune_essence/viewitem.ws?obj='+IntToStr(I));
Price := ConvertPrice(Between('<b>Market price:</b> ', #10 + '</span>', s));
end;

Procedure Debug(s:string);
Begin
if DoDebug then
Writeln(s);
end;

Procedure AxeWielded;
var
Equipped : integer;
TheIDs: TIntegerArray;
Pickaxe : TInvItemArray;
Begin
If Not (LoggedIn) Or Not (Players[CurrentPlayer].Active) Then
exit;
TheIDs := [1265, 1271, 15259, 1267, 1273, 1275, 1269];
GameTab(tab_Inv);
Wait(500 + Random(200));
if(R_ItemIDExistsEx(TheIDs, Pickaxe))then
begin
Players[CurrentPlayer].Booleans[0] := False;
Debug('Pickaxe is in inventory.');
Exit;
end else
GameTab(tab_Equip);
Wait(500 + Random(200));
Equipped := GetEquippedIDAt(3);
if(InIntArray(TheIDs, Equipped))then
begin
Players[CurrentPlayer].Booleans[0] := True;
Debug('Hatchet is equipped.');
Exit;
end;
End;

Procedure LevelTalking;
Begin
If Not (LoggedIn) Or Not (Players[CurrentPlayer].Active) Then
exit;
If LevelUp Then
Begin
Inc(Players[CurrentPlayer].Integers[2]);
stats_IncVariable('Total Levels Gained', 1);
Writeln('Woooot we have now gained '+IntToStr(Players[CurrentPlayer].Integers[2])+' levels!');
Begin
Case Random(50) Of
0: TypeSend('Guess what... I levelled!');
1: TypeSend('w00t lvld');
2: TypeSend('lvld again...');
3: TypeSend('grats me! I lvld!');
4: TypeSend('gay lag, didnt realise i lvld');
5: TypeSend('woopdewoop');
6: TypeSend('this levelling stuff is getting boring...');
7: TypeSend('dangdarnit, I jooost lavallled');
8: TypeSend('can we have a party cause i just lvld');
9: TypeSend('house party at mine! jokes...');
End;
End;
End;
End;

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 ProgressReport;
var
EssMined, TotalLoads, TotalLevels, TotalAntiban, I, ActivePlayers: Integer;
Begin
LevelTalking;
for I := 0 to HowManyPlayers-1 do
begin
with Players[I] do
begin
if Active then
Inc(ActivePlayers);
EssMined := EssMined + Integers[0];
TotalLoads := TotalLoads + Integers[1];
TotalLevels := TotalLevels + Integers[2];
TotalAntiban := TotalAntiban + Integers[3];
end;
end;
PrintOnSmart([' Essence Miner [BOOM]'],Point(22, 30), 62207, 131072);
PrintOnSmart(
['',
'',
'',
' Global Stats ',
' --------------',
' Time Running: '+ TimeRunning,
' Mined: '+IntToStr(EssMined)+' Essence',
' Loads Done: : '+IntToStr(TotalLoads),
' Gained: '+IntToStr(Price*EssMined)+' gp',
' Gained: '+IntToStr(TotalLevels)+' levels',
' Players Active: '+IntToStr(ActivePlayers),
' ',
' Player Stats ',
' --------------',
' Player: '+Capitalize(Players[CurrentPlayer].Name),
' Essence: ' + IntToStr(Players[CurrentPlayer].Integers[0]),
' Gained: '+IntToStr(Price*Players[CurrentPlayer].Integers[0])+' gp'
], Point(30, 60), 1959605, 131072);

cleardebug;
Writeln('[-----------------------------]');
Writeln('[ Essence Miner ]');
Writeln('[-----------------------------]');
Writeln(' We worked for ' + TimeRunning);
Writeln(' Mined ' + IntToStr(EssMined)+' Essence');
Writeln(' Loads Done: ' + IntToStr(TotalLoads));
writeLn(' Gained: '+IntToStr(Price*EssMined)+' gp');
Writeln(' Gained: ' + IntToStr(TotalLevels)+' levels');
Writeln(' Antibanned ' + IntToStr(TotalAntiBan));
Writeln('[-----------------------------]');
Stats_Commit;
End;

procedure AntiBan;
begin
case (Random(400)) of
0: RandomRClick;
1: MouseSpeed := 15 + Random(5);
2: PickUpMouse;
3: BoredHuman;
4..400: begin
Wait(100 + Random(50));
Exit;
end;
end;
Inc(Players[CurrentPlayer].Integers[3]);
end;

Procedure AntiRandoms;
Begin
If Not (LoggedIn) Or Not (Players[CurrentPlayer].Active) Then
NextPlayer(false);
LevelTalking;
FindNormalRandoms;
Wait(300+Random(200));
FindLamp(Players[CurrentPlayer].Strings[1]);
End;

Function WalkToAubury: Boolean;
Begin
If Not LoggedIn Then
Exit;
EssCountStart := R_InvCount;
If WalkToTile(Point(3257, 3409), 2, 1) Then
If not WalkToTile(Point(3253, 3401), 1, 0) Then
Exit;
Result := True;
End;

Function FindEss(Var X, Y : Integer; W, H, X1, Y1, X2, Y2 : Integer): Boolean;
Var
TPA : TPointArray;
ATPA : T2DPointArray;
T: TPoint;
K, G, Z: Extended;
Colors: array [0..1] of tIntegerArray;
I, J, xX, yY, Blah: Integer;
TPAStoof: array [0..1] of TVariantArray;
DoubleTPA: array [0..1] of TPointArray;
Which: array [0..1] of Integer;
begin
if not LoggedIn then Exit;
TPAStoof[0] := [12961230, 0.93, 0.90];
TPAStoof[1] := [10790060, 0.00, 0.16];
ColorToleranceSpeed(2);
for I := 0 to 1 do
begin
SetColorSpeed2Modifiers(TPAStoof[I][Hue], TPAStoof[I][Sat]);
FindColorsTolerance(DoubleTPA[I], TPAStoof[I][Colour], MSx1, MSy1, MSx2, MSy2, 5);
Debug('Length of TPA = '+IntToStr(Length(DoubleTPA[I])));
if Length(DoubleTPA[I]) = 0 then
Exit;
Colors[I] := GetColors(DoubleTPA[I]);
Debug('Length of Colors = '+IntToStr(Length(Colors[I])));
for J := 0 to high(Colors[I]) do
begin
ColorToXYZ(Colors[I][J], K, G, Z);
if InRange(Round(K), 35, 49) then
if InRange(Round(G), 36, 50) then
if InRange(Round(Z), 38, 54) then
begin
Which[I] := J;
Debug('Which['+IntToStr(I)+'] = '+IntToStr(J));
Break;
end;
end;
end;
ColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.20, 0.20);

Repeat
SetArrayLength(TPA, 0);
FindColorsTolerance(TPA, Colors[J][Which[J]], MSX1, MSY1, MSX2, MSY2, 3);
if Length(TPA) <= 0 then
Exit;
ATPA := TPAToATPAEx(TPA, 25, 25);
SortATPASize(ATPA, true);
for I := 0 to high(ATPA) do
begin
if I = 3 then
Break;
T := MiddleTPA(ATPA[I]);
MMouse(T.x, T.y, 5, 5);
Wait(400 + Random(200));
if WaitUpTextMulti(['ssen', 'une'], 350) then
begin
getMousePos(xX, yY);
Blah := RandomRange(0, DependClick);
if Blah = 0 then begin
Mouse(xX, yY, 0, 0, False);
WaitOption('ine', 500)
end else Mouse(xX, yY, 0, 0, True);
Result := True;
Blah := 0;
Exit;
end;
Inc(J);
end;
until J > 1;
Debug('Found the essence!');
End;

Function FoundEss(Var X, Y : Integer): Boolean;
Begin
Debug('Beginning FoundEss');
Result := FindEss(X, Y, 20, 50, MSX1, MSY1, MSX2, MSY2);
End;

Function FoundEss2:Boolean;
var
EPoint : TPoint;
xX, yY : integer;
CurrentObject : TRSObject;
begin
Debug('FoundEss2');
CurrentObject := GetObjectById(2491, 0, 10);
if not (TileOnMs(CurrentObject.Tile, 0) ) then
Exit;
EPoint := TileToMS(CurrentObject.Tile, 0);
MMouse(EPoint.x, EPoint.y, 0, 0);
GetMousePos(xX, yY);
if WaitUpText('ine', 600) then
Mouse(xX, yY, 0, 0, True);
if DidRedClick then
Result := True
else Result := False;
end;


Function MiningCheck:Boolean;
Begin
if not LoggedIn then Exit;
if not CharacterAnimating then
Wait(2500);
if CharacterAnimating then
Result := True else Result := False;
End;

Function DoPortal:boolean;
var
NWPortalTile, SWPortalTile, SEPortalTile, NEPortalTile : TTile;
P : TPoint;
xX, yY, Blah, I, Which, LengthA, LengthB : integer;
TPA : TPointArray;
ATPA : T2DPointArray;
WhichTPA: array [0..1] of TPointArray;
TPAStoof: array [0..1] of TVariantArray;
Begin
NWPortalTile := (tile(2885, 4850)); //NW
SWPortalTile := (tile(2889, 4813)); //SW
SEPortalTile := (tile(2933, 4815)); //SE
NEPortalTile := (tile(2932, 4854)); //NE
TPAStoof[0] := [11652296, 0.49, 2.59, 3];
TPAStoof[1] := [12898508, 2.78, 4.37, 1];

case Players[CurrentPlayer].Loc of
'NW' : Begin
if not WalkToTile((NWPortalTile), 1, 1) then begin
NextPlayer(False);
Exit;
end;
end;
'SW' : Begin
if not WalkToTile((SWPortalTile), 1, 1) then begin
NextPlayer(False);
Exit;
end;
end;
'SE' : Begin
if not WalkToTile((SEPortalTile), 1, 1) then begin
NextPlayer(False);
Exit;
end;
end;
'NE' : Begin
if not WalkToTile((NEPortalTile), 1, 1) then begin
NextPlayer(False);
Exit;
end;
end;
End;
Repeat
Wait(250);
Until not CharacterMoving;
Wait(3000);
repeat
for I := 0 to 1 do
begin
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(TPAStoof[I][Hue], TPAStoof[I][Sat]);
FindColorsTolerance(WhichTPA[I], TPAStoof[I][Colour], MSX1, MSY1, MSX2, MSY2, TPAStoof[I][Tol]);
ColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.20, 0.20);
end;
if Length(WhichTPA[0]) or Length(WhichTPA[1]) > 0 then
Break;
until False;
LengthA := Length(WhichTPA[0]);
LengthB := Length(WhichTPA[1]);
Debug('LengthA = '+IntToStr(LengthA));
Debug('LengthB = '+IntToStr(LengthB));
if LengthA > LengthB then
Which := 0
else
Which := 1;
Debug('Which = '+IntToStr(Which));
TPA := WhichTPA[Which];
ATPA := SplitTPAEx(TPA, 10, 10);
SortATPASize(ATPA, true);
for I := 0 to high(ATPA) do
begin
if I > 2 then
Exit;
P := MiddleTPA(ATPA[I]);
Wait(1000 + Random(500));
MMouse(P.x, P.y, 5, 5);
Wait(1000);
//if WaitUpText('ortal', 400) then
begin
GetMousePos(xX, yY);
Blah := RandomRange(0, DependClick);
if Blah = 0 then begin
Mouse(xX, yY, 0, 0, False);
WaitOption('nte', 500)
end else Mouse(xX, yY, 0, 0, True);
Result := true;
Exit;
end;
end;
end;

Function BoomEss: Boolean;
Var
X, Y, Tried : Integer;
Begin
if Not LoggedIn then
Exit;
Debug('BoomEss');
Repeat
if Tried = 10 then
begin
Debug('Cant find ess... Exiting');
Exit;
end;
if not FoundEss(X, Y) then
if not FoundEss2 then
Begin
Inc(Tried);
Debug(IntToStr(Tried));
Wait(2000 + Random(500));
Continue;
End;
//Mouse(X, Y, 0, 0, True);
Wait(1500 + Random(500));
Repeat
LevelTalking;
if MiningCheck then
begin
Antiban
AntiRandoms
end;
if InvFull then
Break;
Until not (MiningCheck);
Until InvFull;
Result := True;
End;

Function DoAubury:Boolean;
var
Aubury:TNPC;
APoint : TPoint;
x, y :integer;
Tracks :TRSObject;
Begin
if not LoggedIn then Exit;
Tracks := GetObjectByID(454, OBJECT_TYPE_FLOORDECOR, 50);
if FindNPC(553, Aubury) then
APoint := TileToMSEx(Aubury.Tile, 0.5, 0.5, Aubury.Height);
MMouse(APoint.x, APoint.y, 1, 1);
if WaitUpText('-to', 600) then
Mouse(APoint.x, APoint.y, 1, 1, False);
if not R_ChooseOption('elep') then
Exit;
Wait(3000);
Result := True;
Debug('Done aubury');
End;

function DistanceFromArray(TheTiles: TTilesArray): integer;
var
MyPos: TTile;
I: integer;
begin
MyPos := GetMyPos;
Result := High(Result);
for I := 0 to High(TheTiles) do
Result := Min(Result, Distance(MyPos.x, MyPos.y, TheTiles[I].X, TheTiles[I].Y));
end;

Function AtEssPlace:Boolean;
var
NW, NE, SE, SW : TTile;
Tower, Tracks : TRSObject;
Begin
if not LoggedIn then Exit;
NW := Point(2892, 4848); //NW
NE := Point(2926, 4849); //NE
SE := Point(2929, 4816); //SE
SW := Point(2895, 4814); //SW

Tower := GetObjectByID(506, OBJECT_TYPE_FLOORDECOR, 30);
Tracks := GetObjectByID(454, OBJECT_TYPE_FLOORDECOR, 20);
Writeln('AtEssPlace');
if (DistanceFrom(NW) < 20) or (DistanceFrom(NE) <20) or (DistanceFrom(SE) <30) or (DistanceFrom(SW) <20) then
Result := True
else begin
NextPlayer(False);
Debug('AtEssPlace False');
Result := False;
Exit
end;
End;

Function WhichEssPlace:boolean; // I know I can do case, will do later.
Begin
if DistanceFrom(tile(2892, 4848)) < 16 then begin
Players[CurrentPlayer].Loc := 'NW';
Debug('At NW');
if BoomEss then
if DoPortal then
Result := True;
Exit;
End;
if DistanceFrom(tile(2926, 4849)) < 16 then begin
Players[CurrentPlayer].Loc := 'NE';
Debug('At NE');
if BoomEss then
if DoPortal then
Result := True;
Exit;
End;
if DistanceFrom(tile(2929, 4816)) < 16 then begin
Players[CurrentPlayer].Loc := 'SE';
Debug('At SE');
if BoomEss then
if DoPortal then
Result := True;
Exit;
End;
if DistanceFrom(tile(2895, 4814)) < 16 then begin
Players[CurrentPlayer].Loc := 'SW';
Debug('At SW');
if BoomEss then
if DoPortal then
Result := True;
Exit;
End;
End;

Function AtMiddle:boolean;
var
Rope : TRSObject;
MiddleTile:array [0..26] of TTile;
MainTile, done:TTile;
I:integer;
Begin
if not LoggedIn then Exit;
MainTile := Tile(2909, 4834);
MiddleTile[0] := Tile(MainTile.x, MainTile.y);
MiddleTile[1] := Tile(MainTile.x+1, MainTile.y);
MiddleTile[2] := Tile(MainTile.x+2, MainTile.y);
MiddleTile[3] := Tile(MainTile.x+3, MainTile.y);
MiddleTile[4] := Tile(MainTile.x, MainTile.y-1);
MiddleTile[5] := Tile(MainTile.x+1, MainTile.y-1);
MiddleTile[6] := Tile(MainTile.x+2, MainTile.y-1);
MiddleTile[7] := Tile(MainTile.x+3, MainTile.y-1);
MiddleTile[8] := Tile(MainTile.x, MainTile.y-2);
MiddleTile[9] := Tile(MainTile.x+1, MainTile.y-2);
MiddleTile[10] := Tile(MainTile.x+2, MainTile.y-2);
MiddleTile[11] := Tile(MainTile.x+3, MainTile.y-2);
MiddleTile[12] := Tile(MainTile.x, MainTile.y-3);
MiddleTile[13] := Tile(MainTile.x+1, MainTile.y-3);
MiddleTile[14] := Tile(MainTile.x+2, MainTile.y-3);
MiddleTile[15] := Tile(MainTile.x+3, MainTile.y-3);
MiddleTile[16] := Tile(MainTile.x, MainTile.y-4);
MiddleTile[17] := Tile(MainTile.x+1, MainTile.y-4);
MiddleTile[18] := Tile(MainTile.x+2, MainTile.y-4);
MiddleTile[19] := Tile(MainTile.x+3, MainTile.y-4);
MiddleTile[20] := Tile(2909, 4829);
MiddleTile[21] := Tile(2909, 4828);
MiddleTile[22] := Tile(2909, 4827);
MiddleTile[23] := Tile(2908, 4826);
MiddleTile[24] := Tile(2907, 4826);
MiddleTile[25] := Tile(2906, 4826);
MiddleTile[26] := Tile(2905, 4826);
Rope := GetObjectByID(496, OBJECT_TYPE_FLOORDECOR, 9);
done := GetMyPos;
For I:= 0 to 26 do
if ((done.x = MiddleTile[I].x) and (done.y = MiddleTile[I].y)) then begin
Writeln('AtMiddle');
Result := True
end else Result := false;
End;

Function WalkFromMiddle:boolean;
Begin
if not LoggedIn then Exit;
if not AtMiddle then
Exit;
If WalkToTile(Point(2906, 4826), 1, 1) then
If WalkToTile(Point(2898, 4815), 1, 1) then
Begin
Wait(1500 + Random(500));
Result := True;
End;
End;


Function WalkToBank: Boolean;
Begin
If Not LoggedIn Then
Exit;
Wait(750 + Random(300));
If WalkToTile(Point(3259, 3411), 1, 1) Then
if WalkToTile(Point(3253, 3420), 1, 1) then
Result := True;
End;

Function Bank: Boolean;
Var
i, EssCountEnd, EssCountFinal, ID : integer;
B : boolean;
Begin
If Not LoggedIn Then
Exit;
Wait(1000+ Random(1000));
EssCountEnd := R_InvCount;
ID := getItemIDAt(2);
If Not OpenBankFast(Bank_VE) Then
If Not OpenBankQuiet(Bank_VE) Then
If Not R_OpenBankBooth('veb') then
Exit;
for i := 1 + Integer(not Players[CurrentPlayer].Booleans[0]) to 28 do
begin
Deposit(i, 28, True);
end;
CloseBank;
Inc(Players[CurrentPlayer].Integers[1]);
stats_IncVariable('Loads Done', 1);
EssCountFinal := (EssCountEnd - EssCountStart);
begin
B := ID = RUNEESS_ID;
SetPrice(B);
if B then
stats_IncVariable('Rune Essence (Mined)', EssCountFinal)
else stats_IncVariable('Pure Essence (Mined)', EssCountFinal);
end;
IncEx(Players[CurrentPlayer].Integers[0], EssCountFinal);
ProgressReport;
Result := True;
End;

Procedure MainLoop;
Begin
repeat
Case Lowercase(Players[CurrentPlayer].Loc) of
'banked':
if WalkToAubury then
Players[CurrentPlayer].Loc := 'at aubury';
'at aubury':
if DoAubury then
Players[CurrentPlayer].Loc := 'done aubury';
'done aubury': begin
if AtMiddle then
Players[CurrentPlayer].Loc := 'at middle'
else Players[CurrentPlayer].Loc := 'nearly ess';
end;
'at middle':
if WalkFromMiddle then
Players[CurrentPlayer].Loc := 'nearly ess';
'nearly ess':
if AtEssPlace then
Players[CurrentPlayer].Loc := 'at ess';
'at ess':
if WhichEssPlace then
Players[CurrentPlayer].Loc := 'teleported';
'teleported':
if WalkToBank then
Players[CurrentPlayer].Loc := 'at bank';
'at bank':
if Bank then
Players[CurrentPlayer].Loc := 'banked';
end;
until(Players[CurrentPlayer].Integers[1] >= Players[CurrentPlayer].Integers[4]);
End;



begin
ClearDebug;
ClearReport;
SetupSRLStats(22, SRLStats_UserID, SRLStats_Password);
Smart_Server := 17;
Smart_Members := false;
Smart_Signed := true;
Smart_SuperDetail := false;
SetupSRL;
AddOnTerminate('ProgressReport');
begin
DeclarePlayers;
LoginPlayer;
ProgressReport;
AxeWielded;
MakeCompass('North');
SetAngle(True);
Gametab(tab_Inv);
repeat
MainLoop
until AllPlayersInactive();
end;
end.
and report back :)

Thankyooo
-Boom

monkeybeer

2011-01-23 14:03:54

Same problem :( It teleports and then gets stuck. Here's what the debug says. I can see you added to it so hopefully the debug will help you find where that bug is :)

[-----------------------------]
[ Essence Miner ]
[-----------------------------]
We worked for 24 Seconds
Mined 0 Essence
Loads Done: 0
Gained: 0 gp
Gained: 0 levels
Antibanned 0
[-----------------------------]
Hatchet is equipped.
Done aubury
AtMiddle
AtEssPlace

Edit: I ran it again to see what would happen if it didn't get teleported to the middle and it's working!!!!

Edit 2: Now it seems to mine a few loads and then get an error while looking for aubury.

[-----------------------------]
[ Essence Miner ]
[-----------------------------]
We worked for 4 Minutes and 40 Seconds
Mined 56 Essence
Loads Done: 2
Gained: 1680 gp
Gained: 0 levels
Antibanned 2
[-----------------------------]
Exception in Script: Access violation
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap]
File[C:\Simba\Includes\SRL/logs/SRL log 23-01-11 2.txt] has not been freed in the script, freeing it now.

**BANNED The Man

2011-01-24 17:49:37

From: monkeybeer
Same problem :( It teleports and then gets stuck. Here's what the debug says. I can see you added to it so hopefully the debug will help you find where that bug is :)

[-----------------------------]
[ Essence Miner ]
[-----------------------------]
We worked for 24 Seconds
Mined 0 Essence
Loads Done: 0
Gained: 0 gp
Gained: 0 levels
Antibanned 0
[-----------------------------]
Hatchet is equipped.
Done aubury
AtMiddle
AtEssPlace

Edit: I ran it again to see what would happen if it didn't get teleported to the middle and it's working!!!!

Edit 2: Now it seems to mine a few loads and then get an error while looking for aubury.

[-----------------------------]
[ Essence Miner ]
[-----------------------------]
We worked for 4 Minutes and 40 Seconds
Mined 56 Essence
Loads Done: 2
Gained: 1680 gp
Gained: 0 levels
Antibanned 2
[-----------------------------]
Exception in Script: Access violation
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap]
File[C:\Simba\Includes\SRL/logs/SRL log 23-01-11 2.txt] has not been freed in the script, freeing it now.


AFAIK, that is to do with an object memory leak in Simba/SRL.
Try and run again :)

-Boom

Jelloman

2011-01-24 18:34:30

well the second time it went into the mine it was in the middle, and didn't go anywhere from there, then when it got to the bank it couldn't find the bank booth, moused over almost all of the bankers, and then just moved around in the grass. Also, running would be helpful.

[-----------------------------]
[ Essence Miner ]
[-----------------------------]
We worked for 4 Minutes and 38 Seconds
Mined 28 Essence
Loads Done: 1
Gained: 812 gp
Gained: 1 levels
Antibanned 1
[-----------------------------]
Done aubury
AtMiddle
AtEssPlace
At NE
BoomEss
Beginning FoundEss
Length of TPA = 12
Length of Colors = 12
Length of TPA = 2
Length of Colors = 2
Which[1] = 0
Found the essence!
FoundEss2
****** leveled up
Woooot we have now gained 2 levels!
LengthA = 0
LengthB = 69
Which = 1

**BANNED The Man

2011-01-24 19:08:54

Ok so my WalkFromMiddle function isnt initiating.
Maybe because for some reason it isnt detecting any of the tiles or something…
I will edit this post with a test fix.

EDIT: I think I might have fixed it…
program EssMiner;
{$define SMART}
{$i srl/srl.scar}
{$i Reflection/Reflection.simba}
{$i SRL\SRL\Misc\stats.simba}


Const // Fill out below:
SRLStats_UserID = ''; // Your SRL Stats username.
SRLStats_Password = ''; // Your SRL Stats Password.
DependClick = 5; // 1 in how many clicks is a right click option. (Mining)
DoDebug = True; // Do you want the script to debug?

Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with players[0] do
begin
Name := '';
Pass := '';
Active := True;
Pin := ''; //Leave blank if no pin
Loc := 'done aubury'; //Read the thread to see valid arguments.
Integers[4]:= 100; //Amount of loads you want to do.
Strings[1] := 'Mining'; // Lamp Skill
end;
end;

type
TTilesArray = array of TTile;
var
EssCountStart, Price : integer;
const
RUNEESS_ID = 1436;
PUREESS_ID = 7936;
Colour = 0;
Hue = 1;
Sat = 2;
Tol = 3;

function ConvertPrice(input: string): Integer; // Credit to BlumbleBee for these two functions <3
var
f: Extended;
begin
input := Replace(Lowercase(Trim(input)), ',', '');
if (Pos('m', input) > 0) then
f := StrToFloatDef(Copy(input, 1, Pos('m', input) - 1), 0) * 1000000
else if (Pos('k', input) > 0) then
f := StrToFloatDef(Copy(input, 1, Pos('k', input) - 1), 0) * 1000
else
f := StrToFloatDef(Input, 0);
Result := Round(f);
end;

procedure SetPrice(runeEss: Boolean);
var
S: string;
I: Integer;
begin
if runeEss = true then
I := RUNEESS_ID
else
I := PUREESS_ID;

s := getPage('http://services.runescape.com/m=itemdb_rs/Rune_essence/viewitem.ws?obj='+IntToStr(I));
Price := ConvertPrice(Between('<b>Market price:</b> ', #10 + '</span>', s));
end;

Procedure Debug(s:string);
Begin
if DoDebug then
Writeln(s);
end;

Procedure AxeWielded;
var
Equipped : integer;
TheIDs: TIntegerArray;
Pickaxe : TInvItemArray;
Begin
If Not (LoggedIn) Or Not (Players[CurrentPlayer].Active) Then
exit;
TheIDs := [1265, 1271, 15259, 1267, 1273, 1275, 1269];
GameTab(tab_Inv);
Wait(500 + Random(200));
if(R_ItemIDExistsEx(TheIDs, Pickaxe))then
begin
Players[CurrentPlayer].Booleans[0] := False;
Debug('Pickaxe is in inventory.');
Exit;
end else
GameTab(tab_Equip);
Wait(500 + Random(200));
Equipped := GetEquippedIDAt(3);
if(InIntArray(TheIDs, Equipped))then
begin
Players[CurrentPlayer].Booleans[0] := True;
Debug('Hatchet is equipped.');
Exit;
end;
End;

Procedure LevelTalking;
Begin
If Not (LoggedIn) Or Not (Players[CurrentPlayer].Active) Then
exit;
If LevelUp Then
Begin
Inc(Players[CurrentPlayer].Integers[2]);
stats_IncVariable('Total Levels Gained', 1);
Writeln('Woooot we have now gained '+IntToStr(Players[CurrentPlayer].Integers[2])+' levels!');
Begin
Case Random(50) Of
0: TypeSend('Guess what... I levelled!');
1: TypeSend('w00t lvld');
2: TypeSend('lvld again...');
3: TypeSend('grats me! I lvld!');
4: TypeSend('gay lag, didnt realise i lvld');
5: TypeSend('woopdewoop');
6: TypeSend('this levelling stuff is getting boring...');
7: TypeSend('dangdarnit, I jooost lavallled');
8: TypeSend('can we have a party cause i just lvld');
9: TypeSend('house party at mine! jokes...');
End;
End;
End;
End;

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 ProgressReport;
var
EssMined, TotalLoads, TotalLevels, TotalAntiban, I, ActivePlayers: Integer;
Begin
LevelTalking;
for I := 0 to HowManyPlayers-1 do
begin
with Players[I] do
begin
if Active then
Inc(ActivePlayers);
EssMined := EssMined + Integers[0];
TotalLoads := TotalLoads + Integers[1];
TotalLevels := TotalLevels + Integers[2];
TotalAntiban := TotalAntiban + Integers[3];
end;
end;
PrintOnSmart([' Essence Miner [BOOM]'],Point(22, 30), 62207, 131072);
PrintOnSmart(
['',
'',
'',
' Global Stats ',
' --------------',
' Time Running: '+ TimeRunning,
' Mined: '+IntToStr(EssMined)+' Essence',
' Loads Done: : '+IntToStr(TotalLoads),
' Gained: '+IntToStr(Price*EssMined)+' gp',
' Gained: '+IntToStr(TotalLevels)+' levels',
' Players Active: '+IntToStr(ActivePlayers),
' ',
' Player Stats ',
' --------------',
' Player: '+Capitalize(Players[CurrentPlayer].Name),
' Essence: ' + IntToStr(Players[CurrentPlayer].Integers[0]),
' Gained: '+IntToStr(Price*Players[CurrentPlayer].Integers[0])+' gp'
], Point(30, 60), 1959605, 131072);

cleardebug;
Writeln('[-----------------------------]');
Writeln('[ Essence Miner ]');
Writeln('[-----------------------------]');
Writeln(' We worked for ' + TimeRunning);
Writeln(' Mined ' + IntToStr(EssMined)+' Essence');
Writeln(' Loads Done: ' + IntToStr(TotalLoads));
writeLn(' Gained: '+IntToStr(Price*EssMined)+' gp');
Writeln(' Gained: ' + IntToStr(TotalLevels)+' levels');
Writeln(' Antibanned ' + IntToStr(TotalAntiBan));
Writeln('[-----------------------------]');
Stats_Commit;
End;

procedure AntiBan;
begin
case (Random(400)) of
0: RandomRClick;
1: MouseSpeed := 15 + Random(5);
2: PickUpMouse;
3: BoredHuman;
4..400: begin
Wait(100 + Random(50));
Exit;
end;
end;
Inc(Players[CurrentPlayer].Integers[3]);
end;

Procedure AntiRandoms;
Begin
If Not (LoggedIn) Or Not (Players[CurrentPlayer].Active) Then
NextPlayer(false);
LevelTalking;
FindNormalRandoms;
Wait(300+Random(200));
FindLamp(Players[CurrentPlayer].Strings[1]);
End;

Function WalkToAubury: Boolean;
Begin
If Not LoggedIn Then
Exit;
EssCountStart := R_InvCount;
If WalkToTile(Point(3257, 3409), 2, 1) Then
If not WalkToTile(Point(3253, 3401), 1, 0) Then
Exit;
Result := True;
End;

Function FindEss(Var X, Y : Integer; W, H, X1, Y1, X2, Y2 : Integer): Boolean;
Var
TPA : TPointArray;
ATPA : T2DPointArray;
T: TPoint;
K, G, Z: Extended;
Colors: array [0..1] of tIntegerArray;
I, J, xX, yY, Blah: Integer;
TPAStoof: array [0..1] of TVariantArray;
DoubleTPA: array [0..1] of TPointArray;
Which: array [0..1] of Integer;
begin
if not LoggedIn then Exit;
TPAStoof[0] := [12961230, 0.93, 0.90];
TPAStoof[1] := [10790060, 0.00, 0.16];
ColorToleranceSpeed(2);
for I := 0 to 1 do
begin
SetColorSpeed2Modifiers(TPAStoof[I][Hue], TPAStoof[I][Sat]);
FindColorsTolerance(DoubleTPA[I], TPAStoof[I][Colour], MSx1, MSy1, MSx2, MSy2, 5);
Debug('Length of TPA = '+IntToStr(Length(DoubleTPA[I])));
if Length(DoubleTPA[I]) = 0 then
Exit;
Colors[I] := GetColors(DoubleTPA[I]);
Debug('Length of Colors = '+IntToStr(Length(Colors[I])));
for J := 0 to high(Colors[I]) do
begin
ColorToXYZ(Colors[I][J], K, G, Z);
if InRange(Round(K), 35, 49) then
if InRange(Round(G), 36, 50) then
if InRange(Round(Z), 38, 54) then
begin
Which[I] := J;
Debug('Which['+IntToStr(I)+'] = '+IntToStr(J));
Break;
end;
end;
end;
ColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.20, 0.20);

Repeat
SetArrayLength(TPA, 0);
FindColorsTolerance(TPA, Colors[J][Which[J]], MSX1, MSY1, MSX2, MSY2, 3);
if Length(TPA) <= 0 then
Exit;
ATPA := TPAToATPAEx(TPA, 25, 25);
SortATPASize(ATPA, true);
for I := 0 to high(ATPA) do
begin
if I = 3 then
Break;
T := MiddleTPA(ATPA[I]);
MMouse(T.x, T.y, 5, 5);
Wait(400 + Random(200));
if WaitUpTextMulti(['ssen', 'une'], 350) then
begin
getMousePos(xX, yY);
Blah := RandomRange(0, DependClick);
if Blah = 0 then begin
Mouse(xX, yY, 0, 0, False);
WaitOption('ine', 500)
end else Mouse(xX, yY, 0, 0, True);
Result := True;
Blah := 0;
Exit;
end;
Inc(J);
end;
until J > 1;
Debug('Found the essence!');
End;

Function FoundEss(Var X, Y : Integer): Boolean;
Begin
Debug('Beginning FoundEss');
Result := FindEss(X, Y, 20, 50, MSX1, MSY1, MSX2, MSY2);
End;

Function FoundEss2:Boolean;
var
EPoint : TPoint;
xX, yY : integer;
CurrentObject : TRSObject;
begin
Debug('FoundEss2');
CurrentObject := GetObjectById(2491, 0, 10);
if not (TileOnMs(CurrentObject.Tile, 0) ) then
Exit;
EPoint := TileToMS(CurrentObject.Tile, 0);
MMouse(EPoint.x, EPoint.y, 0, 0);
GetMousePos(xX, yY);
if WaitUpText('ine', 600) then
Mouse(xX, yY, 0, 0, True);
if DidRedClick then
Result := True
else Result := False;
end;


Function MiningCheck:Boolean;
Begin
if not LoggedIn then Exit;
if not CharacterAnimating then
Wait(2500);
if CharacterAnimating then
Result := True else Result := False;
End;

Function DoPortal:boolean;
var
NWPortalTile, SWPortalTile, SEPortalTile, NEPortalTile : TTile;
P : TPoint;
xX, yY, Blah, I, Which, LengthA, LengthB : integer;
TPA : TPointArray;
ATPA : T2DPointArray;
WhichTPA: array [0..1] of TPointArray;
TPAStoof: array [0..1] of TVariantArray;
Begin
NWPortalTile := (tile(2885, 4850)); //NW
SWPortalTile := (tile(2889, 4813)); //SW
SEPortalTile := (tile(2933, 4815)); //SE
NEPortalTile := (tile(2932, 4854)); //NE
TPAStoof[0] := [11652296, 0.49, 2.59, 3];
TPAStoof[1] := [12898508, 2.78, 4.37, 1];

case Players[CurrentPlayer].Loc of
'NW' : Begin
if not WalkToTile((NWPortalTile), 1, 1) then begin
NextPlayer(False);
Exit;
end;
end;
'SW' : Begin
if not WalkToTile((SWPortalTile), 1, 1) then begin
NextPlayer(False);
Exit;
end;
end;
'SE' : Begin
if not WalkToTile((SEPortalTile), 1, 1) then begin
NextPlayer(False);
Exit;
end;
end;
'NE' : Begin
if not WalkToTile((NEPortalTile), 1, 1) then begin
NextPlayer(False);
Exit;
end;
end;
End;
Repeat
Wait(250);
Until not CharacterMoving;
Wait(3000);
repeat
for I := 0 to 1 do
begin
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(TPAStoof[I][Hue], TPAStoof[I][Sat]);
FindColorsTolerance(WhichTPA[I], TPAStoof[I][Colour], MSX1, MSY1, MSX2, MSY2, TPAStoof[I][Tol]);
ColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.20, 0.20);
end;
if Length(WhichTPA[0]) or Length(WhichTPA[1]) > 0 then
Break;
until False;
LengthA := Length(WhichTPA[0]);
LengthB := Length(WhichTPA[1]);
Debug('LengthA = '+IntToStr(LengthA));
Debug('LengthB = '+IntToStr(LengthB));
if LengthA > LengthB then
Which := 0
else
Which := 1;
Debug('Which = '+IntToStr(Which));
TPA := WhichTPA[Which];
ATPA := SplitTPAEx(TPA, 10, 10);
SortATPASize(ATPA, true);
for I := 0 to high(ATPA) do
begin
if I > 2 then
Exit;
P := MiddleTPA(ATPA[I]);
Wait(1000 + Random(500));
MMouse(P.x, P.y, 5, 5);
Wait(1000);
//if WaitUpText('ortal', 400) then
begin
GetMousePos(xX, yY);
Blah := RandomRange(0, DependClick);
if Blah = 0 then begin
Mouse(xX, yY, 0, 0, False);
WaitOption('nte', 500)
end else Mouse(xX, yY, 0, 0, True);
Result := true;
Exit;
end;
end;
end;

Function BoomEss: Boolean;
Var
X, Y, Tried : Integer;
Begin
if Not LoggedIn then
Exit;
Debug('BoomEss');
Repeat
if Tried = 10 then
begin
Debug('Cant find ess... Exiting');
Exit;
end;
if not FoundEss(X, Y) then
if not FoundEss2 then
Begin
Inc(Tried);
Debug(IntToStr(Tried));
Wait(2000 + Random(500));
Continue;
End;
//Mouse(X, Y, 0, 0, True);
Wait(1500 + Random(500));
Repeat
LevelTalking;
if MiningCheck then
begin
Antiban
AntiRandoms
end;
if InvFull then
Break;
Until not (MiningCheck);
Until InvFull;
Result := True;
End;

Function DoAubury:Boolean;
var
Aubury:TNPC;
APoint : TPoint;
x, y :integer;
Tracks :TRSObject;
Begin
if not LoggedIn then Exit;
Tracks := GetObjectByID(454, OBJECT_TYPE_FLOORDECOR, 50);
if FindNPC(553, Aubury) then
APoint := TileToMSEx(Aubury.Tile, 0.5, 0.5, Aubury.Height);
MMouse(APoint.x, APoint.y, 1, 1);
if WaitUpText('-to', 600) then
Mouse(APoint.x, APoint.y, 1, 1, False);
if not R_ChooseOption('elep') then
Exit;
Wait(3000);
Result := True;
Debug('Done aubury');
End;

function DistanceFromArray(TheTiles: TTilesArray): integer;
var
MyPos: TTile;
I: integer;
begin
MyPos := GetMyPos;
Result := High(Result);
for I := 0 to High(TheTiles) do
Result := Min(Result, Distance(MyPos.x, MyPos.y, TheTiles[I].X, TheTiles[I].Y));
end;

Function AtEssPlace:Boolean;
var
NW, NE, SE, SW : TTile;
Tower, Tracks : TRSObject;
Begin
if not LoggedIn then Exit;
NW := Point(2892, 4848); //NW
NE := Point(2926, 4849); //NE
SE := Point(2929, 4816); //SE
SW := Point(2895, 4814); //SW

Tower := GetObjectByID(506, OBJECT_TYPE_FLOORDECOR, 30);
Tracks := GetObjectByID(454, OBJECT_TYPE_FLOORDECOR, 20);
if (DistanceFrom(NW) < 20) or (DistanceFrom(NE) <10) or (DistanceFrom(SE) <30) or (DistanceFrom(SW) <20) then
Result := True
else begin
NextPlayer(False);
Debug('AtEssPlace False');
Result := False;
Exit
end;
End;

Function WhichEssPlace:boolean; // I know I can do case, will do later.
Begin
if DistanceFrom(tile(2892, 4848)) < 16 then begin
Players[CurrentPlayer].Loc := 'NW';
Debug('At NW');
if BoomEss then
if DoPortal then
Result := True;
Exit;
End;
if DistanceFrom(tile(2926, 4849)) < 16 then begin
Players[CurrentPlayer].Loc := 'NE';
Debug('At NE');
if BoomEss then
if DoPortal then
Result := True;
Exit;
End;
if DistanceFrom(tile(2929, 4816)) < 16 then begin
Players[CurrentPlayer].Loc := 'SE';
Debug('At SE');
if BoomEss then
if DoPortal then
Result := True;
Exit;
End;
if DistanceFrom(tile(2895, 4814)) < 16 then begin
Players[CurrentPlayer].Loc := 'SW';
Debug('At SW');
if BoomEss then
if DoPortal then
Result := True;
Exit;
End;
End;

Function AtMiddle:boolean;
var
Rope : TRSObject;
MiddleTile:array [0..26] of TTile;
MainTile, done:TTile;
I:integer;
Begin
if not LoggedIn then Exit;
MainTile := Tile(2909, 4834);
MiddleTile[0] := Tile(MainTile.x, MainTile.y);
MiddleTile[1] := Tile(MainTile.x+1, MainTile.y);
MiddleTile[2] := Tile(MainTile.x+2, MainTile.y);
MiddleTile[3] := Tile(MainTile.x+3, MainTile.y);
MiddleTile[4] := Tile(MainTile.x, MainTile.y-1);
MiddleTile[5] := Tile(MainTile.x+1, MainTile.y-1);
MiddleTile[6] := Tile(MainTile.x+2, MainTile.y-1);
MiddleTile[7] := Tile(MainTile.x+3, MainTile.y-1);
MiddleTile[8] := Tile(MainTile.x, MainTile.y-2);
MiddleTile[9] := Tile(MainTile.x+1, MainTile.y-2);
MiddleTile[10] := Tile(MainTile.x+2, MainTile.y-2);
MiddleTile[11] := Tile(MainTile.x+3, MainTile.y-2);
MiddleTile[12] := Tile(MainTile.x, MainTile.y-3);
MiddleTile[13] := Tile(MainTile.x+1, MainTile.y-3);
MiddleTile[14] := Tile(MainTile.x+2, MainTile.y-3);
MiddleTile[15] := Tile(MainTile.x+3, MainTile.y-3);
MiddleTile[16] := Tile(MainTile.x, MainTile.y-4);
MiddleTile[17] := Tile(MainTile.x+1, MainTile.y-4);
MiddleTile[18] := Tile(MainTile.x+2, MainTile.y-4);
MiddleTile[19] := Tile(MainTile.x+3, MainTile.y-4);
MiddleTile[20] := Tile(2909, 4829);
MiddleTile[21] := Tile(2909, 4828);
MiddleTile[22] := Tile(2909, 4827);
MiddleTile[23] := Tile(2908, 4826);
MiddleTile[24] := Tile(2907, 4826);
MiddleTile[25] := Tile(2906, 4826);
MiddleTile[26] := Tile(2905, 4826);
Rope := GetObjectByID(496, OBJECT_TYPE_FLOORDECOR, 9);
done := GetMyPos;
For I:= 0 to 26 do
if ((done.x = MiddleTile[I].x) and (done.y = MiddleTile[I].y)) then begin
//if TileOnMS(MiddleTile[I].x, MiddleTile[I].y, 0) then begin
Writeln('AtMiddle');
Result := True;
Break;
end;
Result := false;
End;

Function WalkFromMiddle:boolean;
Begin
if not LoggedIn then Exit;
WalkToTile(Point(2906, 4826), 1, 1);
If WalkToTile(Point(2898, 4815), 1, 1) then
Begin
Wait(1500 + Random(500));
Debug('Walked from middle');
Result := True
End else Result := False;
End;


Function WalkToBank: Boolean;
Begin
If Not LoggedIn Then
Exit;
Wait(750 + Random(300));
If WalkToTile(Point(3259, 3411), 1, 1) Then
if WalkToTile(Point(3253, 3420), 1, 1) then
Result := True;
End;

Function Bank: Boolean;
Var
i, EssCountEnd, EssCountFinal, ID : integer;
B : boolean;
Begin
If Not LoggedIn Then
Exit;
Wait(1000+ Random(1000));
EssCountEnd := R_InvCount;
ID := getItemIDAt(2);
If Not OpenBankFast(Bank_VE) Then
If Not OpenBankQuiet(Bank_VE) Then
If Not R_OpenBankBooth('veb') then
Exit;
for i := 1 + Integer(not Players[CurrentPlayer].Booleans[0]) to 28 do
begin
Deposit(i, 28, True);
end;
CloseBank;
Inc(Players[CurrentPlayer].Integers[1]);
stats_IncVariable('Loads Done', 1);
EssCountFinal := (EssCountEnd - EssCountStart);
begin
B := ID = RUNEESS_ID;
SetPrice(B);
if B then
stats_IncVariable('Rune Essence (Mined)', EssCountFinal)
else stats_IncVariable('Pure Essence (Mined)', EssCountFinal);
end;
IncEx(Players[CurrentPlayer].Integers[0], EssCountFinal);
ProgressReport;
Result := True;
End;

Procedure MainLoop;
Begin
repeat
Case Lowercase(Players[CurrentPlayer].Loc) of
'banked':
if WalkToAubury then
Players[CurrentPlayer].Loc := 'at aubury';
'at aubury':
if DoAubury then
Players[CurrentPlayer].Loc := 'done aubury';
'done aubury': begin
if AtMiddle then
Players[CurrentPlayer].Loc := 'at middle'
else Players[CurrentPlayer].Loc := 'nearly ess';
end;
'at middle':
if WalkFromMiddle then
Players[CurrentPlayer].Loc := 'nearly ess';
'nearly ess':
if AtEssPlace then
Players[CurrentPlayer].Loc := 'at ess';
'at ess':
if WhichEssPlace then
Players[CurrentPlayer].Loc := 'teleported';
'teleported':
if WalkToBank then
Players[CurrentPlayer].Loc := 'at bank';
'at bank':
if Bank then
Players[CurrentPlayer].Loc := 'banked';
end;
until(Players[CurrentPlayer].Integers[1] >= Players[CurrentPlayer].Integers[4]);
End;



begin
ClearDebug;
ClearReport;
SetupSRLStats(22, SRLStats_UserID, SRLStats_Password);
Smart_Server := 17;
Smart_Members := false;
Smart_Signed := true;
Smart_SuperDetail := false;
SetupSRL;
AddOnTerminate('ProgressReport');
begin
DeclarePlayers;
LoginPlayer;
ProgressReport;
AxeWielded;
MakeCompass('North');
SetAngle(True);
Gametab(tab_Inv);
repeat
MainLoop
until AllPlayersInactive();
end;
end.

Gu3st...

2011-01-24 19:35:10

You should work on your standards a little bit and read some more TPA tutorials.. I see you do stuff like this:
  ColorToleranceSpeed(1);
SetColorSpeed2Modifiers(0.20, 0.20);
Which is not the correct way.

Also, why do you use autocoloring on the essence rocks? Just use ACA to get a good record from it :)

Jelloman

2011-01-24 20:11:24

WalkFromMiddle still isn't working…

**BANNED The Man

2011-01-25 14:39:32

Ok, so I tested and it did 3 loads perfectly then on its 4th it came up with the random error:

[PHP][—————————–]
[ Essence Miner ]
[—————————–]
We worked for 7 Minutes and 34 Seconds
Mined 81 Essence
Loads Done: 3
Gained: 9963 gp
Gained: 0 levels
Antibanned 0
[—————————–]
SRL_Stats: No POST return
Exception in Script: Failed to create new thread, code:8
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap]
File[C:\Simba\Includes\SRL/logs/SRL log 25-01-11 1.txt] has not been freed in the script, freeing it now.[/PHP]

I don't know what I can do about that error ^ it is definitely to do with finding aubury, meaning something to do with Reflection objects/NPC's.
I will try and work out the WalkFromMiddle bug.

-Boom

Sgt Soul

2011-01-25 23:01:58

currently testing, I will run/watch it until it fails :)

-currently running smooth and doesn't seem to be breaking anytime soon :)

-1 load has been perfectly mined and banked, next edit I write will follow with the progress report

died through the same error you had :/

mormonman

2011-01-25 23:07:07

This is where the code 8 error is
Tracks := GetObjectByID(454, OBJECT_TYPE_FLOORDECOR, 50);

It is in doAubury and it doesn't serve any purpose. Remove it, or lower the distance

Sgt Soul

2011-01-25 23:11:23

so by removing the line the script will continue to run without the error?

EDIT: doesn't get the error at all thanks mormonman for the fix :) now all that needs doing is the walk from middle function ;)

EDIT2:
[-----------------------------]
[ Essence Miner ]
[-----------------------------]
We worked for 5 Minutes and 59 Seconds
Mined 56 Essence
Loads Done: 2
Gained: 1568 gp
Gained: 0 levels
Antibanned 1
[-----------------------------]

player logged out straight after the done aubury function.
this is what was in the debug
Done aubury
NextPlayer(False)
SwitchToPlayer(PlayerNo: 0, Active: False);
Player is not Active...
All players not active!
AtEssPlace False
any ideas to why?

**BANNED The Man

2011-01-26 02:36:49

That says that you werent teleported

Sgt Soul

2011-01-26 10:32:47

From: Dynamite
That says that you werent teleported


that is strange because the logout happens instantly after the player teleports to the mine :/

**BANNED The Man

2011-01-26 13:29:17

Here we go:

[-----------------------------]
[ Essence Miner ]
[-----------------------------]
We worked for 32 Minutes and 32 Seconds
Mined 298 Essence
Loads Done: 11
Gained: 34270 gp
Gained: 0 levels
Antibanned 14
[-----------------------------]
Successfully executed.

Finally, we are complete :)
Should work smoothly, just going to update the main post with downloads etc.

-Boom

grats

2011-01-26 13:40:23

From: Dynamite
Here we go:

[-----------------------------]
[ Essence Miner ]
[-----------------------------]
We worked for 32 Minutes and 32 Seconds
Mined 298 Essence
Loads Done: 11
Gained: 34270 gp
Gained: 0 levels
Antibanned 14
[-----------------------------]
Successfully executed.

Finally, we are complete :)
Should work smoothly, just going to update the main post with downloads etc.

-Boom


Running smooth so far, was just testing with 1 character for a bit, had to come here to fix "Loc := 'banked'; //Read the thread to see valid arguments. "

after I see 2 loads go smoothly I'll setup like 5 bots to check it out

single:

[-----------------------------]
[ Essence Miner ]
[-----------------------------]
We worked for 7 Minutes and 57 Seconds
Mined 81 Essence
Loads Done: 3
Gained: 2106 gp
Gained: 0 levels
Antibanned 5
[-----------------------------]

will be editing this post with proggy of those 5

**BANNED The Man

2011-01-26 14:01:04

From: grats
Running smooth so far, was just testing with 1 character for a bit, had to come here to fix "Loc := 'banked'; //Read the thread to see valid arguments. "

after I see 2 loads go smoothly I'll setup like 5 bots to check it out

single:

[-----------------------------]
[ Essence Miner ]
[-----------------------------]
We worked for 7 Minutes and 57 Seconds
Mined 81 Essence
Loads Done: 3
Gained: 2106 gp
Gained: 0 levels
Antibanned 5
[-----------------------------]

will be editing this post with proggy of those 5


Sounds great :)

-Boom

Czech SS

2011-01-26 17:44:04

just testing and got error when finding ess out of range in line 291 : FindColorsTolerance(TPA, Colors[J][Which[J]], MSX1, MSY1, MSX2, MSY2, 3) what it could be?
Another proble found - got random abbys and didnt even start solving this random only said couldn find ess exiting…

Czech SS

2011-01-26 17:56:22

again here is full report any idea?
Beginning FoundEss
Length of TPA = 2641
Length of Colors = 2641
Which[0] = 2
Length of TPA = 5967
Length of Colors = 5967
Which[1] = 5
Error: Out Of Range at line 291
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap]
File[C:\Simba\Includes\SRL/logs/SRL log 26-01-11 14.txt] has not been freed in the script, freeing it now.

Jelloman

2011-01-26 17:57:36

testing, lookin' real good so far!!
also I noticed (line 101) it says 'hatchet is equipped' instead of pickaxe… I'm assuming you used a procedure from your wood cutting scripts and forgot to change it

**BANNED The Man

2011-01-26 17:59:41

From: Czech SS
again here is full report any idea?
Beginning FoundEss
Length of TPA = 2641
Length of Colors = 2641
Which[0] = 2
Length of TPA = 5967
Length of Colors = 5967
Which[1] = 5
Error: Out Of Range at line 291
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap]
File[C:\Simba\Includes\SRL/logs/SRL log 26-01-11 14.txt] has not been freed in the script, freeing it now.


Ahh, yes, I have had that problem once before.
iirc it is to do with the length of the TPA being of 7 thousand or something.
I don't have a fix yet but if you just restart the script it will be fine.
Also the randoms are to do with SRL not my script.

Czech SS

2011-01-26 18:03:48

right ok I dont blame u for randoms or error, u have got my respect for what u doing, but that error happened to me twice in 1O minutes, any idea how to sort it out? Is there anything i can do? or u just do have to improve that part…..
once again thank u for ur time…thx

**BANNED The Man

2011-01-26 18:06:42

From: Czech SS
right ok I dont blame u for randoms or error, u have got my respect for what u doing, but that error happened to me twice in 1O minutes, any idea how to sort it out? Is there anything i can do? or u just do have to improve that part…..
once again thank u for ur time…thx


Thank you :)
And I have to improve it, possibly the whole procedure.

-Boom

Czech SS

2011-01-26 18:11:24

dont know what to say… May be only, when u do an update could u pm me i´d like to became ur tester for this script coz i have got kinda planty of free time so if u agree just send it and all bugs and reports will be right at u…

3Garrett3

2011-01-26 18:13:34

I'd imagine the error is from the TPA being 0. I haven't looked through the script, but if you wanna add me on MSN i'd be glad to talk about scripting/life/whatevs whenever you want. I love helping people work on their scripts :)

E: Reading the report it obviously isn't 0. It's trying to access a point that doesn't exist. If you post the function here, PM or msn (I think I made it so you need to PM me for my msn) then I'd look through it. Too lazy to dl the script, sorry :)

KingKong

2011-01-26 18:21:16

@ Dynamite, you should add the valid arguments in you script, so that people don't have to visit this thread every time they forget it.

Czech SS

2011-01-26 18:30:09

right next error after banked all ess
Error: Exception: Out of memory at line 140
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, 2]
File[C:\Simba\Includes\SRL/logs/SRL log 26-01-11 15.txt] has not been freed in the script, freeing it now.

**BANNED The Man

2011-01-26 18:33:37

From: KingKong
@ Dynamite, you should add the valid arguments in you script, so that people don't have to visit this thread every time they forget it.


Will do in R2.

From: Czech SS
right next error after banked all ess
Error: Exception: Out of memory at line 140
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, 2]
File[C:\Simba\Includes\SRL/logs/SRL log 26-01-11 15.txt] has not been freed in the script, freeing it now.


Fixed for R2.

-Boom

Czech SS

2011-01-26 18:35:18

good lad :)

Jelloman

2011-01-26 19:29:37

was testing, looked good, watched some tv, came back, it was at the lobby (the screen immediately after logging in)
[-----------------------------]
[ Essence Miner ]
[-----------------------------]
We worked for 55 Minutes and 59 Seconds
Mined 448 Essence
Loads Done: 16
Gained: 11648 gp
Gained: 8 levels
Antibanned 26
[-----------------------------]
Done aubury
Starting at Middle
At NE
BoomEss
Beginning FoundEss
Length of TPA = 1951
Length of Colors = 1951
Which[0] = 0
Length of TPA = 4285
Length of Colors = 4285
Which[1] = 0
No SRL update / Plugins update available!
No Reflection update
LengthA = 0
LengthB = 60
Which = 1

**BANNED The Man

2011-01-27 08:12:45

From: Jelloman
was testing, looked good, watched some tv, came back, it was at the lobby (the screen immediately after logging in)
[-----------------------------]
[ Essence Miner ]
[-----------------------------]
We worked for 55 Minutes and 59 Seconds
Mined 448 Essence
Loads Done: 16
Gained: 11648 gp
Gained: 8 levels
Antibanned 26
[-----------------------------]
Done aubury
Starting at Middle
At NE
BoomEss
Beginning FoundEss
Length of TPA = 1951
Length of Colors = 1951
Which[0] = 0
Length of TPA = 4285
Length of Colors = 4285
Which[1] = 0
No SRL update / Plugins update available!
No Reflection update
LengthA = 0
LengthB = 60
Which = 1


Hmm, that means it got stuck trying to go through portal…

**BANNED The Man

2011-01-30 12:50:28

Updated to V2 R2

- Fixed:
Error: Exception: Out of memory at line 140
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, 2]
File[C:\Simba\Includes\SRL/logs/SRL log 26-01-11 15.txt] has not been freed in the script, freeing it now.

- Added valid arguments at top of script

and some more stuff that I forgot :P

-Boom

3Garrett3

2011-01-30 13:53:09

From: Dynamite
Updated to V2 R2

- Fixed:
Error: Exception: Out of memory at line 140
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, 2]
File[C:\Simba\Includes\SRL/logs/SRL log 26-01-11 15.txt] has not been freed in the script, freeing it now.

- Added valid arguments at top of script

and some more stuff that I forgot :P

-Boom


Good job! Although the main point of this post was to say grats on the scripter's cup!

**BANNED The Man

2011-01-30 13:54:41

From: 3Garrett3
Good job! Although the main point of this post was to say grats on the scripter's cup!


Thank you so much :)
I came online, started posting then looked at my name and was like wat. and went crazy haha!

-Boom

3Garrett3

2011-01-30 14:08:30

From: Dynamite
Thank you so much :)
I came online, started posting then looked at my name and was like wat. and went crazy haha!

-Boom


You're probably one of the only people who aren't SRL Members to get the cup, be proud of it ;)

Jelloman

2011-01-30 15:26:50

I also would like to say congratulations!!! and I look forward to testing the update!!

MylesMadness

2011-01-30 15:33:36

Just wondering, why color is first and reflection after? Reflection is faster, so wouldn't you want that first, and if its reflection hooks are down, then use color?

Edit: I just forked your repo. I'm going to try cleaning it up a bit. Is this script just mix of scripts? You have like 3 different styles of standards in here..

editedit: Sent you a pull request.

FuruChan

2011-02-01 20:54:13

Hey I am getting back into SRL and scripting, still getting used to Simba and all the new stuff. This is a really nice script, I'll post a proggy after I run it for a while.

EDIT: Played with it for a while, and got some things to mention.

[—————————–]
[ Essence Miner ]
[—————————–]
We worked for 43 Minutes and 7 Seconds
Mined 392 Essence
Loads Done: 14
Gained: 0 gp
Gained: 1 levels
Antibanned 18
[—————————–]

I have had better reports, but this one is alright.

Occasionally when in the Essence Mining Area the script will stop, it seems like it skips a step or tries to do something to fast for itself to comprehend. Maybe that is the wrong terminology. Point is, I saw it stop and paused the script and manual entered the portal (Because it stops with a full inventory of essence) and press play again at the rune shop and it continued going as if that is where it thought the player was.

I also got this error after this progress report. I don't know what suddenly caused it.

Done aubury
Starting at Middle
At SW
BoomEss
Beginning FoundEss
Length of TPA = 357
Length of Colors = 357
Length of TPA = 1494
Length of Colors = 1494
Which[1] = 0
LengthA = 1
LengthB = 0
Which = 0
Error: Exception: Out of memory at line 161
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, 2]
File[C:\Program Files\Simba\Includes\SRL/logs/SRL log 03-02-11 1.txt] has not been freed in the script, freeing it now.

this doesn't happen all the time though. I would definitely continue to use this script if you keep it current :)

Ethoroxyole

2011-02-13 10:35:18

Great Script so far!

It got stuck after 9 minutes trying to get out the north eastern cavern, i was just standing on the opposite side of where the portal should be, so don't know if that is a problem with your tiles or something, apart from that it was working great and hopefully can get a longer proggy once it's fixed.

**BANNED The Man

2011-02-13 10:47:12

From: FuruChan
Hey I am getting back into SRL and scripting, still getting used to Simba and all the new stuff. This is a really nice script, I'll post a proggy after I run it for a while.

EDIT: Played with it for a while, and got some things to mention.

[—————————–]
[ Essence Miner ]
[—————————–]
We worked for 43 Minutes and 7 Seconds
Mined 392 Essence
Loads Done: 14
Gained: 0 gp
Gained: 1 levels
Antibanned 18
[—————————–]

I have had better reports, but this one is alright.

Occasionally when in the Essence Mining Area the script will stop, it seems like it skips a step or tries to do something to fast for itself to comprehend. Maybe that is the wrong terminology. Point is, I saw it stop and paused the script and manual entered the portal (Because it stops with a full inventory of essence) and press play again at the rune shop and it continued going as if that is where it thought the player was.

I also got this error after this progress report. I don't know what suddenly caused it.

Done aubury
Starting at Middle
At SW
BoomEss
Beginning FoundEss
Length of TPA = 357
Length of Colors = 357
Length of TPA = 1494
Length of Colors = 1494
Which[1] = 0
LengthA = 1
LengthB = 0
Which = 0
Error: Exception: Out of memory at line 161
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, 2]
File[C:\Program Files\Simba\Includes\SRL/logs/SRL log 03-02-11 1.txt] has not been freed in the script, freeing it now.

this doesn't happen all the time though. I would definitely continue to use this script if you keep it current :)


Yeah it is stopping because it has run out of memory.. Memory leak.
I will see if I can do anything about it :)

From: Ethoroxyole
Great Script so far!

It got stuck after 9 minutes trying to get out the north eastern cavern, i was just standing on the opposite side of where the portal should be, so don't know if that is a problem with your tiles or something, apart from that it was working great and hopefully can get a longer proggy once it's fixed.


Hmm, weird that has never happened before.

-Boom

**BANNED The Man

2011-02-13 11:22:55

Updated!!!

Should fix the memory leak!

-Boom

Jelloman

2011-02-13 13:27:27

[-----------------------------]
[ Essence Miner ]
[-----------------------------]
We worked for 3 Minutes and 1 Seconds
Mined 28 Essence
Loads Done: 2
Gained: 0 gp
Gained: 0 levels
Antibanned 0
[-----------------------------]
Done aubury
Starting at Middle
AtMiddle
Starting WalkFromMiddle
Walked from middle
At SW
BoomEss
Beginning FoundEss
Length of TPA = 3
Length of Colors = 3
Length of TPA = 2
Length of Colors = 2
Error: Out Of Range at line 340
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap]
File[C:\Program Files (x86)\Simba\Includes\SRL/logs/SRL log 13-02-11 0.txt] has not been freed in the script, freeing it now.

**BANNED The Man

2011-02-13 13:37:15

Updated
Everyone update from R3.

-Boom

mr-sjb

2011-02-14 12:51:54

shall this one, testing if this is better then your boom oaks script which was already good and helped me alot. post proggy later:)

Jelloman

2011-02-14 19:02:51

looks like theres still a problem :(
[-----------------------------]
[ Essence Miner ]
[-----------------------------]
We worked for 29 Minutes and 23 Seconds
Mined 298 Essence
Loads Done: 12
Gained: 0 gp
Gained: 0 levels
Antibanned 9
[-----------------------------]
Done aubury
Starting at Middle
AtMiddle
Starting WalkFromMiddle
Walked from middle
At SW
BoomEss
Beginning FoundEss
Length of TPA = 28
Length of Colors = 28
Which[0] = 5
Length of TPA = 18
Length of Colors = 18
Which[1] = 0
Found the essence!
1
Beginning FoundEss
Length of TPA = 26
Length of Colors = 26
Which[0] = 1
Length of TPA = 501
Length of Colors = 501
Which[1] = 1
Beginning FoundEss
Length of TPA = 510
Length of Colors = 510
Which[0] = 0
Length of TPA = 2132
Length of Colors = 2132
Which[1] = 3
Error: Out Of Range at line 340
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap]
File[C:\Program Files (x86)\Simba\Includes\SRL/logs/SRL log 14-02-11 0.txt] has not been freed in the script, freeing it now.

mr-sjb

2011-02-15 06:35:20

downloaded the script, but when i try to run it i get this error:


[Hint] C:\Simba\Includes\Reflection\./Core/Text.simba(400:3): Variable 'JAVASTRING' never used at line 399
[Hint] C:\Simba\Includes\Reflection\./Core/Objects.simba(85:3): Variable 'LX' never used at line 84
[Hint] C:\Simba\Includes\Reflection\./Core/Objects.simba(85:3): Variable 'LY' never used at line 84
[Error] (97:6): Unknown identifier 'R_ItemIDExistsEx' at line 96
Compiling failed.

**BANNED The Man

2011-02-15 07:27:00

For people with unknown identifier error.
If you want to use the script now, revert to the previous version of reflection or wait a few hours for me to get home and fix

-Boom

mr-sjb

2011-02-15 07:43:25

ill wait a few hours then;) dont hurry, i want a good script:P

botsrs

2011-02-16 16:01:48

Any luck with the update? Really like the script and can't wait to see it work with reflection once again ^.^

**BANNED The Man

2011-02-16 16:06:11

From: botsrs
Any luck with the update? Really like the script and can't wait to see it work with reflection once again ^.^


Oh because you asked so nicely xD
Updated, download R5.

-Boom

botsrs

2011-02-16 16:12:13

SRL Compiled in 16 msec
SMART Initialized.
Loaded: Server 17, Members: False, Signed: True, Super Detail: False.
[-----------------------------]
[ Essence Miner ]
[-----------------------------]
We worked for 5 Seconds
Mined 0 Essence
Loads Done: 0
Gained: 0 gp
Gained: 0 levels
Antibanned 0
[-----------------------------]
Error: Type Mismatch at line 96
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap]
File[C:\Simba\Includes\SRL/logs/SRL log 16-02-11 3.txt] has not been freed in the script, freeing it now.
It errors :o

**BANNED The Man

2011-02-16 16:21:37

Try changing that line to:
if(R_ItemExistsEx(Pickaxe, TheIDs))then

botsrs

2011-02-16 16:32:53

[Hint] C:\Simba\Includes\Reflection\./Core/Text.simba(400:3): Variable 'JAVASTRING' never used at line 399
[Hint] C:\Simba\Includes\Reflection\./Core/Objects.simba(85:3): Variable 'LX' never used at line 84
[Hint] C:\Simba\Includes\Reflection\./Core/Objects.simba(85:3): Variable 'LY' never used at line 84
[Error] (97:37): Type mismatch at line 96
Compiling failed.

The new error by changing:
if(R_ItemExistsEx(TheIDs, Pickaxe))then
to
if(R_ItemExistsEx(Pickaxe, TheIDs))then

**BANNED The Man

2011-02-16 17:39:22

Updated new R5.

-Boom

botsrs

2011-02-16 17:53:35

Oh noes, another error!
SRL Compiled in 16 msec
SMART Initialized.
Loaded: Server 17, Members: False, Signed: True, Super Detail: False.
Welcome to Runescape.
*************@*******.***
[-----------------------------]
[ Essence Miner ]
[-----------------------------]
We worked for 33 Seconds
Mined 0 Essence
Loads Done: 0
Gained: 0 gp
Gained: 0 levels
Antibanned 0
[-----------------------------]
Error: Type Mismatch at line 105
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap]
File[C:\Simba\Includes\SRL/logs/SRL log 16-02-11 7.txt] has not been freed in the script, freeing it now.

Jelloman

2011-02-16 18:28:12

same error here to:
[-----------------------------]
[ Essence Miner ]
[-----------------------------]
We worked for 5 Minutes and 11 Seconds
Mined 55 Essence
Loads Done: 3
Gained: 0 gp
Gained: 0 levels
Antibanned 2
[-----------------------------]
Done aubury
Starting at Middle
AtMiddle
Starting WalkFromMiddle
Walked from middle
At SW
BoomEss
Beginning FoundEss
Length of TPA = 11
Length of Colors = 11
Which[0] = 0
Length of TPA = 7
Length of Colors = 7
Error: Out Of Range at line 340
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap]
File[C:\Program Files (x86)\Simba\Includes\SRL/logs/SRL log 16-02-11 1.txt] has not been freed in the script, freeing it now.

footballjds

2011-02-17 13:36:44

error at line 105, type missmatch.
i already know my pick is equipped so i simply "//" that out.
running now, looking good so far. ;)

**BANNED The Man

2011-02-17 14:38:44

R5, third try uploaded :)
Good luck footballjds :) <3

-Boom

botsrs

2011-02-17 16:17:57

[Error] (106:11): Unknown identifier 'i' at line 105
Compiling failed.
Keeps liking to not work eh? ^.^

Though, I have my pick equipped so I commented out that part on my older-R5 like footballjds did, and it's working great!

EDIT: I really like what you've done with the anti-ban.. Randomly saying things every level, kudos!

EDIT2: I'm noticing it stops looking for the portal if it can't find it on its way out of the rune area, even though it is right beside it, too. (not all the time though, just sometimes (ADD - It seems to do it a lot now..))

EDIT3: Another err just thought I'd bring to your attention aha.
Done aubury
Starting at Middle
AtMiddle
Starting WalkFromMiddle
Walked from middle
At SW
BoomEss
Beginning FoundEss
Length of TPA = 2
Length of Colors = 2
Length of TPA = 71
Length of Colors = 71
Which[1] = 65
Error: Out Of Range at line 296
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap]
File[C:\Simba\Includes\SRL/logs/SRL log 17-02-11 13.txt] has not been freed in the script, freeing it now.
Just hoping to help you out ^.^

flaminhaz

2011-02-18 09:48:59

From: botsrs
[Error] (106:11): Unknown identifier 'i' at line 105
Compiling failed.
Keeps liking to not work eh? ^.^

Though, I have my pick equipped so I commented out that part on my older-R5 like footballjds did, and it's working great!

I did the same as this but noticed it mention hatchet around that area, shouldn't it be pickaxe?
Besides from that I can see this script being very successful, only got a quick proggy, maybe get a better one later:


[-----------------------------]
[ Essence Miner ]
[-----------------------------]
We worked for 14 Minutes and 47 Seconds
Mined 112 Essence
Loads Done: 4
Gained: 0 gp
Gained: 0 levels
Antibanned 1
[-----------------------------]

Shame it got stuck in a random, it's the Mr. Mordaut one:


***** STR: FOUND RANDOM: 'Surprise Exam' *****
Screenshot of: Found Surprise Exam random 16 Minutes and 40 Seconds
***** STR: 'Surprise Exam' RANDOM SOLVING FAILED! *****

**BANNED The Man

2011-02-18 09:50:02

do you still have the account in the random?

flaminhaz

2011-02-18 10:06:52

From: Dynamite
do you still have the account in the random?

No sorry, literally just got it out. If it gets in there again I will let you know. I also plan to make more accounts to use as well so chances are it won't be that long.

**BANNED The Man

2011-02-18 10:13:36

Ok, no worries also, updated, you now have to fill in whether your axe is wielded in DeclarePlayers but there is no type Mismatch now.

-Boom

botsrs

2011-02-18 12:20:42

Yeup, no type mismatch! No big deal that we have to enter whether we are wielding the pick or not, just glad to see its working :) thanks

Czech SS

2011-02-18 12:32:08

i have tested this script again, and u should add some failsafe for find portal, it always find portal but click right next to it and then it goet stuck, also i had problem with srl it didnt start solving random at all made a little upgrade and boom randoms are ok but dont know how to do a failsafe for portal…..

flaminhaz

2011-02-18 13:09:02

Working great for me, thanks. Had a good 1 hour+ proggy going too before simba crashed for some reason, I suspect it was something on my end and not something wrong with simba or the script.

botsrs

2011-02-18 14:16:18

Got another out of range error:
Done aubury
Starting at Middle
AtMiddle
Starting WalkFromMiddle
Walked from middle
At SW
BoomEss
Beginning FoundEss
Length of TPA = 70
Length of Colors = 70
Length of TPA = 678
Length of Colors = 678
Which[1] = 8
Error: Out Of Range at line 299
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap]
File[C:\Simba\Includes\SRL/logs/SRL log 18-02-11 2.txt] has not been freed in the script, freeing it now.

**BANNED The Man

2011-02-19 03:27:14

From: botsrs
Got another out of range error:
Done aubury
Starting at Middle
AtMiddle
Starting WalkFromMiddle
Walked from middle
At SW
BoomEss
Beginning FoundEss
Length of TPA = 70
Length of Colors = 70
Length of TPA = 678
Length of Colors = 678
Which[1] = 8
Error: Out Of Range at line 299
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap]
File[C:\Simba\Includes\SRL/logs/SRL log 18-02-11 2.txt] has not been freed in the script, freeing it now.


Please change line 299 to:
FindColorsTolerance(TPA, Colors[J][Which[J]], MSX1, MSY1, MSX2, MSY2, 4);
and report back how it goes :)

-Boom

botsrs

2011-02-19 10:27:25

Got an out-of-memory error:
Exception in Script: Failed to create new thread, code:8
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap]
File[C:\Simba\Includes\SRL/logs/SRL log 19-02-11 1.txt] has not been freed in the script, freeing it now.
At this far into the auto:
[-----------------------------]
[ Essence Miner ]
[-----------------------------]
We worked for 1 Hours, 10 Minutes and 51 Seconds
Mined 702 Essence
Loads Done: 26
Gained: 0 gp
Gained: 3 levels
Antibanned 21
[-----------------------------]
Also got this error:
Error: Out Of Range at line 299
The following DTMs were not freed: [SRL - Lamp bitmap, 1]
The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap]
File[C:\Simba\Includes\SRL/logs/SRL log 19-02-11 2.txt] has not been freed in the script, freeing it now.
At this far in:
[-----------------------------]
[ Essence Miner ]
[-----------------------------]
We worked for 1 Hours, 31 Seconds
Mined 567 Essence
Loads Done: 21
Gained: 0 gp
Gained: 2 levels
Antibanned 25
[-----------------------------]

CodaRulz

2011-02-21 03:23:33

[—————————–]
[ Essence Miner ]
[—————————–]
We worked for 1 Hours, 5 Minutes and 0 Seconds
Mined 504 Essence
Loads Done: 18
Gained: 0 gp
Gained: 12 levels
Antibanned 31
[—————————–]
Working great thank you

RudeBoiAlex

2011-02-22 21:36:42

Got stuck here after 23 minuets:


lNVlNClBLE

2011-02-26 12:54:16

Not sure what I'm doing wrong.. help please?
I'm starting right where Aubury teleports me with the 'done aubury' valid argument. As soon as my char logs in and switches to run, it says this

Starting at Middle
NextPlayer(False)
SwitchToPlayer(PlayerNo: 0, Active: False);
Player is not Active…
All players not active!
AtEssPlace False

ricardo016

2011-03-10 19:54:00

I have fully installed the script and working, only problem is that i have a rune pick in my invertory and when he compleet die run he deposit all items and start a new run without a pick.

is it possible that the script only deposit the ess ?

Echo_

2011-03-10 20:40:55

From: ricardo016
I have fully installed the script and working, only problem is that i have a rune pick in my invertory and when he compleet die run he deposit all items and start a new run without a pick.

is it possible that the script only deposit the ess ?


You have to set booleans[0] in the DeclarePlayers procedure to false if your axe isn't equipped.

    Booleans[0] := False; // Axe wielded?

ricardo016

2011-03-11 17:46:22

whoops sorry, i have adjust the settings and the script is running.

and i want to setup all my account on this script but what do i need to copy ?

with players[0] do
begin
Name := '****';
Pass := '*****';
Active := True;
Pin := ''; //Leave blank if no pin
Loc := 'banked'; //Read the thread to see valid arguments.
Integers[4]:= 100; //Amount of loads you want to do.
Strings[1] := 'Mining'; // Lamp Skill
Booleans[0] := False; // Axe wielded?
end;



This part ?

because i have 20 accounts and i want to let it run overnight so i can post a full report of the script!


Edit: already 1 bug detected uhm the bot was walking to abury but clicked in the room near abury and he was walking to the corner of that room, clicked on abury teleport so was walking to it but it took to long and he logged out.

Is it possible to change the time ? to max 2 min or something?

Santa

2011-03-22 23:42:19

Make sure you change each players number and the amount of players you have running on the script.

with players[0] do  // <--- Here
begin
Name := '****';
Pass := '*****';
Active := True;
Pin := ''; //Leave blank if no pin
Loc := 'banked'; //Read the thread to see valid arguments.
Integers[4]:= 100; //Amount of loads you want to do.
Strings[1] := 'Mining'; // Lamp Skill
Booleans[0] := False; // Axe wielded?
end;

with players[1] do // <-- Here
begin
Name := '****';
Pass := '*****';
Active := True;
Pin := ''; //Leave blank if no pin
Loc := 'banked'; //Read the thread to see valid arguments.
Integers[4]:= 100; //Amount of loads you want to do.
Strings[1] := 'Mining'; // Lamp Skill
Booleans[0] := False; // Axe wielded?
end;

Other than that it should work. :D