rostaryms
2008-02-24 19:21:31
<!– BEGIN TEMPLATE: formanswers –>
rostaryms - SRL Member Application Form
rostaryms
What is the meaning to life?
Where you Referred to SRL? If yes, by whom?
no
Programming Knowledge
html, actionscript
Other Communitys
I have an account in the kyab community
How Long have You Played Runescape
2 years
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
I began playing runescape in 6th grade. I found aryan sometime after and started using that. Eventually my old main got banned from aryan. I appealed the ban and it was excepted, but I still quit. Then, this summer, I made my new main. I found the srl forums when searching for bots. I started right away on trying to learn scar and srl. My first few scripts were not very powerful, but I think the miner that I am submitting is. If I am accepted I hope that I can give this script to the community and continue to make more.
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
This is a varrock east miner. It mines iron, or copper and tin. It has a working deathwalk. It should run until all the players are stuck in randoms like mime, maze, or classroom, ect…
——————————————————
<!– END TEMPLATE: formanswers –>
rostaryms - SRL Member Application Form
rostaryms
What is the meaning to life?
Where you Referred to SRL? If yes, by whom?
no
Programming Knowledge
html, actionscript
Other Communitys
I have an account in the kyab community
How Long have You Played Runescape
2 years
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
I began playing runescape in 6th grade. I found aryan sometime after and started using that. Eventually my old main got banned from aryan. I appealed the ban and it was excepted, but I still quit. Then, this summer, I made my new main. I found the srl forums when searching for bots. I started right away on trying to learn scar and srl. My first few scripts were not very powerful, but I think the miner that I am submitting is. If I am accepted I hope that I can give this script to the community and continue to make more.
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
This is a varrock east miner. It mines iron, or copper and tin. It has a working deathwalk. It should run until all the players are stuck in randoms like mime, maze, or classroom, ect…
Program VarrockEastMinerBanker; // By Rostaryms
{.include SRL/SRL/Misc/Smart.scar}
{.include SRL/SRL.scar}
{.include SRL/SRL/Misc/Path.scar}
{.include SRL/SRL/Skill/Mining.scar}
{.include SRL/SRL/Skill/Magic.scar}
{
** SCRIPT DESIGNED BY ROSTARYMS **
MKFindGas, OreMined : created by MasterKill
LogoutLoop : created by Timer
Description: Varrock east miner and banker
Requirements:
- SCAR Divi 3.14
- SRL 4, Revision 14
Setup
- Fill out declare players
- Start with your players in varrock east bank, the mine,
or the lumbridge death spawn (mine recomended)
- Have extra pickaxes in SPOT 1 of your bank
- Make sure your pickaxe is in the inv SPOT 1 or WIELDED
- Press play
}
Var
x, y, PickColor, Ores, NoMine, GasNum, MineTime, Breaks,
NextBreakSet, MiningTalks, DeathWalks, PickaxeDTM, BrokenPickDTM,
AbMark, MineWait, AllResets : Integer;
MineSymbol, WaterSymbol, FishSymbol, QuestSymbol : Integer;
PickInv, AbBool : Boolean;
wangle : Extended;
Const
// Dont touch these unless you find problems
pickcol1 = 2110788;
pickcol2 = 4473930;
pickcol3 = 6645357;
pickcol4 = 5059636;
pickcol5 = 3227185;
pickcol6 = 5656122;
Procedure PlayerSetup; Forward;
Procedure LoginLoop; Forward;
Procedure WalkBank; Forward;
Procedure BankStuff(reason : String); Forward;
Procedure WalkMine; Forward;
Function MyFindPick: Boolean; Forward;
Function AbleDeathWalk: Boolean; Forward;
Function MyFindDead : Boolean; Forward;
Function DeathWalk(AddPReport : Boolean): Boolean; Forward;
Procedure DeclarePlayers;
Begin
Status('DeclarePlayers');
SRLID := '';
SRLPassword := '';
HowManyPlayers := 4;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
// Players[].Active is in FirstPlayerSetup;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Integers[0] := 20; // Amount of minutes to bank if still in the mine
Players[0].Booleans[0] := true; // Mine iron?
Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := '';
Players[1].Integers[0] := 20; // Amount of minutes to bank if still in the mine
Players[1].Booleans[0] := true; // Mine iron?
Players[2].Name := '';
Players[2].Pass := '';
Players[2].Nick := '';
Players[2].Integers[0] := 20; // Amount of minutes to bank if still in the mine
Players[2].Booleans[0] := true; // Mine iron?
Players[3].Name := '';
Players[3].Pass := '';
Players[3].Nick := '';
Players[3].Integers[0] := 20; // Amount of minutes to bank if still in the mine
Players[3].Booleans[0] := true; // Mine iron?
ClearDebug;
End;
// I did this because a problem was occuring with SolveNonTalkingRandoms,
// for some reason it was detecting no gametab and making the player
// in-active. This doesn't need gametab detection because the script
// will detect if it is in a non-solvable random anyways.
Function MyFindNormalRandoms: Boolean;
Var
i: Integer;
Begin
w_UpdateLastLine;
for i := 1 to 5 do
begin
case I of
1: Respond;
2: Result := FindTalk;
3: Result := FindLamp('mining');
4: if FindBox then Result := SolveBox;
5: Result := FindMod;
end;
if Result then Break;
end;
End;
// So when it clicks an ore, it doesn't wait 30 seconds if the flag stays
Function MineFlag: Boolean;
Var
timeout, x, y: Integer;
Begin
if (FindColor(x, y, 255, MMX1, MMY1, MMX2, MMY2)) then
begin
Result := True;
repeat
Wait(100);
timeout := timeout + 1;
until (not FindColor(x, y, 255, MMX1, MMY1, MMX2, MMY2)) or (timeout > 50);
end;
End;
Function ActiveCount: Integer;
Var
a, b : Integer;
Begin
b := 0;
For a := 0 to (HowManyPlayers - 1) do
begin
if (Players[a].Active = true) then b := b + 1;
end;
Result := b;
End;
Procedure PReport;
Var
a : Integer;
Begin
Status('PReport');
ClearDebug;
Writeln(TimeRunning);
Writeln('Active Count : ' + IntToStr(ActiveCount));
Writeln('Current Player : ' + Players[CurrentPlayer].Name);
Writeln('Pickaxe type : ' + Players[CurrentPlayer].Strings[0]);
Writeln('Mining Level : ' + IntToStr(Players[CurrentPlayer].Integers[3]));
Writeln('Breaks : ' + IntToStr(Breaks));
Writeln('Loads Done : ' + IntToStr(Banks));
Writeln('Ores Mined : ' + IntToStr(Ores));
Writeln('Ores Missed : ' + IntToStr(NoMine));
Writeln('Gasses Avoided : ' + IntToStr(GasNum));
Writeln('Fights Handled : ' + IntToStr(Fights));
Writeln('Mining Talks : ' + IntToStr(MiningTalks));
Writeln('Death Walks : ' + IntToStr(DeathWalks));
Writeln('Full Resets : ' + IntToStr(AllResets));
Disguise('Ores Mined : ' + IntToStr(Ores));
Writeln('');
for a := 0 to (HowManyPlayers - 1) do
begin
if (Players[a].Active = false) then
begin
Writeln(Players[a].Name + ': ' + Players[a].Strings[1]);
end else
begin
if (a = CurrentPlayer) then
begin
Writeln(Players[a].Name + ': Currently Active');
end else
Writeln(Players[a].Name + ': Active');
end;
end;
SRLRandomsReport;
SendSRLReport;
End;
Procedure FinalReport;
Var
i : Integer;
Begin
Status('FinalReport');
for i := 0 to (HowManyPlayers - 1) do
begin
Writeln('');
Writeln(Players[i].name);
Writeln(' ' + IntToStr(Players[i].Worked));
Writeln(' Mining Level : ' + IntToStr(Players[i].Integers[3]));
Writeln(' Loads Done : ' + IntToStr(Players[i].Banked));
Writeln(' Ores Mined : ' + IntToStr(Players[i].Integers[2]));
Writeln(' Gasses Avoided : ' + IntToStr(Players[i].Integers[4]));
Writeln(' Fights Handled : ' + IntToStr(Players[i].Integers[5]));
Writeln(' Death Walks : ' + IntToStr(Players[i].Integers[6]));
Writeln(' ' + Players[i].Strings[1]); // Failed reason
end;
End;
Procedure EndScript;
Begin
PReport;
FinalReport;
Status('EndScript');
Disguise('Script Finished');
TerminateScript;
End;
Procedure LogoutLoop; // Thanks Timer
Begin
repeat
if FindFight then RunAway('N', true, 1, 4000 + random(2000));
Logout;
until(not LoggedIn);
End;
Procedure AllReset;
Var
a : Integer;
Begin
for a := 0 to (HowManyPlayers - 1) do
begin
if (Players[a].Booleans[1] = true) then
Players[a].Active := true;
end;
for a := 0 to (ActiveCount - 1) do
begin
if (ActiveCount > 1) then NextPlayer(true);
if (ActiveCount = 1) then LoginPlayer;
Wait(1000 + random(1000));
if TabExists(7) then
begin
CastSpell(1);
Wait(17000 + random(3000));
LogoutLoop;
end else
begin
Players[a].Booleans[1] := false;
Players[a].Active := false;
end;
end;
AllResets := AllResets + 1;
if (ActiveCount = 0) then EndScript;
if (ActiveCount > 1) then NextPlayer(true);
PlayerSetup;
End;
Procedure AllResetWait;
Begin
Status('AllResetWait');
Writeln('');
Writeln('Started waiting at ' + TheTime);
Writeln('Waiting for 30 minutes');
Disguise('30 Minutes... ' + IntToStr(Ores));
Sleep(1800001 + random(120000));
AllReset;
End;
Procedure Failed(txt : string);
Begin
Status('Failed');
Disguise('Next Player');
Players[CurrentPlayer].Strings[1] := txt;
Writeln(txt);
LogoutLoop;
End;
Procedure GoPath(int : Integer);
Begin
RoadColor := FindRoadColor;
PReport;
Status('Walking');
Disguise('Walking... ' + IntToStr(Ores));
WalkPath(int);
End;
Procedure GoPathVar(int : Integer);
Begin
RoadColor := FindVarrockRoadColor;
PReport;
Status('Walking');
Disguise('Walking... ' + IntToStr(Ores));
WalkPath(int);
End;
Procedure PathToMine;
Begin
RoadColor := FindVarrockRoadColor;
Path[0].Mainpoint.x:=660;
Path[0].Mainpoint.y:=48;
Path[0].Subpoints[0].x:=591;
Path[0].Subpoints[0].y:=42;
Path[0].Subpoints[1].x:=602;
Path[0].Subpoints[1].y:=94;
Path[0].Subpoints[2].x:=624;
Path[0].Subpoints[2].y:=92;
Path[0].Subpoints[3].x:=642;
Path[0].Subpoints[3].y:=52;
Path[1].Mainpoint.x:=684;
Path[1].Mainpoint.y:=87;
Path[1].Subpoints[0].x:=584;
Path[1].Subpoints[0].y:=92;
Path[1].Subpoints[1].x:=614;
Path[1].Subpoints[1].y:=85;
Path[1].Subpoints[2].x:=643;
Path[1].Subpoints[2].y:=86;
Path[1].Subpoints[3].x:=669;
Path[1].Subpoints[3].y:=61;
Path[2].Mainpoint.x:=675;
Path[2].Mainpoint.y:=106;
Path[2].Subpoints[0].x:=617;
Path[2].Subpoints[0].y:=53;
Path[2].Subpoints[1].x:=619;
Path[2].Subpoints[1].y:=84;
Path[2].Subpoints[2].x:=674;
Path[2].Subpoints[2].y:=50;
Path[2].Subpoints[3].x:=664;
Path[2].Subpoints[3].y:=80;
Path[2].Subpoints[4].x:=676;
Path[2].Subpoints[4].y:=108;
Path[3].Mainpoint.x:=640;
Path[3].Mainpoint.y:=138;
Path[3].Subpoints[0].x:=602;
Path[3].Subpoints[0].y:=61;
Path[3].Subpoints[1].x:=630;
Path[3].Subpoints[1].y:=34;
Path[3].Subpoints[2].x:=641;
Path[3].Subpoints[2].y:=98;
Path[3].Subpoints[3].x:=634;
Path[3].Subpoints[3].y:=127;
Path[4].Mainpoint.x:=641;
Path[4].Mainpoint.y:=141;
Path[4].Subpoints[0].x:=634;
Path[4].Subpoints[0].y:=46;
Path[4].Subpoints[1].x:=625;
Path[4].Subpoints[1].y:=67;
Path[4].Subpoints[2].x:=642;
Path[4].Subpoints[2].y:=103;
Path[4].Subpoints[3].x:=652;
Path[4].Subpoints[3].y:=126;
Path[4].Subpoints[4].x:=639;
Path[4].Subpoints[4].y:=145;
Path[5].Mainpoint.x:=637;
Path[5].Mainpoint.y:=134;
Path[5].Subpoints[0].x:=629;
Path[5].Subpoints[0].y:=51;
Path[5].Subpoints[1].x:=636;
Path[5].Subpoints[1].y:=66;
Path[5].Subpoints[2].x:=602;
Path[5].Subpoints[2].y:=106;
Path[5].Subpoints[3].x:=634;
Path[5].Subpoints[3].y:=116;
Path[5].Subpoints[4].x:=619;
Path[5].Subpoints[4].y:=143;
Path[6].Mainpoint.x:=630;
Path[6].Mainpoint.y:=110;
Path[6].Subpoints[0].x:=621;
Path[6].Subpoints[0].y:=41;
Path[6].Subpoints[1].x:=595;
Path[6].Subpoints[1].y:=62;
Path[6].Subpoints[2].x:=609;
Path[6].Subpoints[2].y:=95;
Path[6].Subpoints[3].x:=630;
Path[6].Subpoints[3].y:=109;
Path[6].Subpoints[4].x:=650;
Path[6].Subpoints[4].y:=114;
Path[6].Subpoints[5].x:=652;
Path[6].Subpoints[5].y:=141;
Path[7].Mainpoint.x:=630;
Path[7].Mainpoint.y:=133;
Path[7].Subpoints[0].x:=609;
Path[7].Subpoints[0].y:=60;
Path[7].Subpoints[1].x:=611;
Path[7].Subpoints[1].y:=77;
Path[7].Subpoints[2].x:=600;
Path[7].Subpoints[2].y:=110;
Path[7].Subpoints[3].x:=632;
Path[7].Subpoints[3].y:=135;
Path[7].Subpoints[4].x:=654;
Path[7].Subpoints[4].y:=117;
Path[7].Subpoints[5].x:=653;
Path[7].Subpoints[5].y:=97;
End;
Procedure PathToBank;
Begin
RoadColor := FindVarrockRoadColor;
Path[8].Mainpoint.x:=637;
Path[8].Mainpoint.y:=16;
Path[8].Subpoints[0].x:=611;
Path[8].Subpoints[0].y:=64;
Path[8].Subpoints[1].x:=623;
Path[8].Subpoints[1].y:=52;
Path[8].Subpoints[2].x:=638;
Path[8].Subpoints[2].y:=40;
Path[8].Subpoints[3].x:=660;
Path[8].Subpoints[3].y:=51;
Path[8].Subpoints[4].x:=663;
Path[8].Subpoints[4].y:=76;
Path[9].Mainpoint.x:=636;
Path[9].Mainpoint.y:=30;
Path[9].Subpoints[0].x:=629;
Path[9].Subpoints[0].y:=43;
Path[9].Subpoints[1].x:=599;
Path[9].Subpoints[1].y:=63;
Path[9].Subpoints[2].x:=614;
Path[9].Subpoints[2].y:=81;
Path[9].Subpoints[3].x:=613;
Path[9].Subpoints[3].y:=97;
Path[9].Subpoints[4].x:=633;
Path[9].Subpoints[4].y:=111;
Path[10].Mainpoint.x:=607;
Path[10].Mainpoint.y:=38;
Path[10].Subpoints[0].x:=607;
Path[10].Subpoints[0].y:=40;
Path[10].Subpoints[1].x:=622;
Path[10].Subpoints[1].y:=75;
Path[10].Subpoints[2].x:=594;
Path[10].Subpoints[2].y:=126;
Path[10].Subpoints[3].x:=608;
Path[10].Subpoints[3].y:=141;
Path[10].Subpoints[4].x:=621;
Path[10].Subpoints[4].y:=121;
Path[11].Mainpoint.x:=597;
Path[11].Mainpoint.y:=38;
Path[11].Subpoints[0].x:=599;
Path[11].Subpoints[0].y:=37;
Path[11].Subpoints[1].x:=620;
Path[11].Subpoints[1].y:=19;
Path[11].Subpoints[2].x:=636;
Path[11].Subpoints[2].y:=71;
Path[11].Subpoints[3].x:=646;
Path[11].Subpoints[3].y:=123;
Path[12].Mainpoint.x:=567;
Path[12].Mainpoint.y:=94;
Path[12].Subpoints[0].x:=579;
Path[12].Subpoints[0].y:=91;
Path[12].Subpoints[1].x:=595;
Path[12].Subpoints[1].y:=59;
Path[12].Subpoints[2].x:=606;
Path[12].Subpoints[2].y:=73;
Path[12].Subpoints[3].x:=656;
Path[12].Subpoints[3].y:=61;
Path[12].Subpoints[4].x:=659;
Path[12].Subpoints[4].y:=105;
End;
Procedure PathDeathWalk1;
Begin
RoadColor := FindRoadColor;
Path[13].Mainpoint.x:=667;
Path[13].Mainpoint.y:=40;
Path[13].Subpoints[0].x:=667;
Path[13].Subpoints[0].y:=38;
Path[13].Subpoints[1].x:=669;
Path[13].Subpoints[1].y:=74;
Path[13].Subpoints[2].x:=690;
Path[13].Subpoints[2].y:=76;
Path[13].Subpoints[3].x:=617;
Path[13].Subpoints[3].y:=87;
Path[13].Subpoints[4].x:=596;
Path[13].Subpoints[4].y:=88;
Path[14].Mainpoint.x:=605;
Path[14].Mainpoint.y:=24;
Path[14].Subpoints[0].x:=608;
Path[14].Subpoints[0].y:=27;
Path[14].Subpoints[1].x:=616;
Path[14].Subpoints[1].y:=41;
Path[14].Subpoints[2].x:=627;
Path[14].Subpoints[2].y:=64;
Path[14].Subpoints[3].x:=642;
Path[14].Subpoints[3].y:=119;
Path[14].Subpoints[4].x:=626;
Path[14].Subpoints[4].y:=114;
Path[14].Subpoints[5].x:=589;
Path[14].Subpoints[5].y:=126;
Path[15].Mainpoint.x:=610;
Path[15].Mainpoint.y:=38;
Path[15].Subpoints[0].x:=610;
Path[15].Subpoints[0].y:=41;
Path[15].Subpoints[1].x:=612;
Path[15].Subpoints[1].y:=67;
Path[15].Subpoints[2].x:=638;
Path[15].Subpoints[2].y:=100;
Path[15].Subpoints[3].x:=650;
Path[15].Subpoints[3].y:=128;
Path[16].Mainpoint.x:=613;
Path[16].Mainpoint.y:=37;
Path[16].Subpoints[0].x:=612;
Path[16].Subpoints[0].y:=36;
Path[16].Subpoints[1].x:=616;
Path[16].Subpoints[1].y:=54;
Path[16].Subpoints[2].x:=634;
Path[16].Subpoints[2].y:=64;
Path[16].Subpoints[3].x:=632;
Path[16].Subpoints[3].y:=113;
Path[16].Subpoints[4].x:=647;
Path[16].Subpoints[4].y:=129;
Path[17].Mainpoint.x:=598;
Path[17].Mainpoint.y:=28;
Path[17].Subpoints[0].x:=596;
Path[17].Subpoints[0].y:=48;
Path[17].Subpoints[1].x:=610;
Path[17].Subpoints[1].y:=78;
Path[17].Subpoints[2].x:=631;
Path[17].Subpoints[2].y:=98;
Path[17].Subpoints[3].x:=648;
Path[17].Subpoints[3].y:=106;
Path[18].Mainpoint.x:=624;
Path[18].Mainpoint.y:=34;
Path[18].Subpoints[0].x:=631;
Path[18].Subpoints[0].y:=44;
Path[18].Subpoints[1].x:=623;
Path[18].Subpoints[1].y:=62;
Path[18].Subpoints[2].x:=632;
Path[18].Subpoints[2].y:=71;
Path[18].Subpoints[3].x:=639;
Path[18].Subpoints[3].y:=122;
Path[18].Subpoints[4].x:=654;
Path[18].Subpoints[4].y:=143;
Path[19].Mainpoint.x:=656;
Path[19].Mainpoint.y:=26;
Path[19].Subpoints[0].x:=652;
Path[19].Subpoints[0].y:=25;
Path[19].Subpoints[1].x:=658;
Path[19].Subpoints[1].y:=30;
Path[19].Subpoints[2].x:=631;
Path[19].Subpoints[2].y:=52;
Path[19].Subpoints[3].x:=601;
Path[19].Subpoints[3].y:=115;
Path[19].Subpoints[4].x:=625;
Path[19].Subpoints[4].y:=127;
Path[20].Mainpoint.x:=662;
Path[20].Mainpoint.y:=38;
Path[20].Subpoints[0].x:=607;
Path[20].Subpoints[0].y:=144;
Path[20].Subpoints[1].x:=601;
Path[20].Subpoints[1].y:=130;
Path[20].Subpoints[2].x:=634;
Path[20].Subpoints[2].y:=88;
Path[20].Subpoints[3].x:=664;
Path[20].Subpoints[3].y:=37;
Path[20].Subpoints[4].x:=678;
Path[20].Subpoints[4].y:=37;
Path[21].Mainpoint.x:=679;
Path[21].Mainpoint.y:=77;
Path[21].Subpoints[0].x:=588;
Path[21].Subpoints[0].y:=133;
Path[21].Subpoints[1].x:=595;
Path[21].Subpoints[1].y:=135;
Path[21].Subpoints[2].x:=595;
Path[21].Subpoints[2].y:=127;
Path[21].Subpoints[3].x:=601;
Path[21].Subpoints[3].y:=127;
Path[21].Subpoints[4].x:=642;
Path[21].Subpoints[4].y:=85;
Path[21].Subpoints[5].x:=676;
Path[21].Subpoints[5].y:=75;
End;
Procedure PathDeathWalk2;
Begin
RoadColor := FindVarrockRoadColor;
Path[22].Mainpoint.x:=673;
Path[22].Mainpoint.y:=54;
Path[22].Subpoints[0].x:=588;
Path[22].Subpoints[0].y:=54;
Path[22].Subpoints[1].x:=603;
Path[22].Subpoints[1].y:=41;
Path[22].Subpoints[2].x:=618;
Path[22].Subpoints[2].y:=59;
Path[23].Mainpoint.x:=684;
Path[23].Mainpoint.y:=78;
Path[23].Subpoints[0].x:=564;
Path[23].Subpoints[0].y:=77;
Path[23].Subpoints[1].x:=652;
Path[23].Subpoints[1].y:=95;
Path[23].Subpoints[2].x:=674;
Path[23].Subpoints[2].y:=78;
Path[23].Subpoints[3].x:=691;
Path[23].Subpoints[3].y:=80;
Path[24].Mainpoint.x:=661;
Path[24].Mainpoint.y:=41;
Path[24].Subpoints[0].x:=577;
Path[24].Subpoints[0].y:=94;
Path[24].Subpoints[1].x:=602;
Path[24].Subpoints[1].y:=107;
Path[24].Subpoints[2].x:=654;
Path[24].Subpoints[2].y:=94;
Path[24].Subpoints[3].x:=663;
Path[24].Subpoints[3].y:=42;
Path[25].Mainpoint.x:=617;
Path[25].Mainpoint.y:=25;
Path[25].Subpoints[0].x:=619;
Path[25].Subpoints[0].y:=36;
Path[25].Subpoints[1].x:=648;
Path[25].Subpoints[1].y:=50;
Path[25].Subpoints[2].x:=649;
Path[25].Subpoints[2].y:=65;
Path[25].Subpoints[3].x:=640;
Path[25].Subpoints[3].y:=103;
Path[25].Subpoints[4].x:=636;
Path[25].Subpoints[4].y:=139;
End;
Procedure LoadPaths(ThePath : Integer);
Begin
case ThePath of
1: PathToMine;
2: PathToBank;
3: PathDeathWalk1;
4: PathDeathWalk2;
end;
End;
Procedure SetupDTM;
Begin
Status('SetupDTM');
PickaxeDTM := DTMFromString('78DA6314606060E06540038C4824909605125' +
'C04D470020976026A40662810502302245808A801B9590CBF1A00' +
'612000CF');
BrokenPickDTM := DTMFromString('78DA6334676660A8656440058C4824907603A' +
'A2926A0C61BA8A688801A3BA09A4C026A8C806A728950D34A408D' +
'13504D3E7E3500C8FC050A');
End;
Procedure AutoRetal(which : integer); // 1 = on, 2 = off
Begin
if not LoggedIn then Exit;
Status('AutoRetal');
GameTab(1);
Wait(200 + random(200));
case which of
1: begin
if (not FindColorTolerance(x, y, 1711220, 618, 384, 625, 390, 15)) then MouseBox(570, 360, 715, 399, 1);
Wait(200 + random(200));
end;
2: begin
if (FindColorTolerance(x, y, 1711220, 618, 384, 625, 390, 15)) then MouseBox(570, 360, 715, 399, 1);
Wait(200 + random(200));
end;
end;
End;
Procedure ScreenSettings;
Begin
if not LoggedIn then Exit;
Status('ScreenSettings');
SetAngle(true);
Wait(100 + random(200));
MakeCompass('N');
Wait(100 + random(200));
AutoRetal(2);
End;
Procedure HomeTele;
Begin
if not LoggedIn then Exit;
CastSpell(1);
Wait(17000 + random(2000));
if (not MyFindDead) then Failed('Home teleport did not work...');
End;
Function WhereAreWe: String;
Begin
if not LoggedIn then Failed('Where the hell are we?');
Status('WhereAreWe');
SymbolAccuracy := 0.8;
if (FindSymbol(x, y, 'training dummy') or FindSymbol(x, y, 'bank')) then
begin
Players[CurrentPlayer].Loc := 'veb';
Result := 'veb';
Exit;
end;
if (FindSymbol(x, y, 'mining site')) then
begin
Players[CurrentPlayer].Loc := 'mine';
Result := 'mine';
Exit;
end;
if (MyFindDead) then
begin
Players[CurrentPlayer].Loc := 'lum';
Result := 'lum';
Exit;
end;
if (AbleDeathWalk) then
begin
HomeTele;
if DeathWalk(false) then
begin
Players[CurrentPlayer].Loc := 'mine';
Result := 'mine';
end;
end else
Failed('Where the hell are we?');
End;
Function DetectInv(col : integer; ptype : string; mw, wieldlvl : integer): Boolean;
Begin
if not LoggedIn then Exit;
Status('DetectInv');
GameTab(4);
if (FindColorTolerance(x, y, col, 557, 212, 601, 234, 5) and FindDTM(PickaxeDTM, x, y, MIX1, MIY1, MIX2, MIY1 + 100)) then
begin
Players[CurrentPlayer].Strings[0] := ptype;
Players[CurrentPlayer].Integers[8] := wieldlvl;
MineWait := mw * 1000;
PickInv := true;
PickColor := col;
Writeln('Pickaxe type : ' + ptype);
Result := true;
end;
End;
Function DetectWield(col : integer; ptype : string; mw, wieldlvl : integer): Boolean;
Begin
if not LoggedIn then Exit;
Status('DetectWield');
GameTab(5);
Wait(500 + random(500));
if (FindColorTolerance(x, y, col, 571, 288, 603, 310, 5)) then
begin
Players[CurrentPlayer].Strings[0] := ptype;
Players[CurrentPlayer].Integers[8] := wieldlvl;
MineWait := mw * 1000;
PickInv := false;
PickColor := col;
Writeln('Pickaxe type : ' + ptype);
Result := true;
end;
End;
Procedure DetectPick;
Begin
if not LoggedIn then Exit;
Status('DetectPick');
Players[CurrentPlayer].Strings[0] := 'none';
GameTab(4);
Wait(100 + random(100));
if DetectInv(pickcol1, 'bronze', 10, 1) then Exit;
if DetectInv(pickcol2, 'iron', 10, 1) then Exit;
if DetectInv(pickcol3, 'steel', 8, 5) then Exit;
if DetectInv(pickcol4, 'mithril', 6, 20) then Exit;
if DetectInv(pickcol5, 'addy', 4, 30) then Exit;
if DetectInv(pickcol6, 'rune', 3, 40) then Exit;
GameTab(5);
Wait(100 + random(100));
if DetectWield(pickcol1, 'bronze', 10, 1) then Exit;
if DetectWield(pickcol2, 'iron', 10, 1) then Exit;
if DetectWield(pickcol3, 'steel', 8, 5) then Exit;
if DetectWield(pickcol4, 'mithril', 6, 20) then Exit;
if DetectWield(pickcol5, 'addy', 4, 30) then Exit;
if DetectWield(pickcol6, 'rune', 3, 40) then Exit;
WhereAreWe;
if (Players[CurrentPlayer].Loc = 'veb') then
begin
BankStuff('pick');
WalkMine;
Exit;
end;
if (Players[CurrentPlayer].Loc = 'mine') then
begin
WalkBank;
BankStuff('pick');
WalkMine;
Exit;
end;
if (Players[CurrentPlayer].Loc = 'lum') then
begin
DeathWalk(true);
WalkBank;
BankStuff('pick');
WalkMine;
Exit;
end;
Failed('You don''t have a pickaxe...');
End;
Procedure LoginLoop;
Var
LoginMark : Integer;
Begin
if LoggedIn then Exit;
Status('LoginLoop');
MarkTime(LoginMark);
repeat
LoginPlayer;
Wait(10 + random(10));
if (TimeFromMark(LoginMark) > 90000) then
begin
Failed('Could not log in...');
Exit;
end;
until(LoggedIn);
Wait(500 + random(500));
End;
Procedure Variables;
Begin
Status('Variables');
MouseSpeed := 14;
Ores := 0;
Banks := 0;
GasNum := 0;
MiningTalks := 0;
Breaks := 0;
Banks := 0;
AllResets := 0;
DeathWalks := 0;
ReinCarnate := true;
CheckHPFirst := false;
End;
Function AutoColorMine: Boolean;
Var
ACM : Integer;
Begin
if not LoggedIn then Exit;
Status('AutoColorMine');
SymbolAccuracy := 0.8;
if (MineSymbol = 0) then
begin
MarkTime(ACM);
repeat
if (FindSymbol(x, y, 'mining site')) then MineSymbol := GetSymbolColor(x, y, 'mining site');
Wait(50 + random(50));
if (TimeFromMark(ACM) > 12000) then
begin
Result := false;
Exit;
end;
until(MineSymbol > 0);
end;
SymbolAccuracy := 1;
Result := true;
End;
Procedure FirstPlayerSetup;
Var
i : Integer;
Begin
for i := 0 to (HowManyPlayers - 1) do
begin
Players[i].Active := true;
Players[i].Strings[1] := 'Player failed...';
Players[i].Banked := 0; // Loads done
Players[i].Integers[2] := 0; // Ores mined
Players[i].Integers[4] := 0; // Gasses avoided
Players[i].Integers[5] := 0; // Fights handled
Players[i].Integers[6] := 0; // Death walks
Players[i].Booleans[1] := true; // Working player
end;
End;
Procedure PlayerSetup;
Begin
LoginLoop;
ScreenSettings;
WhereAreWe;
DetectPick;
Players[CurrentPlayer].Integers[3] := GetSkillInfo('mining', false);
//
NoMine := 0;
NextBreakSet := 10 + random(4);
AbBool := true;
//
MineSymbol := 0;
WaterSymbol := 0;
FishSymbol := 0;
QuestSymbol := 0;
//
if (WhereAreWe = 'lum') then DeathWalk(true);
if (WhereAreWe = 'veb') then
begin
SymbolAccuracy := 0.8;
if (FindSymbol(x, y, 'training dummy') or FindSymbol(x, y, 'training dummy')) then
begin
WalkMine;
end;
SymbolAccuracy := 1;
end;
if (not AutoColorMine) then
begin
if (not AbleDeathWalk) then
begin
Failed('Could not fix lost, where did your character start?');
Exit;
end else
begin
HomeTele;
DeathWalk(false);
end;
end;
Players[CurrentPlayer].Loc := 'mine';
PReport;
SetRun(true);
End;
Procedure Setup;
Begin
case random(12) of
0: Disguise('Starting Up...');
1: Disguise('Lets mine some ores!');
2: Disguise('Here we go again...');
3: Disguise('YeeHa!');
4: Disguise('De da de!');
5: Disguise('Super miner!');
6: Disguise('Yay, mining...');
7: Disguise('iTunes');
8: Disguise('Google');
9: Disguise('Calculator');
10: Disguise('Notepad');
11: Disguise('This is fun...');
end;
Variables;
DeclarePlayers;
SetupDTM;
ActivateClient;
Wait(1000 + random(1000));
FirstPlayerSetup;
PlayerSetup;
End;
Function RandomsCheck: Boolean;
Begin
if not LoggedIn then Exit;
if (MyFindNormalRandoms) then
begin
PReport;
Result := true;
Exit;
end;
if (FindTalk) then
begin
PReport;
Result := true;
Exit;
end;
Result := false;
End;
Function EnterMine(why : String): Boolean;
Var
MineDTM : Integer;
Begin
if not LoggedIn then Exit;
SymbolAccuracy := 0.7;
if FindSymbol(x, y, 'mining site') then
begin
SymbolAccuracy := 1;
Mouse(x - 8, y - 8, 2, 2, true);
Wait(500 + random(500));
FFlag(0);
Result := true;
Exit;
End;
MineDTM := DTMFromString('78DA630C656260286240015CCCAC609A11CA6' +
'78C05AAA922A02699087362806A72F0AB010031840394');
if FindDtmRotated(MineDTM, x, y, MMX1, MMY1, MMX2, MMY2, radians(-35), radians(35), 0.01, wangle) then
begin
FreeDTM(MineDTM);
Mouse(x - 8, y - 8, 2, 2, true);
Wait(500 + random(500));
FFlag(0);
if (FindColorTolerance(x, y, 2503250, MSX1, MSY1, MSX2, MSY2, 10) or FindColorTolerance(x, y, 9671838, MSX1, MSY1, MSX2, MSY2, 10)) then
begin
Result := true;
end else
Result := false;
Exit;
end;
if (why = 'nomral') then Mouse(597, 100, 5, 5, true);
if (why = 'deathwalk') then Mouse(586, 62, 5, 5, true);
FFlag(0);
if (FindColorTolerance(x, y, 2503250, MSX1, MSY1, MSX2, MSY2, 10) or FindColorTolerance(x, y, 9671838, MSX1, MSY1, MSX2, MSY2, 10)) then
begin
Result := true;
end else
Result := false;
End;
Function MyFindDead : Boolean;
Begin
if not LoggedIn then Exit;
Status('MyFindDead');
SymbolAccuracy := 0.8;
if (FindSymbolIn(x, y, 'water', MMX1, MMY1, MMX2, 85) or FindSymbolIn(x, y, 'water', MMX1, 85, MMX2, MMY2) or FindSymbol(x, y, 'guide')) then Result := true;
SymbolAccuracy := 1;
End;
Function DeathWalk(AddPReport : Boolean): Boolean;
Var
DeathMark : Integer;
Begin
if not LoggedIn then Exit;
if (not MyFindDead) then Exit;
SetRun(false);
Mouse(674, 56, 6, 6, true);
Wait(500 + random(500));
FFlag(0);
RadialRoadWalk(FindRoadColor, 50, 120, 70, 1, 1);
Wait(2000 + random(1000));
FFlag(0);
MarkTime(DeathMark);
repeat
LoadPaths(3);
GoPath(13);
FFlag(0);
GoPath(14);
GoPath(15);
GoPath(16);
GoPath(17);
GoPath(18);
GoPath(19);
GoPath(20);
GoPath(21);
LoadPaths(4);
GoPathVar(22);
GoPathVar(23);
GoPathVar(24);
FFlag(0);
GoPathVar(25);
FFlag(0);
if EnterMine('normal') then Break;
until(TimeFromMark(DeathMark) > 120000);
SetRun(true);
if (AddPReport) then
begin
DeathWalks := DeathWalks + 1;
Players[CurrentPlayer].Integers[6] := Players[CurrentPlayer].Integers[6] + 1;
ReportVars[4] := ReportVars[4] + 1;
end;
PReport;
Players[CurrentPlayer].Loc := 'mine';
Result := true;
End;
Function EnterBank: Boolean;
Var
BankDTM : Integer;
Begin
if not LoggedIn then Exit;
SymbolAccuracy := 0.8;
if (FindSymbol(x, y, 'bank')) then
begin
Mouse(x - 3, y + 8, 6, 3, true);
Wait(2000 + random(1000));
FFlag(0);
SymbolAccuracy := 1;
Result := true;
Exit;
end;
if (FindSymbol(x, y, 'training dummy')) then
begin
Mouse(x, y + 62, 4, 4, true);
Wait(2000 + random(1000));
FFlag(0);
SymbolAccuracy := 1;
Result := true;
Exit;
end;
BankDTM := DTMFromString('78DA630C62626068604001FFFE09836946289' +
'F318AB01A00DF7805D3');
if FindDtmRotated(BankDTM, x, y, MMX1, MMY1, MMX2, MMY2, radians(-35), radians(35), 0.01, wangle) then
begin
FreeDTM(BankDTM);
Mouse(x + 6, y - 5, 2, 2, true);
Wait(500 + random(500));
FFlag(0);
Result := true;
Exit;
end;
Result := false;
End;
Procedure WalkBank;
Var
BankMark : Integer;
Begin
if not LoggedIn then Exit;
MarkTime(BankMark);
repeat
LoadPaths(2);
MakeCompass('n');
Mouse(655, 43, 10, 10, true);
SetRun(false);
FFlag(0);
RandomsCheck;
GoPathVar(8);
RandomsCheck;
GoPathVar(9);
FFlag(0);
RandomsCheck;
GoPathVar(10);
RandomsCheck;
GoPathVar(11);
RandomsCheck;
GoPathVar(12);
RandomsCheck;
if EnterBank then Break;
until(TimeFromMark(BankMark) > 180000);
End;
Procedure BankStuff(reason : String);
Label Retry;
Begin
if not LoggedIn then Exit;
Status('BankStuff');
Disguise('Banking... ' + IntToStr(Ores));
Retry:
if (reason = 'pick') then
begin
TakeOff(5);
Wait(500 + random(200));
GameTab(4);
end;
if (not OpenBankFast('veb')) then
begin
if AbleDeathWalk then
begin
HomeTele;
DeathWalk(false);
WalkBank;
Goto Retry;
end else
begin
Failed('Had trouble openeing bank...');
Exit;
end;
end;
FixBank;
if (reason = 'pick') or (PickInv) then
begin
Deposit(2, 28, 2);
end else
DepositAll;
if (reason = 'pick') then
begin
MouseBox(81, 65, 100, 86, 1);
repeat
Wait(1000 + random(1000));
until(ExistsItem(1));
CloseBank;
if FindDTM(PickaxeDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(x - 2, y - 2, 4, 4, true);
end else
begin
Players[CurrentPlayer].Booleans[1] := false;
Failed('No more picks left in your bank...');
Exit;
end;
ReportVars[3] := ReportVars[3] + 1;
DetectPick;
end else
begin
if (random(2) = 0) then CloseBank;
Banks := Banks + 1;
Players[CurrentPlayer].Banked := Players[CurrentPlayer].Banked + 1;
ReportVars[0] := ReportVars[0] + 1;
if PickInv then ReportVars[1] := Banks * 27;
if not PickInv then ReportVars[1] := Banks * 28;
end;
End;
Procedure WalkMine;
Var
MineMark : Integer;
Begin
if not LoggedIn then Exit;
MarkTime(MineMark);
repeat
LoadPaths(1);
MakeCompass('n');
GoPathVar(0);
RandomsCheck;
GoPathVar(1);
RandomsCheck;
GoPathVar(2);
RandomsCheck;
GoPathVar(3);
RandomsCheck;
GoPathVar(4);
RandomsCheck;
GoPathVar(5);
RandomsCheck;
GoPathVar(6);
RandomsCheck;
GoPathVar(7);
RandomsCheck;
if EnterMine('deathwalk') then Break;
RandomsCheck;
WalkBank;
until(TimeFromMark(MineMark) > 180000);
SetRun(true);
PReport;
MarkTime(MineTime);
End;
Procedure HandleFight;
Begin
if not LoggedIn then Exit;
if (not FindFight) then Exit;
Status('HandleFight');
Disguise('Handling Fight... ' + IntToStr(Ores));
Mouse(655, 28, 8, 8, true);
FFlag(1);
Wait(5000 + random(4000));
Mouse(585, 136, 8, 8, true);
FFlag(0);
if (FindColorTolerance(x, y, MineSymbol, MMX1, MMY1, MMX2, MMY2, 8)) then Mouse(x - 8, y + 8, 6, 6, true);
FFlag(0);
Wait(1000 + random(500));
Players[CurrentPlayer].Integers[5] := Players[CurrentPlayer].Integers[5] + 1;
PReport;
End;
Function FindPlant: Boolean;
Begin
if not LoggedIn then Exit;
Status('FindPlant');
if (FindObjCustom(x, y, ['lant'], [5123389, 743503, 810323], 1)) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, false);
ChooseOption('ick');
Result := true;
end;
End;
Procedure HandleGas;
Var
HGMark : Integer;
Begin
if not LoggedIn then Exit;
Status('HandleGas');
Disguise('Handling Gas... ' + IntToStr(Ores));
Mouse(630, 90, 8, 8, true);
FFlag(0);
Wait(10000 + random(2000));
MouseBox(MSX1, MSY1, MSX2, MSY2, 3);
Wait(8000 + random(2000));
MouseBox(MSX1, MSY1, MSX2, MSY2, 3);
Wait(8000 + random(2000));
MouseBox(MSX1, MSY1, MSX2, MSY2, 3);
MarkTime(HGMark);
repeat
Wait(2000 + random(500));
if (TimeFromMark(HGMark) > 15000) then Break;
until(not FindColorTolerance (x, y, 10596274, 0, 0, 500, 500, 1)) and (not FindColorTolerance (x, y, 8950933, 0, 0, 500, 500, 1)) and (not FindColorTolerance (x, y, 9017755, 0, 0, 500, 500, 1)) and (not FindColorTolerance (x, y, 7900302, 0, 0, 500, 500, 1));
GasNum := GasNum + 1;
Players[CurrentPlayer].Integers[4] := Players[CurrentPlayer].Integers[4] + 1;
ReportVars[2] := ReportVars[2] + 1;
PReport;
End;
Procedure MKFindGas; // By MasterKill
begin
if not LoggedIn then Exit;
if (FindColorTolerance (x, y, 10596274, 0, 0, 500, 500, 1))
or (FindColorTolerance (x, y, 8950933, 0, 0, 500, 500, 1))
or (FindColorTolerance (x, y, 9017755, 0, 0, 500, 500, 1))
or (FindColorTolerance (x, y, 7900302, 0, 0, 500, 500, 1)) then HandleGas;
end;
Procedure UnwieldHandle;
Begin
if not LoggedIn then Exit;
Status('UnwieldHandle');
TakeOff(5);
GameTab(4);
Wait(800 + random(500));
End;
Procedure AttachPick;
Var
i, tries, AttachPickTime : Integer;
Begin
if not LoggedIn then Exit;
Status('AttachPick');
if (not PickInv) then UnwieldHandle;
MarkTime(AttachPickTime);
repeat
Wait(200 + random(100));
if (TimeFromMark(AttachPickTime) > 35000) then
begin
WalkBank;
BankStuff('pick');;
WalkMine;
PReport;
Exit;
end;
if (not FindColorTolerance(x, y, PickColor, MIX1, MIY1, MIX2, MIY2, 10)) then
begin
MyFindPick;
if (not FindColorTolerance(x, y, PickColor, MIX1, MIY1, MIX2, MIY2, 10)) then
begin
WalkBank;
BankStuff('pick');;
WalkMine;
Banks := Banks + 1;
Exit;
end;
end;
Mouse(x - 1, y - 1, 2, 2, true);
Wait(200 + random(200));
Disguise('Attching Head Now');
tries := 0;
for i := 1 to 28 do
begin
MMouseItem(i);
if (IsUpText('Pickaxe handle')) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, true);
Wait(1000 + random(1000));
if (FindColorTolerance(x, y, PickColor, MIX1, MIY1, MIX2, MIY2, 10)) then Mouse(x - 3, y - 3, 6, 6, true);
Wait(500 + random(500));
AxeAttaches := AxeAttaches + 1;
PReport;
MarkTime(MineTime);
Exit;
end;
if (i = 28) then
begin
UnwieldHandle;
tries := tries + 1;
if (tries >= 3) then
begin
WalkBank;
BankStuff('pick');;
WalkMine;
Exit;
end;
end;
end;
until(false);
End;
Function MyFindPick: Boolean;
Var
FindPickTime : Integer;
Begin
if not LoggedIn then Exit;
if (not FindColor(x, y, 16711680, 182, 439, 346, 457)) then Exit;
if (not FindNpcChatText('ickaxe', Nothing)) then Exit;
if (not FindObj(x, y, 'pick head', PickColor, 5)) then Exit;
Status('MyFindPick');
Disguise('Pick Head Found');
DropItem(2);
DropItem(3);
MarkTime(FindPickTime);
repeat
Mouse(x, y, 2, 2, false);
if (ChooseOption('ake')) then Break;
FTWait(1);
if (TimeFromMark(FindPickTime) > 20000) then
begin
Failed('Could not find pick head on ground...');
Exit;
end;
until(false);
FFlag(0);
Wait(1000 + random(500));
Result := true;
End;
Procedure CheckBrokenPick;
Begin
if not LoggedIn then Exit;
if (not FindDTM(BrokenPickDTM, x, y, MIX1, MIY1, MIX2, MIY2) and not FindBlackChatMessage('ickaxe') and not FindNpcChatText('ickaxe', Nothing)) then Exit;
if FindDTM(PickaxeDTM, x, y, MIX1, MIY1, MIX2, MIY1 + 100) then Exit;
Status('CheckBrokenPick');
TerminateScript;
WalkBank;
BankStuff('pick');;
WalkMine;
End;
Function AbleDeathWalk: Boolean;
Begin
Result := false;
if not LoggedIn then Exit;
Status('AbleDeathWalk');
if (GetLumbridgeMins > 0) then Exit;
Result := true;
End;
Procedure NameRespond;
Begin
if not LoggedIn then Exit;
Status('NameRespond');
if (InChat(Players[CurrentPlayer].Nick)) then
begin
case random(8) of
0: TypeSend('wat?');
1: TypeSend('what u want?');
2: TypeSend('leave me alone');
3: TypeSend('cant u see im mining.. lol');
4: TypeSend('ya?');
5: TypeSend('yes...');
6: TypeSend('i am makin $$, be quiet');
7: TypeSend('im in a bad mood, shut up lol');
end;
end;
End;
Procedure MiningTalk;
Var
MiningLvl : String;
Begin
if not LoggedIn then Exit;
Status('MiningTalk');
if ((InChat('hi') and not InChat('this')) or InChat('hey') or InChat('hello')) then
begin
case random(8) of
0: TypeSend('h3y');
1: TypeSend('yo');
2: TypeSend('h1');
3: TypeSend('h3llo');
4: TypeSend('h3y, wasup');
5: TypeSend('hola');
6: TypeSend('h0la');
7: TypeSend('sup');
end;
MiningTalks := MiningTalks + 1;
PReport;
end;
if (InChat('auto') or InChat('bot')) or InChat('macro') then
begin
case random(10) of
0: TypeSend('im not a bot');
1: TypeSend('bot? lol');
2: TypeSend('u think im autoing?');
3: TypeSend('lol, im not botting');
4: TypeSend('haha, lots of ppl acuse me of autoing');
5: TypeSend('dont report, im not a bot');
6: TypeSend('omg, u think im autoing too?');
7: TypeSend('im in a bad mood, dont call me a bot!');
8: TypeSend('nope..');
9: TypeSend('not really, lol');
end;
MiningTalks := MiningTalks + 1;
PReport;
end;
if (InChat('min') and (not InChat('some') and not InChat('advanced'))) then
begin
MiningLvl := IntToStr(GetSkillInfo('mining', false));
case random(11) of
0: begin
TypeSend('mine?');
Wait(500 + random(500));
TypeSend(MiningLvl + '...');
end;
1: TypeSend(MiningLvl);
2: TypeSend(MiningLvl + '...');
3: begin
TypeSend('its decent...');
Wait(500 + random(500));
TypeSend(MiningLvl);
end;
4: TypeSend(MiningLvl + '... lol');
5: begin
TypeSend(MiningLvl);
Wait(500 + random(500));
TypeSend('lol');
end;
6: begin
TypeSend('um.');
Wait(500 + random(500));
TypeSend(MiningLvl);
end;
7: TypeSend(MiningLvl + ', yours?');
8: TypeSend(MiningLvl + ', urs?');
9: TypeSend(MiningLvl + ', you?');
10: TypeSend(MiningLvl + ', u?');
end;
MiningTalks := MiningTalks + 1;
PReport;
end;
End;
Procedure AB0;
Begin
MouseBox(MSX1, MSY1, MSX2, MSY2, 3);
End;
Procedure AB1;
Begin
HoverSkill('mining', false);
End;
Procedure AB2;
Begin
PickUpMouse;
End;
Procedure AB3;
Begin
GameTab(1 + random(14));
Wait(1000 + random(500));
GameTab(1 + random(14));
End;
Procedure AB4;
Begin
GameTab(1 + random(14));
Wait(100 + random(3000));
GameTab(1 + random(14));
Wait(100 + random(3000));
GameTab(1 + random(14));
End;
Procedure AntiBan;
Begin
if not LoggedIn then Exit;
if (AbBool) then
begin
MarkTime(AbMark);
AbBool := false;
end;
if (TimeFromMark(AbMark) > (120000 + random(60000))) then
begin
case random(5) of
0: AB0;
1: AB1;
2: AB2;
3: AB3;
4: AB4;
end;
AbBool := true;
end;
End;
Function OreMined: Boolean; // By MasterKill
Begin
if not LoggedIn then Exit;
Result := false;
if InvFull then Result := True;
if (FindBlackChatMessage('anage') or FindBlackChatMessage('vailable')) then result := True;
End;
Procedure MineRandom;
Begin
if not LoggedIn then Exit;
Status('MineRandom');
if (random(10) = 0) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, false);
ChooseOption('ine');
MineFlag;
end else
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, true);
MineFlag;
end;
End;
Procedure MO1;
Var
col1, col2, col3, tol, a : Integer;
OresFound : Boolean;
TPA1, TPA2, TPA3, TPA4, TPA5 : TPointArray;
Begin
if not LoggedIn then Exit;
Status('MO1');
OresFound := true;
case Players[0].Booleans[0] of
true: begin
col1 := 2701146;
col2 := 2503250;
col3 := 2239818;
tol := 5;
end;
false: begin
col1 := 9803168;
col2 := 9671838;
col3 := 4417679;
tol := 3;
end;
end;
FindColorsSpiralTolerance(x, y, TPA1, col1, MSX1, MSY1, MSX2, MSY2, tol);
FindColorsSpiralTolerance(x, y, TPA2, col2, MSX1, MSY1, MSX2, MSY2, tol);
FindColorsSpiralTolerance(x, y, TPA3, col3, MSX1, MSY1, MSX2, MSY2, tol);
TPA4 := CombineTPA(TPA1, TPA2);
TPA5 := CombineTPA(TPA3, TPA4);
if (Length(TPA5) < 1) then
begin
if (not FindColorTolerance(x, y, MineSymbol, MMX1, MMY1, MMX2, MMY2, 5) and not FindSymbol(x, y, 'mining site')) then
begin
if (not AbleDeathWalk) then
begin
NoMine := NoMine + 1;
end else
begin
HomeTele;
DeathWalk(false);
end;
OresFound := false;
end else
begin
Mouse(x - 12, y - 12, 6, 6, true);
FFlag(0);
Wait(200 + random(200));
OresFound := false;
end;
end;
if (NoMine >= 5) then
begin
Failed('Could not find ores or mining symbol 5 times...');
Exit;
end;
if OresFound then
for a := 0 to High(TPA5) do
begin
MMouse(tpa5[a].x - 5, tpa5[a].y - 5, 10, 10);
Wait(20 + random(20));
if (IsUpText('ine') or IsUpText('ocks')) then
begin
GetMousePos(x, y);
Break;
end;
end;
if (OresFound) then MineRandom;
End;
Procedure MO2;
Begin
if not LoggedIn then Exit;
Status('MO2');
if (PickInv) then
begin
Ores := ((Banks * 27) + (InvCount - 1));
Players[CurrentPlayer].Integers[2] := ((Banks * 27) + (InvCount - 1));
end;
if (not PickInv) then
begin
Ores := ((Banks * 28) + InvCount);
Players[CurrentPlayer].Integers[2] := ((Banks * 28) + InvCount);
end;
PReport;
End;
Procedure MineOres;
Var
i, a, OreTime : Integer;
Begin
if not LoggedIn then Exit;
i := 0;
a := 0;
AbBool := true;
MarkTime(MineTime);
repeat
Status('MineOres');
MO1;
MarkTime(OreTime);
repeat
if not LoggedIn then Exit;
MKFindGas;
FindTalk;
Wait(100 + random(100));
HandleFight;
FindTalk;
Wait(100 + random(100));
MKFindGas;
FindTalk;
Wait(100 + random(100));
AntiBan;
RandomsCheck;
Wait(100 + random(100));
FindPlant;
Wait(100 + random(100));
MiningTalk;
NameRespond;
if (OreMined) then Break;
if (random(4) = 0) then SleepAndMoveMouse(200 + random(800));
Wait(100 + random(100));
if DeathWalk(true) then MarkTime(MineTime);
Wait(100 + random(100));
if (FindInventoryRandoms) then PReport;
a := a + 1;
i := i + 1;
if (a = 3) then
begin
if MyFindPick then AttachPick;
a := 0;
end;
if (i = 5) then
begin
CheckBrokenPick;
i := 0;
end;
if not LoggedIn then Exit;
until(OreMined) or (TimeFromMark(OreTime) > MineWait);
MO2;
if (TimeFromMark(MineTime) >= Players[CurrentPlayer].Integers[0] * 60000) then Break;
until(InvFull);
End;
Procedure TakeBreak;
Var
BreakMark : Integer;
Begin
if not LoggedIn then Exit;
Status('TakeBreak');
case random(3) of
0: Disguise('Taking Break');
1: Disguise('Taking Break...');
2: Disguise('Taking Break . . .');
end;
LogoutLoop;
if (ActiveCount = 1) then
begin
MarkTime(BreakMark);
repeat
Sleep(30000 + random(20000));
until(TimeFromMark(BreakMark) >= (280000 + random(40000)));
end else NextPlayer(true);
PlayerSetup;
Breaks := Breaks + 1;
PReport;
End;
Procedure BreakCheck;
Var
i : Integer;
Begin
if not LoggedIn then Exit;
Status('BreakCheck');
for i := 1 to 50 do
begin
if (Banks = (i * NextBreakSet)) then TakeBreak;
end;
End;
Procedure ScriptLoop;
Begin
repeat
if (not LoggedIn) then
begin
if (ActiveCount = 1) then
begin
Players[CurrentPlayer].Active := false;
PReport;
Exit;
end else
begin
NextPlayer(false);
PReport;
PlayerSetup;
end;
end;
BreakCheck;
MineOres;
WalkBank;
BankStuff('');
WalkMine;
PReport;
until(false);
End;
Begin
SetupSRL;
ScriptID := '650';
Setup;
repeat
ScriptLoop;
AllResetWait;
until(false);
End.
——————————————————
<!– END TEMPLATE: formanswers –>