SRL Archive - MSI Archives

Multiple Miner & Smither


Daniel

2008-03-14 21:51:51

This will mine and smith at multiple locations. These positions are available:
  • Walking
  • Banking
  • Mining Procedures
  • Smithing Procedures

I am doing the walking and a bit of the banking but i need more people.

Positions:
Walking:
  • IP-Drowner - Mining Guild
  • Mylesmadness - Varrock West & East
  • Cazax - Dwarven Mines
  • XcanadamanX - Varrock West & East and Al-Kharid for smithing. Walk to and from bank.

Banking:
  • IP-Drowner
  • hermpie

Mining and Smithing:
  • NaumanAkhlaQ
  • XcanadamanX
  • Special Ed

Form Specialists:

Submit your details to help me out. I want this to be a community project. ;)

EDIT: I need this script to have at least 5 mining procedures and 2 different walking styles so it is more human . ;)

Santa_Clause

2008-03-14 21:59:41

Already enough projects being done at the moment…in my opinion.

oliver1205

2008-03-14 23:27:09

From: Santa_Clause
Already enough projects being done at the moment…in my opinion.


theres only one being done? the varrok thing. and it doesnt look like its going any where

Daniel

2008-03-15 00:23:36

From: oliver1205
theres only one being done? the varrok thing. and it doesnt look like its going any where

That's exactly why i wanted to start a new one ;)

Special Ed

2008-03-15 01:12:20

Is this going to have set locations where it can mine or is it just going to wander towards some specific areas and mine whatever it finds. In any case I think FindRocks is pretty covered with FindBlobs… by Benland… I think IDK its been a while.

As for walking even though your doing it I think you should establish some areas it will be mining and where people need to work on what.

EDIT: F2P?

Daniel

2008-03-15 02:02:16

From: Special Ed
Is this going to have set locations where it can mine or is it just going to wander towards some specific areas and mine whatever it finds. In any case I think FindRocks is pretty covered with FindBlobs… by Benland… I think IDK its been a while.

As for walking even though your doing it I think you should establish some areas it will be mining and where people need to work on what.

EDIT: F2P?

I was hoping that other members could help. This is going to be for F2P and P2P, but i am not a member. It will have set locations such as Varrock East, Varrock West, Falador Guild, Dwarven Mines etc.

Santa_Clause

2008-03-15 02:53:05

What's the point of starting another project if one isn't finished?

Daniel

2008-03-15 03:34:57

But the other one seems to have lost the leader (Macrosoft).

Naum

2008-03-15 05:24:40

True ill do the mining Procedures. And I hope santy and I can work on the form :)

MylesMadness

2008-03-15 08:11:54

I'm p2p so I can help with walking as long as its not rrw as I couldn't make a rrw that works to save my life. walkpath ftw

ShowerThoughts

2008-03-15 10:05:38

ill do teh Banking :D

Cazax

2008-03-15 11:15:53

I could to help with the walking :)

i can make something:

if WalkPath(0) then
begin
//FFlag(5)
FFlag(0)
end else
begin
if RadialWalk(bla) then
begin
//FFlag(5)
FFlag(0)
end else
begin
if rrw(bla) then
begin
// FFlag(5)
FFLag(0)
end else
begin
Writeln('We arent at varrock');// or anything else
NextPlayer(False);
end;
end;
end;

also, i can add some DDTM's to the walking.

I added the FFLag(0) becouse WalkPath, rrw and RadialWalk have FFlag(10) inside them.

Special Ed

2008-03-15 12:19:29

Remember we still have the SvN to share materials. Also for the smithing are you just talking about the smelting portion of it or do you plan on having the script make all the bars into something? Maybe an option?

Naum

2008-03-15 15:37:55

Urhhhmm. Cazax Radial walk already has flag in it ;)

Cazax

2008-03-15 18:44:36

From: NaumanAkhlaQ
Urhhhmm. Cazax Radial walk already has flag in it ;)


i no, but its FFlag(10) and i want it at 0.

Santa_Clause

2008-03-15 19:06:16

From: NaumanAkhlaQ
True ill do the mining Procedures. And I hope santy and I can work on the form :)


I'm not participating!!

Daniel

2008-03-15 21:39:39

From: NaumanAkhlaQ
True ill do the mining Procedures. And I hope santy and I can work on the form :)

Ok, you're in for the mining ;)

From: Mylesmadness
I'm p2p so I can help with walking as long as its not rrw as I couldn't make a rrw that works to save my life. walkpath ftw

Well, i was hoping this script would use professional walking techniques. But sure, you can help.

From: hermpie
ill do teh Banking :D

Ok, thanks :D

From: Cazax
I could to help with the walking :)

i can make something:

if WalkPath(0) then
begin
//FFlag(5)
FFlag(0)
end else
begin
if RadialWalk(bla) then
begin
//FFlag(5)
FFlag(0)
end else
begin
if rrw(bla) then
begin
// FFlag(5)
FFLag(0)
end else
begin
Writeln('We arent at varrock');// or anything else
NextPlayer(False);
end;
end;
end;

also, i can add some DDTM's to the walking.

I added the FFLag(0) becouse WalkPath, rrw and RadialWalk have FFlag(10) inside them.

You're in for the walking :)

From: Special Ed
Remember we still have the SvN to share materials. Also for the smithing are you just talking about the smelting portion of it or do you plan on having the script make all the bars into something? Maybe an option?

Yeah, that is what i mean. Not just to smelt bars but to also smith the bars into an object then bank them.

From: Santa_Clause
I'm not participating!!

Why not? What have you got against this project?

Santa_Clause

2008-03-16 01:51:43

Nothing against this project…but I'm working on something else at the moment :D

Also…how do you quote multiple people in one message using the quote button?

Daniel

2008-03-16 03:36:30

From: Santa_Clause
Also…how do you quote multiple people in one message using the quote button?


Next to the quote button, there is a green arrow pointing down. Click on that and to multi-quote that person. Once you have done selecting the people you want to quote, press the Reply button and all quotes will appear in the text input area with a spare line for typing below them.

Enjoy ;)

Santa_Clause

2008-03-16 04:04:32

God help me. Thankyou very much!

XcanadamanX

2008-03-16 11:40:06

i can probably do some smelting. i already have my smelter able to use ring of forging and make cannonballs.

Daniel

2008-03-17 01:22:39

From: Santa_Clause
God help me. Thankyou very much!

You're welcome ;) Need any more help?
From: XcanadamanX
i can probably do some smelting. i already have my smelter able to use ring of forging and make cannonballs.

Ok, great! You can do the Varrock and Al-Kharid Smithing procedures and walking (Walking to the smith).

Are you P2P?

XcanadamanX

2008-03-17 08:00:58

im not p2p. i just borrowed accounts to test.

Special Ed

2008-03-17 17:27:56

I could work on some walking if you still need it, if not I'll make the Progress Report or something… or maybe smithing?

Daniel

2008-03-18 01:42:07

From: Special Ed
I could work on some walking if you still need it, if not I'll make the Progress Report or something… or maybe smithing?

Sure, you can do both ;) If you're up to it :p

Naum

2008-03-18 13:29:27

I just need to know the places…

Naum

2008-03-18 13:50:11

Knocked this up in 10 mins.
Test.

program New;
{.include srl/srl.scar}
{.include srl/srl/skill/mining.scar}

var
x,y:Integer;
Oresmined: Integer;

procedure WaitWhileMining;
var
Mark : Integer;
begin
MarkTime(mark)
repeat
FindNormalRandoms;
If GasFound(x,y) then
begin
RunAway('e',false,1,7000 + Random(3000))
writeln('We avoided Gas!!! :P')
end;
until (FindBlackChatMessage('You manage to mine some')) or (TimeFromMark(mark)>20000)
end;

Procedure MineRock(Rock : String);
begin
Case Rock of
'Clay': begin
repeat
if FindObjOre2(x, y, 'Mine', 6989253, 5, 2) then
mmouse(x, y, 2, 2);
if IsUpTextMultiCustom(['min', 'ne', 'rocks']) then
wait(100 + Random(300));
mouse(x, y, 0, 2, true);
WaitWhileMining;
OresMined := OresMined + 1;
until (invcount = 28)
end;
'Copper': begin
repeat
if FindObjOre2(x, y, 'Rock', 2902115, 5, 2) then
mmouse(x, y, 0, 2);
if IsUpTextMultiCustom(['min', 'ne', 'rocks']) then
wait(100 + Random(300));
mouse(x, y, 0, 2, true);
WaitWhileMining;
OresMined := OresMined + 1;
until (invcount = 28)
end;
'Tin':begin
repeat
if FindObjOre2(x, y, 'Mine', 7829380, 5, 2) then
mmouse(x, y, 0, 2);
if IsUpTextMultiCustom(['min', 'ne', 'rocks']) then
wait(100 + Random(300));
mouse(x, y, 0, 2, true);
WaitWhileMining;
OresMined := OresMined + 1;
until (invcount = 28)
end;
'Iron': begin
repeat
if FindObjOre2(x, y, 'Mine', 610943, 5, 2) then
mmouse(x, y, 0, 2);
if IsUpTextMultiCustom(['min', 'ne', 'rocks']) then
wait(100 + Random(300));
mouse(x, y, 0, 2, true);
WaitWhileMining;
OresMined := OresMined + 1;
until (invcount = 28)
end;
'Silver': begin
repeat
if FindObjOre2(x, y, 'Mine', 10724528, 5, 2) then
mmouse(x, y, 0, 2);
if IsUpTextMultiCustom(['min', 'ne', 'rocks']) then
wait(100 + Random(300));
mouse(x, y, 0, 2, true);
WaitWhileMining;
OresMined := OresMined + 1;
until (invcount = 28)
end;
'Coal':begin
repeat
if FindObjOre2(x, y, 'Mine', 530456, 5, 2) then
mmouse(x, y, 0, 2);
if IsUpTextMultiCustom(['min', 'ne', 'rocks']) then
wait(100 + Random(300));
mouse(x, y, 0, 2, true);
WaitWhileMining;
OresMined := OresMined + 1;
until (invcount = 28)
end;
'Gold':begin
repeat
if FindObjOre2(x, y, 'Mine', 2197148, 5, 2) then
mmouse(x, y, 0, 2);
if IsUpTextMultiCustom(['min', 'ne', 'rocks']) then
wait(100 + Random(300));
mouse(x, y, 0, 2, true);
WaitWhileMining;
OresMined := OresMined + 1;
until (invcount = 28)
end;
'Mith':begin
repeat
if FindObjOre2(x, y, 'Mine', 6765885, 5, 2) then
mmouse(x, y, 0, 2);
if IsUpTextMultiCustom(['min', 'ne', 'rocks']) then
wait(100 + Random(300));
mouse(x, y, 0, 2, true);
WaitWhileMining;
OresMined := OresMined + 1;
until (invcount = 28)
end;
'Addy':begin
repeat
if FindObjOre2(x, y, 'Mine', 3228209, 5, 2) then
mmouse(x, y, 0, 2);
if IsUpTextMultiCustom(['min', 'ne', 'rocks']) then
wait(100 + Random(300));
mouse(x, y, 0, 2, true);
WaitWhileMining;
OresMined := OresMined + 1;
until (invcount = 28)
end;
'Rune':begin
repeat
if FindObjOre2(x, y, 'Mine', 8090954, 5, 2) then
mmouse(x, y, 0, 2);
if IsUpTextMultiCustom(['min', 'ne', 'rocks']) then
wait(100 + Random(300));
mouse(x, y, 0, 2, true);
WaitWhileMining;
OresMined := OresMined + 1;
until (invcount = 28)
end;
end;
end;

Begin
MineRock('Rune')
end.

XcanadamanX

2008-03-18 15:46:32

or just
Procedure MineRock(Rock : String);
var color : integer;
begin
Case lowercase(Rock) of
'clay': color := 6989253;
'copper': color := 2902115;
'tin': color := 7829380;
'iron': color := 610943;
'silver': color := 10724528;
'coal': color := 530456;
'gold': color := 2197148;
'mith': color := 6765885;
'addy': color := 3228209;
'rune': color := 8090954
end;
repeat
if FindObjOre2(x, y, 'Mine', color, 5, 2) then
mmouse(x, y, 0, 2);
if IsUpTextMultiCustom(['min', 'ne', 'rocks']) then
begin
wait(100 + Random(300));
mouse(x, y, 0, 2, true);
WaitWhileMining;
OresMined := OresMined + 1;
end;
until (invcount = 28)
end;

Cazax

2008-03-18 16:51:04

and:
OresMined := OresMined + 1;


this one is better:

//the mining proc
until (InvFull)
IncEx(OresMined, CountItemsDtm(OreDtm, MIX1, MIY1, MIX2, MIY2))

Naum

2008-03-18 16:59:42

Thx. Just like the layout of my one looks better no?

XcanadamanX

2008-03-18 17:01:37

i personally dont like that layout at all. and i dont like your standards. but thats just me :p

Cazax

2008-03-18 19:23:27

From: XcanadamanX
i personally dont like that layout at all. and i dont like your standards. but thats just me :p


i made that one beocuse if you get an inventory random, or it doesnt mine anything during the loop, anyways it will count +1 so mine's better.

XcanadamanX

2008-03-18 19:26:13

i wasnt talking to you Cazax. i was talking to Nauman because there's so much unnecessary code.

Santa_Clause

2008-03-18 19:48:18

From: NaumanAkhlaQ
Knocked this up in 10 mins.
Test.

program New;
{.include srl/srl.scar}
{.include srl/srl/skill/mining.scar}

var
x,y:Integer;
Oresmined: Integer;

procedure WaitWhileMining;
var
Mark : Integer;
begin
MarkTime(mark)
repeat
FindNormalRandoms;
If GasFound(x,y) then
begin
RunAway('e',false,1,7000 + Random(3000))
writeln('We avoided Gas!!! :P')
end;
until (FindBlackChatMessage('You manage to mine some')) or (TimeFromMark(mark)>20000)
end;

Procedure MineRock(Rock : String);
begin
Case Rock of
'Clay': begin
repeat
if FindObjOre2(x, y, 'Mine', 6989253, 5, 2) then
mmouse(x, y, 2, 2);
if IsUpTextMultiCustom(['min', 'ne', 'rocks']) then
wait(100 + Random(300));
mouse(x, y, 0, 2, true);
WaitWhileMining;
OresMined := OresMined + 1;
until (invcount = 28)
end;
'Copper': begin
repeat
if FindObjOre2(x, y, 'Rock', 2902115, 5, 2) then
mmouse(x, y, 0, 2);
if IsUpTextMultiCustom(['min', 'ne', 'rocks']) then
wait(100 + Random(300));
mouse(x, y, 0, 2, true);
WaitWhileMining;
OresMined := OresMined + 1;
until (invcount = 28)
end;
'Tin':begin
repeat
if FindObjOre2(x, y, 'Mine', 7829380, 5, 2) then
mmouse(x, y, 0, 2);
if IsUpTextMultiCustom(['min', 'ne', 'rocks']) then
wait(100 + Random(300));
mouse(x, y, 0, 2, true);
WaitWhileMining;
OresMined := OresMined + 1;
until (invcount = 28)
end;
'Iron': begin
repeat
if FindObjOre2(x, y, 'Mine', 610943, 5, 2) then
mmouse(x, y, 0, 2);
if IsUpTextMultiCustom(['min', 'ne', 'rocks']) then
wait(100 + Random(300));
mouse(x, y, 0, 2, true);
WaitWhileMining;
OresMined := OresMined + 1;
until (invcount = 28)
end;
'Silver': begin
repeat
if FindObjOre2(x, y, 'Mine', 10724528, 5, 2) then
mmouse(x, y, 0, 2);
if IsUpTextMultiCustom(['min', 'ne', 'rocks']) then
wait(100 + Random(300));
mouse(x, y, 0, 2, true);
WaitWhileMining;
OresMined := OresMined + 1;
until (invcount = 28)
end;
'Coal':begin
repeat
if FindObjOre2(x, y, 'Mine', 530456, 5, 2) then
mmouse(x, y, 0, 2);
if IsUpTextMultiCustom(['min', 'ne', 'rocks']) then
wait(100 + Random(300));
mouse(x, y, 0, 2, true);
WaitWhileMining;
OresMined := OresMined + 1;
until (invcount = 28)
end;
'Gold':begin
repeat
if FindObjOre2(x, y, 'Mine', 2197148, 5, 2) then
mmouse(x, y, 0, 2);
if IsUpTextMultiCustom(['min', 'ne', 'rocks']) then
wait(100 + Random(300));
mouse(x, y, 0, 2, true);
WaitWhileMining;
OresMined := OresMined + 1;
until (invcount = 28)
end;
'Mith':begin
repeat
if FindObjOre2(x, y, 'Mine', 6765885, 5, 2) then
mmouse(x, y, 0, 2);
if IsUpTextMultiCustom(['min', 'ne', 'rocks']) then
wait(100 + Random(300));
mouse(x, y, 0, 2, true);
WaitWhileMining;
OresMined := OresMined + 1;
until (invcount = 28)
end;
'Addy':begin
repeat
if FindObjOre2(x, y, 'Mine', 3228209, 5, 2) then
mmouse(x, y, 0, 2);
if IsUpTextMultiCustom(['min', 'ne', 'rocks']) then
wait(100 + Random(300));
mouse(x, y, 0, 2, true);
WaitWhileMining;
OresMined := OresMined + 1;
until (invcount = 28)
end;
'Rune':begin
repeat
if FindObjOre2(x, y, 'Mine', 8090954, 5, 2) then
mmouse(x, y, 0, 2);
if IsUpTextMultiCustom(['min', 'ne', 'rocks']) then
wait(100 + Random(300));
mouse(x, y, 0, 2, true);
WaitWhileMining;
OresMined := OresMined + 1;
until (invcount = 28)
end;
end;
end;

Begin
MineRock('Rune')
end.


I thought you called yourself a 'case freak' :p

Naum

2008-03-19 03:27:38

Lolz i like that layout because its spacious. Having a function with only 10 lines wont look that good.
If you know what i mean :rolleyes:

Santa_Clause

2008-03-19 06:08:03

You'd probably be better making a function using TPAs. I'll post my own one later.

XcanadamanX

2008-03-19 15:55:35

From: NaumanAkhlaQ
Lolz i like that layout because its spacious. Having a function with only 10 lines wont look that good.
If you know what i mean :rolleyes:


so your script looks longer? well when your script is already 2000+ lines that extra is just useless and takes up to much room. also takes longer to compile the script.

Special Ed

2008-03-19 16:03:34

Does


repeat
if FindObjOre2(x, y, 'Mine', color, 5, 2) then
mmouse(x, y, 0, 2);
if IsUpTextMultiCustom(['min', 'ne', 'rocks']) then
begin
wait(100 + Random(300));
mouse(x, y, 0, 2, true);
WaitWhileMining;
OresMined := OresMined + 1;
end;
until (invcount = 28)


Really work, it seems too simple to be efficient, accurate, and reliable… although I haven't tested it so I wouldn't know.

XcanadamanX

2008-03-19 16:06:10

if FindObjOre2(x, y, 'Mine', color, 5, 2) then
mmouse(x, y, 0, 2);
if IsUpTextMultiCustom(['min', 'ne', 'rocks']) then


is repetitive because FindObjOre2 already looks for uptext.

Special Ed

2008-03-19 16:08:44

From: XcanadamanX
is repetitive because FindObjOre2 already looks for uptext.


I figured that but I was assuming they were using it for extra caution? Has anyone tested this to see how well it works, if at all?

Naum

2008-03-19 16:25:47

No thats just the beginning so i cann get some ideas. Works well enough.
But it think someone should make an array bank of colors we can use for each rock.
Maybe we could add an extra job - 'Color picker'.
No really.

Special Ed

2008-03-19 16:40:44

Are we doing new and old rocks? Or did they remove the old rocks altogether now? I'll go and pick colors at… somewhere… are we going to have Brumlidge as a mining spot? I'll get colors though don't worry.

Cazax

2008-03-19 16:54:09

From: Special Ed
Are we doing new and old rocks? Or did they remove the old rocks altogether now? I'll go and pick colors at… somewhere… are we going to have Brumlidge as a mining spot? I'll get colors though don't worry.


Did you mean 'Lumbridge' :p?

Lumbdrige isnt a bad idea, and there is a furnrace in lumby.

Special Ed

2008-03-19 17:01:19

:confused: There is no Town called Lumbridge! Its all lies! :eek:

Ya thats why I though Brumlidge :rolleyes: would be a good spot since it had a furnace… the only problem is… wouldn't walking be kind of annoying? If someone can make a reliable and efficient procedure to go from the Lumbridge General Store to the Mining spot and a procedure to go from Draynor to the mining spot I'll do the actual mining and smithing part.

XcanadamanX

2008-03-19 17:26:24

smithing parts wont take long. the only hard part is the furnace finding. Special if you want some help with the smithing ill help.

Special Ed

2008-03-19 17:44:19

Its up to IP-Drowner who's working on this project or not, unless he's just letting this be an open project. If you wanna get Bar Colors / Ore Colors (In Inventory) that would be helpful, I think there may be some constant / reliable colors around the forum somewhere so I don't think it would hurt to look. If you wanna help gathering rock colors that fine too, just do whatever you think would be helpful and if we end up doing the same thing we can always combine ideas / data.

XcanadamanX

2008-03-19 17:46:09

From: IP-Drowner

Ok, great! You can do the Varrock and Al-Kharid Smithing procedures and walking (Walking to the smith).

Are you P2P?


already approved.

Special Ed

2008-03-19 17:54:02

Ahhh… Ok then lets get started! I'll start picking rock colors and what-not, maybe start developing a FindRock procedure… I wonder what happened to Benlands like super-amazing one?

XcanadamanX

2008-03-19 21:00:57

i searched for it but no source was released to the mems. maybe pwnaz0r has it because he was the competition leader.

Daniel

2008-03-20 01:34:29

From: XcanadamanX
smithing parts wont take long. the only hard part is the furnace finding. Special if you want some help with the smithing ill help.

Wouldn't you only need to search for the orange with tolerance levels?
From: Special Ed
Its up to IP-Drowner who's working on this project or not, unless he's just letting this be an open project.

It is an open project, so it is not just me who decides, but the rest of the team.

Bobarkinator

2008-03-20 09:15:15

From: Special Ed
Ahhh… Ok then lets get started! I'll start picking rock colors and what-not, maybe start developing a FindRock procedure… I wonder what happened to Benlands like super-amazing one?


FindRocks by Benland(not for the faint of heart):
{*******************************************************************************
procedure FindRocks(var Points: TPointArray; RockType: Integer);
by: BenLand100
Description: Finds rocks in Varrock using HSL
Returns midpoints of rocks found in the Points array
Use the following values for RockType:
0 - Copper
1 - Tin
2 - Iron
3 - Silver
4 - Clay
*******************************************************************************}
procedure FindRocks(var Points: TPointArray; RockType: Integer);
var
Temp: TPointArray;
Len, Count, i, e: Integer;
begin
SetLength(Points,169830);
case RockType of
{Copper} 0: Len:= FindColorsHSLFast(GetClientCanvas.handle,5,5,515,338,Points,169830,28,50,50,5,20,30);
{Tin} 1: Len:= FindColorsHSLFast(GetClientCanvas.handle,5,5,515,338,Points,169830,2,10,50,7,20,30);
{Iron} 2: Len:= FindColorsHSLFast(GetClientCanvas.handle,5,5,515,338,Points,169830,17,50,30,2,20,20);
{Silver} 3: Len:= FindColorsHSLFast(GetClientCanvas.handle,5,5,515,338,Points,169830,43,18,60,5,10,40);
{Clay} 4: Len:= FindColorsHSLFast(GetClientCanvas.handle,5,5,515,338,Points,169830,40,55,70,2,20,20);
end;
Len:= GroupCentersMin(Points,Len,30,10);
SetLength(Temp,1600);
i:= 0;
e:= Len - 1;
{The FindColorsHSLFast in the following section identifies the rock color
that is the lightest color on the rock for Varrock rocks. It could be
adjusted to work for other new rocks by putting in the HSL values for the
rocks of the new area.}
//Simplified Excluding Quicksort Algorithm
while i < Len do
begin
repeat
Count:= FindColorsHSLFast(GetClientCanvas.handle,Points[e].X-15,Points[e].Y-15,Points[e].X+15,Points[e].Y+15,Temp,1600,45,75,40,12,20,20);
e:= e - 1;
Len:= Len - 1;
until ((Count >= 150) and (Count <= 700)) or (e < 0);
Len:= Len + 1;
e:= e + 1;
repeat
Count:= FindColorsHSLFast(GetClientCanvas.handle,Points[i].X-15,Points[i].Y-15,Points[i].X+15,Points[i].Y+15,Temp,1600,45,75,40,12,20,20);
i:= i + 1;
until ((Count < 150) or (Count > 700)) or (i - 1 > e);
i:= i - 1;
if i >= e then break;
Points[i]:= Points[e];
Len:= Len - 1;
end;
SetLength(Temp,0);
SetLength(Points,Len);
end;

CrazyFast.dll

XcanadamanX

2008-03-20 16:02:08

From: IP-Drowner
Wouldn't you only need to search for the orange with tolerance levels?


ya. just use n3ss's in the function/script section in this (msi) part of the forums. it works good.

Naum

2008-03-21 04:37:40

So hows about we make a form?

Santa_Clause

2008-03-21 07:52:48

From: NaumanAkhlaQ
So hows about we make a form?


How many times have I told you…the form is always the last thing you do…

Cazax

2008-03-21 12:23:38

No forms… just SRLPlayerForm.

Naum

2008-03-21 13:55:11

Santy you made me cry :(.
SRL Player form doesn't look sexy. Maybe we could add some color to it dudes!

Daniel

2008-03-23 17:56:13

I was hoping a separate form instead of setting up players like one where you can choose options such as: Use AntiBan (Checkbox), Set Mouse Speed(Checkbox), Lamp Skill (Edit Box), Bank or Powermine (Combobox), Location (Combobox (Will appear if Bank is selected from the other combobox).

Cazax

2008-03-23 19:20:09

If we are going to make a form, it should be multiplayers, so we need someone who knows how to add tabs into forms.

Timothegreat

2008-03-26 13:51:28

From: XcanadamanX
smithing parts wont take long. the only hard part is the furnace finding. Special if you want some help with the smithing ill help.


il do the furnace finding using tpa's just give me a pm when u need it. ;)

XcanadamanX

2008-03-26 15:20:47

ive got a working one one my smelter but go ahead if you want to make one. it will probably be better than mine. (made in like 2 mins)

Daniel

2008-03-27 05:41:32

From: Cazax
If we are going to make a form, it should be multiplayers, so we need someone who knows how to add tabs into forms.

No, what i meant was for the form that it uses the SRL Playerform but it includes options to change (similar to constants, but on a form).

P1nky

2008-03-27 18:58:36

will this be for members only :)

Daniel

2008-04-02 06:41:40

From: p1nky
will this be for members only :)


Depends on what everyone decides.

Special Ed

2008-04-02 19:47:16

No ones added anything to the SvN so are people still working on this? I haven't had much time but I'll start working on getting an outline done if it needs it… then people can fill in where they can.

Where are all the locations that this script will mine / smith at? Also will this script travel from town to town? Or is it just going to be able to mine / smith in any town you choose?

Cazax

2008-04-02 21:08:41

From: Special Ed
No ones added anything to the SvN so are people still working on this? I haven't had much time but I'll start working on getting an outline done if it needs it… then people can fill in where they can.

Where are all the locations that this script will mine / smith at? Also will this script travel from town to town? Or is it just going to be able to mine / smith in any town you choose?

Any town you choose… i think:

Lubridge - Furnrace.

Rimmy - Falador Furnrace (Difficult though).

Al Kharid - Furnrace (Difficult too).

These are my ideas.

Special Ed

2008-04-02 22:58:47

There's also the Brumlidge mine too… I think what we should have the script do, is mine "x" ores and bank. When the script has "x" ores in the bank then it will go to a Furnace Town where it will smelt all the ores into bars and bank all the bars. Then after all the ore is made into bars it will proceed to the Smith Town which may be the same town but it will systematically smith all the bars into various items which then can either be stored in the bank or sold by the users digression.

Sounds like a plan to me although it's not up to me ;)

Daniel

2008-04-03 03:06:24

From: Special Ed
There's also the Brumlidge mine too… I think what we should have the script do, is mine "x" ores and bank. When the script has "x" ores in the bank then it will go to a Furnace Town where it will smelt all the ores into bars and bank all the bars. Then after all the ore is made into bars it will proceed to the Smith Town which may be the same town but it will systematically smith all the bars into various items which then can either be stored in the bank or sold by the users digression.


That's what i meant. But you can also choose a setting to do that (^^), just mine and bank, powermine or just smith.

For the location, i was thinking of most mining and smithing locations. But it is also up to you guys and not just me.

Special Ed

2008-04-03 16:13:58

Yes, but you're the leader of this project are you not? You need to give us some direction ;)

I'll work on an outline and upload it to the SvN, hopefully tonight. I've got to write a paper for school but after I should be able to work on it.

XcanadamanX

2008-04-03 16:21:18

i would add to the svn if i knew where it was.

Special Ed

2008-04-03 17:14:31

From: Special Ed
First go to www.sourceforge.net and make an account and PM it to me.

Next, Download the correct "Install" for your computer (32 or 64 bit) to access the updated files

http://tortoisesvn.net/downloads

Install it then make a folder on your desktop called "MSI". Right click on it then click on Checkout, and type in

https://fcmb.svn.sourceforge.net/svnroot/fcmb

in the text box at the top and click O.K. It should download all the files and put them in your MSI Folder. *To Update the Folder just right click on it and select "Update"*

When you want to submit things you've put in the folder so all of us can see, right click on the folder and press "Commit". It will ask you for your Sourceforge username and password.


I really need the ability to sticky posts in the MSI section ^.^

Bobarkinator

2008-04-03 17:16:02

Or announcements :rolleyes:

Naum

2008-04-04 14:45:47

Yeah.
Mostly what happens is that projects disintergrate, not this one, i'm avalible an hour every day.
add my msn if needs be

P1nky

2008-04-05 23:57:07

dont lie naum :P u were never on for me :(

Naum

2008-04-06 11:46:33

Lol because your annoying me.
I blocked you …

lol fell for that!

Special Ed

2008-04-06 18:14:31

Well I added the Outline to the SvN, not really detailed yet except for what I think should be on the form.

MylesMadness

2008-04-11 15:17:11

Two things.
1.)Special, not there yet
2.)I can't do this anymore. Talk me off the list

Daniel

2008-04-11 20:08:03

From: Mylesmadness

2.)I can't do this anymore. Talk me off the list


How come?

MylesMadness

2008-04-12 10:50:10

First this isn't getting anywhere. Two I have little or no time for my next script, my scripts have priority over others.

Special Ed

2008-04-12 16:18:29


program New;
{.include SRL/SRL.scar}
var
RPoint: TPointArray;
i: Byte;

{*******************************************************************************
procedure FindRocks(var Points: TPointArray; RockType: Integer);
by: BenLand100
Description: Finds rocks in Varrock using HSL
Returns midpoints of rocks found in the Points array
Use the following values for RockType:
0 - Copper
1 - Tin
2 - Iron
3 - Silver
4 - Clay
*******************************************************************************}
procedure FindRocks(var Points: TPointArray; RockType: Integer);
var
Temp: TPointArray;
Len, Count, i, e: Integer;
begin
SetLength(Points,169830);
case RockType of
{Copper} 0: Len:= FindColorsHSLFast(GetClientCanvas.handle,5,5,515,338,Points,169830,28,50,50,5,20,30);
{Tin} 1: Len:= FindColorsHSLFast(GetClientCanvas.handle,5,5,515,338,Points,169830,2,10,50,7,20,30);
{Iron} 2: Len:= FindColorsHSLFast(GetClientCanvas.handle,5,5,515,338,Points,169830,17,50,30,2,20,20);
{Silver} 3: Len:= FindColorsHSLFast(GetClientCanvas.handle,5,5,515,338,Points,169830,43,18,60,5,10,40);
{Clay} 4: Len:= FindColorsHSLFast(GetClientCanvas.handle,5,5,515,338,Points,169830,40,55,70,2,20,20);
end;
Len:= GroupCentersMin(Points,Len,30,10);
SetLength(Temp,1600);
i:= 0;
e:= Len - 1;
{The FindColorsHSLFast in the following section identifies the rock color
that is the lightest color on the rock for Varrock rocks. It could be
adjusted to work for other new rocks by putting in the HSL values for the
rocks of the new area.}
//Simplified Excluding Quicksort Algorithm
while i < Len do
begin
repeat
Count:= FindColorsHSLFast(GetClientCanvas.handle,Points[e].X-15,Points[e].Y-15,Points[e].X+15,Points[e].Y+15,Temp,1600,45,75,40,12,20,20);
e:= e - 1;
Len:= Len - 1;
until ((Count >= 150) and (Count <= 700)) or (e < 0);
Len:= Len + 1;
e:= e + 1;
repeat
Count:= FindColorsHSLFast(GetClientCanvas.handle,Points[i].X-15,Points[i].Y-15,Points[i].X+15,Points[i].Y+15,Temp,1600,45,75,40,12,20,20);
i:= i + 1;
until ((Count < 150) or (Count > 700)) or (i - 1 > e);
i:= i - 1;
if i >= e then break;
Points[i]:= Points[e];
Len:= Len - 1;
end;
SetLength(Temp,0);
SetLength(Points,Len);
end;

procedure SortRPoints(RPoint: TPointArray);
var
a, i, n, f, ArrL: Byte;
TmpArr: TPointArray;
begin
ArrL:= High(RPoint);
for a:= 0 to ArrL do
begin
for i:= n to ArrL do
if(a <> i)and((i + a) <> (ArrL * 2))then
begin
Writeln('(' + inttostr(RPoint[a].x) + ', ' + inttostr(RPoint[a].y) +') - (' + inttostr(RPoint[i].x) + ', ' + inttostr(RPoint[i].y) +')');
if(Abs(RPoint[a].x - RPoint[i].x) >= 15)then
if(Abs(RPoint[a].y - RPoint[i].y) >= 15)then
begin
f:= f + 1;
SetArrayLength(TmpArr, f);
TmpArr[f - 1]:= RPoint[i];
end;
end;
n:= n + 1;
end;
SetArrayLength(RPoint, f);
for a:= 0 to f - 1 do RPoint[a]:= TmpArr[a]
end;

{Thank to Boreas}
function RemoveDupsFromTPA(var StartTPA: TPointArray): TPointArray;
var
ArrayLength, pFindDups, pBubbleUp: Integer;
tpSwap: TPoint;
begin
ArrayLength:= GetArrayLength(StartTPA);
Result:= RearrangeTPA(StartTPA, 0, ArrayLength - 1, True, True);
for pFindDups:= 0 to ArrayLength - 2 do
begin
if(Result[pFindDups].x = Result[pFindDups + 1].x) then
begin
if(Result[pFindDups].y = Result[pFindDups + 1].y)then
begin
for pBubbleUp:= pFindDups to ArrayLength - 2 do
begin
tpSwap:= Result[pBubbleUp];
Result[pBubbleUp]:= Result[pBubbleUp + 1];
Result[pBubbleUp + 1]:= tpSwap;
end;
ArrayLength:= ArrayLength - 1;
SetArrayLength(Result, ArrayLength);
end;
end;
end;
end;


begin
SetupSRL;
ClearDebug;
FindRocks(RPoint, 0);
RemoveDupsFromTPA(RPoint);
SortRPoints(RPoint);
for i:= 0 to High(RPoint) do
begin
Writeln('Rock @ (' + inttostr(RPoint[i].x) + ', ' + inttostr(RPoint[i].y) + ')');
MMouse(RPoint[i].x, RPoint[i].y, 5, 5);
Wait(1000 + Random(500));
end;
end.

I've tried using both, RemoveDups (by Boreas) and the SortRPoints made by me but whenever I use the Findrock procedure it still returns multiple instances of the same rock. Any ideas on how to make sure it only gives you on TPA per rock?

Also… how would one go about updating the colors for this? I'd assume you just get the HSL of the rocks, but which part? I'm guessing the vein part. Also Could this be adapting to work with old rocks as well?

EDIT: Thanks Killerdou for the fix. I ended up having to make a copy of the array that you use for FindRocks then using the copy with RearrangeAndShortenArrayEx(TempArr, 10, 10); it works… I wonder why it doesn't work without the copy though?

MylesMadness

2008-04-14 19:42:35

RearrangeAndShortenArrayEx(TempArr, 10, 10); is slow, RAaSTPAEx is faster.

Special Ed

2008-04-17 16:46:09

Ya thats what I ended up using! I forgot to edit my edit…

Anyone working on anything else right now?

This is what I've got done so far… although the FindRock still returns doubles even using RAaSTPA, I don't understand what I'm doing wrong.


program New;
{.include SRL/SRL.scar}
var
RPoint, TempArr: TPointArray;
i: Byte;

{*******************************************************************************
procedure FindRocks(var Points: TPointArray; RockType: Integer);
by: BenLand100
Description: Finds rocks in Varrock using HSL
Returns midpoints of rocks found in the Points array
Use the following values for RockType:
0 - Copper
1 - Tin
2 - Iron
3 - Silver
4 - Clay
*******************************************************************************}
procedure FindRocks(var Points: TPointArray; RockType: Integer);
var
Temp: TPointArray;
Len, Count, i, e: Integer;
begin
SetLength(Points,169830);
case RockType of
{Copper} 0: Len:= FindColorsHSLFast(GetClientCanvas.handle,5,5,515,338,Points,169830,28,50,50,5,20,30);
{Tin} 1: Len:= FindColorsHSLFast(GetClientCanvas.handle,5,5,515,338,Points,169830,2,10,50,7,20,30);
{Iron} 2: Len:= FindColorsHSLFast(GetClientCanvas.handle,5,5,515,338,Points,169830,17,50,30,2,20,20);
{Silver} 3: Len:= FindColorsHSLFast(GetClientCanvas.handle,5,5,515,338,Points,169830,43,18,60,5,10,40);
{Clay} 4: Len:= FindColorsHSLFast(GetClientCanvas.handle,5,5,515,338,Points,169830,40,55,70,2,20,20);
end;
Len:= GroupCentersMin(Points,Len,30,10);
SetLength(Temp,1600);
i:= 0;
e:= Len - 1;
{The FindColorsHSLFast in the following section identifies the rock color
that is the lightest color on the rock for Varrock rocks. It could be
adjusted to work for other new rocks by putting in the HSL values for the
rocks of the new area.}
//Simplified Excluding Quicksort Algorithm
while i < Len do
begin
repeat
Count:= FindColorsHSLFast(GetClientCanvas.handle,Points[e].X-15,Points[e].Y-15,Points[e].X+15,Points[e].Y+15,Temp,1600,45,75,40,12,20,20);
e:= e - 1;
Len:= Len - 1;
until ((Count >= 150) and (Count <= 700)) or (e < 0);
Len:= Len + 1;
e:= e + 1;
repeat
Count:= FindColorsHSLFast(GetClientCanvas.handle,Points[i].X-15,Points[i].Y-15,Points[i].X+15,Points[i].Y+15,Temp,1600,45,75,40,12,20,20);
i:= i + 1;
until ((Count < 150) or (Count > 700)) or (i - 1 > e);
i:= i - 1;
if i >= e then break;
Points[i]:= Points[e];
Len:= Len - 1;
end;
SetLength(Temp,0);
SetLength(Points,Len);
end;

procedure SortTPADist(var TPA: TPointArray; Cx, Cy: Integer);
var
ID: TPointArray;
i, ArrL: Byte;
begin
ArrL:= GetArrayLength(TPA);
SetArrayLength(ID, ArrL);
for i:= 0 to ArrL - 1 do
begin
ID[i].x:= Distance(Cx, Cy, TPA[i].x, TPA[i].y);
ID[i].y:= i;
end;
RearrangeTPA(ID, 0, ArrL, True, False);
for i:= 0 to ArrL - 1 do
begin
TPA[i]:= TPA[ID[ArrL - 1 - i].y];
Writeln('TPA[' + inttostr(i) + '].Dist:= ' + inttostr(ID[ArrL - 1 - i].x));
end;
end;

begin
SetupSRL;
ClearDebug;
FindRocks(RPoint, 1);
SetArrayLength(TempArr, GetArrayLength(RPoint));
for i:= 0 to High(RPoint) do TempArr[i]:= RPoint[i];
RAaSTPA(TempArr, 10);
SortTPADist(TempArr, MSCX, MSCY);
for i:= 0 to High(TempArr) do
begin
Writeln('Rock @ (' + inttostr(TempArr[i].x) + ', ' + inttostr(TempArr[i].y) + ')');
MMouse(TempArr[i].x, TempArr[i].y, 5, 5);
Wait(1000 + Random(500));
end;
end.

XcanadamanX

2008-04-27 18:42:43

From: Special Ed

Anyone working on anything else right now?


Ive started some walking at Varrock. Anyone else doing anything?

Daniel

2008-04-27 19:41:49

From: XcanadamanX
Ive started some walking at Varrock. Anyone else doing anything?

I'm doing the Mining Guild at the moment.

Special Ed

2008-04-27 20:23:36

I'm working on VEM and VWM… since that kind of overlaps with MVP as well.

NiCbaZ

2008-05-14 04:46:26

What me to do anything, im not busy or anything atm so i can do what ever you ask…

Special Ed

2008-05-14 20:03:04

Nicbaz if you're looking for something to do I suggest setting up a mining routine for VEM and VWM since both of those places will be used in both MVP and this script.