PDA

View Full Version : power ore miner (mines and drops) by outlander



outlander
06-20-2007, 06:02 AM
my first auto miner, mines and drops.


/////////////////////////////////////////////////////////
/////////power ore miner (mines and drops ores)///////////
///////////////made by Outlander////////////////////////
//////////////////not for retail/////////////////////////
///start with 5 pickaxes in the first 5 slots/1 pick and other items.///////////
///////////////////version 1.0.2 public beta/////////////////////////
program outlanders_ore_miner_and_dropper;
{.include SRL/SRL.scar}

Const
Orecolour = 1582146; // fill in ore color using color picker
begin
repeat
FindColorSpiral(x,y,orecolour,MSX1,MSY1,MSX2,MSY2)


DisguiseScar('Internetexplorer7');


findcolorspiral(x,y,orecolour,MSX1,MSY1,MSX2,MSY2) ;

mmouse (x,y,2,2)
wait (300+random(800))
Mouse(x,y,1,1,true)



Mouse(x,y,1,1,true)
wait (3000+random(10000))

writeln ('now dropping ore...')
/////////////////////////////////////dropping ore
mmouse (627,265,2,2)
wait (500+random(1000))
mouse (627,265,1,1,false)
mmouse (606,307,2,2)
wait (500+random(1000))
findcolorspiral(x,y,65535,MSX1,MSY1,MSX2,MSY2);
mmouse (x,y,2,2)
wait (500+random(1000))
Mouse(x,y,1,1,true)




until (false)



end.

ZephyrsFury
06-20-2007, 09:13 AM
hey so a power miner is your first script. thats good, my first script was a useless autotalker.

i've got a few suggestions for you.

firstly, you need to learn the standards for script (indenting and setting out, etc.). this will make your script a lot easier to follow and easier to understand what you are trying to do.

secondly, i dont get what you are doing here:
FindColorSpiral(x,y,orecolour,MSX1,MSY1,MSX2,MSY2)


DisguiseScar('Internetexplorer7');


findcolorspiral(x,y,orecolour,MSX1,MSY1,MSX2,MSY2) ;

why can't you just disguisescar once at the begin and then find the rock colour?

thirdly, from what i can see, the script clicks the rock, waits about 1.5 secs, clicks again, clicks straight away then waits. then it drops. you it mines three ores then drops three ores?
make it click and wait until the inventory is full then begin dropping

fourthly, you should put hte mining and the dropping is separate procedures. this will allow you to manipulate them more easily and in better ways.

fifthly, what are you doing here?:
mmouse (627,265,2,2)
wait (500+random(1000))
mouse (627,265,1,1,false)
mmouse (606,307,2,2)
wait (500+random(1000))
findcolorspiral(x,y,65535,MSX1,MSY1,MSX2,MSY2);
mmouse (x,y,2,2)
wait (500+random(1000))
Mouse(x,y,1,1,true)

it moves the mouse, waits 1.5 secs, clicks, then what? chooses the drop option? theres easier methods than that such as SRL's DropAll and ChooseOption functions.
i also dont get what the FindColorSpiral function is there for. does this also mean that you are only dropping one ore even though you are mining 3 ores per loop?

heres what a very simple autominer could be:

program AutoMiner;
{.include SRL/SRL.scar}

const
OreColour = 456346;

procedure Mine;
begin
x:=MSCX;
y:=MSCY;
If FindColorSpiralTolerance(x, y, OreColour, MSX1, MSY1, MSX2, MSY2, 10) then
begin
repeat
Flag;
x:=MSCX;
y:=MSCY;
FindColorSpiralTolerance( x, y, OreColour, MSX1, MSY1, MSX2, MSY2, 10)
Mouse(x, y, 1, 1, true);
Wait(3000+random(500));
until not (FindColorSpiralTolerance( x, y, OreColour, MSX1, MSY1, MSX2, MSY2, 10));
end;
end;

procedure Drop;
begin
if InvCount >= 28 then
DropTo(6, 28);
end;

begin
repeat
repeat
Mine;
until(InvCount >= 28);
if InvCount >= 28 then
Drop;
until(false);
end.

outlander
06-20-2007, 05:11 PM
thanks for the help mate. btw just try it, it mines 1 ore and then drops 1 ore. etc...

ZephyrsFury
06-21-2007, 01:28 PM
np, yea i figured but that is sorta ... not normal. lol. make it mine until you get a full inv then drop all or something.;)

outlander
06-21-2007, 04:04 PM
ok thanks mate. btw, ur script mines but does not drop for me.

ZephyrsFury
06-22-2007, 08:30 AM
ok thanks mate. btw, ur script mines but does not drop for me.


lol i didn't expect it too. the drop procedure is only 2 lines long and i didn't even do it in scar. if you want a really good drop procedure you need to use dtm's and better functions than dropto.