rockman
2008-03-01 14:16:03
<!– BEGIN TEMPLATE: formanswers –>
rockman - SRL Member Application Form
rockman
What is the meaning to life?
Where you Referred to SRL? If yes, by whom?
no
Programming Knowledge
HTML, some Java
Other Communitys
Sythe
How Long have You Played Runescape
4+ Years
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
Hi all. I'm 15 years old. I live in Minnesota, USA. Uhh, I started scripting a year and a half ago and I really like it because It feels good to just beat the system. I want to be an SRL Member so that I can have access to the elite scripting community and make some great scripts.
About the script below. It's my powerminer. I made it last December, and i have just kept making it better since then. I have gotten an hour and a half progress report on 4 players, but I stopped it manually. So far, it has over 2400 minutes on SRL stats. So please review my script, and vote for me as you see fit.
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
——————————————————
<!– END TEMPLATE: formanswers –>
rockman - SRL Member Application Form
rockman
What is the meaning to life?
Where you Referred to SRL? If yes, by whom?
no
Programming Knowledge
HTML, some Java
Other Communitys
Sythe
How Long have You Played Runescape
4+ Years
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
Hi all. I'm 15 years old. I live in Minnesota, USA. Uhh, I started scripting a year and a half ago and I really like it because It feels good to just beat the system. I want to be an SRL Member so that I can have access to the elite scripting community and make some great scripts.
About the script below. It's my powerminer. I made it last December, and i have just kept making it better since then. I have gotten an hour and a half progress report on 4 players, but I stopped it manually. So far, it has over 2400 minutes on SRL stats. So please review my script, and vote for me as you see fit.
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
//
//
// Rockman's Powerminer v3.3
//
// Type: PowerMiner
// Date Released: February, 2008
// SCAR REV: 3.14
// SRL Rev: #14
// Author: Rockman
// Thread URL: [url]www.srl-forums.com/forum/10-powerminer-rockman-t26918.html[/url]
//
// Make Sure Before Starting:
// - Characters are near the rocks that you wish to mine.
// - Pickaxe is wielded (Recommended to have another in inventory).
// - Color is on Very Bright and 32-bit.
// - Fill out constants and Declare Players (Below).
//
// Hope it works well, and be sure to post your proggies!
//
//
// Version History
// ------------
// - Version 3.3 - Fixed Bug
// - Version 3.2 - Fixed Bug
// - Version 3.1
// - Re-wrote mining procedure
// - Tweaked auto-detection
// - Tweaked logins so it will be more compatible with SMART
// - Extended Progress Report to make it more detailed
// - Lots of other little timing tweaks
// -Version 3.0 (February 1st 2008)
// - Updated for S.M.A.R.T.
// - Made Auto-Detectable when rock is mined
// - Other Bugs Fixed to make more efficient
// - Version 2.2 - Fixed GasFind and made multiplayer
// - Version 2.1 - Adjusted Failsafes and fixed bugs
// - Version 2.0 (Released January 2008)
// - Script is now auto-colored
// - Changed the drop procedure to a DTM for more accurate dropping
// - Added a better procedure to check for gas
// - Added chat for when gas occurs
// - Extended Anti-Ban procedure to get more random results
// - Added a tolerance for rock-finding
// - Version 1.0 Script (Released December 2007)
program RockmansPowerminer;
{.include SRL/SRL/Misc/Smart.scar}
{.include SRL/SRL.scar}
{.include SRL/SRL/Skill/Mining.scar}
const
YourSRLId = ''; // If you don't have register at:
YourSRLPassword =''; // [url]http://srl-forums.com/stats/index.php?action=register[/url]
WorldToLoad = 117; // World to load when SMART starts
AutoRespond = True; // Use the auto-responder?
MaxWaitTime = 9 ; // Max time to wait for rock to mine in seconds
RockTol = 3 ; // Put higher if it is not finding the rock
RunDir = 'N'; // The direction to run when a fight or gas is found
RunFar = True ; // Run far if a fight is found?
StartPlayer = 0 ; // Player to start with
Procedure DeclarePlayers;
begin
HowManyPlayers := 4; //How many players will be mining
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := StartPlayer;
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Booleans[1] := True; // Mining new rocks?
Players[0].Strings[1] :='copper'; // What rock you are mining
Players[0].Integers[0] := 4; // Loads to do before switching
Players[0].Active := True; // Using this player
Writeln( IntToStr (HowManyPlayers) + ' Player(s)' );
end;
////////////////////////////END OF SETUP///////////////////////////////////////////////
const
VersionNumber ='3.3';
var
Levels, WelcomeBitmap, SmartLoadTime, PickTab, PickHandle : Integer;
cx, cy, k, TotalOres, CurrentActive, Loads, x, y : Integer;
DamagedPick, rocktime, rockcolor, FalsePlayers, PickGone : Integer;
const
copperold = 4483474; //4153734
tinold = 8421514; //4671308
ironold = 1646901; //1778747
goldold = 4102828; //5094867
coalold = 2570553; //2109488
mithrilold = 6111295; //4994100
addyold = 4741704; //5334353
coppernew = 4417423; //4879263
tinnew = 7171702; //10066597
ironnew = 2503249; //2503249
goldnew = 2083318; //2674427
coalnew = 1911595; //1647910
mithrilnew = 5716795; //6702661
addynew = 4610118; //5334353
Procedure RockColors;
begin
if (Players[CurrentPlayer].Booleans[1]) then
begin
case lowercase(Players[CurrentPlayer].Strings[1]) of
'copper' : rockcolor:= coppernew;
'tin' : rockcolor:= tinnew;
'iron' : rockcolor:= ironnew;
'coal' : rockcolor:= coalnew;
'mith' : rockcolor:= mithrilnew;
'mithril' : rockcolor:= mithrilnew;
'addy' : rockcolor:= addynew;
'adamant' : rockcolor:= addynew;
end;
end;
if (Players[CurrentPlayer].Booleans[1]) = False then
begin
case lowercase(Players[CurrentPlayer].Strings[1]) of
'copper' : rockcolor:= copperold;
'tin' : rockcolor:= tinold;
'iron' : rockcolor:= ironold;
'coal' : rockcolor:= coalold;
'mith' : rockcolor:= mithrilold;
'mithril' : rockcolor:= mithrilold;
'addy' : rockcolor:= addyold;
'adamant' : rockcolor:= addyold;
end;
end;
end;
Procedure Randoms;
begin
FindNormalRandoms;
If (FindFight) then RunAway(RunDir, RunFar, 1, 5000);
end;
procedure ProgressReport;
begin
CurrentActive := (HowManyPlayers) - (FalsePlayers);
ClearDebug;
SRLRandomsReport;
writeln('---------Rockmans Powerminer---------');
writeln('Worked For: '+ (TimeRunning));
writeln('Loads Mined and Dropped: ' + IntToStr(Loads));
writeln('Total ores mined so far: ' + IntToStr(TotalOres));
writeln('We have leveled ' + IntToStr(Levels) +' times so far');
writeln('You are using Version ' + (VersionNumber));
writeln('______________________________________');
writeln(' There are '+ IntToStr(CurrentActive) + ' player(s) still active.');
writeln(' ');
for k := 0 to HowManyPlayers - 1 do
begin
writeln('- ' + Players[k].Name + ':');
writeln(' Location: ' + Players[k].Loc + ' | Mining Level: ' +
IntToStr(Players[k].Integers[1]));
writeln(' Loads done so far: ' + IntToStr(Players[k].Integers[3]) +
' | Ores mined and dropped: ' + IntToStr(Players[k].Integers[2]));
writeln(' ');
end;
end;
Procedure LoadOreDTM;
Begin
Ore := DTMFromString('78DA636C6266607064624006DE7A4A0CFF813' +
'42310FF0702C616A01A53543510591809A4CB816AAC09A82904AA' +
'7123A0A60EA8C69F809A5E4C37A3AB0100470C0A46');
end;
Procedure LoadPaxeDTMs;
begin
DamagedPick := DTMFromString('78DA63B4666660F8C180020C14D9C0342394C' +
'F680B54F399010D30A2AA3107AAF94A408D11116A0C816ABE1350' +
'630254F393801A4722D47800D5FC2642CD5F026A5C8850030A1F5' +
'646C27EE727420D270135A640358CF8D5000017B60DA9');
Pickaxe := DTMFromString('78DA6374626260B8CD80020C14D918FE03694' +
'620FE0F048C1E986A20B2301248DB03D5DC20A0C684087302806A' +
'1E1250630154F309BF1A00172B0C31');
end;
Procedure LoadWelcomeBitmap;
begin
WelcomeBitmap := BitmapFromString(112, 1, 'beNqzdg4KifPxi4QgD6' +
'9gNIQm6Ojsi4xs7T2BCM6AsCG64AjZfKy2IBsFMQGiC6vD4GbC3YZ' +
'pJpoIsvlW1s64ENx2TA/CxeFcuHo0ZAUAretfkQ==');
end;
Procedure LoadBrokenPick;
begin
PickHandle := BitmapFromString(16, 27, 'beNqV070KwkAQBOAE' +
'/17AyiKmELQKgloJIWV8/xdyw8Cy3G1mNzBFim+Hyy03vuZxyW96k' +
'zRNK8F36EV+bsfv44QR+LUpMcP1oP7Z99bXI5u8YuLtSNJjxGIJcN' +
'JzLHHL7WmJL8r17zLlxQVaj5H65O6CCh8uFHGvZRMOfbh9Xs59fXX' +
'q3XL+iEg58cny+2VvFxSWw2fK4bvzTkYy5eol3Bf36R4GwN2X4rVH' +
't+QPszLuhg==');
PickGone := BitmapFromString(43, 11, 'beNqNVNEKgkAQvP9/8KEQu' +
't76AyOKKBKikKA+qtXJYdz1QllkvVtn5mZXU/pctxbP4wbxOKwtNL' +
'Hozll3u3ONZMjzEDVw3pc+SamHtV0sMrD7i9uOOZBJQSLgo8ASLk7' +
'FZNQg0ng5UrxOARQMnREWgV0cnzUGAj0jVHaAdEDptGDigwhQIj7S' +
'E4C8Tnm8Z2dvFBBbMBslB9wYuGOOB88lASZyCbt2DRcHDAK4juOgl' +
'bHREWchKRxggpwCmFvXLIcVCs48ivGjLjPv3mqbFcApoG0qW6QAsH' +
'MwZknnBQhpyQQ6wNZHB3C/7yv8AdBfN+dFAQUNKMBdrY5i9FEX4wf' +
'1x5BZdpoAASRypDpX/Kx00WlYModakL6VUibV');
end;
Procedure SetChats;
Begin
Wait(2500); // Helps wait for unsigned client to load up all the way
SetChat('On', 1);
SetChat('Off', 2);
end;
Procedure AutoResponder;
Begin
if AutoRespond = False then Exit;
if not LoggedIn then Exit;
If (InChat('Mining') or
InChat('mining lvl') or
InChat('mining lvls') or
InChat('mining lvl?') or
InChat('mining lvls?') or
InChat('mining lv') or
InChat('mine lv')) then
begin
case Random(6) of
0: TypeSend('I am ' + IntToStr(Players[CurrentPlayer].Integers[1]) + ' mining and loving it');
1: TypeSend('im ' + IntToStr(Players[CurrentPlayer].Integers[1]) + ' mining');
2: TypeSend(IntToStr(Players[CurrentPlayer].Integers[1]) + ' here');
3: TypeSend('lol too low');
4, 5: TypeSend(IntToStr(Players[CurrentPlayer].Integers[1]));
6: TypeSend(IntToStr(Players[CurrentPlayer].Integers[1]) + ' u?');
end;
end;
If (InChat('hey') or
InChat('sup') or
InChat('respond') or
InChat('wats up') or
InChat((Players[CurrentPlayer].Name)) or
InChat((Players[CurrentPlayer].Nick))) then
begin
case Random(5) of
0: TypeSend('umm hi');
1: TypeSend('hi there');
2: TypeSend('hoi');
3: TypeSend('whats up');
4: TypeSend('hows it goin?');
5: TypeSend('hi');
end;
end;
If (InChat('macro') or
InChat('bot') or
InChat('auto') or
InChat('autoer') or
InChat('macro?')) then
begin
case Random(7) of
0: TypeSend('not me');
1: TypeSend('im not a bot');
2: TypeSend('im not');
3: TypeSend('i hate autoers');
4: TypeSend('whos a bot?');
5: TypeSend('bots are bad for runescape');
6: TypeSend('jagex got rid of bots');
7: TypeSend('im not a bot, thats for sure!');
end;
end;
end;
Procedure AntiBannage;
begin
if not LoggedIn then Exit;
case Random(16) of
0: BoredHuman;
1: begin
HoverSkill('Mining', false);
wait(211 + random(267));
end;
2: begin
HoverSkill('Strength', false);
wait(132 + random(213));
end;
3: RandomRClick;
4: RandomRClick;
5: PickUpMouse;
6: AlmostLogout;
7: RandomMovement;
9: PickUpMouse;
10: GameTab(9);
11: GameTab(10);
12: DoEmote(1 + Random(9));
13: Begin
MakeCompass('E');
Wait(3000 + Random(2000));
MakeCompass('N');
End;
14: Begin
MakeCompass('W');
Wait(3000 + Random(2000));
MakeCompass('N');
End;
15: Begin
MakeCompass('S');
Wait(3000 + Random(2000));
MakeCompass('N');
End;
16: HoverSkill('Hitpoints', false);
end;
end;
Procedure GasRespond;
Begin
Case Random(13) of
0: TypeSend('i hate when i get a gas rock');
1: TypeSend('i hate when i have smokin rock');
2: TypeSend('almost broke a pick');
3: TypeSend('its steaming');
4: TypeSend('this rock might blow soon');
5: TypeSend('b00m');
6: TypeSend('steamy rock!');
7: TypeSend('take cover, its gonna blow');
8: TypeSend('that rock is bad');
9: TypeSend('dont break a pick');
10, 11, 12, 13: ;
end;
end;
Procedure CheckForGas;
Begin
if not LoggedIn then Exit;
If (GasFound(x, y)) then
begin
writeln('Gas! Running away...');
Randoms;
SetRun(True);
MakeCompass('N');
RunAway(RunDir, False, 2, 17000); //Runs away and stays
SetAngle(False);
RunAway(RunDir, False, 3, 1000); //Also just means RunBack
GasRespond;
SetAngle(True);
end;
end;
Procedure FixPick;
begin
FindPick;
Wait(300);
Randoms;
end;
Procedure PickCheck;
begin
LoadPaxeDTMs;
GameTab(PickTab);
If FindDTM(Pickaxe, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
FreeDTM(Pickaxe);
FreeDTM(DamagedPick);
GameTab(4);
Exit;
end;
If FindDTM(DamagedPick, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
writeln('Our pick has been damaged! Logging out...');
Players[CurrentPlayer].Loc := 'Broken/No Pick';
FreeDTM(Pickaxe);
FreeDTM(DamagedPick);
Logout;
Exit;
end;
LoadBrokenPick;
If FindDTM(PickHandle, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
writeln('Our pick head has flown off! Attempting to fix!');
FreeBitmap(PickHandle);
FreeBitmap(PickGone);
FixPick;
end;
end;
Procedure CheckPickaxe;
begin
if not LoggedIn then Exit;
LoadPaxeDTMs;
GameTab(5);
Wait(2000);
If FindDTM(Pickaxe, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
writeln('Found Pickaxe!');
PickTab := 5;
GameTab(4);
FreeDTM(Pickaxe);
FreeDTM(DamagedPick);
Exit;
end;
If FindDTM(DamagedPick, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
writeln('Pickaxe is damaged, logging out...');
Players[CurrentPlayer].Loc := 'Broken/No Pick';
FreeDTM(Pickaxe);
FreeDTM(DamagedPick);
Logout;
Exit;
end;
GameTab(4);
Wait(300);
If FindDTM(Pickaxe, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
writeln('Found Pickaxe!');
PickTab := 4;
Mouse(x, y, 0, 0, true);
FreeDTM(Pickaxe);
FreeDTM(DamagedPick);
Exit;
end;
If FindDTM(DamagedPick, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
writeln('Pickaxe is damaged, logging out...');
Players[CurrentPlayer].Loc := 'Broken/No Pick';
FreeDTM(Pickaxe);
FreeDTM(DamagedPick);
Logout;
Exit;
end;
writeln('Could not find pickaxe, logging out.....');
Logout;
Players[CurrentPlayer].Loc := 'Broken/No Pick';
end;
Procedure LevelClick;
begin
Levels := Levels + 1;
ClickToContinue;
Wait(400);
ClickToContinue;
Wait(400);
ClickToContinue;
end;
Function Leveled:Boolean;
begin
If FindText(cx, cy, 'advanced', SmallChars, 0, 340, 516, 478) then
begin
Result:= True;
end;
end;
Function RockGone:Boolean;
begin
If FindText(x, y, 'manage', SmallChars, 263, 471, 752, 498) then Result := True;
If FindText(x, y, 'currently', SmallChars, 263, 471, 752, 498) then Result := True;
end;
Procedure RockWait;
begin
If FindText(x, y, 'swing', SmallChars, 263, 471, 752, 498) then
begin
repeat
If RockGone then Exit;
Randoms;
Wait(500);
If RockGone then Exit;
If Leveled then LevelClick;
Randoms;
CheckForGas;
If RockGone then Exit;
If Leveled then LevelClick;
Randoms;
Wait(200);
Until (TimeFromMark(rocktime) > MaxWaitTime * 1000);
end;
end;
Procedure MineRocks;
begin
if not LoggedIn then Exit;
Players[CurrentPlayer].Integers[1] := GetSkillInfo('mining', false);
Players[CurrentPlayer].Loc := 'In Mine';
GameTab(4);
writeln('Mining ores...');
If FindObjCustom(x, y, ['ock', 'ine'], [rockcolor], RockTol) then
begin
repeat
FindObjCustom(x, y, ['ock', 'ine'], [rockcolor], RockTol);
Mouse(x, y, 4, 4, true);
Randoms;
AutoResponder;
CheckForGas;
MarkTime(rocktime);
Wait(3000);
Randoms;
RockWait;
until (invfull) or (not(LoggedIn)) or (FindNormalRandoms) or (FindFight);
end;
If not FindObjCustom(x, y, ['ock', 'ine'], [rockcolor], RockTol) then
begin
Wait(2500);
If not FindSymbol(x, y, 'mining spot') then
begin
writeln('Cannot find any rocks to mine. Logging player out...');
Logout;
Players[CurrentPlayer].Loc :='Not in Mine';
Exit;
end;
end;
AntiBannage;
writeln('------------');
writeln('Done!');
end;
function CountOres:integer; // By Munk
var
i,c:integer;
slot:tbox;
begin
for i:=1 to 28 do
begin
slot:=invbox(i);
if finddtm(ore,x,y,slot.x1,slot.y1,slot.x2,slot.y2) then inc(c);
end;
Players[CurrentPlayer].Integers[2] := Players[CurrentPlayer].Integers[2] + c;
TotalOres := TotalOres + c;
result := c;
end;
Procedure DropRocks;
begin
PickCheck;
if not LoggedIn then Exit;
GameTab(4);
writeln('------------');
writeln('Dropping Ores...');
AutoResponder;
Randoms;
LoadOreDTM;
CountOres;
repeat
FindDTM(Ore, x, y, 545, 203, 739, 465);
Mouse(x, y, 5, 5, false);
If FindText(cx, cy, 'Use', SmallChars, MIX1, MIY1, MIX2, MIY2) then
begin
ChooseOption('cel');
Mouse(x, y, 5, 5, false);
end;
ChooseOption('rop');
Wait(450);
until not (FindDTM(Ore, x, y, 545, 203, 739, 465));
FreeDTM(Ore);
Loads := Loads + 1;
ReportVars[0] := ReportVars[0] + 1;
SendSRLReport;
Players[CurrentPlayer].Integers[3] := Players[CurrentPlayer].Integers[3] + 1;
ProgressReport;
ArrangeInv;
end;
Procedure Signature;
Begin
ClearDebug;
writeln('Rockmans Powerminer Version '+ VersionNumber);
writeln('_______________________________');
wait(500);
writeln('Good luck and hope for a nice prog ;)');
writeln('_______________________________');
wait(500);
writeln('Starting SMART.....');
writeln('_______________________________');
wait(1500);
end;
Procedure CheckStats;
begin
if (YourSRLId = '') or (YourSRLPassword = '') then
begin
ClearDebug;
writeln('You need to register for SRL stats.');
writeln('Go here to register:');
writeln('http://srl-forums.com/stats/index.php?action=register');
writeln('It only takes a second and it helps you and me!');
TerminateScript;
end;
end;
Procedure LoadSMART;
begin
SmartSetupEx(WorldToLoad, False, False)
SetTargetDC(SmartGetDC);
LoadWelcomeBitmap;
ClearDebug;
If (LoggedIn) then Exit;
writeln('Waiting for SMART to load...');
MarkTime(SmartLoadTime);
repeat
Wait(500);
until (FindBitmap(WelcomeBitmap, x, y)) or (SmartLoadTime > 45000);
writeln('----');
writeln('SMART has loaded. Logging In...');
FreeBitmap(WelcomeBitmap);
end;
begin
CheckStats;
Signature;
LoadSMART;
SetupSRL;
SRLId := YourSRLId;
SRLPassword:= YourSRLPassword;
ActivateClient;
ScriptID := '598';
DeclarePlayers;
RockColors;
LoginPlayer;
repeat
FTWait(8);
SetAngle(True);
MakeCompass('n');
SetChats;
CheckPickaxe;
Randoms;
repeat
MineRocks;
DropRocks;
until(Loads = Players[CurrentPlayer].Integers[0]) or (not(LoggedIn));
If (Players[CurrentPlayer].loc = 'Unknown')or(Players[CurrentPlayer].loc = 'Broken/No Pick')or(Players[CurrentPlayer].loc ='Not in Mine') then
begin
FalsePlayers := FalsePlayers + 1;
NextPlayer(False);
end;
If (Players[CurrentPlayer].loc = 'In Mine') then NextPlayer(True);
until (FalsePlayers = HowManyPlayers);
end.——————————————————
<!– END TEMPLATE: formanswers –>