-chaos-
2006-05-21 17:13:38
Yes thats right another powerminer im still learning to script so i tryed to improve my skills my taking on less challenging projects
i need someone to test it and give me feedback on how it works also if you have any suggestions please tell me :cool:
Here it is
[php]{=========================================================================]
| _ _ _ _ _ _ _ _ |
| / | | <===================> _ _ |
| / _ _ _| | |_ _ _ _ _ _ _ _ _ _| | | |
| | / | | | |~SRL MEMBER~ | | | | |
| | | | | |- - - - - - - - - -| _ _ | |_ _ |
| | | | |_ _ _ _ _ _ _ _ _ _ _ _ | _ _ _ _| |
| | \_ _ _| _ | | _ | _ _ _| |_| | | |
| \ | | | | | | | |_| | |_ _ _ _ _ _ _ _ _ _ _ _ _| | |
| \_ _ _ _ _ _|_| |_|_ _|_|_ _ _|_ _ _ | _ _| _ | | | | | |
| _ _ _ | | |_ _| | | | _ _|_ _| |
|<============================>|_ _ _ _ _|_ _ _|_ | |_| | |
| |_| |
[=========================================================================]
[ ]
[ ]
[ NAME : SRL PowerMiner ]
[ WRITER : -Chaos- ]
[ CATEGORY : AutoRanger ]
[ DESCRIPTION : See below. ]
[ USAGE : PowerMining Anywhere ]
[ AUTOCOLOR : Yes ]
[ SRL REV. : SRL Ver. 2.0. ]
[ NOTES : Have angle as high as it goes ]
[=========================================================================]
| Description: This script mines a full inventory of ore then drops it, |
| and repeats. |
| |
| Instructions: |
| 1.Set the Runescape brightness to V-bright, and your computer's |
| resolution to 32bit resolution. |
| 2.Need SCAR version 2.0.3. |
| 3.Stand near the rock you want to mine. |
| 4.Setup the script at lines 49 - 53 |
| 5.Have fun :). |
[=========================================================================}
program PowerMiner;
{.include SRL/SRL.scar}
{.include SRL/SRL/Skill/Mining.scar}
var Mined, Xp, Pc1, Pc2, Pc3, Pc4, Pc5, RColor : integer;
const // _ _ _ _ \\
//[]============================_|_|_|_=================================[]\\
//[] |Setup| []\\
//[]====================================================================[]\\
Skill = 'Mining'; //Skill To Use If Lamp Found
RName = 'Copper'; //[-] Copper, Tin, Iron, Coal [-]\\
Waitx = 1000; //How Long To Wait Before Clicking On Next Rock
//[] End Setup []\\
Function FindRockC : boolean;
begin
if (FindColorTolerance(x, y, RColor, 3, 3, 515, 338, 25)) then Result:=true else result:=false;
end;
Function InventoryF : boolean;
begin
GameTab(4);
if (InvFull) then Result:=true else Result:=false;
end;
function FindPickHeadC : boolean;
begin
GameTab(4);
if(FindBitmapSpiralTolerance(PickAxe, x, y, 546, 198, 745, 468, 100))or
(FindBitmapSpiralTolerance(PickAxeSteel, x, y, 546, 198, 745, 468, 100))then
Result:=True;
if(Result=false)then
begin
if(not(GetColor(681, 173)=2763390))then
begin
Mouse(679, 180, 5, 5, true);
wait(200+random(100)+random(100))
end;
if(FindBitmapSpiralTolerance(PickAxe, x, y, 546, 198 ,745, 468, 100))or
(FindBitmapSpiralTolerance(PickAxeSteel, x, y, 546, 198, 745, 468, 100))then
Result:=True;
end;
if(Result=false)then
begin
writeln('');
writeln('ERROR! cannot find pick in screen, please put pick in inventory or your equip page and restart the script!');
writeln('');
Result:=False;
end;
if(Result=true)then
begin
Pc1:=GetColor(x+6, y+3);
Pc2:=GetColor(x+18, y+7);
Pc3:=GetColor(x+20, y+6);
Pc4:=GetColor(x+19, y+6);
Pc5:=GetColor(x+16, y+5);
end;
writeln('Pick head colors… '+inttostr(Pc1)+' '+inttostr(Pc2)+' '+inttostr(Pc3)+' '+inttostr(Pc4)+' '+inttostr(Pc5));
end;
procedure BanP;
begin
RandomChatEvery(10 + Random(5));
RotateEvery(20 + Random(10));
LeaveScreenEvery(5 + Random(5));
HoverEvery(15 + Random(5),'random');
PickUpMouse;
end;
procedure Setup;
begin
SetupSRL;
SetupSRLMining;
SetChat('Off', 1);
SetChat('Off', 2);
SetChat('Off', 3);
end;
procedure Dropitlikeitshot;
begin
if(InventoryF)then
begin
Writeln('dropping Inventory');
DropToPosition(2, 28);
end;
end;
Procedure MineRocks;
begin
GameTab(4);
BanP;
if(not((GetColor(x,y))= RColor))then
begin
if (FindColorTolerance(x, y, RColor, 3, 3, 515, 338, 25)) then
begin
MMouse (x, y, 1, 1);
if IsUpText('Mine') then
Mouse(x, y, 0, 0, True);
GasCheck(x, y);
wait(Waitx);
while IsChatMessage('You swing') do
begin
repeat
wait(Waitx);
until(IsChatMessage('You manage'));
end;
end;
end;
Dropitlikeitshot;
Mined:=Mined+1
end;
procedure FPick;
begin
GameTab(4);
if IsChatMessage('You need') then
begin
FindPick;
end;
end;
procedure RandomP;
begin
CloseWindow;
ClickToContinue;
FindLamp('Skill');
FindDead;
FindMod;
FindMime;
FindMaze;
FindQuiz;
FindFrog;
FindDemon;
FindNormalRandoms;
if FindNewBox then Logout;
end;
procedure PReport;
begin
ClearDebug;
Writeln(' ~SRL PowerMiner~');
Writeln(' -Chaos-');
Writeln('You Have Mined '+inttostr(Mined)+' Rocks So Far');
Writeln('You Have Gained About '+inttostr(Xp*Mined)+' Xp So Far');
end;
procedure GetRockC;
begin
Case (RName) of
'Tin' : RColor:= 7895169;
'Copper' : RColor:= 4550039;
'Iron' : RColor:= 2371664;
'Coal' : RColor:= 2768446;
end;
end;
procedure GetRockXp;
begin
Case (RName) of
'Tin' : Xp:= (35/2);
'Copper' : Xp:= (35/2);
'Iron' : Xp:=35;
'Coal' : Xp:= 50;
end;
end;
begin
Setup;
RandomP;
BanP;
GetRockXp;
GetRockC;
FindPickHeadC;
repeat
RandomP;
FPick;
MineRocks;
PReport;
until(false);
end.[/php]
thanks
-Chaos-
i need someone to test it and give me feedback on how it works also if you have any suggestions please tell me :cool:
Here it is
[php]{=========================================================================]
| _ _ _ _ _ _ _ _ |
| / | | <===================> _ _ |
| / _ _ _| | |_ _ _ _ _ _ _ _ _ _| | | |
| | / | | | |~SRL MEMBER~ | | | | |
| | | | | |- - - - - - - - - -| _ _ | |_ _ |
| | | | |_ _ _ _ _ _ _ _ _ _ _ _ | _ _ _ _| |
| | \_ _ _| _ | | _ | _ _ _| |_| | | |
| \ | | | | | | | |_| | |_ _ _ _ _ _ _ _ _ _ _ _ _| | |
| \_ _ _ _ _ _|_| |_|_ _|_|_ _ _|_ _ _ | _ _| _ | | | | | |
| _ _ _ | | |_ _| | | | _ _|_ _| |
|<============================>|_ _ _ _ _|_ _ _|_ | |_| | |
| |_| |
[=========================================================================]
[ ]
[ ]
[ NAME : SRL PowerMiner ]
[ WRITER : -Chaos- ]
[ CATEGORY : AutoRanger ]
[ DESCRIPTION : See below. ]
[ USAGE : PowerMining Anywhere ]
[ AUTOCOLOR : Yes ]
[ SRL REV. : SRL Ver. 2.0. ]
[ NOTES : Have angle as high as it goes ]
[=========================================================================]
| Description: This script mines a full inventory of ore then drops it, |
| and repeats. |
| |
| Instructions: |
| 1.Set the Runescape brightness to V-bright, and your computer's |
| resolution to 32bit resolution. |
| 2.Need SCAR version 2.0.3. |
| 3.Stand near the rock you want to mine. |
| 4.Setup the script at lines 49 - 53 |
| 5.Have fun :). |
[=========================================================================}
program PowerMiner;
{.include SRL/SRL.scar}
{.include SRL/SRL/Skill/Mining.scar}
var Mined, Xp, Pc1, Pc2, Pc3, Pc4, Pc5, RColor : integer;
const // _ _ _ _ \\
//[]============================_|_|_|_=================================[]\\
//[] |Setup| []\\
//[]====================================================================[]\\
Skill = 'Mining'; //Skill To Use If Lamp Found
RName = 'Copper'; //[-] Copper, Tin, Iron, Coal [-]\\
Waitx = 1000; //How Long To Wait Before Clicking On Next Rock
//[] End Setup []\\
Function FindRockC : boolean;
begin
if (FindColorTolerance(x, y, RColor, 3, 3, 515, 338, 25)) then Result:=true else result:=false;
end;
Function InventoryF : boolean;
begin
GameTab(4);
if (InvFull) then Result:=true else Result:=false;
end;
function FindPickHeadC : boolean;
begin
GameTab(4);
if(FindBitmapSpiralTolerance(PickAxe, x, y, 546, 198, 745, 468, 100))or
(FindBitmapSpiralTolerance(PickAxeSteel, x, y, 546, 198, 745, 468, 100))then
Result:=True;
if(Result=false)then
begin
if(not(GetColor(681, 173)=2763390))then
begin
Mouse(679, 180, 5, 5, true);
wait(200+random(100)+random(100))
end;
if(FindBitmapSpiralTolerance(PickAxe, x, y, 546, 198 ,745, 468, 100))or
(FindBitmapSpiralTolerance(PickAxeSteel, x, y, 546, 198, 745, 468, 100))then
Result:=True;
end;
if(Result=false)then
begin
writeln('');
writeln('ERROR! cannot find pick in screen, please put pick in inventory or your equip page and restart the script!');
writeln('');
Result:=False;
end;
if(Result=true)then
begin
Pc1:=GetColor(x+6, y+3);
Pc2:=GetColor(x+18, y+7);
Pc3:=GetColor(x+20, y+6);
Pc4:=GetColor(x+19, y+6);
Pc5:=GetColor(x+16, y+5);
end;
writeln('Pick head colors… '+inttostr(Pc1)+' '+inttostr(Pc2)+' '+inttostr(Pc3)+' '+inttostr(Pc4)+' '+inttostr(Pc5));
end;
procedure BanP;
begin
RandomChatEvery(10 + Random(5));
RotateEvery(20 + Random(10));
LeaveScreenEvery(5 + Random(5));
HoverEvery(15 + Random(5),'random');
PickUpMouse;
end;
procedure Setup;
begin
SetupSRL;
SetupSRLMining;
SetChat('Off', 1);
SetChat('Off', 2);
SetChat('Off', 3);
end;
procedure Dropitlikeitshot;
begin
if(InventoryF)then
begin
Writeln('dropping Inventory');
DropToPosition(2, 28);
end;
end;
Procedure MineRocks;
begin
GameTab(4);
BanP;
if(not((GetColor(x,y))= RColor))then
begin
if (FindColorTolerance(x, y, RColor, 3, 3, 515, 338, 25)) then
begin
MMouse (x, y, 1, 1);
if IsUpText('Mine') then
Mouse(x, y, 0, 0, True);
GasCheck(x, y);
wait(Waitx);
while IsChatMessage('You swing') do
begin
repeat
wait(Waitx);
until(IsChatMessage('You manage'));
end;
end;
end;
Dropitlikeitshot;
Mined:=Mined+1
end;
procedure FPick;
begin
GameTab(4);
if IsChatMessage('You need') then
begin
FindPick;
end;
end;
procedure RandomP;
begin
CloseWindow;
ClickToContinue;
FindLamp('Skill');
FindDead;
FindMod;
FindMime;
FindMaze;
FindQuiz;
FindFrog;
FindDemon;
FindNormalRandoms;
if FindNewBox then Logout;
end;
procedure PReport;
begin
ClearDebug;
Writeln(' ~SRL PowerMiner~');
Writeln(' -Chaos-');
Writeln('You Have Mined '+inttostr(Mined)+' Rocks So Far');
Writeln('You Have Gained About '+inttostr(Xp*Mined)+' Xp So Far');
end;
procedure GetRockC;
begin
Case (RName) of
'Tin' : RColor:= 7895169;
'Copper' : RColor:= 4550039;
'Iron' : RColor:= 2371664;
'Coal' : RColor:= 2768446;
end;
end;
procedure GetRockXp;
begin
Case (RName) of
'Tin' : Xp:= (35/2);
'Copper' : Xp:= (35/2);
'Iron' : Xp:=35;
'Coal' : Xp:= 50;
end;
end;
begin
Setup;
RandomP;
BanP;
GetRockXp;
GetRockC;
FindPickHeadC;
repeat
RandomP;
FPick;
MineRocks;
PReport;
until(false);
end.[/php]
thanks
-Chaos-