Rimmington Auto Miner ~Tin, Copper, Iron, and Gold
NewToAutoing
2007-05-21 18:52:06
Rimmington AutoMiner
Edit: Is NO LONGER WORKING. Will be updated in the near future.
It has/does:
- Antiban
- Antirandoms (Pretty sure they mostly work..)
- Walks to Rimmington Mine from Falador East Bank
- Walks to Falador East Bank from Rimmingtom Mine
- Can mine Tin, Copper, Iron, and Gold (Set which near the beginning)
- Can start from either Falador or Rimmington (Though you must make sure to set which you are at)
- Uses dynamic DTMs
Please post progress reports, bugs, ideas for improvement, and anything of the sort.In V0.90 I changed some of the walking procedures a bit and redid the DTM of the road split next to the bank, giving it more points so as to make it more accurate (which fixed the problem i encountered with it) I also did a huge change on the way it finds the bank, which has many more failsafes and works much more often now. Also, i found out FindFallyRoadColor screws up too, just like FindRockColor, to which i added the same failsafes that i gave FindRockColor (which don't always fix the problem). Most importantly, this version works a lot better than the older ones.
In V0.94 Mainly i altered the walking parts so it didn't create so much lag for people, tweaked the banking part and changed the ore counting part. Before it would count each one while you were mining, it was inaccurate though, because if it clicked a rock and someone else got the ore before your character even moved, "you manage to mine some blah blah" would still be the bottom line, so it counted that as getting an ore. I changed this by using CountItemDTM for Gems, Tokens, and Ores, and it does this before each walk back to the bank. I gave it a better testing which produced the progress report below. I could have let it go longer but i stopped it manually because i'm tired :D Also put in a little failsafe with the DDTM of the banksplit near the bank so that if it doesn't find it after 7 tries (more than enough clicks to the north) it just goes to the bankfinding part.
In V0.95 I went back and redid some of the older procedures so that they took up less space as they were repetitive. For instance, the aligning procedures were all basically the same thing with different DTMs which i was able to combine into one procedure. The same kind of thing happened for the banking part. When i changed the banking part i also made it so that it shouldn't bank in the same order everytime. So if you get gems while mining sometimes it will bank them first, other times after. I didn't actually test these changes, but it should still work in the same way as the old ones.
In V0.98 I tweaked the bank finding part a little bit, and I added in the option of mining clay which turned out to be more complicated than I thought it would be, but it seems to work now. Here's a proggy from when i was testing it <~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
Banked: 2 times.
Mined: 54 pieces of clay.
Obtained: 0 gems.
Has been running for: 15 Minutes, and 20 Seconds
Thank you for using NewToAutoings RimmingtonAutoMinerV0.95
<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
By: Me
Note: I made this script using Scar Divi 3.06 with SRL 3.7
Current best progress report:
<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
Banked: 2 times.
Mined: 54 iron ores.
Obtained: 0 gems.
Has been running for: 14 Minutes, and 21 Seconds
Thank you for using NewToAutoings RimmingtonAutoMinerV0.93
<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
By: Me
The above is only the current best because nobody else posted any :fiery: I could have let this one go longer but i stopped it because i was tired :p
subz3r0
2007-05-21 19:04:21
nice nice nice daddy like
zaniar
2007-05-21 20:34:58
From: subz3r0
nice nice nice daddy like
wtf? ok stop spamming
this is really nice but its still a bit buggy on the radial walking.:spot:
the bank banking procedure is nice, made very well.
radioactive_werewolf
2007-05-21 21:28:20
This script should come in handy as hell for getting all of that precious silver to level crafting. I'll test it out and give you some proggies when I get around to it. I just haven't been into runescape that much lately and I actually still need to get a proggie to rkroxpunk for his VEM. Someday you'll get a proggie from me though when I finally get around to using it.
NewToAutoing
2007-05-21 23:14:03
Thanks, but this script doesn't/can't mine silver :p It's the rimmington mine, not the crafting guild mine (if that's what you were thinking) Fixed a bunch of bugs and uploaded 0.6. Please post proggies/bugs/comments, i'll be back for a bit now. :)
radioactive_werewolf
2007-05-22 04:16:56
Aww crap.
Rocks: 2 Clay, 2 Tin, 5 Copper, 6 Iron, 2 Gold
I haven't been down there in months and I had entirely forgotten that there wasn't any silver down there. I guess this script won't be so useful to me after all. I wouldn't count on a proggie from me since I can't see any use I'd have for this script.
NewToAutoing
2007-05-22 21:36:48
:p Sorry to hear that my script is of no use to you
Anyone else care to test it out for me?
Sumilion
2007-05-23 11:46:04
I never like testing other peoples scripts :) but i must say, im quite impressed. I dont quite care if it works well or not, it lookss really good. If you apply with this then im sure you'll be let in in no time, i know ill vote yes :), good luck to you! :D
EDIT:
There is actually only one part i didnt like, which was the walking … it can mess up way to easily, try using loops more.
DennellyRune
2007-05-23 14:47:25
I keep getting this how can i fix it??? i tried many different ways but it stills says the same thing
Failed when compiling
Line 45: [Error] (18410:29): Duplicate identifier 'Attempts' in script C:\RimmingtonAutoMinerV0.6.scar
NewToAutoing
2007-05-24 00:17:18
Sumillion, thanks! I was planning on applying soon, i just wanted to test it a bit first and fix out any bugs and/or improve it in any way i can :D I dislike the walking part of my script also, but i don't really know how else to do it. If you could give me a brief explanation of what you mean, i'd be delighted :)
DennellyRune, i'm not sure why you got that error. Did you accidentally change something in my script..? Other than that, i do not know for it compiles for me and i don't think it declare Attempts as anything other than a variable.
Sumilion
2007-05-24 07:05:47
I allways walk from point to point using a loop, so :
repeat;
RadialRoadWalk();
Flag(5);
until(AtNextPoint);
Since i also made a rimmy miner, my points are the bank, gates of falador, rocks at mine. For each point a loop and in each loop RRW.
NewToAutoing
2007-05-24 18:01:17
So then like this?
procedure LeavingFally;
begin
Status('Leaving the bank..');
TheColor:=FindFallyRoadColor;
RadialRoadWalk(TheColor,240,285,45,2,2);
WaitAndCheckFally;
Status('Leaving Fally..');
repeat
TheColor:=FindFallyRoadColor //Actually i could take this out, couldn't i?
RadialRoadWalk(TheColor,150,200,45,2,2);
WaitAndCheckFally;
until(FindRoadcolor<>0) and (RadialRoadWalk(FindRoadColor,160,215,60,2,2))
Status('Left Fally');
end;
Instead of like this?
procedure LeavingFally;
begin
Status('Leaving Fally..');
TheColor:=FindFallyRoadColor;
RadialRoadWalk(TheColor,240,285,45,2,2);
WaitAndCheckFally;
repeat
TheColor:=FindFallyRoadColor
RadialRoadWalk(TheColor,150,200,45,2,2);
WaitAndCheckFally;
RadialRoadWalk(TheColor,150,210,45,2,2);
WaitAndCheckFally;
RadialRoadWalk(TheColor,150,210,60,2,2);
WaitAndCheckFally;
RadialRoadWalk(TheColor,150,210,60,2,2);
WaitAndCheckFally;
until(RadialRoadWalk(FindRoadColor,160,215,60,2,2))
Status('Left Fally');
end;
I added the and (FindRoadColor<>0) because if i understand correctly, it sets it to 0 if it doesn't find it, which is black, so if black was found on the minimap in the RadialRoadWalk in the until part, then it'd click that which would be wrong..At least i think that's what the problem was. I'll try altering the rest of them now, if i have enough time :rolleyes:
Edit: How would i do the same for the mines though? I tried
begin
TheColor := FindRoadColor;
Status('Walking to the mine..');
repeat
RadialRoadWalk(TheColor,280,160,50,2,2);
WaitAndCheck;
until (FindDirtRoadColor<>0) and
(RadialRoadWalk(FindDirtRoadColor,280,160,50,2,2))
end
The dirt road being that little patch by the mines, where theres a few squares of dirt in the road (which shows on the minimap. I tried FindDirtRoadColor and it worked, but then i tried it again and it said it didn't find it..In otherwords, it finds it, then it doesn't find it. Thanks for all the help so far, but i'm kinda stuck here
Edit2: Nevermind, figured out something else. Using this now :)
begin
TheColor := FindRoadColor;
Status('Walking to the mine..');
repeat
RadialRoadWalk(TheColor,280,160,50,2,2);
WaitAndCheck;
until ((FindMMColorTol(x,y,3038859,10)) and
(FindMMColorTol(x,y,1264244,10))) and
((RadialWalk(3038859,40,220,60,2,2)) or
(RadialWalk(1264244,40,220,60,2,2)))
FFlag(0);
end;
Most Recent Edit: I no longer use this^
NewToAutoing
2007-05-24 21:19:39
I only had time to alter the WalkToMine part, but now it works a lot better. Anyone care to test it out?
Wizzup?
2007-05-25 03:31:01
Try using either DTM's or Symbols are points that you walk too…. or when the road changes in degrees, walk until you don't find the roadcolor in the direction you were previously walking in.. :)
vinny13
2007-05-25 23:10:09
I tested.
I mined 1 load, it randomly ran to the middle of the mine where the spade is, and it froze. I don't know if it was the game or the script. Whatever.
It also clicks the ground a little too much instead of the rocks.
Great job by the way, I hope you can fix some of whatever's wrong or whatever. I've been waiting for a Rimmingtin miner anyways :)
merch
2007-05-26 11:32:26
mine wont find the road color, and when i mine a full load it runs to the middle and stops
NewToAutoing
2007-05-26 13:27:04
The running to the middle is normal, it does that because depending on which rock you were mining, you'd be at different spots. What i had tried to make it do was run to the middle, FindDeformed (which explains why it appeared to freeze) of a certain spot (which would be the starting point for the walking) and then walk to there. From there the walking procedure would be the same regardless of which ore you were mining. Only problem is, FindDeformed makes it lag too much most of the time, which i'm trying to find an alternative to.
Edit: Also, i tried to make DTMs of spots on the minimap, but either i made them incorrectly or they just didn't work. Is it that minimap DTMs don't work, or do i need to set the tolerance on each point higher or something?
NewToAutoing
2007-05-26 19:35:30
Learned how to use dynamic DTMs. I completely redid the aligning parts, and they now work all of the time (or at least, worked every single time i tested them) I left FindDeformed in there as a last resort, just in case though. I'm gonna use dynamic DTMs in the walking procedures now, and i'm currently altering the WalkToBank part to use loops with the untils being FindDTMRotated of the dynamic DTM of places like where there's a split in the road, etc. Hoping to have it finished by tonight, but i might not be able to.
The Lewter
2007-05-26 23:02:22
I tested it. At first it had an error in the setup since because I only had one player. I solved that by deleting the other player setups.
Then I got it working, but it walked past the mine along the road to Rimmington, took a step back, then concluded "Did not find mining symbol. Account is lost.", and signed out.
NewToAutoing
2007-05-27 12:16:32
Yeah, it gets that sometimes because i had it use a dynamic DTM and search DTM rotated of the iron rocks on the minimap (since they're closest to the road) but sometimes it seems to miss them. It looks like it happens less often with the newer v0.80 though, which i'm gonna upload right now. I had it done last night, but i couldn't get on the forums for some reason, so i'll upload it now.
NewToAutoing
2007-05-28 04:06:50
Well i've been working on implementing a form into it (since it seems like that's the only thing left to do :p) but i'm kind of stuck and confused on how to make it set each players info based on what the user types into the form. If anyone is good with forms and doesn't mind helping me out please notify me :) I probably won't get time to finish it up this week (busy week this week) but it'll be a big change once i do the update. I could use some proggies on V0.80 as it works (or at least worked) a lot better for me than the others, and i'd like to know if it works well for others too.
Only problem i've been unable to fix is that it sometimes won't find the dynamic dtm of the iron rocks on the minimap while walking back to the mine and will walk right past it. Not sure what i can do to fix that, but i think it happens less often now. Would love to hear other's results.
jeanke54
2007-05-28 06:31:42
Line 46: [Error] (18743:52): Duplicate identifier 'Attempts' in script C:\Documents and Settings\………..\RimmingtonAutoMinerV0.81.scar
damn can someone help me fix tis
NewToAutoing
2007-05-28 15:52:07
I'm not quite sure why that happened, because it compliles and runs fine for me with no problems. (I made sure there was no difference between the one i tried and the one i uploaded, they both compile) Do you have the most recent SRL? (Who knows, maybe that's the problem) If anyone else gets this i'll just change the variable name in the next update..
jonol33t
2007-05-28 23:28:17
mines good just cant find bank :confused: :( any way good job
Java King
2007-05-29 03:22:19
From: DennellyRune
I keep getting this how can i fix it??? i tried many different ways but it stills says the same thing
Failed when compiling
Line 45: [Error] (18410:29): Duplicate identifier 'Attempts' in script C:\RimmingtonAutoMinerV0.6.scar
When an Error like that comes up.. the way i have learnt is to get this sort of error C:\ERROR NAME HERE.scar.
So what you do is go to your internet brouser.. and type in the url box your error.. like so ;;
C:\RimmingtonAutoMinerV0.6.scar
:f:
NewToAutoing
2007-05-29 04:16:37
Er..well yeah that'd open the location of the error but since that error is apparently in my script it's not like that makes much of a difference..
As for the bank finding not working, i've done a HUGE change to it, and changed the Attempts integer to something else in the process. I was gonna release the version with the new bank finding tonight, but i ran into errors with FindRockColor that my failsafe for it couldn't really do anything about, so that held me up from testing out the new find bank. Here it is in case anyone is interested in it.
procedure SearchForBankers;
begin
BankersFound := False;
if (FindDTMRotated(MMBankersDTM,x,y,MMX1,MMY1,MMX2,MMY2,-Pi/2,Pi/2,0.1,WhichAngle)) then
begin
BankersFound := True;
end;
if (BankersFound = False) then
begin
if (FindDeformed(x,y,MMBankers,MMX1,MMY1,MMX2,MMY2)) then
begin
BankersFound := True;
end;
end;
end;
procedure SearchForBank;
begin
ActivateClient;
LowestAngle;
BankFound := False;
Status('Attempting FindBank...');
if (FindBank('feb')) then
begin
BankFound := True;
end;
if (BankFound = False) then
begin
Status('Searching for bank symbol..');
if (FindSymbol(x,y,'bank')) then
begin
Mouse(x,y,2,2,true);
FFlag(0);
Mouse(MMCX+5,MMCY+5,2,2,true);
FFlag(0);
if (OpenBankQuiet('feb')) then
begin
if (BankScreen = True) then
begin
Status('Opened bank.');
BankAttempts1 := 0;
BankAttempts2 := 0;
OtherBankAttempts1 := 0;
OtherBankAttempts2 := 0;
BankFound := True;
end;
end;
end;
end;
if (BankFound = False) then
begin
Status('Attempting to find the booth..');
if (OpenBankQuiet('feb')) then
begin
if (BankScreen = True) then
begin
Status('Opened bank.');
BankAttempts1 := 0;
BankAttempts2 := 0;
OtherBankAttempts1 := 0;
OtherBankAttempts2 := 0;
BankFound := True;
end;
end;
end;
end;
function FindTheBank: Boolean;
begin
FFlag(0);
Result := False;
Status('Searching for bank..');
SearchForBank;
if (BankFound = False) then
begin
repeat
Wait(2000+random(500));
BankAttempts1 := BankAttempts1 + 1;
Status('Searched for bank symbol ' + IntToStr(BankAttempts1) + ' time(s).');
SearchForBank;
until (BankFound = True) or
(BankAttempts1 >= 3)
if (BankAttempts1 >= 3) then
begin
Status('Did not find bank symbol, searching for bankers..');
BankAttempts2 := BankAttempts2 + 1;
begin
repeat
Wait(2000+random(2000));
OtherBankAttempts1 := OtherBankAttempts1 + 1;
Status('Searched for bankers ' + IntToStr(OtherBankAttempts1) + ' time(s).');
SearchForBankers;
until(BankersFound = True) or
(OtherBankAttempts1 >= 2)
if (OtherBankAttempts1 >= 2) then
begin
OtherBankAttempts2 := OtherBankAttempts2 + 1;
end else
begin
if (BankersFound = True) then
begin
Mouse(x,y-10,2,2,true)
FFlag(0);
Status('Found bank!');
if (OpenBankQuiet('feb')) then
begin
Status('Opened bank.');
Result := True;
BankAttempts1 := 0;
BankAttempts2 := 0;
OtherBankAttempts1 := 0;
OtherBankAttempts2 := 0;
end else
begin
Status('Did not find booth.');
Writeln('Did not find booth. Player is lost.');
LogOut;
NextPlayer(False);
Result := False;
BankAttempts1 := 0;
BankAttempts2 := 0;
OtherBankAttempts1 := 0;
OtherBankAttempts2 := 0;
Exit;
end;
end;
end;
if (OtherBankAttempts2 = 2) then
begin
Status('Could not find bank.');
Writeln('Could not find bank. Player is lost.');
LogOut;
NextPlayer(False);
BankAttempts1 := 0;
BankAttempts2 := 0;
OtherBankAttempts1 := 0;
OtherBankAttempts2 := 0;
Result := False;
Exit;
end;
end;
end else
begin
Status('Found bank and opened.');
Result := True;
BankAttempts1 := 0;
BankAttempts2 := 0;
OtherBankAttempts1 := 0;
OtherBankAttempts2 := 0;
end;
if (BankAttempts2 = 3) then
begin
Status('Could not find bank.');
Writeln('Could not find bank. Player is lost.');
LogOut;
NextPlayer(False);
BankAttempts1 := 0;
BankAttempts2 := 0;
OtherBankAttempts1 := 0;
OtherBankAttempts2 := 0;
Result := False;
Exit;
end;
end else
begin
if (BankScreen = True) then
begin
Status('Found bank and opened.');
BankAttempts1 := 0;
BankAttempts2 := 0;
OtherBankAttempts1 := 0;
OtherBankAttempts2 := 0;
Result := True;
end;
end;
end;
MUCH more complex than the previous one:
function FindTheBank: boolean;
begin
Attempts := 0;
Result := False;
Status('Searching for bank..');
if (not(OpenBankQuiet('feb'))) then
begin
repeat
Wait(1000+random(500));
Attempts := Attempts + 1;
Status('Searched for bank symbol ' + IntToStr(Attempts) + ' time(s).');
until (FindBank('feb')) or (Attempts = 5)
if (Attempts >= 5) then
begin
Status('Did not find bank symbol, searching for bankers..');
if (FindDeformed(x,y,MMBankers,MMX1,MMY1,MMX2,MMY2)) then
begin
Mouse(x,y-10,2,2,true)
FFlag(0);
Status('Found bank!');
if (OpenBankQuiet('feb')) then
begin
Status('Opened bank.');
Result := True;
end else
begin
Status('Did not find booth.');
Writeln('Did not find booth. Player is lost.');
LogOut;
NextPlayer(False);
end;
end else
begin
Status('Could not find bank.');
Writeln('Could not find bank. Player is lost.');
LogOut;
NextPlayer(False);
end;
end else
begin
Status('Found bank and opened.');
Result := True;
end;
end else
begin
Status('Found bank and opened.');
Result := True;
end;
end;
The new one should make it so that it searches multiple times, then it should let your character walk north again, then do the searches again, and then walk north again (which should get you close to the bank now) and then do the searches again. If it doesn't find it by the third set of searches it should conclude you are lost. Though, in theory it would leave your character standing around for a bit while it does all these searches, thus making it take a long time. Once i'm able to test it i'll see what i can do to speed it up.
NewToAutoing
2007-05-30 22:30:34
Uploaded V0.90, which works better than all previous version (based on my testing) and uses the above mentioned bankfinding. I could still use some help with the forms (which i'm hoping i'll put into the next update) So if anyone is good with them and feels like helping me out, feel free to pm me. Also, here's the current best proggress report:
<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
Banked: 1 times.
Mined: 28 iron ores.
Has been running for: 9 Minutes, and 54 Seconds
Thank you for using NewToAutoings RimmingtonAutoMinerV0.81
<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>
By: Me
Hopefully somebody will post a progress report that isn't as pathetic since i stopped the script between each run to tweak it a bit while i was testing it, which is what that proggy is from :p
rkroxpunk
2007-05-31 00:06:35
Best TUT on forms by a mile
http://www.moparisthebest.com/smf/index.php/topic,7621.0.htmlhttp://www.moparisthebest.com/smf/index.php/topic,7797.0.htmlhttp://www.moparisthebest.com/smf/index.php/topic,10472.0.htmlbtw they go in order of lessons and i think u may have to register there to see them but it's definately worth it.
btw very nice script I'm making a rim miner and I looked at urs to see what the competition was like :p and then I saw u using DDTM's so I decided to give it a shot and they work :D thx for the inspiration :p
NewToAutoing
2007-05-31 00:26:38
Thanks, but i already read those tuts :p They helped me understand forms, but the part i need help with is how to make the form send the player info to the right player, i didn't look into it that much though today, worked on fixing my script instead of adding to it for today. Glad to hear i inspired you, if you have any questions or would like any tips on DDTMs i'd be happy to tell you whatever i know on them and try to help :)
Also, if you end up using them in the same way i did (FindRockColor) you'll run into quite a few problems with it. Countless times it's given me the wrong color, either giving my a color from the pickaxe in the mining symbol or giving me a color from that patch of dirt that overlaps the road near the mines.
rkroxpunk
2007-05-31 23:11:57
hmmm u know the place just down of the second cross road intersection coming from fally to mine there's a think a group of 3 rocks…..rekon it will work there? and I assume it's only for the grey rocks
zaniar
2007-06-01 01:24:14
Ok i tried out the new one and i don't get the problem with the find bitmap of "managed to mine some iron"
very good and useful
zaniar
2007-06-01 01:28:07
Ok I see your not using the find bitmap sorry i didn't read your posts:p
ilikechikslots
2007-06-01 02:36:36
Cant wait for you to make it better, it still cant find bank sometimes. Well it finds it and enters, but then it doesnt deposit. instead, it goes back to road and bank and then road again, like its stuck in a loop.
Can't wait for ur next upsate on this script.:sasmokin: :sasmokin: :sasmokin:
the flea
2007-06-01 04:46:38
i tried running it but it was far too laggy for me :( with each click on the mini map when the flag disapeared it would sit and go all laggy for like 5 seconds each time!!
NewToAutoing
2007-06-01 14:53:30
@rkroxpunk, I'd have to go check what you're talking about. If it's close enough to the road then it might work, possbly even better.
@Zaniar, yeah changed it a lot since then lol. Also, i'm not gonna be a grad nite. Long story, call me at my mom's house if you have the number.
@likechikslots, Not sure why it does that for you. Works fine for me but i'll look into it.
@the flea, Yeah i was worried that what happen. These past few days I've been on my vista computer (so almost NOTHING lags for me) And i was worried it might be too laggy on weaker computers. I think the problem for you is that it does FindRockColor too much (which i fixed in the version i'm testing right now, it's a small change but should help lessen the lag nonetheless, and i'll release it soon-ish.
imamonkey28again2
2007-06-01 15:40:08
When I tried this from the bank, it could not find road and logged out around south fally wall.
I then tried from the mining place and it mined 28 iron perfectly, but then got to bank and "Could not find bank" after trying about 10 times…
(Basically I get the same problem as the guy above me with the loop, but no deposit can't find bank code…)
Other then that it was good code, do you know why this was happeneing for me?
NewToAutoing
2007-06-01 18:38:04
If by Fally south wall you mean the gate (south exit) then i dunno why it does it to you but i altered it already and it should be fixed in the next version.
And i already fixed the banking problem too, which will be in the next version. I'll try to quickly explain it.
procedure WalkToBankAndOpen;
begin
SetBankSplitDTM;
Status('Walking to bank..');
repeat
RadialRoadWalk(TheOtherColor,320,410,40,2,2);
WaitAndCheckFally;
SetBankSplitDTM;
until(FindDTM(BankSplitDTM,x,y,MMX1,MMY1,MMX2,MMY2))
Mouse(x,y,2,2,true);
FFlag(0);
Status('Reached split near bank.');
Wait(1000+random(1000));
Mouse(MMCX+(30+random(5)),MMCY+(30+random(5)),0,0,true);
FFlag(0);
repeat
Wait(2000+random(500));
until(FindTheBank = True)
Status('Found and opened bank.');
FreeDTM(BankSplitDTM);
end;
That's how it'll look now. Basically the way it was set up before it would walk north until it finds the DDTM of that split by the bank, then search for the bank (and if it didn't find it on first try, it would click the DDTM again) The problem was that the DDTM was outside of the bank, while i had a manual thing to get you inside or at least closer to the bank, making it seem like it was walking in and out :p Now it'll walk north to the DDTM, then do the manual thing i did to get closer, then do the bank finding without moving back and forth. Reason i hadn't noticed it sooner was that it usually found the bank within the first try for me so i'd never encountered that. I'm just doing a few more tests, then i'll release the fixed version.
Edit: And i also fixed the problem how it made computers that weren't as good as the one i'm on right now lag too much, so it should lag a lot less with the next version. (Or at least, lag as little as necessary.)
rkroxpunk
2007-06-01 21:02:45
nah it doesn't work, ur right findrockcolor doesn't work :S clicked on a tree for me :D…I don't need it any more tho so it's all good
NewToAutoing
2007-06-01 23:40:55
Um, it works but screws up sometimes, but from what you said it sounds like it came back 0. When it doesn't find it it results as 0, and i remember it moving the mouse to a tree when that happened (I'm guessing the tree icon on the minimap has some black in it..) But yeah, it is kinda screwy. Glad to hear you found some other solution though.
ilikechikslots
2007-06-02 02:43:08
Hey i made the changes that your going to put on your new version, and just to let you know. It still can't find bank, it opens up and then doesn't deposit the ore. You sure those changes are correct?
NewToAutoing
2007-06-02 03:23:52
Download the newest version (0.92) should fix the problem :)
NewToAutoing
2007-06-02 05:37:56
*yawn* Version 0.93. Most successful version so far, gave me a new best proggy which i stoppped because *yawn* i'm obviously too tired. I'm gonna go to sleep now, but hopefully somebody'll download the newest one and test it by the time i wake up (which is more often that not late) Hope to hear (good) news in the morning :)
NewToAutoing
2007-06-03 04:54:26
V0.94 uploaded. Small fix, just a failsafe added with the split near the bank so that it'll just skip it and go to searching for the bank if it doesn't find the DDTM after so many tries. Went from one update to another without any posts, come on people :fiery:
hellhunter
2007-06-03 12:05:21
Hey really nice script dude, well coded ;)
I'm getting this error though -
Failed when compiling
Line 53: [Error] (17203:39): Unknown type 'TDTMPointDef' in script C:\Users\Computer1\Documents\RS Cheats\RimmingtonAutoMinerV0.94.scar
Line 53: [Error] (17203:39): Unknown identifier '' in script C:\Users\Computer1\Documents\RS Cheats\RimmingtonAutoMinerV0.94.scar
NewToAutoing
2007-06-03 18:27:26
That sounds like its from part of the DDTMs, which i think only work in Divi. If you're using Scar Divi 3.06 and getting that error then i dunno though, sorry.
teremanboy91
2007-06-04 21:22:50
i keep getting this error [runtime error] line 152 out of range, but im only using one account… what do i need to do to fix this
takemu
2007-06-04 22:12:40
Include file C:\Program Files\SCAR 3.06\includes\SRL\SRL.scar does not exist.
Include file C:\Program Files\SCAR 3.06\includes\SRL\SRL\skill\Mining.scar does not exist.
Include file C:\Program Files\SCAR 3.06\includes\SRL\SRL\extended\xAutoTalk.scar does not exist.
Include file C:\Program Files\SCAR 3.06\includes\SRL\SRL\extended\xAntiBan.scar does not exist.
Include file C:\Program Files\SCAR 3.06\includes\SRL\SRL\extended\xBitMap.scar does not exist.
Include file C:\Program Files\SCAR 3.06\includes\SRL\SRL\extended\xInventory.scar does not exist.
Failed when compiling
how do i get these????????????????????????????????????????????????????????
NewToAutoing
2007-06-05 02:01:49
You haven't downloaded SRL…
If you're using Divi then click File > Download SRL and wait until it says it was downloaded and installed.
Also, gonna upload 0.95 now. All i did was alter the banking procedure (to make it less repetitive and at the same time i made it more random) and to make the aligning procedures less repetitive. I haven't gone through and tested them but it should work the same exact way.
teremanboy91
2007-06-05 20:20:23
newtoautoings i keep getting an error with line 152 it says he is out of raneg, but i am only using 1 account why would he be out of range ?
NewToAutoing
2007-06-06 01:39:34
If you're only using one account then the info for that account should be in the part that says Players[0].blah and you shouldn't have to touch any of the other players. That and make sure you left HowManyPlayers := 6; on line 103.
NewToAutoing
2007-06-06 12:30:12
Added the choice of mining and banking clay. Planning on thinking over adding in the ability to make the clay into soft clay, and eventually putting it a feature to withdraw a new pickaxe in case something happens to the one you're using. Other than that, not much left to add. I still haven't gotten any progress reports though, and while the script runs great for me i really don't know how well it goes for others since the last five updates or so. So please, somebody test it out for me and lemme know how it goes :D
Your script works well for the most part and I'd love to try and give you a proggie, but I'm getting some problems when trying to bank. My guy will mine all the ores just great then walk back to the bank and he either gets stuck outside the bank on the road and the mouse icon just moves back and forth in an infinite loop, or he goes to the bank opens it then doesn't deposit the ore and the mouse loop happens again. Mines great but just a little trouble with the banking procedure.
NewToAutoing
2007-06-06 17:15:50
The mouse moving like you said sounds like openbank or whichever one i used (can't remember) But as for doing it outside of the bank, i'll look into that, i thought i just made a fix for that in the last one :p Hold on.
Edit: Just found the problem. I altered it so that if it gets stuck on the road just outside of the bank it'll try a different way to find the bank, but forgot to change the normal part that came after. Fixed that though, i'm gonna give it another quick look over before uploading.
teremanboy91
2007-06-06 18:55:57
yea i am having trouble getting to bank also.. i get to where the guards are and my character tries to find the bank from there moving the mouse from guard to guard then toward the ladders of the mining guild other than that the mining is fine
Sumilion
2007-06-06 18:56:19
Keeps getting better :)
teremanboy91
2007-06-06 18:57:03
i think it gets messed up because the road color changes as you get into falador
NewToAutoing
2007-06-07 00:14:06
Thanks Sumillion, don't think there's that much left to add though :p
As for the banking part, it's not because of the color changing when you enter fally, because that's already in there and has been from the start, lol. By guards, i'm assuming you mean it walks towards fally center by those guards then? In that case, i'll look into it. Then you say the ladders of the mining guild, in the opposite direction, also, those would be on the minimap (unless it somehow walked you over to there..) The mouse moving around is how it looks for the bank booth..but it should work better now. Teremanboy91, if you could explain it a little better I could get right to work on a solution :)
I'm gonna download your newest script now and run a couple guys on it, I'll get back to you with any type of problems. I'll try to explain them best as possible. Possibly have a couple links to pictures of specific areas where they seem to get stuck more often than not, and what not.
Also, after you get all the bugs worked out I was thinking it would be a good idea to add a procedure that will unequip/deposit a broken pick and withdraw/equip a new one. Just in case the pick finding random or gas random fails for some reason. Then not to far a step from that if you get to a certain mining level that allows for a better pick to withdraw that from the bank and equip it instead. It would probably be easier if you just had it so that the user made sure the pick was in the first slot of their bank, and to keep a small stack of them.
EDIT: This might be the wrong spot for this but Just thought of this, I dont know if its in antiban or if anyone has really done this or if it really matters at all in the fact of being ban. However As far as I know antibans are just mimics of human like actions, like checking your xp periodically. As i was walking my guy to rimmington to I realized that I very often like to examine things. Weather or not if its something that I just do or alot of people do if you had the auto do this while waiting for ore to respawn or while you are getting the ore it might help in antiban. That is if its even a detectable thing. If Jagex cant detect that then I suppose it doesn't really matter.
Thus far good job on your script it seems to be coming along rather nicely.
EDIT AGAIN: I was reading through your introduction/setup and not really that big of deal but might confuse a few people, it says to change lines 70,103, and 143-189 however you must have added things above that because what used to be on line 70 is now at 72, again not really that big of an issue just letting you know.
Pictures are rather large do I'm posting links instead of just uploading them straight to the post. Sorry if this causes a slight inconvenience. Please excuse the picture quality. You may need to click on the image to enlarge it to allow easier reading. Also note that in all screen shots I have the debug image preview and scar on top, this is not so while running the script.
>>>>>>>>>>>>>>>>>>>>..::Begin Test Runs::..<<<<<<<<<<<<<<<<<<<<<
I started him at the Falador Bank, He logged in, did all the usual trade and chat stuff like intended. He then proceeded to walk down towards the fork in the road. In stead of taking the west path he took the east one toward Port Sarim. I thought it might be a new path that was much less buggy when taken. He walked down next to the dock and sat there for a minute. He then walked outside the door of the jail. I waited to see if he did anything then decided to rotate the camera for a better shot of the area. Upon doing so he immediately clicked in the bait shop. Once there ran back to the jail just next to the door, and nothing further happened.
Port Sarim Jail BugOn my second attempt i started from the Falador east bank again. The out come was nearly the same, however he made is way more quickly to the jail then proceeded to try and click the Thief's mini map icon (yellow dot) then back on the road outside the door then the yellow dot and so on. Stuck in an endless loop. I noticed that when walking to the mine from the bank instead of actually clicking on the road he clicks slightly to the right of it never on it.
On my third attempt I started from the rimmington mine. He mined very well, the only thing I noticed that might screw up the macro is that the color of a rune kite trim is the same as iron vein so it moves and hovers over it. It never clicked it so I'm supposing that you've already taken care of that. I think i remember seeing some code in there to check for 'ine' so I'm guessing it checks the name before clicking. I don't think you have an auto response feature in there, or if you do its not working too well. I had a couple report threats but got that taken care of. Anyway back to the matter at hand on the way back to the bank I didn't see any problems. He got away from being attacked just fine and walked up to and into the bank very well. It took a couple seconds to find the bank. What I think is happening is that when hes in the bank he didn't walk in quite far enough. As I understand it you have the mouse move back and forth searching for the correct words indicating the bank, and once found stops moving and opens it. He kept barely missing the bank booth he would come just a pixel or two short of hovering over the bank booth, it took about 10-15 seconds to find it. Once opened he deposited everything quickly and then clicked out and turned on run and headed back down the road. Again slightly clicking to the right of the actual road.He got to the fork and I expected him to head toward port sarim once again but he instead hesitated 3 or 4 seconds and clicked on the west fork he made it to that small hump in the road above the elemental wizards. Then ceased to move he sat there and was attacked by a highway bandit or whatever.
Stuck Walking Back To MineOn the forth attempt I started at the mine again mined good, no randoms happened. Once the pack was full he walked back towards town when arriving at the fork just west of the east bank he decided to take the northwest path rather then continuing slightly north of the path then clicking on the bank symbol and searching for the bank, and depositing. It took a good minute or two for it to determine that he was lost.
Lost Northwest Of East BankOn the fifth attempt I started at the mine, he mined a full pack then switched over to the preferences and turned off run like its supposed to then tried to find the road color and fally road color over and over unsuccessful every time.
Stuck At MineOn Final Attempt I started at the mine. A Drunken Dwarf came up and I waited for a bit to see if he'd take care of it, but he didn't unless he just runs when attacked. I talked to him and the script continued to mine. The pack got full and once again he got stuck there trying to find the road color.
So what I think is that if you start at the bank you are guarantee to get lost in port sarim as it happened every time I started from the bank. Should probably check that particular procedure. As for starting at the mine it seems to work better as you can actually mine things and have the chance to try and bank it. But its pretty damn buggy. Lots of mixed results. I suggest that you try and fix getting back from the mine first because then people can actually use it as long as they start at them mine then you try and fix Starting at the bank cause if you fix that first you still have the problem of getting back so in essence it would still be broken either way.
NewToAutoing
2007-06-08 18:03:36
THANK YOU! Finally someone gave me a detailed description of what happened. Now as for the Port Sarim thing, i saw it happen twice in the times i tested it, and only twice so i assumed it was a rare anomaly (as both times it was during a test where i left my computer while it ran) But apparently it seems to happen very often for you, so i'll look into fixing it.
And no, it shouldn't go towards Port Sarim at all.
It SHOULD click on the right side of the road, but not necessarily to the right of the road. I'll look into that also, but i don't neccessarily think it's a problem.
Nope, no autoresponder. Mainly because it checks the text in the chat box (which is why it sets it to hide) to confirm whether or not you got the ore, therefore making it not show other player's messages, in effect, no responder.
As for the spot by the elemental wizards, i experience that bug ONCE, and recently too. The only explanation for it not continuing to walk is that it's not finding the color of the road, which doesn't really make sense unless i somehow changed the parameters on RadialRoadWalk without noticing it, so i'll double check that part.
And for walking past the bank, the solution i put to that was that it searches for a DDTM of that split back by the bank, and keeps walking until it finds it. In my experiences it found it 9/10 times and would stop at the right spot, or it would walk so far north that there would be no road directly north of it (meaning 0 degrees) for it to click, only the northwest path, but it wouldn't go to it. I thought i had that bug fixed, but apparently i need to change it more. The reason it looked for the bank even though it never found the split was in case what i said above happened, so that it should still be able to find the bank.
And i think that covers everything you told me :D As for the antiban, it has some but as i said, no autoresponding, and that is an interesting idea about examining things. I think that could always give away the autoer though, because after a while you stop examining things in certain areas. I remember i used to all the time when doing things like that, but now no longer do as i know the areas too well. What i said is unlikely though, and it's definitely a good idea.
And i was planning on adding that part about extra pickaxes later, but wanted to work out all the current bugs first.
Edit: Wait..in that picture of Stuck At Mine what are you mining? If i'm not mistaken that spot has iron, but i didn't set it to go there..It should only use the other spot…
Actually yeah I am mining there, and if he's not supposed to that would most likely explain not finding the road colors to walk back. I'll check into that, I should mine on the ones in the west part of the mines is what I'm assuming. I'll run it a couple times starting from rimmington closer to the ones intended for the script. Also I ran into a couple more randoms and just want to check does it solve the no fighting randoms after he is teleported or is it supposed to talk to them right away? I assume that you just run from the fights. Maybe my nick is just not good enough. It might be a while before I get back to you with a report though, I should have one up by 1ish am central us time.
NewToAutoing
2007-06-08 19:56:25
The randoms part is from SRL, so it could be the nick being set wrong. Otherwise i don't know. And yeah, the iron spot would DEFINITELY cause more problems. I guess you wouldn't have known to use the other spot though, since you never saw it get to the mine and go to that one itself.
And i can wait as long as need be, i'm just happy to be finally getting real testing done.
tears
2007-06-08 22:48:21
hey this thing works great for me …. except well i get to the bank and it opens bank but doesn't seem to know how to deposit iron can you help? otherwise everythingh else is working great for me :)
NewToAutoing
2007-06-09 01:11:36
Could you describe very specifically what it does? Does it just sit there and do nothing, or does it click certain places..or what..?
motocross
2007-06-09 01:31:33
line 53: [Error] (18748:39) :Uknown type TDTMPointDef in script C:/DOCUME…..
line 53: [Error] (18748:39) :Uknown identifier in script C:/docume….
help me =)
Motocross in the future it helps if people could see your entire error. However as far as I can tell I think your trying to run this script with SCAR 2.03 and SRL 3.06 It need Scar 3.06 Divi and SRL 3.07 please go to the download section on this site and get the latest versions. Do not uninstall the older version though as some scripts still use it. Make sure to set up SCAR and SRL right by following the tutorials and then run the script. That should take care of your errors.
NewToAutoing Proggie coming soon.
Well, I started mining where its intended for and it gets to the bank and banks it all good but out of the 10 times I've done it its only made it back to the mine once then on the way back to the back he got stuck on the north west path again. He seems to get stuck in port sarim alot more now.
Sumilion
2007-06-10 04:20:52
Guess who released his rimmington miner in the SRL members section :).
RudeBoiAlex
2007-06-10 05:29:13
hmmmm i might use and congratz on membership im gna use sometime this week :)
logic
2007-06-11 06:42:30
Dunno if it is me or not,but i have huge lag…
And it doesnt find bank sometimes …
Then it logs out .
NewToAutoing
2007-06-12 00:08:25
@Logic, some lag is expected..but not so much that it doesn't work at all. I suppose it could depend on your computer though.
@rudeboialex, thanks! I look forward to hearing about the problems you get with it :P
@Sumillion, read what i posted there :P
@Xirx, I apologize for not looking into it earlier like i said i would. I've been busy :P I'll see what i can do right now.
@motocross, yes you must be using Scar Divi 3.06 with SRL 3.7.
RudeBoiAlex
2007-06-12 11:51:01
rofl problems :P just gettin some more levels 1 guild miner now :P
tears
2007-06-12 15:24:46
From: NewToAutoing
Could you describe very specifically what it does? Does it just sit there and do nothing, or does it click certain places..or what..?
specificly it gets to bank opens bank screen then it moves the mouse around in the bank screen not the inventory for about 3 mins then it goes to mini map and clicks bank icon and finds banker again and starts over never depositing my iron hope this is specific enough anything else you need or want i got plenty of messangers you can contact me on one :)
NewToAutoing
2007-06-12 15:37:52
Yeah, i understand what you mean. Sounds like it keeps looking for the bank after it opens it. I'll try to figure out the problem.
Eacis
2007-06-12 18:59:16
I'm having hte same problem as tear… While mining iron (might be usefull)
It keeps hopping between some items in bank (while not clicking) and then stops.. hits the minimap and then trys again.. all other features work for me like roadcolor and mining…
-Eacis
kja87
2007-06-13 12:50:38
i found a post about it…..
something about editting banking.scar
some line with bankscreen must be editted just like i did and it worked
NewToAutoing
2007-06-13 20:01:31
Kja, yes that's correct. I entirely forgot about that, because during my own testings i encountered that bug even with banking.scar fixed for myself. I later fixed it though, and when people began saying there were problems with it my first instinct was that i hadn't full fixed the bug. But yeah, try fixing your bank.scar and then running it, as that would definitely explain the problem.
draygonsly
2007-06-14 11:11:25
i get this error
Line 54: [Error] (18745:39): Unknown type 'TDTMPointDef' in script C:\Documents and Settings\Parent\Desktop\RimmingtonAutoMinerV0.98.scar
Line 54: [Error] (18745:39): Unknown identifier '' in script C:\Documents and Settings\Parent\Desktop\RimmingtonAutoMinerV0.98.scar
can somone help me
Drew_Dawg
2007-06-14 12:12:03
i learned a lot just by reading through this script
i haven't actually ran it, i'm sure it works great though
kja87
2007-06-14 12:15:16
People who has problem with ores storing on the bank read:
http://www.villavu.com/forum/showthread.php?t=9818NewtoAutoing:
Your script does have some bugs in it:
- after 1 successfull mining and banking, the second time when walking back to falador it aint storing ores on the bank anymore. It moves into the bank but then it gets an error.
(ERROR MESSAGE: error did not open the bank. player is lost) or it gets stuck at the entrance of falador park.
some stucks:
- sometimes the script goes to port sarim(on the way to the mining area)
- sometimes the script gets stuck at the southern entrance of falador guards(on the way to the bank)
- sometimes the script get stucks at entrance of the falador park(on the way to the bank)
- sometimes script gets stuck in the bank(keeps searching for the bank booth)
- sometimes script gets stuck at the chicken house at the 3 way road it has to move to the west but it aint moving.(on the way to the mining)
hope you can fix it… cause your script is really great :)
tears
2007-06-15 12:23:05
please forgive in advance if i am restating previously brought up things but…. here goes. i spent 4 hours this morning with this scrip as i have said before i like it alot but you asked for feedback so here goes. about 1/3 of the time i end up having to bring character back to mine from the port as it sometimes goes wrong way at that bottom road junction thank you to the person who mentioned the bank thing got that fixed now. every other load it logs out stating that it can't find bank icon when it is standing in the bank. and finally i get these reports much like those shown above only there is a difference mine always says 21 ores banked …. um i am doing 28 ore loads could this have something to do with why it will do one whole load go back get another then log out when it reaches bank i know nothing about these so someone smarter then me will have to ponder it :) as i stated i really like this script ty so much. hope any of this helps and if you have any questions i have like all the maessangers listed i think :P
bro of mist
2007-06-15 17:47:12
how do i set witch one i start off at?
kja87
2007-06-16 06:39:54
SRL 3.8 im going to try this out with SRL 3.8 i'll let you know how it goes…
kja87
2007-06-16 07:54:02
You really should make it compatible with:
Scar 3.06 and SRL 3.8 ;)
NewToAutoing
2007-06-17 03:05:28
Hmm, it's not compatible with 3.8? Very well then, this is what I'll do.
I'm aware of all the bugs, thanks for all the responses. Nearly all of them i know exactly what i must do to correct them without even openining SCAR. Many of the places you say it gets stuck at are checkpoints, which use DDTMs. Usual problems with that is that if there's a white dot on top of the spot it's checking, it'll return false. Same for a red dot. So if somebody is just standing there where it's searching for a certain color, it could get screwed up. Or if an item is there.
Other ones i'll have to look closer into, like how it just stops walking at a certain point for no apparent reason (near the split south of falador from what i understand).
Since there's plenty of things to be fixed, and i have to make it compatible now, i'll do that (or at least try to) all in one update. So while this means there'll be a lot of changes in the next update, it also means it'll take a while to fix everything.
Thank you everyone for all the feedback, and I hope to get better results with the next update :D
And for this part "error did not open the bank. player is lost" It sounds like the beginning of the banking procedure. Which checks if the bankscreen is there (in case something went wrong earlier while opening the bank) and if the bankscreen isn't there, it'll say that. But i might've used that same message somewhere else, so i'll have to look into it.
Also, i apologize for my lack of response over the last day or two, as i wasn't online much, and when i was, i was busy working on other things
kja87
2007-06-17 06:01:56
Thanks for making an update. Your script is one of the best free scripts I know.
You know what i said about can't finding the bankscreen…
that you needed to fix bank.scar well SRL 3.8 has already fixed that,
but there is one more problem. when i fixed the bankscreen in SRL 3.7 by myself, it only banked one time… after that it couldn't find the bank anymore.
so dont forget about that :p
Anyway why not using the deposit thingy, in fally bank aint that much faster? and more relieable or aint that possible because of some settings in the script?
I wish you good luck fixing your script and hope I can give you a feedback about it ;)
Greetings :cool:
Harry
2007-06-17 08:03:50
I will test out soon if I can :) Thanks
Miner Man
2007-06-18 16:05:03
hey the autoing is awesome! the only problem is walking to the bank, once it gets to the falador gates the road changes colors so it just stops there without going on. so i have to take to bank myself and return to mine. please help with that. just tell me what i have to change in the script but like i said everything else is perfect.
kja87
2007-06-18 16:06:39
read his last post please, or better please read the whole forum before you talking about any bugs… :)
kja87
2007-06-19 08:38:01
From: NewToAutoing
Hmm, it's not compatible with 3.8? Very well then, this is what I'll do.
I'm aware of all the bugs, thanks for all the responses. Nearly all of them i know exactly what i must do to correct them without even openining SCAR. Many of the places you say it gets stuck at are checkpoints, which use DDTMs. Usual problems with that is that if there's a white dot on top of the spot it's checking, it'll return false. Same for a red dot. So if somebody is just standing there where it's searching for a certain color, it could get screwed up. Or if an item is there.
Other ones i'll have to look closer into, like how it just stops walking at a certain point for no apparent reason (near the split south of falador from what i understand).
Since there's plenty of things to be fixed, and i have to make it compatible now, i'll do that (or at least try to) all in one update. So while this means there'll be a lot of changes in the next update, it also means it'll take a while to fix everything.
Thank you everyone for all the feedback, and I hope to get better results with the next update :D
And for this part "error did not open the bank. player is lost" It sounds like the beginning of the banking procedure. Which checks if the bankscreen is there (in case something went wrong earlier while opening the bank) and if the bankscreen isn't there, it'll say that. But i might've used that same message somewhere else, so i'll have to look into it.
Also, i apologize for my lack of response over the last day or two, as i wasn't online much, and when i was, i was busy working on other things
do you know how long you are going to take..?
1 week, 2 week 1 month :P???
otherwise i'll go train some other things ;)
NewToAutoing
2007-06-20 00:57:58
It's not because the road colors change, lol, it's much more complicated than that.
I don't see how the deposit thing is faster..or why anyone would use it. Not to metion there aren't any existing functions for it that i know of, so it'd not only be rather pointless, but take longer :p But i suppose i could plan it for later as an additional thing, in case anyone prefers it or something. I dunno.
As for how long..To be honest i'm focusing on other things right now, so i really can't say. I'm leaning towards two weeks..but it could be less. Or it could be more. I really can't say :p
Pietz0r
2007-06-20 13:37:59
Hi, ive tried your script.. It works, but it gets stuck near the split south of falador, there the mouse cursor keeps going over the wizards, and i believe its desperatly searching for a rock color, but it doesnt find one so it gets stuck…
In other words, the script thinks that the fire wizard south of falador is a rock…
(not sure if it matters) Im using scar divi 3.06 with srl 3.8
hampus008
2007-06-21 04:03:34
srry to say this but it aint working..
It cant find to rimmington from falador and it cant find falador from rimington it always takes other paths 0/10
NewToAutoing
2007-06-22 01:28:25
Not so sorry to say this, but if you would have read a few posts up, i already know of the problems.
To the other person about the wizards, sounds like something went wrong and it ended up thinking it was at the mine a little early.
I'm already aware of all the bugs, and will be fixing it soon.
Santa_Clause
2007-06-22 01:32:36
Ffs…everyone except NewToAutoing just shutup and read the posts above you…
btryan
2007-06-23 22:23:03
Will try it out, thanks.
When I run it, it logs me in and does the chat, PM, trade, settings and then it just sits there, and in the bug window it returns the message "Could not find Road Color!". I have tried adding road colors with the color tool but it doesn't work.
linusgr
2007-06-27 07:19:19
oki i havent got any scripts to work.so can some 1 do a newbie steps to do this i get lots of erros like.line is out of range,wenn i start it say found
compas and dont do anythig plz help me
Mikihisa
2007-06-28 11:02:09
When i try to use the Script, this error came up:
Line 54: [Error] (18751:39): Unknown type 'TDTMPointDef' in script C:\Documents and Settings\Anton S Carlsson\Local Settings\Temporary Internet Files\Content.IE5\URDR1JIY\RimmingtonAutoMinerV0.98[1].scar
Line 54: [Error] (18751:39): Unknown identifier '' in script C:\Documents and Settings\Anton S Carlsson\Local Settings\Temporary Internet Files\Content.IE5\URDR1JIY\RimmingtonAutoMinerV0.98[1].scar
I use Scar 2.03 With SRL 3.06, should i use another Scar?
Please help me!
Mikihisa
NewToAutoing
2007-07-02 23:44:24
Mikihisa, you need scar divi with SRL i don't know. I made it with 3.7 and haven't changed it since then so i don't know if it works with 3.8 or not.
linusgr, sounds like you set up the players wrong.
Gort, maybe you set the wrong location? I don't know as i haven't been updating this for a while now.
btryan, feel free to if you wanna waste your time :p it doesn't work right now, please read the other posts.
Now, everyone, i am going to update the script. I do not know when. I'll be changing the first post to say this. I have far too many things going on right now to give a date whatsoever, which is why i was unable to follow up to the estimate i gave last time. My mom is having surgery tomorrow (and it's almost considered brain surgery, even though they don't have to go inside the brain but rather just near it) and then i have to go to an optomologist soon after. So it all depends on what happens from those things. Until then, you can always use Sumillion's as it is working and much better than mine :rolleyes:
bubbleboy13
2007-07-04 13:05:20
I read through the thread and couldnt find this problem, but everyscript i run shows this error, and its the only error:
Line 303: [Error] (5002:11): Unknown identifier 'ScanExactMinimapD' in script C:\ Program Files\SCAR 3.06\includes\srl\srl\core\Color.scar
Im running the very newest version of Scar and the newest version of SRL. It used to say that it coudlnt find Mining.scar but I took care of that problem. Now how to I fix this?
noobstuff
2007-07-06 10:55:25
shudnt u read teh first page?
sum1uallno
2007-07-13 21:18:11
Just add the original autominer.
Add new random finder.
Add anitban/mouse continual mover.
Add colors of ore that u want to mine using scars color finder.
Last change path direction as you hit the reminton mine,.
Just read the code and you will absolutely figure it out. Just take the time to over look it carefully. Ill post one here for you but ill let you work on one problem.
I have it set for copper as u walk in! One thing you shall work on to learn is the gap between the road and the actuall mine. Take a few moments to figure it out. Then youll be on your way to writing your own. This was not originally made by so i take no credit im creating it.
{===================================================================]
[ Sumilions Rimmington Miner ]
[ ]
[ NAME : Sumilions Rimmington Miner ]
[ WRITER : Sumilion ]
[ CATEGORY : Miner ]
[ DESCRIPTION : Mines in Rimmington, banks in Falador ]
[ USAGE : Start at bankbooth in Falador ]
[ AUTOCOLOR : Partially ]
[ SRL Used : 3.7 (DIVI) ]
[ ]
[ More Scripts can be found at ]
[
www.SRL-Forums.com ]
[===================================================================]
[ Instructions. ]
[===================================================================]
[ 1. USE Runescape with Low Detail, Very Bright. ]
[ 2. Set your Screen to 32 bit TRUE color. ]
[ 3. Setup lines below ]
[ 4. Set CopperRockMMColor (and NormalRockMMColor)!!! ]
[ 5. Set Playernames and Passwords below. ]
[ 6. Have Pick in First invslot or wielded and more in the bank ]
[ 7. Start script Logged Out / Logged in ]
[===================================================================]
[ Credits to : ]
[ Wizzup? –> For the GetRockColor; function. ]
[===================================================================}
program SumilionsRimmingtonMiner;
{.include SRL/SRL.scar}
{.include SRL/SRL/skill/Mining.scar}
//********Color Settings********\\
const
CopperRockMMColor = 5343966; // You HAVE to fill this in, it wont work otherwise.
NormalRockMMColor = 936558; // If below is true, then there is no need to fill this in.
AutoMMRockColor = False; // Use Wizzups MinimapRockColor finder (not adviced)?
//********Player Settings********\\
const
MinutesPerPlayer = 60; // Time in minutes per player
MaxSecRock = 5; // Maximum seconds to wait for a rock
StartPlayer = 0; // With what player do you want to start ?
UseBenMouse = True; // Use BenMouse? (Some people say its good for anti-ban)
RunDir = 'N'; // Direction to run to when in fight
RunFar = True; // Run far when in fight ?
//********Additional Settings********\\
SRLStatsID = ''; // Your SRL ID for the stats (Leave blanc to set it to default, from SetupSRL.scar)
SRLStatsPW = ''; // Your Password for the stats (Leave blanc to set it to default, from SetupSRL.scar)
VersionNumber = '0.13'; // No need to change this
TheMinCount = 5; // No need to change this
BoxSize = 15; // No need to change this
RemoteMaster = 'umil'; // For advanved users only.
//********Player Settings********\\
procedure DeclarePlayers;
begin
HowManyPlayers := 1;//MAKE SURE THIS ONE IS CORRECT!
CurrentPlayer := StartPlayer;
NumberOfPlayers(HowManyPlayers);
Players[0].Name := 'your name here'; // Your Runescape name
Players[0].Pass := 'your pass here'; // The corresponding password
Players[0].Nick := 'three letters from your name here do not use first letter or _ or n's'; // 3-4 letters from your name, NO CAPITALS (that includes the first character)
Players[0].String1 := 'Copper'; // Type of ore to mine (Clay / Copper / Tin / Iron / Gold)
Players[0].String2 := '0000'; // Your BankPinNumber
Players[0].Active := True;
end;
//********RockColor Settings********\\
const
CopperColor = 5343966;
TinColor = 10592685;
ClayColor = 7712718;
IronColor = 2437457;
GoldColor = 1817573;
//********Dont go below unless your more advanced********\\
var
GasAvoided, bmpOreMask, bmpClayMask, RunTime, MinCount,
FalaRoadColor, MiningSiteColor, dtmBanker, dtmBank, RockColor,
a, GemsReceived, OresMined, TotalLoads, bmpGemMask: Integer;
dtmPaxes: array[1..6] of Integer;
PinNumber: string;
AngleVar: Extended;
PlayerStatus: Boolean;
//—————————————————————–\\
{ ProgressReport - Sets up the player array ||
\\—————————————————————–//}
procedure ProgressReport;//Made by Fakawi, i think, edited by me
var
PActive, Spaces: string;
I, K, SpaceNumber: Integer;
begin
SRLRandomsReport;
if Players[CurrentPlayer].Active then
PActive:='True'
else
PActive:='False';
Writeln(' ');
Writeln('<========== RimmingtonMiner ============>');
Writeln('<======= -'+VersionNumber+'- Progress Report ========>');
Writeln('/=======================================\');
Writeln(' Worked for '+ TimeRunning);
Writeln(' Banked '+IntToStr(TotalLoads)+' loads
.');
Writeln(' Mined '+inttostr(OresMined)+(' ores.'));
if(GemsReceived > 0)then
Writeln(' Received '+IntToStr(GemsReceived)+(' gem.'));
if(GasAvoided > 0)then
Writeln(' Avoided gas '+IntToStr(GasAvoided)+(' time.'));
Writeln('\=======================================/');
Writeln(' Name : '+Players[CurrentPlayer].Name);
Writeln(' Mining Lvl : '+IntToStr(Players[CurrentPlayer].Level[15]));
Writeln(' Worked for : '+IntToStr(Players[CurrentPlayer].Worked)+' minutes.');
Writeln(' Banked : '+IntToStr(Players[CurrentPlayer].Banked)+' time.');
Writeln(' Active : '+PActive);
Writeln(' Location : '+Players[CurrentPlayer].Loc);
Writeln('\\————————————-//');
for I := 0 to HowManyPlayers-1 do
begin
if Players.Active then
PActive:='True'
else
PActive:='False';
SpaceNumber := 12 - Length(Players.Name);
for K := 0 to SpaceNumber do
Spaces := Spaces + ' ';
Writeln(IntToStr(I)+': '+Players.Name + Spaces +
'= ' + PActive + ', ' + IntToStr(Players.Banked) + ' Bank' +
', Worked ' + IntToStr(Players.Worked) + ' minutes, ' +
'Loc: ' + Players.Loc);
Spaces := '';
end
Writeln('<==========================================>');
end;
//—————————————————————–\\
{ LoadImages - Loads the images in the memory ||
\\—————————————————————–//}
procedure LoadImages;
begin
bmpOreMask := BitmapFromString(9, 8, 'z78DA333040076E6080C9C60' +
'F064A17F17A71E9C2AFD70D03E09725DE4CF2DC0F00DCD05C59');
bmpClayMask := BitmapFromString(9, 6, 'z78DA33302016B88101F' +
'12A4905B86CC1AF9E3CB7E1329F787F218B03004FC54795');
bmpGemMask := BitmapFromString(23, 24, 'z78DA3330183EC00D0C686732' +
'F10097AEC1E33BFC2EA77F08936AD7A84B465D428C8DA32E19750' +
'931F68EBA6434B50C45978CCC929F785B68ED1E52CDA76E9B90BA' +
'7E74A3180CFE3E0200FDE18F27');
dtmPaxes[1] := DTMFromString('78DA637463646008664001068A0C0C5C401A2' +
'8C3F01F0818C381AC40543536FE11703520C0E80B6479A0AAF149' +
'2D405103000A07084F'); //Rune
dtmPaxes[2] := DTMFromString('78DA631463646008634001068A0C0C5C401A2' +
'8C3F01F08183580AC405435561E56703520C028076479A0AAF188' +
'F142510300D923076A'); //Addy
dtmPaxes[3] := DTMFromString('78DA637CCEC0C010C680020C141918B880342' +
'310FF0702C69F404620AA1A73F300B81A10607C0F243C50D5B8BA' +
'A7A3A8010086BD09E1'); //Mith
dtmPaxes[4] := DTMFromString('78DA63DCC9C0C010CC80020C141918B880342' +
'310FF0702C653404620AA9ACCA424B81A10603C00243C50D5B4D6' +
'D4A0A801007D560A4B'); //Steel
dtmPaxes[5] := DTMFromString('78DA63EC62606008654001068A0C0C5C409A1' +
'188FF0301E36C202310558DBB93135C0D08304E04121EA86AA242' +
'4250D400003C4908E3'); //Iron
dtmPaxes[6] := DTMFromString('78DA638C62606008634001068A0C0C5C409A1' +
'188FF0301630E901188AAC6D1480EAE0604189380843BAA1A3B2D' +
'0614350000CD0781'); //Bronze
dtmBanker := DTMFromString('78DA636C66626008634001972E5E66F80FA41' +
'981F83F1030B601D5C4A0AAF9F38789810BAA0604189B8850D345' +
'580D00CA7B110D'); //From GuildRaper
dtmBank := DTMFromString('78DA630C64626030614001BBD64F61D000D28' +
'C40FC1F081863816A9C20724C50356FDF32C0D580006334A69A3F' +
'7F9850D58403651C50D5FCFB278CAA260428E348C09C004C3518E' +
'E09C66F172B100300D8741716');
end;
//—————————————————————–\\
{ KeepUpStats - Updates current statistics ||
\\—————————————————————–//}
procedure KeepUpStats;
begin
ProgressReport;
OresMined := OresMined + CountItemBmpMaskTol(bmpOreMask, 5, 5) + CountItemBmpMaskTol(bmpClayMask, 5, 5);
ReportVars[0] := ReportVars[0] + CountItemBmpMaskTol(bmpOreMask, 5, 5) + CountItemBmpMaskTol(bmpClayMask, 5, 5);
GemsReceived := GemsReceived + CountItemBmpMaskTol(bmpGemMask, 5, 5);
ReportVars[3] := ReportVars[3] + CountItemBmpMaskTol(bmpGemMask, 5, 5);
TotalLoads := TotalLoads + 1;
ReportVars[1] := ReportVars[1] + 1;
Players[CurrentPlayer].Banked := Players[CurrentPlayer].Banked + 1;
end;
//—————————————————————–\\
{ SetOreColor - Sets correct OreColor ||
\\—————————————————————–//}
procedure SetOreColor;
begin
case LowerCase(Players[CurrentPlayer].String1) of
'copper' : OreColor := CopperColor;
'tin' : OreColor := TinColor;
'clay' : OreColor := ClayColor;
'iron' : OreColor := IronColor;
'gold' : OreColor := GoldColor;
end;
if(OreColor = 0)then
Writeln('String1 is NOT set properly or color is 0…');
end;
//—————————————————————–\\
{ FindFastRandoms - Finds the randoms fast ||
\\—————————————————————–//}
function FindFastRandoms: Boolean; // By WT-Fakawi.
var
i: Integer;
begin
for I := 1 to 11 do
begin
case I of
1: if FindDead then
Result := True;
2: if FindMod then
Result := True;
3: if FindMime then
Result := True;
4: if FindMaze then
Result := True;
5: if FindQuiz then
Result := True;
6: if FindDemon then
Result := True;
7: begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;
8: begin
if InBlack then
begin
Result := True;
Players[CurrentPlayer].loc := 'InBlack';
Logout;
Exit;
end;
end;
9 : if RC then
Result := True;
10 : if FindFight then
begin
Result := True;
RunTo(RunDir, RunFar);
end;
11: if FindTalk then
Result := True;
end;
Wait(1);
end;
end;
//—————————————————————–\\
{ SumFindPickHeadColor - Gets pickhead colors ||
\\—————————————————————–//}
function SumFindPickHeadColor: Boolean;
var
InvPAxe, WieldPAxe, Ix, Iy, Wx, Wy: integer;
begin
GameTab(4);
for InvPAxe := 1 to 7 do
begin
if(InvPAxe = 7)then
Break;
if(FindDtm(dtmPaxes[InvPAxe], Ix, Iy, MIX1, MIY1, MIX2, MIY2))then
Break;
end;
GameTab(5);
Wait(500);
for WieldPAxe := 1 to 7 do
begin
if(WieldPAxe = 7)then
Break;
if(FindDtm(dtmPaxes[WieldPAxe], Wx, Wy, MIX1, MIY1, MIX2, MIY2))then
Break;
end;
if(InvPAxe = 7)and(WieldPAxe = 7)then
begin
Result := False;
Exit;
end;
if((InvPAxe-WieldPAxe) < 0)then
EquipPick := False
else
EquipPick := True;
Result := true;
if(EquipPick)then
begin
GameTab(5);
hc1 := GetColor(585, 295);
hc2 := GetColor(597, 297);
hc3 := GetColor(594, 296);
hc4 := GetColor(588, 295);
hc5 := GetColor(582, 294);
end else
begin
GameTab(4);
if(Ix > 592)and(Iy > 238)then
Drag(Ix, Iy, 5, 5, 579, 227, 5, 5, true);
FindDtm(dtmPaxes[InvPAxe], Ix, Iy, MIX1, MIY1, MIX2, MIY2);
hc1 := GetColor(587, 216);
hc2 := GetColor(587, 219);
hc3 := GetColor(592, 222);
hc4 := GetColor(584, 216);
hc5 := GetColor(577, 219);
end;
WriteLn('Pick head colors… ' + IntToStr(hc1) + ' ' + IntToStr(hc2) + ' ' +
IntToStr(hc3) + ' ' + IntToStr(hc4) + ' ' + IntToStr(hc5));
end;
//—————————————————————–\\
{ SumFindRoadColor - Finds both road colors on the screen ||
\\—————————————————————–//}
function SumFindRoadColor(FalaColor: Boolean): Integer;
var
arRoadPoints: TPointArray;
GenericColor, a, b: Integer;
arRoughRoadColors, arRoadColors: array of Integer;
WeGotIt: Boolean;
begin
if(FalaColor)then
GenericColor := 6057843
else
GenericColor := 5921377;
ColorToleranceSpeed(2);
SetColorspeed2Modifiers(10.0, 0.03);
FindColorsTolerance(arRoadPoints, GenericColor, MMX1, MMY1, MMX2, MMY2, 50);
ColorToleranceSpeed(1);
arRoughRoadColors := GetColors(arRoadPoints);
for a := 0 to GetArrayLength(arRoughRoadColors) - 1 do
begin
WeGotIt := False;
if(arRoughRoadColors[a] > 5000000)and(arRoughRoadColors[a] < 8000000)then
begin
for b := 0 to GetArrayLength(arRoadColors) - 1 do
begin
if(arRoadColors = arRoughRoadColors[a])then
WeGotIt := True;
end;
if not(WeGotIt)then
begin
if(CountColor(arRoughRoadColors[a], MMX1, MMY1, MMX2, MMY2) > 200)then
begin
Writeln(IntToStr(arRoughRoadColors[a]));
SetArrayLength(arRoadColors, GetArrayLength(arRoadColors) + 1);
arRoadColors[GetArrayLength(arRoadColors) - 1] := arRoughRoadColors[a];
end;
end;
end;
end;
if not(GetArrayLength(arRoadColors) = 1)then
begin
Writeln('Failed to find the road using SumFindRoadColor.');
Writeln('Trying default autocoloring.');
if(FalaColor)then
Result := FindFallyRoadColor
else
Result := FindRoadColor;
end else
Result := arRoadColors[0];
Writeln('RoadColor = '+IntToStr(Result));
if(Result = 0)then
begin
Writeln('Failed to find the road color.');
Writeln('Leaving it what it was.');
if(FalaColor)then
Result := FalaRoadColor
else
Result := RoadColor;
end;
end;
function ColorsAtColor(CPoint: TPoint; Color: Integer; Colors: TIntegerArray): Boolean;
var // <3 Wizzup
I: Integer;
begin
if CountColor(Color, CPoint.X - 8, CPoint.Y - 8, CPoint.X + 8, CPoint.Y + 8) > 8 then
begin
for I := 0 to GetArrayLength(Colors) - 1 do
if(CountColor(Colors, CPoint.X - 8, CPoint.Y - 8, CPoint.X + 8, CPoint.Y + 8) > 4)Then
begin
if(Colors <> Color)then
begin
WriteLn('Found Color ' +IntToStr(Colors) + ' too.');
Result := True;
Exit;
end;
end;
end;
end;
function NumInArray(Num: Integer; TheArray: TIntegerArray): Boolean;
var // <3 Wizzup
I, TheArrayLength: Integer;
begin
TheArrayLength := GetArrayLength(TheArray) - 1;
for I := 0 to TheArrayLength do
begin
if Num = TheArray then
begin
Result := True;
Exit;
end;
end;
end;
function ColorsTol(C1, C2: Integer): integer;
var // <3 Wizzup
I : integer;
begin
for I := 0 to 255 do
if SimilarColors(C1, C2, I) then Break;
if I <> 255 then Result := I;
end;
Type
AColor = Record
Color: Integer;
Amount: Integer;
Point: TPoint;
End;
var
Colors: array of AColor;
function GetRockColor: Integer;
var // <3 Wizzup
Points, PosResultsP, PosResults2P: TPointArray;
Found: array of TPointArray;
CColors, PosResults, PosResults2: array of Integer;
I: Integer;
H, S, L: Extended;
begin
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.9, 0.2);
FindColorsTolerance(Points, 5266264, 540, 5, 740, 155, 60);
//WriteLn('P2 Found ' + IntToStr(GetArrayLength(Points)));
CColors := GetColors(Points);
//WriteLn('Colors Found ' + IntToStr(GetArrayLength(CColors)));
SetArrayLength(Colors, GetArrayLength(CColors));
for I := 0 to GetArrayLength(CColors) - 1 do
begin
Colors.Color := CColors;
Colors.Point := Points;
end;
for I := 0 to GetArrayLength(Colors) - 1 do
begin
ColorToHSL(Colors.Color, H, S, L);
//If ((L > 15) And (L < 40) And (S < 50)) Then
if((L > 15)and(L < 40)and(S < 50)and(H > 10)and(H < 95))then
if not NumInArray(Colors.Color, PosResults)then
begin
SetArrayLength(PosResults, GetArrayLength(PosResults) + 1);
PosResults[GetArrayLength(PosResults) - 1] := Colors.Color;
SetArrayLength(PosResultsP, GetArrayLength(PosResultsP) + 1);
PosResultsP[GetArrayLength(PosResultsP) - 1] := Colors.Point;
end;
end;
for I := 0 to GetArrayLength(PosResults) - 1 do
begin
SetArrayLength(Found, GetArraylength(Found) + 1);
FindColorsTolerance(Found, PosResults, 540, 5, 740, 155, 0);
{WriteLn('Possible Colors['+IntToStr(I) + '] F ' +
IntToStr(GetArrayLength(Found)) + ' = '+
IntToStr(PosResults)+ ' With a tol of ' +
IntToStr(ColorsTol(PosResults, 5266264)));}
end;
for I := 0 to GetArrayLength(PosResults) - 1 do
begin
if (GetArrayLength(Found) > 5) and (GetArrayLength(Found) < 400)then
begin
if (ColorsAtColor(PosResultsP, PosResults, PosResults))and
(rs_OnMiniMap(PosResultsP.X, PosResultsP.Y))then
begin
SetArrayLength(PosResults2, GetArrayLength(PosResults2) + 1);
PosResults2[GetArrayLength(PosResults2) - 1] := PosResults;
SetArrayLength(PosResults2P, GetArrayLength(PosResults2P) + 1);
PosResults2P[GetArrayLength(PosResults2P) - 1] := PosResultsP;
end;
end;
end;
for I := 0 to GetArrayLength(PosResults2) - 1 do
begin
ColorToHSL(PosResults2, H, S, L);
{WriteLn('Possible Colors2['+IntToStr(I) + '] F ' +
IntToStr(GetArrayLength(Found)) + ' = '+
IntToStr(PosResults2) + ' H ' + FloatToStr(H) + ' S ' +FloatToStr(S)
+ ' L ' + FloatToStr(L));
Wait(500);}
Result := PosResults;
if(Result > 0)then
Break;
end;
end;
//—————————————————————–\\
{ SumCheckGas - Checks if there is gas ||
\\—————————————————————–//}
function SumCheckGas(rx, ry: Integer): Boolean;
var
TempMouseSpeed, GasTime: Integer;
begin
Result := FindGas(rx, ry - 20);
if(Result)then
begin
Writeln('Gas found!');
TempMouseSpeed := MouseSpeed;
MouseSpeed := 5;
MouseFindNoFlag(MMCX, MMCY + 4, 1, 1);
MarkTime(GasTime);
MouseSpeed := TempMouseSpeed;
while(TimeFromMark(GasTime) < 35000)do
if(Random(20) > 15)then
IdleTime(500, 500, 0.4)
else
Wait(500 + Random(500));
GasAvoided := GasAvoided + 1;
ReportVars[2] := ReportVars[2] + 1;
end;
end;
//—————————————————————–\\
{ getArrayFromBox - Gets colors in groups ||
\\—————————————————————–//}
function getArrayFromBox(arColor: TPointArray; Width, Height: Integer): TPointArray;
var
Count, Count3: Integer;
DoNotAccept : Boolean;
begin
SetArrayLength(Result, 1);
Result[0] := arColor[0];
for Count := 1 to GetArrayLength(arColor) - 1 do
begin
if(arColor[Count].x < arColor[Count - 1].x + Width)and
(arColor[Count].y < arColor[Count - 1].y + Height)and
(arColor[Count].x > arColor[Count - 1].x - Width)and
(arColor[Count].y > arColor[Count - 1].y - Height)then
else
begin
DoNotAccept := False;
for Count3 := 0 to GetArrayLength(Result) - 1 do
begin
if (arColor[Count].x < Result[Count3].x + Width)and
(arColor[Count].y < Result[Count3].y + Height)and
(arColor[Count].x > Result[Count3].x - Width)and
(arColor[Count].y > Result[Count3].y - Height)then
DoNotAccept := True;
if DoNotAccept then
Break;
end;
if (DoNotAccept = False) then
begin
SetArrayLength(Result, GetArrayLength(Result) + 1);
Result[GetArrayLength(Result) - 1] := arColor[Count];
end;
end;
end;
end;
//—————————————————————–\\
{ IsOre - Did we found an ore or a rock ? ||
\\—————————————————————–//}
function IsOre(rx, ry: Integer): Boolean;
begin
Result := FindColorSpiralTolerance(x, y, 4481401, rx - 5, ry - 5, rx + 5, ry + 5, 5);
end;
//—————————————————————–\\
{ FindRockCenter - Finds the rock center ||
\\—————————————————————–//}
function FindRockCenter(var RockPoint: TPoint; RockColor, BoxSize, RockMinimum: Integer): Boolean;
var
c, MaxTime: Integer;
arRoughRockPoints, arRockPoints: TPointArray;
begin
FindColorsSpiralTolerance(MSCX, MSCY, arRoughRockPoints, RockColor, MSX1, MSY1, MSX2, MSY2, 5);
if(GetArrayLength(arRoughRockPoints) < 1)then
Exit;
MarkTime(MaxTime);
for c := 0 to GetArrayLength(arRoughRockPoints) - 1 do
begin
if not(IsOre(arRoughRockPoints[c].x, arRoughRockPoints[c].y))then
begin
RockPoint.x := 0;
RockPoint.y := 0;
ColorToleranceSpeed(2);
SetColorspeed2Modifiers(0.4, 0.4);
FindColorsTolerance(arRockPoints, 940676, arRoughRockPoints[c].x - BoxSize, arRoughRockPoints[c].y - BoxSize, arRoughRockPoints[c].x + BoxSize, arRoughRockPoints[c].y + BoxSize, 3);
for a := 0 to GetArrayLength(arRockPoints) - 1 do
begin
RockPoint.x := RockPoint.x + arRockPoints[a].x;
RockPoint.y := RockPoint.y + arRockPoints[a].y;
end;
if(GetArrayLength(arRockPoints) <> 0)and
(RockPoint.x <> 0)and(RockPoint.y <> 0)then
begin
RockPoint.x := RockPoint.x / GetArrayLength(arRockPoints);
RockPoint.y := RockPoint.y / GetArrayLength(arRockPoints);
MMouse(RockPoint.x, RockPoint.y, 5, 5);
ColorToleranceSpeed(1);
Result := (GetArrayLength(arRockPoints) > RockMinimum)and
(IsUpText('Mine'));
end;
if(Result)or(TimeFromMark(MaxTime) > 5000)then
Break;
Wait(100);
end;
end;
end;
//—————————————————————–\\
{ FindRockCenterBetter - Gets the center using a coordinate ||
\\—————————————————————–//}
function FindRockCenterBetter(var RockPoint: TPoint; rx, ry, BoxSize, RockMinimum: Integer): Boolean;
var
fx, fy: Integer;
arRockPoints: TPointArray;
begin
if not(FindColorSpiralTolerance(fx, fy, 940676, rx - 5, ry - 5, rx + 5, ry + 5, 5))then
begin
fx := rx;
fy := ry;
end;
RockPoint.x := 0;
RockPoint.y := 0;
ColorToleranceSpeed(2);
SetColorspeed2Modifiers(0.4, 0.4);
FindColorsTolerance(arRockPoints, 940676, fx - BoxSize, fy - BoxSize, fx + BoxSize, fy + BoxSize, 3);
for a := 0 to GetArrayLength(arRockPoints) - 1 do
begin
RockPoint.x := RockPoint.x + arRockPoints[a].x;
RockPoint.y := RockPoint.y + arRockPoints[a].y;
end;
if(GetArrayLength(arRockPoints) <> 0)and
(RockPoint.x <> 0)and(RockPoint.y <> 0)then
begin
RockPoint.x := RockPoint.x / GetArrayLength(arRockPoints);
RockPoint.y := RockPoint.y / GetArrayLength(arRockPoints);
Result := GetArrayLength(arRockPoints) > RockMinimum;
end;
ColorToleranceSpeed(1);
end;
//—————————————————————–\\
{ RockGone - Did we lost the rock ? ||
\\—————————————————————–//}
function RockGone(rx, ry: Integer): Boolean;
begin
Result := not FindColorSpiralTolerance(rx, ry, OreColor, rx - 10, ry - 10, rx + 10, ry + 10, 10);
end;
//—————————————————————–\\
{ GetNewPick - Goes to get a new pick from the bank ||
\\—————————————————————–//}
procedure MineToBank; forward;
procedure BankToMine; forward;
procedure SLBank(WithdrawNewPick: Boolean); forward;
procedure GetNewPick;
begin
MineToBank;
SLBank(True);
BankToMine;
end;
//—————————————————————–\\
{ WorkUntilMined - Loops until we're done mining ||
\\—————————————————————–//}
procedure WorkUntilMined(wx, wy, InvSpot: Integer);
var
i, MineTime: Integer;
begin
MarkTime(MineTime);
while(LoggedIn)do
begin
for i := 0 to 6 do
begin
case i of
0 : if not(FindPick)then
begin
Writeln('We lost our pick axe.');
Break;
end;
1 : if(FindFastRandoms)then
Break;
2 : if(SumCheckGas(wx, wy))then
Break;
3 : if(ExistsItem(InvSpot))then
Exit;
4 : if(RockGone(wx, wy))then
Exit;
5 : if(TimeFromMark(MineTime) > MaxSecRock * 1000)then
Exit;
6 : if(NoPick)then
GetNewPick;
end;
Wait(1);
end;
if(Random(100) > 90)then
IdleTime(500, 500, 0.4);
end;
PlaySound('C:\WINDOWS\Media\winAquariumCritStop.wav');
end;
//—————————————————————–\\
{ UpdateRockCoord - Updates the coord of the rock ||
\\—————————————————————–//}
function UpdateRockCoord(var ux, uy: Integer; UColor: Integer): Boolean;
var
FailSafeTime, i: Integer;
RockPoint: TPoint;
begin
if not(FlagPresent)then
begin
Result := True;
Exit;
end;
MarkTime(FailSafeTime);
while(FindColorSpiralTolerance(ux, uy, UColor, ux - 20, uy - 20, ux + 20, uy + 20, 10))and
(TimeFromMark(FailSafeTime) < 20000)and
(FlagPresent)do
begin
Result := FindRockCenterBetter(RockPoint, ux, uy, BoxSize, MinCount);
Wait(16);
ux := RockPoint.x;
uy := RockPoint.y;
end;
for i := 0 to 62 do
begin
Result := FindRockCenterBetter(RockPoint, ux, uy, BoxSize, MinCount);
Wait(8);
ux := RockPoint.x;
uy := RockPoint.y;
end;
end;
//—————————————————————–\\
{ SumMine - Mines the rock ||
\\—————————————————————–//}
function SumMine: Boolean;
var
rx, ry, InvSpot: Integer;
RockPoint: TPoint;
begin
Result := FindRockCenter(RockPoint, OreColor, BoxSize, MinCount);
if(Result)then
begin
if(SumCheckGas(RockPoint.x, RockPoint.y))then
Exit;
for InvSpot := 1 to 28 do
if not(ExistsItem(InvSpot))then
Break;
GetMousePos(rx, ry);
if Random (20) < 19 then
Mouse(rx, ry, 0, 0, True)
else begin
Mouse(rx, ry, 0, 0, False);
ChooseOption(x, y, 'Mine');
end;
if not(UpdateRockCoord(RockPoint.x, RockPoint.y, GetColor(RockPoint.x, RockPoint.y)))then
Exit;
WorkUntilMined(RockPoint.x, RockPoint.y, InvSpot);
end;
end;
//—————————————————————–\\
{ GoToCorrectSpot - Goes to the correct spot ||
\\—————————————————————–//}
procedure GoToCorrectSpot;
begin
if(RockColor = 0)then
begin
if(AutoMMRockColor)then
RockColor := GetRockColor
else
RockColor := NormalRockMMColor;
Writeln('RockColor = ' + IntToStr(RockColor));
end;
case OreColor of
TinColor :
begin
RadialWalk(RockColor, 90, 130, 100, -1, -1);
Flag;
end;
IronColor :
begin
RadialWalk(RockColor, 250, 290, 100, 1, 0);
Flag;
end;
ClayColor :
begin
RadialWalk(CopperRockMMColor, 50, 120, 70, 1, 0);
Flag;
end;
GoldColor :
begin
RadialWalk(RockColor, 170, 210, 100, 1, 0);
Flag;
end;
end;
end;
//—————————————————————–\\
{ SumFindBank - Finds falador bankers on MM ||
\\—————————————————————–//}
function SumFindBank(var bx, by: Integer): Boolean;
var
a, b, c, HighestCount: Integer;
arRoughBankCoords, HighestArray: TPointArray;
arBankCoords: array of TPointArray;
WeGotIt: Boolean;
begin
ColorToleranceSpeed(0);
FindColorsTolerance(arRoughBankCoords, 195836, MMX1, MMY1 + 40, MMX2, MMY2, 5);
for a := 0 to GetArrayLength(arRoughBankCoords) - 1 do
begin
WeGotIt := False;
for b := 0 to GetArrayLength(arBankCoords) - 1 do
begin
for c := 0 to GetArrayLength(arBankCoords) - 1 do
begin
if(arRoughBankCoords[a].y > arBankCoords[c].y - 5)and
(arRoughBankCoords[a].y < arBankCoords[c].y + 5)then
begin
SetArrayLength(arBankCoords, GetArrayLength(arBankCoords) + 1);
arBankCoords[GetArrayLength(arBankCoords) - 1] := arRoughBankCoords[a];
WeGotIt := True;
Break;
end;
end;
end;
if not(WeGotIt)then
begin
SetArrayLength(arBankCoords, GetArrayLength(arBankCoords) + 1);
SetArrayLength(arBankCoords[GetArrayLength(arBankCoords) - 1], GetArrayLength(arBankCoords[GetArrayLength(arBankCoords) - 1]) + 1);
arBankCoords[GetArrayLength(arBankCoords) - 1][0] := arRoughBankCoords[a];
end;
end;
for a := 0 to GetArrayLength(arBankCoords) - 1 do
begin
if(GetArrayLength(arBankCoords[a]) > HighestCount)then
begin
HighestArray := arBankCoords[a];
HighestCount := GetArrayLength(arBankCoords[a]);
end;
end;
if(GetArrayLength(HighestArray) > 15)then
begin
Result := True;
for a := 0 to GetArrayLength(HighestArray) - 1 do
begin
bx := bx + HighestArray[a].x;
by := by + HighestArray[a].y;
end;
bx := bx / GetArrayLength(HighestArray);
by := (by / GetArrayLength(HighestArray)) - 10;
end;
ColorToleranceSpeed(1);
end;
//—————————————————————–\\
{ BankToMine - Walks to the mine ||
\\—————————————————————–//}
procedure BankToMine;
var
MaxTime: Integer;
begin
if not(LoggedIn)then
Exit;
if(FalaRoadColor = 0)or(not(FindColor(x, y, FalaRoadColor, MMX1, MMY1, MMX2, MMY2)))then
FalaRoadColor := SumFindRoadColor(True);
RadialWalk(FalaRoadColor, 210, 250, 70, 0, -1);
FFlag(5);
MarkTime(MaxTime);
repeat;
if not(FindColor(x, y, FalaRoadColor, MMX1, MMY1, MMX2, MMY2))then
FalaRoadColor := SumFindRoadColor(True);
RadialWalk(FalaRoadColor, 160, 210, 40, 0, -1);
FFlag(5);
until((not(FindColor(x, y, FalaRoadColor, MMCX - 20, MMCY + 10, MMX2, MMY2)))and
(FindColor(x, y, FalaRoadColor, MMX1, MMY1, MMX2, MMY2)))or
(TimeFromMark(MaxTime) > 90000);
if(TimeFromMark(MaxTime) > 90000)then
PlayerLost('timed out (1)');
if(RoadColor = 0)or(not(FindColor(x, y, RoadColor, MMX1, MMY1, MMX2, MMY2)))then
RoadColor := SumFindRoadColor(False);
while(not(FindColor(x, y, CopperRockMMColor, MMX1, MMY1, MMX2, MMY2)))and
(TimeFromMark(MaxTime) < 90000)do
begin
if not(RadialRoadWalk(RoadColor, 160, 280, 50, 0, -1))then
RoadColor := SumFindRoadColor(False);
FFlag(5);
end;
if(TimeFromMark(MaxTime) > 90000)then
PlayerLost('timed out (2)');
MouseFindNoFlag(x, y, 0, -1);
Flag;
if not(OreColor = CopperColor)then
begin
if(MiningSiteColor = 1589845)then
begin
MiningSiteColor := GetSymbolColor(x, y, 'mining site');
if(MiningSiteColor = 1589845)then
begin
Writeln('MiningSiteColor not found, terminating.');
TerminateScript;
end else
Writeln('MiningSiteColor = '+IntToStr(MiningSiteColor));
end else
if not(FindColor(x, y, MiningSiteColor, MMX1, MMY1, MMX2, MMY2))then
begin
MouseFindNoFlag(MMCX + 20, MMCY + 20, -1, -1);
Flag;
if not(FindColor(x, y, MiningSiteColor, MMX1, MMY1, MMX2, MMY2))then
begin
PlayerLost('Couldnt''t find the mine.');
Exit;
end;
end;
Mouse(x, y, 10, 10, True);
Flag;
GoToCorrectSpot;
end;
end;
//—————————————————————–\\
{ MineToBank - Walks to the bank ||
\\—————————————————————–//}
procedure MineToBank;
var
MaxTime, bx, by: Integer;
begin
if not(LoggedIn)then
Exit;
if not(OreColor = CopperColor)then
begin
if(MiningSiteColor = 0)then
begin
MiningSiteColor := GetSymbolColor(x, y, 'mining site');
end else
if(FindColor(x, y, MiningSiteColor, MMX1, MMY1, MMX2, MMY2))then
begin
Mouse(x, y, 20, 20, True);
Flag;
if(FindColor(x, y, CopperRockMMColor, MMX1, MMY1, MMX2, MMY2))then
begin
Mouse(x, y, 3, 3, True);
Flag;
end else
PlayerLost('Failed to find the Copper Rock');
end else
PlayerLost('Failed to find the Mining Site Symbol');
end;
MarkTime(MaxTime);
repeat;
if not(RadialRoadWalk(RoadColor, 340, 450, 70, 0, 2))then
begin
Mouse(MMCX, MMCY - 30, 5, 5, True);
RoadColor := SumFindRoadColor(False);
RadialRoadWalk(RoadColor, 340, 450, 70, 0, 2);
Flag;
end else
Break;
FFlag(5);
until(TimeFromMark(MaxTime) > 30000);
if(TimeFromMark(MaxTime) > 30000)then
PlayerLost('timed out (3)');
FFlag(5);
MarkTime(MaxTime);
while((FindColor(x, y, RoadColor, MMX1, MMY1, MMX2, MMCY - 20))or
(not FindColor(x, y, RoadColor, MMX1, MMY1, MMX2, MMY2)))and
(TimeFromMark(MaxTime) < 90000)and
(LoggedIn)do
begin
if not(RadialRoadWalk(RoadColor, 355, 495, 50, 0, -1))then
RoadColor := SumFindRoadColor(False);
FFlag(5);
end;
if(TimeFromMark(MaxTime) > 90000)then
PlayerLost('timed out (4)');
MarkTime(MaxTime);
repeat;
if not(RadialWalk(FalaRoadColor, 330, 380, 40, 0, -1))then
begin
FalaRoadColor := SumFindRoadColor(True);
RadialWalk(FalaRoadColor, 0, 70, 40, -1, 0);
end;
Flag;
Wait(200+Random(200));
until(SumFindBank(bx, by))and
(not(FindColor(x, y, RoadColor, MMX1, MMY1, MMX2, MMY2)))or
(TimeFromMark(MaxTime) > 90000);
Mouse(bx, by, 3, 3, True);
if(TimeFromMark(MaxTime) > 90000)then
PlayerLost('timed out (5)');
Flag;
if(FindDtmRotated(dtmBanker, x, y, MMX1, MMY1, MMX2, MMY2, 0, pi*2, 0.1, AngleVar))then
begin
MouseFindNoFlag(x, y, 1, 0);
Flag;
if(FlagPresent)then
Wait(500 + Random(200));
end;
end;
//————————————————————————\\
{ GetBestPaxe - Finds the best paxe in the bank ||
\\————————————————————————//}
function GetBestPaxe(var x, y : integer) : Boolean;
var
I : integer;
begin
FixBank;
for I := 1 to 7 do
begin
if(I = 7)then
Break;
if(FindDtm(dtmPaxes, x, y, MSX1, MSY1, MSX2, MSY2))then
begin
Result := True;
Break;
end;
end;
if(I = 7)then
begin
CloseBank;
PlayerLost('No Paxe in the bank');
end;
end;
//————————————————————————\\
{ SLOpenBank - Opens the bank, thnx to Lorax, made by me ||
\\————————————————————————//}
function SLOpenBank: Boolean;
var
BankTime, I: Integer;
arBankColor, arBankColorResults: TPointArray;
begin
if LoggedIn then
begin
Wait(500);
MarkTime(BankTime);
while(not(BankScreen))and(TimeFromMark(BankTime) < 20000)do
begin
FindColorsSpiralTolerance(MSCX, MSCY, arBankColor, 4679037, MSX1, MSCY, MSX2, MSY2, 10);
if(GetArrayLength(arBankColor) = 0)then
Break;
arBankColorResults := getArrayFromBox(arBankColor, 40, 40);
for I := 1 to GetArrayLength(arBankColorResults)-1 do
begin
if not(LoggedIn)then Exit;
Flag;
Wait(100 + Random(100));
MMouse(arBankColorResults.x, arBankColorResults.y, 5, 5);
if(IsUpTextMulti('se Ban', 'ank b', 'booth'))then
begin
GetMousePos(x, y);
Mouse(x, y, 2, 2, false);
Wait(100+Random(100));
ChooseOption(x, y, 'uickly');
Wait(100+Random(100));
Flag;
Wait(1000 + Random(500));
end;
if(PinScreen)then
if not(InPin(PinNumber))then
Writeln('Pin Failed.');
if(BankScreen)or(TimeFromMark(BankTime) > 20000)then
Break;
end;
end;
Result := BankScreen;
end;
end;
//————————————————————————\\
{ SLBank - Main banking procedure ||
\\————————————————————————//}
procedure SLBank(WithdrawNewPick: Boolean);
var
dtmOre: Integer;
begin
if LoggedIn then
begin
if(WithdrawNewPick)then
begin
if(InvCount = 28)then
begin
dtmOre := DTMFromString('78DA63DCCBC0C0F08C0105989828C1D9FF818' +
'0711D90F198010D302291407A0F90F84C40CD29207197809AE340' +
'E2157E3500FA360CCF');
if(FindDtm(dtmOre, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, false);
ChooseOption(x, y, 'rop');
end;
FreeDtm(dtmOre);
end;
GameTab(5);
Mouse(591, 304, 10, 10, true);
GameTab(4);
end;
SLOpenBank;
if(not BankScreen)then
begin
if(FindDtmRotated(dtmBanker, x, y, MMX1, MMY1, MMX2, MMY2, 0, pi*2, 0.1, AngleVar))then
begin
MouseFindNoFlag(x, y, 1, 0);
Flag;
if(FlagPresent)then
Wait(500 + Random(200));
end;
if not(OpenBankQuiet('feb'))then
begin
Wait(500);
if not(BankScreen)then
begin
PlayerLost('couldnt open the bank.');
Exit;
end;
end;
end;
FixBank;
if(EquipPick)or(WithdrawNewPick)then
begin
DepositAll;
DepositAll;
end else
Deposit(2, 28, 2);
if(WithdrawNewPick)then
begin
if(GetBestPAxe(x, y))then
begin
Mouse(x, y, 5, 5, true);
Wait(200+Random(300));
end;
end;
CloseBank;
Wait(200+Random(200));
if(BankScreen)then
CloseBank;
if(WithdrawNewPick)then
begin
if(FindColorTolerance(x, y, 876930, MIX1, MIY1, MIX2, MIY2, 10))then
Mouse(x, y, 4, 4, True);
Wait(400 + Random(400));
if not(SumFindPickHeadColor)then
PlayerLost('You dont have an axe');
end;
end;
end;
//—————————————————————–\\
{ TimeToSwitchPlayers - Is it time to switch players ? ||
\\—————————————————————–//}
function TimeToSwitchPlayers: boolean;
begin
if(TimeFromMark(RunTime) / 60 / 1000 > MinutesPerPlayer)then
begin
Result := True;
WriteLn('Time is up');
end else
Result := False;
end;
//—————————————————————–\\
{ Signature - My trade mark :) ||
\\—————————————————————–//}
procedure Signature;
begin
Writeln(' _______ __ __ __');
Writeln(' / _____/__ __ _____ |__| |__| ___ ____');
Writeln(' \___ \| | \/ \| | | |/ _ \/ \');
Writeln(' / \ | / Y Y \ | | ( <_> ) | \');
Writeln('/_____ /____/|__|_| /__|__|__|\___/|__| /');
Writeln(' \/ \/ \/');
Writeln('Scripts Brings You:');
Writeln(' Sumilions Rimmington Miner');
end;
//—————————————————————–\\
{ SetupScript - Sets up the script. ||
\\—————————————————————–//}
procedure SetupScript;
begin
SetupSRL;
SetupSRLMining;
ScriptID := '166';
RCMaster := RemoteMaster;
if(SRLStatsID <> '')then
SRLID := SRLStatsID;
if(SRLStatsPW <> '')then
SRLPassword := SRLStatsPW;
LoadImages;
DeclarePlayers;
MinCount := TheMinCount;
BenMouse := UseBenMouse;
CurrentPlayer := StartPlayer;
ClearDebug;
Signature;
CheckUserNicks;
Wait(500);
ActivateClient;
Wait(500);
end;
//—————————————————————–\\
{ SetupUser - Sets up the current user. ||
\\—————————————————————–//}
procedure SetupUser;
begin
if not(LoggedIn)then
LoginPlayer;
MakeCompass('N');
HighestAngle;
if not(SumFindPickHeadColor)then
begin
Writeln('No PickAxe found…');
Writeln('Make sure your at V-Bright');
LogOut;
end;
GameTab(2);
Players[CurrentPlayer].Level[15] := GetSkillLevel('mining');
PinNumber := Players[CurrentPlayer].String2;
SetOreColor;
GameTab(4);
MarkTime(RunTime);
end;
//—————————————————————–\\
{ MainLine - The magic is down here. ||
\\—————————————————————–//}
begin
SetupScript;
repeat;
SetupUser;
repeat;
BankToMine;
SetRun(True);
while(LoggedIn)and
(not(InvFull))and
(not(TimeToSwitchPlayers))do
begin
if not(SumMine)then
if(Random(100) > 85)then
IdleTime(500, 500, 0.4);
Wait(16);
FindNormalRandoms;
Wait(16);
end;
SetRun(False);
GameTab(4);
MineToBank;
KeepUpStats;
SLBank(False);
PlayerStatus := LoggedIn;
if(TimeToSwitchPlayers)then
LogOut;
until not(LoggedIn);
NextPlayer(PlayerStatus);
until not(Players[CurrentPlayer].Active);
Writeln('All players are false.');
end.
sum1uallno
2007-07-13 21:23:32
Just add the original autominer.
Add new random finder.
Add anitban/mouse continual mover.
Add colors of ore that u want to mine using scars color finder.
Last change path direction as you hit the reminton mine,.
Just read the code and you will absolutely figure it out. Just take the time to over look it carefully. Ill post one here for you but ill let you work on one problem.
I have it set for copper as u walk in! Also it is set for 1 player dont change this unless u know what your doing. One thing you shall work on to learn is the gap between the road and the actuall mine. Take a few moments to figure it out. Then youll be on your way to writing your own. This was not originally made by so i take no credit im creating it.
{===================================================================]
[ Sumilions Rimmington Miner ]
[ ]
[ NAME : Sumilions Rimmington Miner ]
[ WRITER : Sumilion ]
[ CATEGORY : Miner ]
[ DESCRIPTION : Mines in Rimmington, banks in Falador ]
[ USAGE : Start at bankbooth in Falador ]
[ AUTOCOLOR : Partially ]
[ SRL Used : 3.7 (DIVI) ]
[ ]
[ More Scripts can be found at ]
[
www.SRL-Forums.com ]
[===================================================================]
[ Instructions. ]
[===================================================================]
[ 1. USE Runescape with Low Detail, Very Bright. ]
[ 2. Set your Screen to 32 bit TRUE color. ]
[ 3. Setup lines below ]
[ 4. Set CopperRockMMColor (and NormalRockMMColor)!!! ]
[ 5. Set Playernames and Passwords below. ]
[ 6. Have Pick in First invslot or wielded and more in the bank ]
[ 7. Start script Logged Out / Logged in ]
[===================================================================]
[ Credits to : ]
[ Wizzup? –> For the GetRockColor; function. ]
[===================================================================}
program SumilionsRimmingtonMiner;
{.include SRL/SRL.scar}
{.include SRL/SRL/skill/Mining.scar}
//********Color Settings********\\
const
CopperRockMMColor = 5343966; // You HAVE to fill this in, it wont work otherwise.
NormalRockMMColor = 936558; // If below is true, then there is no need to fill this in.
AutoMMRockColor = False; // Use Wizzups MinimapRockColor finder (not adviced)?
//********Player Settings********\\
const
MinutesPerPlayer = 60; // Time in minutes per player
MaxSecRock = 5; // Maximum seconds to wait for a rock
StartPlayer = 0; // With what player do you want to start ?
UseBenMouse = True; // Use BenMouse? (Some people say its good for anti-ban)
RunDir = 'N'; // Direction to run to when in fight
RunFar = True; // Run far when in fight ?
//********Additional Settings********\\
SRLStatsID = ''; // Your SRL ID for the stats (Leave blanc to set it to default, from SetupSRL.scar)
SRLStatsPW = ''; // Your Password for the stats (Leave blanc to set it to default, from SetupSRL.scar)
VersionNumber = '0.13'; // No need to change this
TheMinCount = 5; // No need to change this
BoxSize = 15; // No need to change this
RemoteMaster = 'umil'; // For advanved users only.
//********Player Settings********\\
procedure DeclarePlayers;
begin
HowManyPlayers := 1;//MAKE SURE THIS ONE IS CORRECT!
CurrentPlayer := StartPlayer;
NumberOfPlayers(HowManyPlayers);
Players[0].Name := 'your name here'; // Your Runescape name
Players[0].Pass := 'your pass here'; // The corresponding password
Players[0].Nick := 'three letters from your name here do not use first letter or _ or n's'; // 3-4 letters from your name, NO CAPITALS (that includes the first character)
Players[0].String1 := 'Copper'; // Type of ore to mine (Clay / Copper / Tin / Iron / Gold)
Players[0].String2 := '0000'; // Your BankPinNumber
Players[0].Active := True;
end;
//********RockColor Settings********\\
const
CopperColor = 5343966;
TinColor = 10592685;
ClayColor = 7712718;
IronColor = 2437457;
GoldColor = 1817573;
//********Dont go below unless your more advanced********\\
var
GasAvoided, bmpOreMask, bmpClayMask, RunTime, MinCount,
FalaRoadColor, MiningSiteColor, dtmBanker, dtmBank, RockColor,
a, GemsReceived, OresMined, TotalLoads, bmpGemMask: Integer;
dtmPaxes: array[1..6] of Integer;
PinNumber: string;
AngleVar: Extended;
PlayerStatus: Boolean;
//—————————————————————–\\
{ ProgressReport - Sets up the player array ||
\\—————————————————————–//}
procedure ProgressReport;//Made by Fakawi, i think, edited by me
var
PActive, Spaces: string;
I, K, SpaceNumber: Integer;
begin
SRLRandomsReport;
if Players[CurrentPlayer].Active then
PActive:='True'
else
PActive:='False';
Writeln(' ');
Writeln('<========== RimmingtonMiner ============>');
Writeln('<======= -'+VersionNumber+'- Progress Report ========>');
Writeln('/=======================================\');
Writeln(' Worked for '+ TimeRunning);
Writeln(' Banked '+IntToStr(TotalLoads)+' loads
.');
Writeln(' Mined '+inttostr(OresMined)+(' ores.'));
if(GemsReceived > 0)then
Writeln(' Received '+IntToStr(GemsReceived)+(' gem.'));
if(GasAvoided > 0)then
Writeln(' Avoided gas '+IntToStr(GasAvoided)+(' time.'));
Writeln('\=======================================/');
Writeln(' Name : '+Players[CurrentPlayer].Name);
Writeln(' Mining Lvl : '+IntToStr(Players[CurrentPlayer].Level[15]));
Writeln(' Worked for : '+IntToStr(Players[CurrentPlayer].Worked)+' minutes.');
Writeln(' Banked : '+IntToStr(Players[CurrentPlayer].Banked)+' time.');
Writeln(' Active : '+PActive);
Writeln(' Location : '+Players[CurrentPlayer].Loc);
Writeln('\\————————————-//');
for I := 0 to HowManyPlayers-1 do
begin
if Players.Active then
PActive:='True'
else
PActive:='False';
SpaceNumber := 12 - Length(Players.Name);
for K := 0 to SpaceNumber do
Spaces := Spaces + ' ';
Writeln(IntToStr(I)+': '+Players.Name + Spaces +
'= ' + PActive + ', ' + IntToStr(Players.Banked) + ' Bank' +
', Worked ' + IntToStr(Players.Worked) + ' minutes, ' +
'Loc: ' + Players.Loc);
Spaces := '';
end
Writeln('<==========================================>');
end;
//—————————————————————–\\
{ LoadImages - Loads the images in the memory ||
\\—————————————————————–//}
procedure LoadImages;
begin
bmpOreMask := BitmapFromString(9, 8, 'z78DA333040076E6080C9C60' +
'F064A17F17A71E9C2AFD70D03E09725DE4CF2DC0F00DCD05C59');
bmpClayMask := BitmapFromString(9, 6, 'z78DA33302016B88101F' +
'12A4905B86CC1AF9E3CB7E1329F787F218B03004FC54795');
bmpGemMask := BitmapFromString(23, 24, 'z78DA3330183EC00D0C686732' +
'F10097AEC1E33BFC2EA77F08936AD7A84B465D428C8DA32E19750' +
'931F68EBA6434B50C45978CCC929F785B68ED1E52CDA76E9B90BA' +
'7E74A3180CFE3E0200FDE18F27');
dtmPaxes[1] := DTMFromString('78DA637463646008664001068A0C0C5C401A2' +
'8C3F01F0818C381AC40543536FE11703520C0E80B6479A0AAF149' +
'2D405103000A07084F'); //Rune
dtmPaxes[2] := DTMFromString('78DA631463646008634001068A0C0C5C401A2' +
'8C3F01F08183580AC405435561E56703520C028076479A0AAF188' +
'F142510300D923076A'); //Addy
dtmPaxes[3] := DTMFromString('78DA637CCEC0C010C680020C141918B880342' +
'310FF0702C69F404620AA1A73F300B81A10607C0F243C50D5B8BA' +
'A7A3A8010086BD09E1'); //Mith
dtmPaxes[4] := DTMFromString('78DA63DCC9C0C010CC80020C141918B880342' +
'310FF0702C653404620AA9ACCA424B81A10603C00243C50D5B4D6' +
'D4A0A801007D560A4B'); //Steel
dtmPaxes[5] := DTMFromString('78DA63EC62606008654001068A0C0C5C409A1' +
'188FF0301E36C202310558DBB93135C0D08304E04121EA86AA242' +
'4250D400003C4908E3'); //Iron
dtmPaxes[6] := DTMFromString('78DA638C62606008634001068A0C0C5C409A1' +
'188FF0301630E901188AAC6D1480EAE0604189380843BAA1A3B2D' +
'0614350000CD0781'); //Bronze
dtmBanker := DTMFromString('78DA636C66626008634001972E5E66F80FA41' +
'981F83F1030B601D5C4A0AAF9F38789810BAA0604189B8850D345' +
'580D00CA7B110D'); //From GuildRaper
dtmBank := DTMFromString('78DA630C64626030614001BBD64F61D000D28' +
'C40FC1F081863816A9C20724C50356FDF32C0D580006334A69A3F' +
'7F9850D58403651C50D5FCFB278CAA260428E348C09C004C3518E' +
'E09C66F172B100300D8741716');
end;
//—————————————————————–\\
{ KeepUpStats - Updates current statistics ||
\\—————————————————————–//}
procedure KeepUpStats;
begin
ProgressReport;
OresMined := OresMined + CountItemBmpMaskTol(bmpOreMask, 5, 5) + CountItemBmpMaskTol(bmpClayMask, 5, 5);
ReportVars[0] := ReportVars[0] + CountItemBmpMaskTol(bmpOreMask, 5, 5) + CountItemBmpMaskTol(bmpClayMask, 5, 5);
GemsReceived := GemsReceived + CountItemBmpMaskTol(bmpGemMask, 5, 5);
ReportVars[3] := ReportVars[3] + CountItemBmpMaskTol(bmpGemMask, 5, 5);
TotalLoads := TotalLoads + 1;
ReportVars[1] := ReportVars[1] + 1;
Players[CurrentPlayer].Banked := Players[CurrentPlayer].Banked + 1;
end;
//—————————————————————–\\
{ SetOreColor - Sets correct OreColor ||
\\—————————————————————–//}
procedure SetOreColor;
begin
case LowerCase(Players[CurrentPlayer].String1) of
'copper' : OreColor := CopperColor;
'tin' : OreColor := TinColor;
'clay' : OreColor := ClayColor;
'iron' : OreColor := IronColor;
'gold' : OreColor := GoldColor;
end;
if(OreColor = 0)then
Writeln('String1 is NOT set properly or color is 0…');
end;
//—————————————————————–\\
{ FindFastRandoms - Finds the randoms fast ||
\\—————————————————————–//}
function FindFastRandoms: Boolean; // By WT-Fakawi.
var
i: Integer;
begin
for I := 1 to 11 do
begin
case I of
1: if FindDead then
Result := True;
2: if FindMod then
Result := True;
3: if FindMime then
Result := True;
4: if FindMaze then
Result := True;
5: if FindQuiz then
Result := True;
6: if FindDemon then
Result := True;
7: begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;
8: begin
if InBlack then
begin
Result := True;
Players[CurrentPlayer].loc := 'InBlack';
Logout;
Exit;
end;
end;
9 : if RC then
Result := True;
10 : if FindFight then
begin
Result := True;
RunTo(RunDir, RunFar);
end;
11: if FindTalk then
Result := True;
end;
Wait(1);
end;
end;
//—————————————————————–\\
{ SumFindPickHeadColor - Gets pickhead colors ||
\\—————————————————————–//}
function SumFindPickHeadColor: Boolean;
var
InvPAxe, WieldPAxe, Ix, Iy, Wx, Wy: integer;
begin
GameTab(4);
for InvPAxe := 1 to 7 do
begin
if(InvPAxe = 7)then
Break;
if(FindDtm(dtmPaxes[InvPAxe], Ix, Iy, MIX1, MIY1, MIX2, MIY2))then
Break;
end;
GameTab(5);
Wait(500);
for WieldPAxe := 1 to 7 do
begin
if(WieldPAxe = 7)then
Break;
if(FindDtm(dtmPaxes[WieldPAxe], Wx, Wy, MIX1, MIY1, MIX2, MIY2))then
Break;
end;
if(InvPAxe = 7)and(WieldPAxe = 7)then
begin
Result := False;
Exit;
end;
if((InvPAxe-WieldPAxe) < 0)then
EquipPick := False
else
EquipPick := True;
Result := true;
if(EquipPick)then
begin
GameTab(5);
hc1 := GetColor(585, 295);
hc2 := GetColor(597, 297);
hc3 := GetColor(594, 296);
hc4 := GetColor(588, 295);
hc5 := GetColor(582, 294);
end else
begin
GameTab(4);
if(Ix > 592)and(Iy > 238)then
Drag(Ix, Iy, 5, 5, 579, 227, 5, 5, true);
FindDtm(dtmPaxes[InvPAxe], Ix, Iy, MIX1, MIY1, MIX2, MIY2);
hc1 := GetColor(587, 216);
hc2 := GetColor(587, 219);
hc3 := GetColor(592, 222);
hc4 := GetColor(584, 216);
hc5 := GetColor(577, 219);
end;
WriteLn('Pick head colors… ' + IntToStr(hc1) + ' ' + IntToStr(hc2) + ' ' +
IntToStr(hc3) + ' ' + IntToStr(hc4) + ' ' + IntToStr(hc5));
end;
//—————————————————————–\\
{ SumFindRoadColor - Finds both road colors on the screen ||
\\—————————————————————–//}
function SumFindRoadColor(FalaColor: Boolean): Integer;
var
arRoadPoints: TPointArray;
GenericColor, a, b: Integer;
arRoughRoadColors, arRoadColors: array of Integer;
WeGotIt: Boolean;
begin
if(FalaColor)then
GenericColor := 6057843
else
GenericColor := 5921377;
ColorToleranceSpeed(2);
SetColorspeed2Modifiers(10.0, 0.03);
FindColorsTolerance(arRoadPoints, GenericColor, MMX1, MMY1, MMX2, MMY2, 50);
ColorToleranceSpeed(1);
arRoughRoadColors := GetColors(arRoadPoints);
for a := 0 to GetArrayLength(arRoughRoadColors) - 1 do
begin
WeGotIt := False;
if(arRoughRoadColors[a] > 5000000)and(arRoughRoadColors[a] < 8000000)then
begin
for b := 0 to GetArrayLength(arRoadColors) - 1 do
begin
if(arRoadColors = arRoughRoadColors[a])then
WeGotIt := True;
end;
if not(WeGotIt)then
begin
if(CountColor(arRoughRoadColors[a], MMX1, MMY1, MMX2, MMY2) > 200)then
begin
Writeln(IntToStr(arRoughRoadColors[a]));
SetArrayLength(arRoadColors, GetArrayLength(arRoadColors) + 1);
arRoadColors[GetArrayLength(arRoadColors) - 1] := arRoughRoadColors[a];
end;
end;
end;
end;
if not(GetArrayLength(arRoadColors) = 1)then
begin
Writeln('Failed to find the road using SumFindRoadColor.');
Writeln('Trying default autocoloring.');
if(FalaColor)then
Result := FindFallyRoadColor
else
Result := FindRoadColor;
end else
Result := arRoadColors[0];
Writeln('RoadColor = '+IntToStr(Result));
if(Result = 0)then
begin
Writeln('Failed to find the road color.');
Writeln('Leaving it what it was.');
if(FalaColor)then
Result := FalaRoadColor
else
Result := RoadColor;
end;
end;
function ColorsAtColor(CPoint: TPoint; Color: Integer; Colors: TIntegerArray): Boolean;
var // <3 Wizzup
I: Integer;
begin
if CountColor(Color, CPoint.X - 8, CPoint.Y - 8, CPoint.X + 8, CPoint.Y + 8) > 8 then
begin
for I := 0 to GetArrayLength(Colors) - 1 do
if(CountColor(Colors, CPoint.X - 8, CPoint.Y - 8, CPoint.X + 8, CPoint.Y + 8) > 4)Then
begin
if(Colors <> Color)then
begin
WriteLn('Found Color ' +IntToStr(Colors) + ' too.');
Result := True;
Exit;
end;
end;
end;
end;
function NumInArray(Num: Integer; TheArray: TIntegerArray): Boolean;
var // <3 Wizzup
I, TheArrayLength: Integer;
begin
TheArrayLength := GetArrayLength(TheArray) - 1;
for I := 0 to TheArrayLength do
begin
if Num = TheArray then
begin
Result := True;
Exit;
end;
end;
end;
function ColorsTol(C1, C2: Integer): integer;
var // <3 Wizzup
I : integer;
begin
for I := 0 to 255 do
if SimilarColors(C1, C2, I) then Break;
if I <> 255 then Result := I;
end;
Type
AColor = Record
Color: Integer;
Amount: Integer;
Point: TPoint;
End;
var
Colors: array of AColor;
function GetRockColor: Integer;
var // <3 Wizzup
Points, PosResultsP, PosResults2P: TPointArray;
Found: array of TPointArray;
CColors, PosResults, PosResults2: array of Integer;
I: Integer;
H, S, L: Extended;
begin
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.9, 0.2);
FindColorsTolerance(Points, 5266264, 540, 5, 740, 155, 60);
//WriteLn('P2 Found ' + IntToStr(GetArrayLength(Points)));
CColors := GetColors(Points);
//WriteLn('Colors Found ' + IntToStr(GetArrayLength(CColors)));
SetArrayLength(Colors, GetArrayLength(CColors));
for I := 0 to GetArrayLength(CColors) - 1 do
begin
Colors.Color := CColors;
Colors.Point := Points;
end;
for I := 0 to GetArrayLength(Colors) - 1 do
begin
ColorToHSL(Colors.Color, H, S, L);
//If ((L > 15) And (L < 40) And (S < 50)) Then
if((L > 15)and(L < 40)and(S < 50)and(H > 10)and(H < 95))then
if not NumInArray(Colors.Color, PosResults)then
begin
SetArrayLength(PosResults, GetArrayLength(PosResults) + 1);
PosResults[GetArrayLength(PosResults) - 1] := Colors.Color;
SetArrayLength(PosResultsP, GetArrayLength(PosResultsP) + 1);
PosResultsP[GetArrayLength(PosResultsP) - 1] := Colors.Point;
end;
end;
for I := 0 to GetArrayLength(PosResults) - 1 do
begin
SetArrayLength(Found, GetArraylength(Found) + 1);
FindColorsTolerance(Found, PosResults, 540, 5, 740, 155, 0);
{WriteLn('Possible Colors['+IntToStr(I) + '] F ' +
IntToStr(GetArrayLength(Found)) + ' = '+
IntToStr(PosResults)+ ' With a tol of ' +
IntToStr(ColorsTol(PosResults, 5266264)));}
end;
for I := 0 to GetArrayLength(PosResults) - 1 do
begin
if (GetArrayLength(Found) > 5) and (GetArrayLength(Found) < 400)then
begin
if (ColorsAtColor(PosResultsP, PosResults, PosResults))and
(rs_OnMiniMap(PosResultsP.X, PosResultsP.Y))then
begin
SetArrayLength(PosResults2, GetArrayLength(PosResults2) + 1);
PosResults2[GetArrayLength(PosResults2) - 1] := PosResults;
SetArrayLength(PosResults2P, GetArrayLength(PosResults2P) + 1);
PosResults2P[GetArrayLength(PosResults2P) - 1] := PosResultsP;
end;
end;
end;
for I := 0 to GetArrayLength(PosResults2) - 1 do
begin
ColorToHSL(PosResults2, H, S, L);
{WriteLn('Possible Colors2['+IntToStr(I) + '] F ' +
IntToStr(GetArrayLength(Found)) + ' = '+
IntToStr(PosResults2) + ' H ' + FloatToStr(H) + ' S ' +FloatToStr(S)
+ ' L ' + FloatToStr(L));
Wait(500);}
Result := PosResults;
if(Result > 0)then
Break;
end;
end;
//—————————————————————–\\
{ SumCheckGas - Checks if there is gas ||
\\—————————————————————–//}
function SumCheckGas(rx, ry: Integer): Boolean;
var
TempMouseSpeed, GasTime: Integer;
begin
Result := FindGas(rx, ry - 20);
if(Result)then
begin
Writeln('Gas found!');
TempMouseSpeed := MouseSpeed;
MouseSpeed := 5;
MouseFindNoFlag(MMCX, MMCY + 4, 1, 1);
MarkTime(GasTime);
MouseSpeed := TempMouseSpeed;
while(TimeFromMark(GasTime) < 35000)do
if(Random(20) > 15)then
IdleTime(500, 500, 0.4)
else
Wait(500 + Random(500));
GasAvoided := GasAvoided + 1;
ReportVars[2] := ReportVars[2] + 1;
end;
end;
//—————————————————————–\\
{ getArrayFromBox - Gets colors in groups ||
\\—————————————————————–//}
function getArrayFromBox(arColor: TPointArray; Width, Height: Integer): TPointArray;
var
Count, Count3: Integer;
DoNotAccept : Boolean;
begin
SetArrayLength(Result, 1);
Result[0] := arColor[0];
for Count := 1 to GetArrayLength(arColor) - 1 do
begin
if(arColor[Count].x < arColor[Count - 1].x + Width)and
(arColor[Count].y < arColor[Count - 1].y + Height)and
(arColor[Count].x > arColor[Count - 1].x - Width)and
(arColor[Count].y > arColor[Count - 1].y - Height)then
else
begin
DoNotAccept := False;
for Count3 := 0 to GetArrayLength(Result) - 1 do
begin
if (arColor[Count].x < Result[Count3].x + Width)and
(arColor[Count].y < Result[Count3].y + Height)and
(arColor[Count].x > Result[Count3].x - Width)and
(arColor[Count].y > Result[Count3].y - Height)then
DoNotAccept := True;
if DoNotAccept then
Break;
end;
if (DoNotAccept = False) then
begin
SetArrayLength(Result, GetArrayLength(Result) + 1);
Result[GetArrayLength(Result) - 1] := arColor[Count];
end;
end;
end;
end;
//—————————————————————–\\
{ IsOre - Did we found an ore or a rock ? ||
\\—————————————————————–//}
function IsOre(rx, ry: Integer): Boolean;
begin
Result := FindColorSpiralTolerance(x, y, 4481401, rx - 5, ry - 5, rx + 5, ry + 5, 5);
end;
//—————————————————————–\\
{ FindRockCenter - Finds the rock center ||
\\—————————————————————–//}
function FindRockCenter(var RockPoint: TPoint; RockColor, BoxSize, RockMinimum: Integer): Boolean;
var
c, MaxTime: Integer;
arRoughRockPoints, arRockPoints: TPointArray;
begin
FindColorsSpiralTolerance(MSCX, MSCY, arRoughRockPoints, RockColor, MSX1, MSY1, MSX2, MSY2, 5);
if(GetArrayLength(arRoughRockPoints) < 1)then
Exit;
MarkTime(MaxTime);
for c := 0 to GetArrayLength(arRoughRockPoints) - 1 do
begin
if not(IsOre(arRoughRockPoints[c].x, arRoughRockPoints[c].y))then
begin
RockPoint.x := 0;
RockPoint.y := 0;
ColorToleranceSpeed(2);
SetColorspeed2Modifiers(0.4, 0.4);
FindColorsTolerance(arRockPoints, 940676, arRoughRockPoints[c].x - BoxSize, arRoughRockPoints[c].y - BoxSize, arRoughRockPoints[c].x + BoxSize, arRoughRockPoints[c].y + BoxSize, 3);
for a := 0 to GetArrayLength(arRockPoints) - 1 do
begin
RockPoint.x := RockPoint.x + arRockPoints[a].x;
RockPoint.y := RockPoint.y + arRockPoints[a].y;
end;
if(GetArrayLength(arRockPoints) <> 0)and
(RockPoint.x <> 0)and(RockPoint.y <> 0)then
begin
RockPoint.x := RockPoint.x / GetArrayLength(arRockPoints);
RockPoint.y := RockPoint.y / GetArrayLength(arRockPoints);
MMouse(RockPoint.x, RockPoint.y, 5, 5);
ColorToleranceSpeed(1);
Result := (GetArrayLength(arRockPoints) > RockMinimum)and
(IsUpText('Mine'));
end;
if(Result)or(TimeFromMark(MaxTime) > 5000)then
Break;
Wait(100);
end;
end;
end;
//—————————————————————–\\
{ FindRockCenterBetter - Gets the center using a coordinate ||
\\—————————————————————–//}
function FindRockCenterBetter(var RockPoint: TPoint; rx, ry, BoxSize, RockMinimum: Integer): Boolean;
var
fx, fy: Integer;
arRockPoints: TPointArray;
begin
if not(FindColorSpiralTolerance(fx, fy, 940676, rx - 5, ry - 5, rx + 5, ry + 5, 5))then
begin
fx := rx;
fy := ry;
end;
RockPoint.x := 0;
RockPoint.y := 0;
ColorToleranceSpeed(2);
SetColorspeed2Modifiers(0.4, 0.4);
FindColorsTolerance(arRockPoints, 940676, fx - BoxSize, fy - BoxSize, fx + BoxSize, fy + BoxSize, 3);
for a := 0 to GetArrayLength(arRockPoints) - 1 do
begin
RockPoint.x := RockPoint.x + arRockPoints[a].x;
RockPoint.y := RockPoint.y + arRockPoints[a].y;
end;
if(GetArrayLength(arRockPoints) <> 0)and
(RockPoint.x <> 0)and(RockPoint.y <> 0)then
begin
RockPoint.x := RockPoint.x / GetArrayLength(arRockPoints);
RockPoint.y := RockPoint.y / GetArrayLength(arRockPoints);
Result := GetArrayLength(arRockPoints) > RockMinimum;
end;
ColorToleranceSpeed(1);
end;
//—————————————————————–\\
{ RockGone - Did we lost the rock ? ||
\\—————————————————————–//}
function RockGone(rx, ry: Integer): Boolean;
begin
Result := not FindColorSpiralTolerance(rx, ry, OreColor, rx - 10, ry - 10, rx + 10, ry + 10, 10);
end;
//—————————————————————–\\
{ GetNewPick - Goes to get a new pick from the bank ||
\\—————————————————————–//}
procedure MineToBank; forward;
procedure BankToMine; forward;
procedure SLBank(WithdrawNewPick: Boolean); forward;
procedure GetNewPick;
begin
MineToBank;
SLBank(True);
BankToMine;
end;
//—————————————————————–\\
{ WorkUntilMined - Loops until we're done mining ||
\\—————————————————————–//}
procedure WorkUntilMined(wx, wy, InvSpot: Integer);
var
i, MineTime: Integer;
begin
MarkTime(MineTime);
while(LoggedIn)do
begin
for i := 0 to 6 do
begin
case i of
0 : if not(FindPick)then
begin
Writeln('We lost our pick axe.');
Break;
end;
1 : if(FindFastRandoms)then
Break;
2 : if(SumCheckGas(wx, wy))then
Break;
3 : if(ExistsItem(InvSpot))then
Exit;
4 : if(RockGone(wx, wy))then
Exit;
5 : if(TimeFromMark(MineTime) > MaxSecRock * 1000)then
Exit;
6 : if(NoPick)then
GetNewPick;
end;
Wait(1);
end;
if(Random(100) > 90)then
IdleTime(500, 500, 0.4);
end;
PlaySound('C:\WINDOWS\Media\winAquariumCritStop.wav');
end;
//—————————————————————–\\
{ UpdateRockCoord - Updates the coord of the rock ||
\\—————————————————————–//}
function UpdateRockCoord(var ux, uy: Integer; UColor: Integer): Boolean;
var
FailSafeTime, i: Integer;
RockPoint: TPoint;
begin
if not(FlagPresent)then
begin
Result := True;
Exit;
end;
MarkTime(FailSafeTime);
while(FindColorSpiralTolerance(ux, uy, UColor, ux - 20, uy - 20, ux + 20, uy + 20, 10))and
(TimeFromMark(FailSafeTime) < 20000)and
(FlagPresent)do
begin
Result := FindRockCenterBetter(RockPoint, ux, uy, BoxSize, MinCount);
Wait(16);
ux := RockPoint.x;
uy := RockPoint.y;
end;
for i := 0 to 62 do
begin
Result := FindRockCenterBetter(RockPoint, ux, uy, BoxSize, MinCount);
Wait(8);
ux := RockPoint.x;
uy := RockPoint.y;
end;
end;
//—————————————————————–\\
{ SumMine - Mines the rock ||
\\—————————————————————–//}
function SumMine: Boolean;
var
rx, ry, InvSpot: Integer;
RockPoint: TPoint;
begin
Result := FindRockCenter(RockPoint, OreColor, BoxSize, MinCount);
if(Result)then
begin
if(SumCheckGas(RockPoint.x, RockPoint.y))then
Exit;
for InvSpot := 1 to 28 do
if not(ExistsItem(InvSpot))then
Break;
GetMousePos(rx, ry);
if Random (20) < 19 then
Mouse(rx, ry, 0, 0, True)
else begin
Mouse(rx, ry, 0, 0, False);
ChooseOption(x, y, 'Mine');
end;
if not(UpdateRockCoord(RockPoint.x, RockPoint.y, GetColor(RockPoint.x, RockPoint.y)))then
Exit;
WorkUntilMined(RockPoint.x, RockPoint.y, InvSpot);
end;
end;
//—————————————————————–\\
{ GoToCorrectSpot - Goes to the correct spot ||
\\—————————————————————–//}
procedure GoToCorrectSpot;
begin
if(RockColor = 0)then
begin
if(AutoMMRockColor)then
RockColor := GetRockColor
else
RockColor := NormalRockMMColor;
Writeln('RockColor = ' + IntToStr(RockColor));
end;
case OreColor of
TinColor :
begin
RadialWalk(RockColor, 90, 130, 100, -1, -1);
Flag;
end;
IronColor :
begin
RadialWalk(RockColor, 250, 290, 100, 1, 0);
Flag;
end;
ClayColor :
begin
RadialWalk(CopperRockMMColor, 50, 120, 70, 1, 0);
Flag;
end;
GoldColor :
begin
RadialWalk(RockColor, 170, 210, 100, 1, 0);
Flag;
end;
end;
end;
//—————————————————————–\\
{ SumFindBank - Finds falador bankers on MM ||
\\—————————————————————–//}
function SumFindBank(var bx, by: Integer): Boolean;
var
a, b, c, HighestCount: Integer;
arRoughBankCoords, HighestArray: TPointArray;
arBankCoords: array of TPointArray;
WeGotIt: Boolean;
begin
ColorToleranceSpeed(0);
FindColorsTolerance(arRoughBankCoords, 195836, MMX1, MMY1 + 40, MMX2, MMY2, 5);
for a := 0 to GetArrayLength(arRoughBankCoords) - 1 do
begin
WeGotIt := False;
for b := 0 to GetArrayLength(arBankCoords) - 1 do
begin
for c := 0 to GetArrayLength(arBankCoords) - 1 do
begin
if(arRoughBankCoords[a].y > arBankCoords[c].y - 5)and
(arRoughBankCoords[a].y < arBankCoords[c].y + 5)then
begin
SetArrayLength(arBankCoords, GetArrayLength(arBankCoords) + 1);
arBankCoords[GetArrayLength(arBankCoords) - 1] := arRoughBankCoords[a];
WeGotIt := True;
Break;
end;
end;
end;
if not(WeGotIt)then
begin
SetArrayLength(arBankCoords, GetArrayLength(arBankCoords) + 1);
SetArrayLength(arBankCoords[GetArrayLength(arBankCoords) - 1], GetArrayLength(arBankCoords[GetArrayLength(arBankCoords) - 1]) + 1);
arBankCoords[GetArrayLength(arBankCoords) - 1][0] := arRoughBankCoords[a];
end;
end;
for a := 0 to GetArrayLength(arBankCoords) - 1 do
begin
if(GetArrayLength(arBankCoords[a]) > HighestCount)then
begin
HighestArray := arBankCoords[a];
HighestCount := GetArrayLength(arBankCoords[a]);
end;
end;
if(GetArrayLength(HighestArray) > 15)then
begin
Result := True;
for a := 0 to GetArrayLength(HighestArray) - 1 do
begin
bx := bx + HighestArray[a].x;
by := by + HighestArray[a].y;
end;
bx := bx / GetArrayLength(HighestArray);
by := (by / GetArrayLength(HighestArray)) - 10;
end;
ColorToleranceSpeed(1);
end;
//—————————————————————–\\
{ BankToMine - Walks to the mine ||
\\—————————————————————–//}
procedure BankToMine;
var
MaxTime: Integer;
begin
if not(LoggedIn)then
Exit;
if(FalaRoadColor = 0)or(not(FindColor(x, y, FalaRoadColor, MMX1, MMY1, MMX2, MMY2)))then
FalaRoadColor := SumFindRoadColor(True);
RadialWalk(FalaRoadColor, 210, 250, 70, 0, -1);
FFlag(5);
MarkTime(MaxTime);
repeat;
if not(FindColor(x, y, FalaRoadColor, MMX1, MMY1, MMX2, MMY2))then
FalaRoadColor := SumFindRoadColor(True);
RadialWalk(FalaRoadColor, 160, 210, 40, 0, -1);
FFlag(5);
until((not(FindColor(x, y, FalaRoadColor, MMCX - 20, MMCY + 10, MMX2, MMY2)))and
(FindColor(x, y, FalaRoadColor, MMX1, MMY1, MMX2, MMY2)))or
(TimeFromMark(MaxTime) > 90000);
if(TimeFromMark(MaxTime) > 90000)then
PlayerLost('timed out (1)');
if(RoadColor = 0)or(not(FindColor(x, y, RoadColor, MMX1, MMY1, MMX2, MMY2)))then
RoadColor := SumFindRoadColor(False);
while(not(FindColor(x, y, CopperRockMMColor, MMX1, MMY1, MMX2, MMY2)))and
(TimeFromMark(MaxTime) < 90000)do
begin
if not(RadialRoadWalk(RoadColor, 160, 280, 50, 0, -1))then
RoadColor := SumFindRoadColor(False);
FFlag(5);
end;
if(TimeFromMark(MaxTime) > 90000)then
PlayerLost('timed out (2)');
MouseFindNoFlag(x, y, 0, -1);
Flag;
if not(OreColor = CopperColor)then
begin
if(MiningSiteColor = 1589845)then
begin
MiningSiteColor := GetSymbolColor(x, y, 'mining site');
if(MiningSiteColor = 1589845)then
begin
Writeln('MiningSiteColor not found, terminating.');
TerminateScript;
end else
Writeln('MiningSiteColor = '+IntToStr(MiningSiteColor));
end else
if not(FindColor(x, y, MiningSiteColor, MMX1, MMY1, MMX2, MMY2))then
begin
MouseFindNoFlag(MMCX + 20, MMCY + 20, -1, -1);
Flag;
if not(FindColor(x, y, MiningSiteColor, MMX1, MMY1, MMX2, MMY2))then
begin
PlayerLost('Couldnt''t find the mine.');
Exit;
end;
end;
Mouse(x, y, 10, 10, True);
Flag;
GoToCorrectSpot;
end;
end;
//—————————————————————–\\
{ MineToBank - Walks to the bank ||
\\—————————————————————–//}
procedure MineToBank;
var
MaxTime, bx, by: Integer;
begin
if not(LoggedIn)then
Exit;
if not(OreColor = CopperColor)then
begin
if(MiningSiteColor = 0)then
begin
MiningSiteColor := GetSymbolColor(x, y, 'mining site');
end else
if(FindColor(x, y, MiningSiteColor, MMX1, MMY1, MMX2, MMY2))then
begin
Mouse(x, y, 20, 20, True);
Flag;
if(FindColor(x, y, CopperRockMMColor, MMX1, MMY1, MMX2, MMY2))then
begin
Mouse(x, y, 3, 3, True);
Flag;
end else
PlayerLost('Failed to find the Copper Rock');
end else
PlayerLost('Failed to find the Mining Site Symbol');
end;
MarkTime(MaxTime);
repeat;
if not(RadialRoadWalk(RoadColor, 340, 450, 70, 0, 2))then
begin
Mouse(MMCX, MMCY - 30, 5, 5, True);
RoadColor := SumFindRoadColor(False);
RadialRoadWalk(RoadColor, 340, 450, 70, 0, 2);
Flag;
end else
Break;
FFlag(5);
until(TimeFromMark(MaxTime) > 30000);
if(TimeFromMark(MaxTime) > 30000)then
PlayerLost('timed out (3)');
FFlag(5);
MarkTime(MaxTime);
while((FindColor(x, y, RoadColor, MMX1, MMY1, MMX2, MMCY - 20))or
(not FindColor(x, y, RoadColor, MMX1, MMY1, MMX2, MMY2)))and
(TimeFromMark(MaxTime) < 90000)and
(LoggedIn)do
begin
if not(RadialRoadWalk(RoadColor, 355, 495, 50, 0, -1))then
RoadColor := SumFindRoadColor(False);
FFlag(5);
end;
if(TimeFromMark(MaxTime) > 90000)then
PlayerLost('timed out (4)');
MarkTime(MaxTime);
repeat;
if not(RadialWalk(FalaRoadColor, 330, 380, 40, 0, -1))then
begin
FalaRoadColor := SumFindRoadColor(True);
RadialWalk(FalaRoadColor, 0, 70, 40, -1, 0);
end;
Flag;
Wait(200+Random(200));
until(SumFindBank(bx, by))and
(not(FindColor(x, y, RoadColor, MMX1, MMY1, MMX2, MMY2)))or
(TimeFromMark(MaxTime) > 90000);
Mouse(bx, by, 3, 3, True);
if(TimeFromMark(MaxTime) > 90000)then
PlayerLost('timed out (5)');
Flag;
if(FindDtmRotated(dtmBanker, x, y, MMX1, MMY1, MMX2, MMY2, 0, pi*2, 0.1, AngleVar))then
begin
MouseFindNoFlag(x, y, 1, 0);
Flag;
if(FlagPresent)then
Wait(500 + Random(200));
end;
end;
//————————————————————————\\
{ GetBestPaxe - Finds the best paxe in the bank ||
\\————————————————————————//}
function GetBestPaxe(var x, y : integer) : Boolean;
var
I : integer;
begin
FixBank;
for I := 1 to 7 do
begin
if(I = 7)then
Break;
if(FindDtm(dtmPaxes, x, y, MSX1, MSY1, MSX2, MSY2))then
begin
Result := True;
Break;
end;
end;
if(I = 7)then
begin
CloseBank;
PlayerLost('No Paxe in the bank');
end;
end;
//————————————————————————\\
{ SLOpenBank - Opens the bank, thnx to Lorax, made by me ||
\\————————————————————————//}
function SLOpenBank: Boolean;
var
BankTime, I: Integer;
arBankColor, arBankColorResults: TPointArray;
begin
if LoggedIn then
begin
Wait(500);
MarkTime(BankTime);
while(not(BankScreen))and(TimeFromMark(BankTime) < 20000)do
begin
FindColorsSpiralTolerance(MSCX, MSCY, arBankColor, 4679037, MSX1, MSCY, MSX2, MSY2, 10);
if(GetArrayLength(arBankColor) = 0)then
Break;
arBankColorResults := getArrayFromBox(arBankColor, 40, 40);
for I := 1 to GetArrayLength(arBankColorResults)-1 do
begin
if not(LoggedIn)then Exit;
Flag;
Wait(100 + Random(100));
MMouse(arBankColorResults.x, arBankColorResults.y, 5, 5);
if(IsUpTextMulti('se Ban', 'ank b', 'booth'))then
begin
GetMousePos(x, y);
Mouse(x, y, 2, 2, false);
Wait(100+Random(100));
ChooseOption(x, y, 'uickly');
Wait(100+Random(100));
Flag;
Wait(1000 + Random(500));
end;
if(PinScreen)then
if not(InPin(PinNumber))then
Writeln('Pin Failed.');
if(BankScreen)or(TimeFromMark(BankTime) > 20000)then
Break;
end;
end;
Result := BankScreen;
end;
end;
//————————————————————————\\
{ SLBank - Main banking procedure ||
\\————————————————————————//}
procedure SLBank(WithdrawNewPick: Boolean);
var
dtmOre: Integer;
begin
if LoggedIn then
begin
if(WithdrawNewPick)then
begin
if(InvCount = 28)then
begin
dtmOre := DTMFromString('78DA63DCCBC0C0F08C0105989828C1D9FF818' +
'0711D90F198010D302291407A0F90F84C40CD29207197809AE340' +
'E2157E3500FA360CCF');
if(FindDtm(dtmOre, x, y, MIX1, MIY1, MIX2, MIY2))then
begin
Mouse(x, y, 5, 5, false);
ChooseOption(x, y, 'rop');
end;
FreeDtm(dtmOre);
end;
GameTab(5);
Mouse(591, 304, 10, 10, true);
GameTab(4);
end;
SLOpenBank;
if(not BankScreen)then
begin
if(FindDtmRotated(dtmBanker, x, y, MMX1, MMY1, MMX2, MMY2, 0, pi*2, 0.1, AngleVar))then
begin
MouseFindNoFlag(x, y, 1, 0);
Flag;
if(FlagPresent)then
Wait(500 + Random(200));
end;
if not(OpenBankQuiet('feb'))then
begin
Wait(500);
if not(BankScreen)then
begin
PlayerLost('couldnt open the bank.');
Exit;
end;
end;
end;
FixBank;
if(EquipPick)or(WithdrawNewPick)then
begin
DepositAll;
DepositAll;
end else
Deposit(2, 28, 2);
if(WithdrawNewPick)then
begin
if(GetBestPAxe(x, y))then
begin
Mouse(x, y, 5, 5, true);
Wait(200+Random(300));
end;
end;
CloseBank;
Wait(200+Random(200));
if(BankScreen)then
CloseBank;
if(WithdrawNewPick)then
begin
if(FindColorTolerance(x, y, 876930, MIX1, MIY1, MIX2, MIY2, 10))then
Mouse(x, y, 4, 4, True);
Wait(400 + Random(400));
if not(SumFindPickHeadColor)then
PlayerLost('You dont have an axe');
end;
end;
end;
//—————————————————————–\\
{ TimeToSwitchPlayers - Is it time to switch players ? ||
\\—————————————————————–//}
function TimeToSwitchPlayers: boolean;
begin
if(TimeFromMark(RunTime) / 60 / 1000 > MinutesPerPlayer)then
begin
Result := True;
WriteLn('Time is up');
end else
Result := False;
end;
//—————————————————————–\\
{ Signature - My trade mark :) ||
\\—————————————————————–//}
procedure Signature;
begin
Writeln(' _______ __ __ __');
Writeln(' / _____/__ __ _____ |__| |__| ___ ____');
Writeln(' \___ \| | \/ \| | | |/ _ \/ \');
Writeln(' / \ | / Y Y \ | | ( <_> ) | \');
Writeln('/_____ /____/|__|_| /__|__|__|\___/|__| /');
Writeln(' \/ \/ \/');
Writeln('Scripts Brings You:');
Writeln(' Sumilions Rimmington Miner');
end;
//—————————————————————–\\
{ SetupScript - Sets up the script. ||
\\—————————————————————–//}
procedure SetupScript;
begin
SetupSRL;
SetupSRLMining;
ScriptID := '166';
RCMaster := RemoteMaster;
if(SRLStatsID <> '')then
SRLID := SRLStatsID;
if(SRLStatsPW <> '')then
SRLPassword := SRLStatsPW;
LoadImages;
DeclarePlayers;
MinCount := TheMinCount;
BenMouse := UseBenMouse;
CurrentPlayer := StartPlayer;
ClearDebug;
Signature;
CheckUserNicks;
Wait(500);
ActivateClient;
Wait(500);
end;
//—————————————————————–\\
{ SetupUser - Sets up the current user. ||
\\—————————————————————–//}
procedure SetupUser;
begin
if not(LoggedIn)then
LoginPlayer;
MakeCompass('N');
HighestAngle;
if not(SumFindPickHeadColor)then
begin
Writeln('No PickAxe found…');
Writeln('Make sure your at V-Bright');
LogOut;
end;
GameTab(2);
Players[CurrentPlayer].Level[15] := GetSkillLevel('mining');
PinNumber := Players[CurrentPlayer].String2;
SetOreColor;
GameTab(4);
MarkTime(RunTime);
end;
//—————————————————————–\\
{ MainLine - The magic is down here. ||
\\—————————————————————–//}
begin
SetupScript;
repeat;
SetupUser;
repeat;
BankToMine;
SetRun(True);
while(LoggedIn)and
(not(InvFull))and
(not(TimeToSwitchPlayers))do
begin
if not(SumMine)then
if(Random(100) > 85)then
IdleTime(500, 500, 0.4);
Wait(16);
FindNormalRandoms;
Wait(16);
end;
SetRun(False);
GameTab(4);
MineToBank;
KeepUpStats;
SLBank(False);
PlayerStatus := LoggedIn;
if(TimeToSwitchPlayers)then
LogOut;
until not(LoggedIn);
NextPlayer(PlayerStatus);
until not(Players[CurrentPlayer].Active);
Writeln('All players are false.');
end.
99percent
2007-07-14 20:24:53
ill post a progress report if you update it!!!
CatastrophicDesire
2007-07-18 19:23:01
…Does sumilion know you just posted his rimmy miner???
NewToAutoing
2007-07-19 09:24:35
Could somebody please edit that, or at least put it in scar tags? -.-
I don't know what you were trying to tell me, but whatever it was you definitely didn't need to put Sumillion's miner on my thread. Twice. It sounds like you're trying to tell me to learn/figure something out? That's funny, honestly. I didn't stop working on the script because i'm stuck, i stopped because i was busy and had other things going on. It's kind of ironic that on the same day i found some spare time and felt like working on it, i find this O_o. Anyway, please edit your post, as it's pointless and long, and if i wanted to look at Sumillion's miner for ideas, i very easily could. As it's in this very same forum, don't you know? :p
Mr. Doctor
2007-07-28 00:08:47
I tested it tonight, ill post the progg tomorow.
Drako925
2007-08-24 06:33:12
when i did it it went in to runescape then the mouse automatically went up and clicked on rules
tdogg
2007-08-26 22:55:35
the script logs me in then ."ERROR! cannot find pick in screen, please put pick in inventory or your equip page and restart the script!" i have a bronze pick in my invetory. any ideas. pm me
groaning dragon
2007-08-27 02:02:47
How do i get a free srl download?