TheGodfather
02-11-2007, 11:22 PM
Hey, I've made the basic mine rocks part of my script, (no anti-randoms yet, but I have the code for them but haven't added it, and haven't added the drop procedure in, but I got all of that no worries :P)
program PowerMiner;
{.include SRL/SRL.scar}
//~Basic Functions of the Godfather Inc. Power Miner VERS. Alpha~
//IMPORTANT:= low detailed 32 bit colors
//Have mouse over rock desired to mine within 10 seconds of starting script
//Rimmington Rocks NOT reccomended~
//Report bugs/glitches to dub_edit@yahoo.com
//Known Glitches: No Anti Randoms (will come in beta)
{============Updates Expected============)
~Use some SRL includes
~Anti Randoms in Beta Version
~A progress report
}
{----------BeginOfSetup----------}
const
nextrock= 2800; //Miliseconds till begin mining next rock? (1000 = 1 second)
// Press CTRL+ALT+S to stop script
{----------end of setup----------}
var full,rockmined,xR,yR,x1,y1,x2,y2: integer;
procedure GetSRL;
begin
setupsrl;
MouseSpeed:= 8;
end;
procedure LoadBitmap;
begin
full := BitmapFromString(16, 12, 'z78DA73B27434B5' +
'307442220D908013862C0AE9E8E864E14880C43019934D020 9361' +
'3C5854822C8F692693EA66BF19B86D7BF44998F2B344834CD 096F' +
'3C620262621C7F4A202A7C70F89754712A9B8FE1E6C1EF7E5 CB14' +
'36A6EC29F129C8C2C2DCD4D212401F391546211C7EF122435 0043' +
'29FB94');
end;
// AutoColor.....
Function GetRockColor(rockmined: integer): integer;
begin
wait(10000)
GetMousePos(x1,y1);
rockmined:= GetColor(x1,y1);
Result:= Getcolor(x1,y1);
end;
//Mining Routine *********************** By TheGodfather
Procedure MineRock;
begin
FindColorTolerance(xR,yR,rockmined,30,20,485,315,2 );
Mouse(xR,yR,4,4,true)
wait(nextrock)
end;
begin
repeat MineRock;
until(findbitmap(full,x2,y2))
end.
What I believe needs fixing in the script is the Function GetRockColor, as Im not 100% sure I got the result back. If someone can, I'd like some help please. Thanks.
If the auto color is a hard thing to use, then I'd just get the color as a constant, and make a better auto color.
Heres the script with a constant
program PowerMiner;
{.include SRL/SRL.scar}
//~Basic Functions of the Godfather Inc. Power Miner VERS. Alpha~
//IMPORTANT:= low detailed 32 bit colors
//Have mouse over rock desired to mine within 10 seconds of starting script
//Rimmington Rocks NOT reccomended~
//Report bugs/glitches to dub_edit@yahoo.com
//Known Glitches: No Anti Randoms (will come in beta)
{============Updates Expected============)
~Use some SRL includes
~Anti Randoms in Beta Version
~AntiBan
~A progress report
~Auto Color
}
{----------BeginOfSetup----------}
const
nextrock= 2800; //Miliseconds till begin mining next rock? (1000 = 1 second)
rockmined= 2503250; //color of rock mining
// Press CTRL+ALT+S to stop script
{----------end of setup----------}
var full,xR,yR,x1,y1: integer;
procedure GetSRL;
begin
setupsrl;
MouseSpeed:= 12;
end;
procedure LoadBitmap;
begin
full := BitmapFromString(16, 12, 'z78DA73B27434B5' +
'307442220D908013862C0AE9E8E864E14880C43019934D020 9361' +
'3C5854822C8F692693EA66BF19B86D7BF44998F2B344834CD 096F' +
'3C620262621C7F4A202A7C70F89754712A9B8FE1E6C1EF7E5 CB14' +
'36A6EC29F129C8C2C2DCD4D212401F391546211C7EF122435 0043' +
'29FB94');
end;
//Mining Routine *********************** By TheGodfather
Procedure MineRock;
begin
FindColorTolerance(xR,yR,rockmined,30,20,485,315,2 );
Mouse(xR,yR,4,4,true);
wait(nextrock)
end;
begin
repeat MineRock;
until(findbitmap(full,x1,y1))
end.
The Problem is the mouse just goes over to the rock and then the script just executes. And I get a runtime error
program PowerMiner;
{.include SRL/SRL.scar}
//~Basic Functions of the Godfather Inc. Power Miner VERS. Alpha~
//IMPORTANT:= low detailed 32 bit colors
//Have mouse over rock desired to mine within 10 seconds of starting script
//Rimmington Rocks NOT reccomended~
//Report bugs/glitches to dub_edit@yahoo.com
//Known Glitches: No Anti Randoms (will come in beta)
{============Updates Expected============)
~Use some SRL includes
~Anti Randoms in Beta Version
~A progress report
}
{----------BeginOfSetup----------}
const
nextrock= 2800; //Miliseconds till begin mining next rock? (1000 = 1 second)
// Press CTRL+ALT+S to stop script
{----------end of setup----------}
var full,rockmined,xR,yR,x1,y1,x2,y2: integer;
procedure GetSRL;
begin
setupsrl;
MouseSpeed:= 8;
end;
procedure LoadBitmap;
begin
full := BitmapFromString(16, 12, 'z78DA73B27434B5' +
'307442220D908013862C0AE9E8E864E14880C43019934D020 9361' +
'3C5854822C8F692693EA66BF19B86D7BF44998F2B344834CD 096F' +
'3C620262621C7F4A202A7C70F89754712A9B8FE1E6C1EF7E5 CB14' +
'36A6EC29F129C8C2C2DCD4D212401F391546211C7EF122435 0043' +
'29FB94');
end;
// AutoColor.....
Function GetRockColor(rockmined: integer): integer;
begin
wait(10000)
GetMousePos(x1,y1);
rockmined:= GetColor(x1,y1);
Result:= Getcolor(x1,y1);
end;
//Mining Routine *********************** By TheGodfather
Procedure MineRock;
begin
FindColorTolerance(xR,yR,rockmined,30,20,485,315,2 );
Mouse(xR,yR,4,4,true)
wait(nextrock)
end;
begin
repeat MineRock;
until(findbitmap(full,x2,y2))
end.
What I believe needs fixing in the script is the Function GetRockColor, as Im not 100% sure I got the result back. If someone can, I'd like some help please. Thanks.
If the auto color is a hard thing to use, then I'd just get the color as a constant, and make a better auto color.
Heres the script with a constant
program PowerMiner;
{.include SRL/SRL.scar}
//~Basic Functions of the Godfather Inc. Power Miner VERS. Alpha~
//IMPORTANT:= low detailed 32 bit colors
//Have mouse over rock desired to mine within 10 seconds of starting script
//Rimmington Rocks NOT reccomended~
//Report bugs/glitches to dub_edit@yahoo.com
//Known Glitches: No Anti Randoms (will come in beta)
{============Updates Expected============)
~Use some SRL includes
~Anti Randoms in Beta Version
~AntiBan
~A progress report
~Auto Color
}
{----------BeginOfSetup----------}
const
nextrock= 2800; //Miliseconds till begin mining next rock? (1000 = 1 second)
rockmined= 2503250; //color of rock mining
// Press CTRL+ALT+S to stop script
{----------end of setup----------}
var full,xR,yR,x1,y1: integer;
procedure GetSRL;
begin
setupsrl;
MouseSpeed:= 12;
end;
procedure LoadBitmap;
begin
full := BitmapFromString(16, 12, 'z78DA73B27434B5' +
'307442220D908013862C0AE9E8E864E14880C43019934D020 9361' +
'3C5854822C8F692693EA66BF19B86D7BF44998F2B344834CD 096F' +
'3C620262621C7F4A202A7C70F89754712A9B8FE1E6C1EF7E5 CB14' +
'36A6EC29F129C8C2C2DCD4D212401F391546211C7EF122435 0043' +
'29FB94');
end;
//Mining Routine *********************** By TheGodfather
Procedure MineRock;
begin
FindColorTolerance(xR,yR,rockmined,30,20,485,315,2 );
Mouse(xR,yR,4,4,true);
wait(nextrock)
end;
begin
repeat MineRock;
until(findbitmap(full,x1,y1))
end.
The Problem is the mouse just goes over to the rock and then the script just executes. And I get a runtime error