han941306
2009-04-27 10:02:36
How Long have You Played Runescape?
6 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
ASP, PHP, Pascal, JavaScript, C++
Are you a member of any other communities?
Sythe
Tell us about yourself…
Please show us one (or multiple) of your scripts.
6 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
ASP, PHP, Pascal, JavaScript, C++
Are you a member of any other communities?
Sythe
Tell us about yourself…
From: han941306
I am a student, I like learning new languages and doing some exiting things.
Please show us one (or multiple) of your scripts.
//Test Miner 0.1 Beta by Han
//Read Before Using :
//Wield Pickaxe First, And Put the Character in the Varrock East Mine.
//This Script is just help players boost Mining Levels.
//The Ores drop instead of banking.
//The failsafe is not doing so well, more failsafes will be added in next version.
Program Miner;
{.include SRL\SRL\Misc\Smart.scar}
{.include SRL\SRL.scar}
{.include SRL\SRL\Skill\Mining.scar}
var
Loads, FailAtt, HaltNo : integer;
////////////////////////////Setup///////////////////////////////////
const
CFailAtt = 5; //Fail Attempt Before Switching Characters
Procedure DeclarePlayers;
begin
HowManyPlayers := 3;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := true;
Players[0].Strings[0] := 'Copper'; //Which Ore?
Players[0].Integers[0] := 20; //Loads to do
Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := '';
Players[1].Active := true;
Players[1].Strings[0] := 'Copper'; //Which Ore?
Players[1].Integers[0] := 1; //Loads to do
Players[2].Name := '';
Players[2].Pass := '';
Players[2].Nick := '';
Players[2].Active := true;
Players[2].Strings[0] := 'Copper'; //Which Ore?
Players[2].Integers[0] := 1; //Loads to do
end;
/////////////////Script Underneath, Don't Modify////////////////////
Procedure RandomKeyboard;
begin
case Random(6) of
0:MakeCompass('N');
1:MakeCompass('E');
2:MakeCompass('W');
3:MakeCompass('S');
4:SetAngle(True);
5:SetAngle(False);
end;
end;
Procedure AntiBan(RanNum : integer);
begin
case RanNum of
0:RandomRClick;
1:HoverSkill('mining', false);
2:PickUpMouse;
3:RandomMovement;
4:BoredHuman;
5:RandomKeyboard;
end;
end;
Procedure CheckLogin;
begin
if (not loggedIn) then Exit;
end;
Procedure CWait(Times : integer);
begin
wait(Times * (100 + Random(50)));
end;
Procedure ProgressReport;
var
HaltState : String;
begin
case HaltNo of
0:HaltState := 'Done all loads successfully.';
1:HaltState := 'Lost / Ore Not Found.'
end;
WriteLn('...........Progress Report...........');
WriteLn('-------------------------------------');
WriteLn('Player : ' + Players[CurrentPlayer].Nick);
WriteLn('Loads done : ' + IntToStr(Loads));
WriteLn('State : ' + HaltState);
WriteLn('Time Elapsed : ' + TimeRunning);
WriteLn('-------------------------------------');
end;
Procedure MineOre;
var
OreColor : array[0..1] of integer;
x, y: integer;
begin
case LowerCase(Players[CurrentPlayer].Strings[0]) of
'copper':
begin
OreColor[0] := 4483989;
OreColor[1] := 3824510;
repeat
if (FindObjTPA(x, y, OreColor[0], 10, 2, 15, 25, 10, ['Rock', 'Roc', 'ock'])) then
begin
if (FindObjTPA(x, y, OreColor[1], 10, 2, 15, 25, 10, ['Rock', 'Roc', 'ock'])) then
begin
if (not FindGas(x, y)) then
begin
Mouse(x, y, 2, 2, false);
ChooseOption('Mine');
Exit;
end;
end;
end else
begin
FailAtt := FailAtt + 1;
WriteLn('Ore Not Found, tried ' + IntToStr(FailAtt) + ' Times.');
MakeCompass('N');
SetAngle(True);
end;
until (FailAtt = CFailAtt);
WriteLn('Ore Not Found, Probably Got Lost.');
HaltNo := 1;
Exit;
end;
'tin':
begin
OreColor[0] := 7566204;
OreColor[1] := 6908273;
repeat
if (FindObjTPA(x, y, OreColor[0], 10, 2, 15, 25, 10, ['Rock', 'Roc', 'ock'])) then
begin
if (FindObjTPA(x, y, OreColor[1], 10, 2, 15, 25, 10, ['Rock', 'Roc', 'ock'])) then
begin
if (not FindGas(x, y)) then
begin
Mouse(x, y, 2, 2, false);
ChooseOption('Mine');
Exit;
end;
end;
end else
begin
FailAtt := FailAtt + 1;
WriteLn('Ore Not Found, tried ' + IntToStr(FailAtt) + ' Times.');
MakeCompass('N');
SetAngle(True);
end;
until (FailAtt = CFailAtt);
WriteLn('Ore Not Found, Probably Got Lost.');
HaltNo := 1;
Exit;
end;
'iron':
begin
OreColor[0] := 2503251;
OreColor[1] := 1515315;
repeat
if (FindObjTPA(x, y, OreColor[0], 10, 2, 15, 25, 10, ['Rock', 'Roc', 'ock'])) then
begin
if (FindObjTPA(x, y, OreColor[1], 10, 2, 15, 25, 10, ['Rock', 'Roc', 'ock'])) then
begin
if (not FindGas(x, y)) then
begin
Mouse(x, y, 2, 2, false);
ChooseOption('Mine');
Exit;
end;
end;
end else
begin
FailAtt := FailAtt + 1;
WriteLn('Ore Not Found, tried ' + IntToStr(FailAtt) + ' Times.');
MakeCompass('N');
SetAngle(True);
end;
until (FailAtt = CFailAtt);
WriteLn('Ore Not Found, Probably Got Lost.');
HaltNo := 1;
Exit;
end;
end;
end;
Procedure Init;
begin
Loads := 0;
LampSkill := 'mining';
ClearDebug;
ClearReport;
SmartSetupEx(73, False, True, False);
SetTargetDC(SmartGetDC);
SetupSRL;
DeclarePlayers;
SetAudioOff;
LoginPlayer;
end;
Procedure MainLoop;
begin
CheckLogin;
repeat
repeat
CheckLogin;
FailAtt := 0;
ChatsOff;
SetAngle(True);
SetRun(true);
MineOre;
CWait(30);
AntiBan(Random(6));
FindNormalRandoms;
if (InvFull) then
begin
DropAll;
Loads := Loads + 1;
end;
until ((Loads = Players[CurrentPlayer].Integers[0]) or (FailAtt = CFailAtt));
ProgressReport;
Logout;
Cwait(5);
Players[CurrentPlayer].Active := false;
repeat
if(CurrentPlayer = HowManyPlayers - 1) then exit;
Inc(CurrentPlayer);
until(Players[CurrentPlayer].Active = true);
NextPlayer(Players[CurrentPlayer].Active);
Loads := 0;
until(AllPlayersInactive);
writeLn('All Players Finished.');
end;
begin
Init;
MainLoop;
end.