program Mining;
{.Include SRL\SRL\Misc\SMART.SCAR}
{.include SRL\SRL.scar}
{.Include SRL\SRL\Reflection\Reflection.Scar}
{.include SRL\SRL\Misc\WorldSwitcher.scar}
const
ResponderOn = True; //Turn False if u don't want the AutoResponder on.
version = '0.65';//Dont Change!!
YourStatsID = 'd'; //SRL Stats ID
YourStatsPass = 'd'; //SRL Stats Password.
var
x, y, RockType, LoadsDone, TotalOres, RespondCount: integer;
RockTiles, STiles: TPointArray;
RockTypes, STypes: TIntegerArray;
RockTile: TPoint;
Loc, TB, TPick, Ore: String;
PickRank, PickID, MSSlept, LastPlayer: Integer;
AllOres: TStringArray;
MCopper, MIron, MTin, MGold, MCoal, MMith, MClay, ScriptStart: integer;
WP: boolean;
Responded: array of array[0..1] of String;
Auth: String;
Triggers: Array of Array[0..3] of TStringArray;
Answers: Array of TStringArray;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True;
Players[0].Pin := '';
Players[0].Strings[0] := 'iron';
Players[0].Strings[1] := 'vem'; //Which mine?
Players[0].Integers[0] := 12000;//Max wait
Players[0].Booleans[0] := True; //Members?
Players[0].Booleans[1] := False; //Powermine?
{ Players[1].Name := '';
Players[1].Nick := '';
Players[1].Pass := '';
Players[1].Active := True;
Players[1].Pin := '';
Players[1].Strings[0] := 'copper';
Players[1].Strings[1] := 'vem'; //Which mine?
Players[1].Integers[0] := 4000;//Max wait
Players[1].Booleans[0] := False; //Members?
Players[1].Booleans[1] := True; //Powermine?
Players[2].Name := '';
Players[2].Nick := '';
Players[2].Pass := '';
Players[2].Active := True;
Players[2].Pin := '';
Players[2].Strings[0] := 'copper';
Players[2].Strings[1] := 'rim'; //Which mine?
Players[2].Integers[0] := 7000;//Max wait
Players[2].Booleans[0] := False; //Members?
Players[2].Booleans[1] := False; //Powermine?
Players[3].Name := '';
Players[3].Nick := '';
Players[3].Pass := '';
Players[3].Active := True;
Players[3].Pin := '';
Players[3].Strings[0] := 'copper';
Players[3].Strings[1] := 'rim'; //Which mine?
Players[3].Integers[0] := 4000;//Max wait
Players[3].Booleans[0] := False; //Members?
Players[3].Booleans[1] := True; //Powermine? }
end;
procedure AddToDebug(S: String);
var
FileNum: integer;
begin
Writeln(S);
FileNum := RewriteFile(ScriptPath+'[DEBUG]AwesomeMiner.txt',True);
WriteFileString(FileNum, GetDebugText);
CloseFile(FileNum);
end;
function KillPlayer(Reason: String): boolean;
begin
Result := True;
if not Players[CurrentPlayer].Active then Exit;
AddToDebug('Killed player: '+Players[CurrentPlayer].Nick+'. Reason: '+Reason);
Logout;
Players[CurrentPlayer].Active := False;
end;
function Min_GetObjectTypeAt(TheTile: TPoint): integer; forward;
function Scr_FindRandomWorld: TPoint;
var
Pvp: TPointArray;
Found: Boolean;
Slot: Integer;
begin
Pvp := [Point(585, 155), Point(585, 173), Point(585, 191),
Point(585, 209), Point(585, 227), Point(585, 245),
Point(585, 263), Point(585, 281), Point(585, 299),
Point(585, 317), Point(585, 335), Point(585, 353),
Point(585, 371), Point(585, 389), Point(585, 407),
Point(585, 425), Point(585, 443)];
Found := false;
While not Found do
begin
Slot := Random(17);
Found := not FindColorTolerance(x, y, 6663533, Pvp[Slot].x, Pvp[Slot].y,
Pvp[Slot].x, Pvp[Slot].y, 5);
if Found then Result := Point(130, Pvp[Slot].y);
end;
end;
{*******************************************************************************
function WorldSwitch(Members: boolean): boolean;
By: The[Cheese]
Description: My NEW AND IMPROVED world switcher! It won't fail now >:)
*******************************************************************************}
function Scr_WorldSwitch(Members: boolean): boolean;
var
Time, LongTime: integer;
begin
if R_LoggedIn then Exit;
Writeln('Attempting to switch worlds.');
RandomWorld(Players[0].Booleans[0], False);
end;
procedure Scr_FindMyRandoms;
var
NPC: TNPC;
begin
if not R_LoggedIn then Exit;
if (FindNPC('Cap''n Arnav', NPC)) or (FindNPC('Niles', NPC)) or
(FindNPC('Quiz Master', NPC)) or (FindNPC('Sandwich Lady', NPC)) or
(FindNPC('Miles', NPC)) or (FindNPC('Giles', NPC)) or
(FindNPC('Drill Demon', NPC)) or (FindNPC('Evil Bob', NPC)) or
(FindNPC('Molly', NPC)) or (FindNPC('Mysterious Old Man', NPC)) or
(FindNPC('Prison Pete', NPC)) or (FindNPC('Mordaut', NPC)) or
(FindNPC('Leo', NPC)) then
begin
if IsInteractingWithMe(NPC.Name) or (R_InPillory) or (Min_GetObjectTypeAt(Point(3422, 4775)) = 8985) then
begin
Players[CurrentPlayer].Loc := NPC.Name;
if NPC.Name = 'Mysterious Old Man' then Players[CurrentPlayer].Loc := 'Old Man';
if NPC.Name = '' then Players[CurrentPlayer].Loc := 'Random';
KillPlayer('Random Event: '+NPC.Name);
end;
end;
if not R_LoggedIn then Exit;
R_FindRandoms;
end;
procedure Scr_CountOres;
var
OMined: Integer;
begin
if not R_LoggedIn then Exit;
case lowercase(Players[CurrentPlayer].Strings[0]) of
'clay': begin
OMined := R_CountItems(435);
MClay := MClay + OMined;
ReportVars[5] := ReportVars[5] + OMined;
end;
'tin': begin
OMined := R_CountItems(439);
MTin := MTin + OMined;
ReportVars[4] := ReportVars[4] + OMined;
end;
'copper': begin
OMined := R_CountItems(437);
MCopper := MCopper + OMined;
ReportVars[3] := ReportVars[3] + OMined;
end;
'iron': begin
OMined := R_CountItems(441);
MIron := MIron + OMined;
ReportVars[6] := ReportVars[6] + OMined;
end;
'coal': begin
OMined := R_CountItems(454);
MCoal := MCoal + R_CountItems(454);
ReportVars[7] := ReportVars[7] + OMined;
TotalOres := TotalOres + OMined;
Players[CurrentPlayer].Integers[9] := Players[CurrentPlayer].Integers[9] + OMined;
ReportVars[2] := ReportVars[2] + OMined;
OMined := R_CountItems(448)
MMith := MMith + OMined;
ReportVars[8] := ReportVars[8] + OMined;
end;
'gold': begin
OMined := R_CountItems(445);
MGold := MGold + OMined;
ReportVars[9] := ReportVars[9] + OMined;
end;
end;
Players[CurrentPlayer].Integers[9] := Players[CurrentPlayer].Integers[9] + OMined;
TotalOres := TotalOres + OMined;
ReportVars[2] := ReportVars[2] + OMined;
end;
function Scr_InStrArray(Arr: TStringArray; Str: String): boolean;
var
i: integer;
begin
if (Length(Arr) < 1) then Exit;
for i := 0 to High(Arr) do
if Str = Arr[i] then
begin
Result := true;
Break;
end;
end;
{
//---------------------------------------------------\\
|| Responder ||
\\---------------------------------------------------//
}
function Res_GetChatBoxLine2(Line: integer; ChatType: String): string;
var
S : TStringArray;
begin
if not R_LoggedIn then Exit;
if (Line < 1) or (Line > 8) then
Exit;
s := GetChatMessages(ChatType, True, False);
try Result := s[8-line] except Exit;
end;
end;
function Res_RespondedTo(Str, Author: String): boolean;
var
i: integer;
begin
if not R_LoggedIn then Exit;
Result := (lowercase(Author) = lowercase(Players[CurrentPlayer].Name));
if Result then Exit;
if Length(Responded) < 1 then Exit;
for i := 0 to High(Responded) do
begin
Result := ((Str = Responded[i][0]) and (Author = Responded[i][1]));
if Result then Exit;
end;
end;
procedure Res_LoadTriggers;
begin
SetLength(Triggers, 0);
SetLength(Answers, Length(Triggers));
SetLength(Triggers, 27);
SetLength(Answers, Length(Triggers));
//Maxiumum of 4 phrases per row.
Triggers[0][0]:= ['mine lvl','mining l','mining level','mine lvl'];
Triggers[0][1]:= ['minin l', 'minning l', 'level in mining?', 'minng l'];
Triggers[0][1]:= ['mini* l', 'mining level', 'mining lvl?', 'level in mining'];
Answers[0] := [
'Mines '+inttostr(Players[CurrentPlayer].Integers[5])+'. You?',
inttostr(Players[CurrentPlayer].Integers[5]),
'only '+ inttostr(Players[CurrentPlayer].Integers[5]),
'mine is '+ inttostr(Players[CurrentPlayer].Integers[5]),
'almost '+ inttostr(Players[CurrentPlayer].Integers[5]+1)
];
Triggers[1][0]:= ['Hello','Hey', 'hola'];
Answers[1] := ['Sup '+Auth+'?','hey '+Auth,'waddup','yo '+ Auth,'hi there',
'howdy','hola','hey whats good '+Auth,'whats up '+Auth+'?',
'hihi','heys'];
Triggers[2][0]:= ['Can i have','I need','Give me', 'Howdy'];
Triggers[2][0]:= ['want free'];
Answers[2] := ['how about no.','sry im keeping','nfs','go away...','shoo fly',
'no thanks','nah im ok','nope','negative','noo'];
Triggers[3][0]:= ['Noob', 'nub', 'froob', 'f@q'];
Answers[3] := ['Look at you noob..','how about u stfu','ur the noob','noob...',
'lol nub','lol ok no noob calling','how about we all just mine now',
'yah i am noob :P'];
Triggers[4][0]:= ['bot', 'macro'];
Answers[4] := ['who me?','rofl...','haha right','hope ur not talking to me...'];
Triggers[5][0]:= ['buying', 'buy', 'selling'];
Answers[5] := ['dont got','go to ge...','I love the GE','thats what the ge is for'];
Triggers[6][0]:= ['I died', 'i lost', 'i fail'];
Answers[6] := ['sorry '+Auth,'that stinks',
'dying sucks..'];
Triggers[7][0]:= ['This is why im hot'];
Answers[7] := ['this is why ur not!','this is why I.M. hot hehe','lol this is why im hot x.d'];
Triggers[8][0]:= ['go away', 'leave'];
Answers[8] := ['you go away...','how bout no one leaves...','muhaha'];
Triggers[9][0]:= ['haha', 'lolol', 'lawl', 'rofl'];
Answers[9] := ['lol =p','lol?','roflcopter','heh'];
Triggers[10][0]:= ['idiot', 'dumby', 'rere'];
Answers[10] := ['ur the idiot','idiot...','dumbo...'];
Triggers[11][0]:= ['brb'];
Answers[11] := ['kk'];
Triggers[12][0]:= ['Reported'];
Answers[12] := ['who me?','idc noob...','lol poor noob'];
Triggers[13][0]:= ['I need', 'I have to have', 'i really need'];
Answers[13] := ['We all need things lol','i need 100m','well i need a life rofl'];
Triggers[13][0]:= ['dragon slayer', 'cooks assis', 'demon slayer', 'drago slay'];
Answers[13] := ['i hate quests','my mains done it','quests are boring'];
Triggers[14][0]:= ['zezima', 'cooks assis', 'demon slayer'];
Answers[14] := ['man zezima isnt that good anymore','zezima isnt even in the top ten!',
'zezima... rofl','only nerds love zezima lol','zezi is a fat nerd rofl'];
Triggers[15][0]:= ['g2g', 'got to go', 'bye', 'c ya'];
Triggers[15][1]:= ['see you', 'see ya', 'c you', 'goodnight'];
Answers[15] := ['byes','byers','see ya','later','peace'];
Triggers[16][0]:= ['papa johns', 'papajohns', 'pizzahut', 'pizza hut'];
Triggers[16][1]:= ['dominos', 'domino''s'];
Answers[16] := ['i like dominos the best','dominos pizza rocks','i dont rly like papajohns',
'yay for dominos','mmmm pizza...'];
Triggers[17][0]:= ['whats up?', 'wazzup', 'wats up', 'sup'];
Triggers[17][1]:= ['waddup'];
Answers[17] := ['nm you?','nuthin','nothing rly','nada','nm','nm u?'];
Triggers[18][0]:= ['nm you?', 'nm u?', 'nuthin'];
Answers[18] := ['nuthin','nothing rly','nada','nm'];
Triggers[19][0]:= [lowercase(Players[CurrentPlayer].Name)];
Answers[19] := ['what','hm?','huh'];
Triggers[20][0]:= ['not bad', 'nice'];
Answers[20] := ['heh','i guess','meh'];
Triggers[21][0]:= ['free ores'];
Answers[21] := ['nty thanks anyway','nty'];
Triggers[22][0]:= ['do you need armor'];
Answers[22] := ['nty thanks anyway','nty'];
Triggers[23][0]:= ['your mom','ur mom'];
Answers[23] := ['how old are u, 5?','ur moms mom'];
Triggers[24][0]:= ['blow me', 'blow job', 'suck my balls', 'lick my balls'];
Answers[24] := ['eww thats nasty..','no one would...','perv...','eww...'];
Triggers[25][0]:= [Players[currentplayer].nick];
Answers[25] := ['what?','hmm?','huh?'];
Triggers[26][0]:= ['trade me', 'trade plz'];
Answers[26] := ['no','im mining my own','nty'];
end;
function Res_CheckTriggers(Str, Auth: string; var response: string): boolean;
var
i, j, k: integer;
begin
if not R_LoggedIn then Exit;
for i := 0 to High(Triggers) do
begin
for j := 0 to High(Triggers[i]) do
begin
for k := 0 to High(Triggers[i][j]) do
begin
Result := (Pos(lowercase(Triggers[i][j][k]), lowercase(Str)) > 0);
if Result then Break;
end;
if Result then Break;
end;
if Result then Break;
end;
if Result then Response := Answers[i][RandomRange(Low(Answers[i]), High(Answers[i]))]
end;
function Res_FindPlayerOnMap(Name: string): boolean;
var
Players: array of TPlayer;
i: integer;
a: string;
begin
if not R_LoggedIn then Exit;
Players := GetPlayers;
for i := 0 to High(Players) do
begin
a := lowercase(Replace(Players[i].Name, 'Â', ''));
Result := (a = Name);
if Result then Break;
end;
end;
function Res_FindLastUnresponded(var Auth, Str: String; line: integer; var r: string): boolean;
var
s, a: string;
begin
if not R_LoggedIn then Exit;
s := Res_GetChatBoxLine2(line, 'chat');
s := Lowercase(Trim(Copy(s, Pos(':', s)+1, High(s))));
a := Res_GetChatBoxLine2(line, 'chat');
a := Lowercase(Trim(Replace(Copy(a, Low(a), Pos(':', a)-1 ), 'Â', '')));
if (Not Res_RespondedTo(s, a))then Result := (Res_CheckTriggers(s, a, r));
if Result then Result := (Res_FindPlayerOnMap(a));
if Result then
begin
AddToDebug('Found unresponded message! ['+lowercase(a)+']['+lowercase(s)+']');
Auth := lowercase(a);
Str := lowercase(s);
end;
end;
function Res_AutoRespond: boolean;
var
s, a, res: string;
i: integer;
begin
if not R_LoggedIn then Exit;
if not ResponderOn then Exit;
for i := 8 downto 1 do
begin
if Res_FindLastUnresponded(a, s, i, res) then
begin
TypeSend(res);
Inc(RespondCount);
Inc(ReportVars[1]);
Result := true;
SetLength(Responded, Length(Responded)+1);
Responded[High(Responded)][0] := s;
Responded[High(Responded)][1] := a;
end;
end;
end;
function W_LoadPath(Which: String): TPointArray;
begin
case Lowercase(Which) of
'vem_tobank': Result := [Point(3292, 3377), Point(3292, 3388),
Point(3291, 3399), Point(3289, 3409), Point(3281, 3417),
Point(3279, 3425), Point(3267, 3428), Point(3259, 3427),
Point(3254, 3420)];
'vem_tomine': Result := [Point(3262, 3427), Point(3274, 3428),
Point(3281, 3418), Point(3287, 3411), Point(3291, 3400),
Point(3292, 3389), Point(3294, 3379), Point(3290, 3372)];
'vwm_tobank': Result := [Point(3182, 3376), Point(3178, 3386),
Point(3172, 3393), Point(3170, 3404), Point(3170, 3415),
Point(3171, 3423), Point(3179, 3428)];
'vwm_tomine': Result := [Point(3181, 3429), Point(3171, 3423),
Point(3169, 3410), Point(3171, 3398), Point(3175, 3388),
Point(3179, 3379)];
'rim_tomine': Result := [Point(3007, 3347), Point(3007, 3334),
Point(3007, 3322), Point(3004, 3308), Point(2999, 3296),
Point(2994, 3286), Point(2988, 3275), Point(2982, 3265),
Point(2978, 3257), Point(2976, 3248), Point(2976, 3245)];
'rim_tobank': Result := [Point(2977, 3248), Point(2978, 3257),
Point(2986, 3266), Point(2990, 3278), Point(2993, 3289),
Point(2999, 3309), Point(3006, 3319), Point(3007, 3332),
Point(3007, 3342), Point(3006, 3352), Point(3012, 3357)];
'gld_tomine': Result := [Point(3026, 3349)];
'gld_tomine2': Result := [Point(3020, 3338)];
'gld_tomid': Result := [Point(3032, 9736), Point(3041, 9738)];
'gld_toladder': Result := [Point(3040, 9738), Point(3027, 9738),
Point(3021, 9739)];
'gld_tobank': Result := [Point(3024, 3350), Point(3013, 3356)];
'vem_death': Result := [Point(3234, 3220), Point(3242, 3226),
Point(3253, 3227), Point(3259, 3237), Point(3256, 3247),
Point(3250, 3256), Point(3249, 3267), Point(3242, 3275),
Point(3238, 3283), Point(3239, 3293), Point(3238, 3304),
Point(3247, 3314), Point(3255, 3323), Point(3266, 3325),
Point(3269, 3329), Point(3281, 3332), Point(3287, 3340),
Point(3294, 3349), Point(3296, 3360), Point(3292, 3371)];
'vwm_death': Result := [Point(3234, 3220), Point(3242, 3226),
Point(3253, 3227), Point(3259, 3237), Point(3256, 3247),
Point(3250, 3256), Point(3249, 3267), Point(3242, 3275),
Point(3238, 3283), Point(3239, 3293), Point(3238, 3304),
Point(3247, 3314), Point(3255, 3323), Point(3266, 3325),
Point(3269, 3329), Point(3258, 3333), Point(3248, 3336),
Point(3238, 3336), Point(3228, 3339), Point(3226, 3349),
Point(3218, 3356), Point(3208, 3361), Point(3200, 3367),
Point(3190, 3369), Point(3185, 3369)];
'gld_death', 'rim_death':
Result := [Point(3234, 3219), Point(3231, 3230),
Point(3225, 3236), Point(3223, 3243), Point(3213, 3247),
Point(3202, 3247), Point(3190, 3246), Point(3178, 3249),
Point(3171, 3255), Point(3159, 3258), Point(3148, 3259),
Point(3136, 3262), Point(3125, 3263), Point(3113, 3262),
Point(3105, 3263), Point(3095, 3272), Point(3084, 3279),
Point(3072, 3277), Point(3060, 3275), Point(3047, 3275),
Point(3036, 3276), Point(3023, 3275), Point(3012, 3278),
Point(3007, 3288), Point(3005, 3298), Point(3006, 3309),
Point(3007, 3318), Point(3008, 3329), Point(3007, 3340),
Point(3007, 3351), Point(3012, 3355)];
end;
end;
function W_WalkToPathTile(Tile: TPoint; Randomness: Integer): Boolean;
var
wTile: TPoint;
t: Integer;
begin
if not R_LoggedIn then Exit;
Tile.X := RandomRange(Tile.X-Randomness, Tile.X+Randomness);
Tile.Y := RandomRange(Tile.Y-Randomness, Tile.Y+Randomness);
wTile := TileToMM(Tile);
While not TileOnMM(Tile) do
begin
if not R_LoggedIn then Exit;
wait(100+Random(200));
end;
if not TileOnMM(Tile) then
begin
Result := False;
AddToDebug('Tile not on MM!');
Exit;
end;
Result := True;
Mouse(wTile.x, wTile.y, 0, 0, true);
t := getsystemtime;
Result := (GetSystemTime - t) < 60000;
end;
function W_FindNewTile(Tile: TPoint): TPoint;
var
MTile: TPoint;
begin
MTile := GetMyPos;
if (Tile.X > MTile.X) and (Tile.Y > MTile.Y) then
begin
While not TileOnMM(Tile) do
begin
if not R_LoggedIn then
if KillPlayer('Walking Path') then Exit;
Tile.X := Tile.X-1;
Tile.Y := Tile.Y-1;
end;
Result := Tile;
Exit;
end;
if (Tile.X < MTile.X) and (Tile.Y < MTile.Y) then
begin
While not TileOnMM(Tile) do
begin
if not R_LoggedIn then Exit;
Tile.X := Tile.X+1;
Tile.Y := Tile.Y+1;
end;
Result := Tile;
Exit;
end;
if (Tile.X > MTile.X) and (Tile.Y < MTile.Y) then
begin
While not TileOnMM(Tile) do
begin
if not R_LoggedIn then Exit;
Tile.X := Tile.X-1;
Tile.Y := Tile.Y+1;
end;
Result := Tile;
Exit;
end;
if (Tile.X < MTile.X) and (Tile.Y > MTile.Y) then
begin
While not TileOnMM(Tile) do
begin
if not R_LoggedIn then Exit;
Tile.X := Tile.X+1;
Tile.Y := Tile.Y-1;
end;
Result := Tile;
Exit;
end;
end;
{*******************************************************************************
function WalkPath(Path: TPointArray): boolean;
By: Drags111
Description: Walks path (Path) human like. Usage: WalkPath(LoadPath1); (example)
*******************************************************************************}
procedure W_WalkPath(Path: TPointArray; Fast: boolean);
var
i, T: integer;
NotMarked: Boolean;
begin
if not R_LoggedIn then Exit;
if not W_WalkToPathTile(Path[i], 2)then Exit;
for i := 0 to High(Path) do
begin
if i < High(Path) then
begin
while not TileOnMM(Point(Path[i+1].x, Path[i+1].y)) do
begin
if not R_LoggedIn then Exit;
if (not FlagPresent) and (NotMarked) then
begin
MarkTime(T);
Scr_FindMyRandoms;
NotMarked := false;
end;
wait(100+Random(100));
if not R_LoggedIn then Exit;
if (not FlagPresent) and (TimeFromMark(t) > 6000)then
WalkToTile(W_FindNewTile(Point(Path[i+1].x, Path[i+1].y)), 0, 0);
end;
wait(1000+Random(500));
W_WalkToPathTile(Path[i+1], 1);
if not Fast then FFlag(5);
end else FFlag(0);
wait(400+Random(200));
end;
end;
procedure W_GetLocation;
begin
Players[CurrentPlayer].Loc := '';
case Loc of
'vem_': begin
if DistanceFrom(Point(3254, 3420)) < 25 then
Players[CurrentPlayer].Loc := 'Bank';
if DistanceFrom(Point(3286, 3365)) < 30 then
Players[CurrentPlayer].Loc := 'Mine';
end;
'vwm_': begin
if DistanceFrom(Point(3187, 3439)) < 30 then
Players[CurrentPlayer].Loc := 'Bank';
if DistanceFrom(Point(3179, 3370)) < 30 then
Players[CurrentPlayer].Loc := 'Mine';
end;
'rim_': begin
if DistanceFrom(Point(3012, 3355)) < 30 then
Players[CurrentPlayer].Loc := 'Bank';
if DistanceFrom(Point(2977, 3239)) < 50 then
Players[CurrentPlayer].Loc := 'Mine';
end;
'gld_': begin
if DistanceFrom(Point(3014, 3355)) < 30 then
Players[CurrentPlayer].Loc := 'Bank';
if DistanceFrom(Point(3041, 9738)) < 50 then
Players[CurrentPlayer].Loc := 'Mine';
end;
end;
if DistanceFrom(Point(3222, 3218)) < 20 then
Players[CurrentPlayer].Loc := 'Home';
end;
function W_TeleHome: boolean;
begin
repeat
GameTab(7);
wait(1000+Random(1000));
MouseBox(566, 223, 576, 232, 1);
wait(2000+Random(2000));
Result := (not ChatBoxTextExists('black', 'You need to wait'));
until Result or (ChatBoxTextExists('black', 'You need to wait'));
end;
procedure W_WalkTo(Place: String); forward;
procedure W_FindLocation;
begin
W_GetLocation;
if (lowercase(Players[CurrentPlayer].Loc) = 'home') then W_WalkTo(Loc+'death');
if Players[CurrentPlayer].Loc = '' then
begin
wait(5000+Random(5000));
W_GetLocation;
if Players[CurrentPlayer].Loc = '' then
begin
if not W_TeleHome then
begin
Players[CurrentPlayer].Loc := 'Lost';
KillPlayer('Lost');
end else
begin
While not (lowercase(Players[CurrentPlayer].Loc) = 'home') do
begin
W_GetLocation;
wait(500+Random(300));
end;
W_WalkTo(Loc+'death');
end;
end;
end;
W_GetLocation;
end;
procedure W_GoInMine;
var
P: TPoint;
begin
if not R_LoggedIn then Exit;
AddToDebug('Going in mine...');
case lowercase(Loc) of
'vem_': begin
case lowercase(Players[CurrentPlayer].Strings[0]) of
'iron': P := Point(3286, 3368);
'copper': P := Point(3287, 3364);
'tin': P := Point(3282, 3363);
end;
end;
'vwm_': begin
case lowercase(Players[CurrentPlayer].Strings[0]) of
'iron': P := Point(3178, 3369);
'clay': P := Point(3180, 3371);
'tin': P := Point(3182, 3376);
end;
end;
'rim_': begin
case lowercase(Players[CurrentPlayer].Strings[0]) of
'iron': P := Point(2969, 3239);
'clay': P := Point(2986, 3240);
'tin': P := Point(2985, 3236);
'copper': P := Point(2978, 3247);
'gold' : P := Point(2976, 3233);
end;
end
else P := Point(3046, 9737);
end;
if (DistanceFrom(P) > 15) then
WalkToTile(P, 0, 0);
W_FindLocation;
AddToDebug('Player made it to mine: '+booltostr(Players[CurrentPlayer].Loc = 'Mine'));
end;
function W_ClimbLadder(Which: string): boolean;
var
r, t: integer;
ex, ey: extended;
LTiles: TPointArray;
P: TPoint;
begin
case lowercase(Which) of
'down': LTiles := [Point(3018, 3339), Point(3019, 3340),
Point(3019, 3338), Point(3020, 3339)];
'up': LTiles := [Point(3018, 9739), Point(3019, 9740),
Point(3019, 9738), Point(3020, 9739)];
end;
r := Random(4);
if not TileOnMS(LTiles[r], 10) then WalkToTile(LTiles[r], 0, 0);
case lowercase(which) of
'down':
case r of
0: begin ex := 0.9; ey := 0.2; end;
1: begin ex := 0.2; ey := 0.1; end;
2: begin ex := 0.2; ey := 0.9; end;
3: begin ex := 0.1; ey := 0.2; end;
end;
'up':
case r of
0: begin ex := 0.5; ey := 0.2; end;
1: begin ex := 0.2; ey := 0.2; end;
2: begin ex := 0.2; ey := 0.5; end;
3: begin ex := 0.5; ey := 0.2; end;
end;
end;
repeat
P := TileToMSEx(Tile(LTiles[r].x+ex, LTiles[r].y+ey), 10);
Mouse(P.x, P.y, 0, 0, false);
wait(RandomRange(80, 100));
Result := ChooseOption(lowercase(which));
case r of
1..2: ex := ex + 0.1;
0, 3: ey := ey + 0.1;
end;
inc(T);
if T > 3 then Exit;
until Result;
case lowercase(which) of
'down': While (DistanceFrom(Point(3021, 9739)) > 10) do wait(100+Random(100));
'up': While(DistanceFrom(Point(3020, 3338)) > 10) do wait(100+Random(100));
end;
Wait(RandomRange(1000, 2000));
end;
procedure W_GuildWalking(Which: string);
var
i, p: integer;
Path, NPath: TPointArray;
begin
if lowercase(which) = 'gld_tomine'then
begin
W_WalkPath(W_LoadPath('gld_tomine'), false);
W_WalkPath(W_LoadPath('gld_tomine2'), false);
while not W_ClimbLadder('down') do
if i > 5 then KillPlayer('Ladder Failed Down') else Inc(i);
Writeln('Climbed');
W_WalkPath(W_LoadPath('gld_tomid'), false);
end else
begin
Path := W_LoadPath('gld_toladder');
for i := High(Path) downto Low(Path)do
if TileOnMM(Path[i]) then Break;
for i := i to High(Path) do
begin
SetLength(NPath, Length(NPath)+1)
NPath[p] := Path[i];
inc(p)
end;
W_WalkPath(Path, True);
i := 0;
while not W_ClimbLadder('up') do
if i > 5 then KillPlayer('Ladder Failed Up') else Inc(i);
W_WalkPath(W_LoadPath('gld_tobank'), false);
end;
end;
procedure W_WalkTo(Place: String);
var
l: integer;
begin
if not R_LoggedIn then Exit;
AddToDebug('Walking to '+Place);
if not (Loc = 'gld_') or (place = 'gld_death')then
begin
W_WalkPath(W_LoadPath(Place), true);
end else W_GuildWalking(Place);
end;
function Min_FindPick: boolean;
var
IDs, Slots: TIntegerArray;
ID, i, MP, ML: integer;
Item: TInvItem;
begin
if not R_LoggedIn then Exit;
IDs := [1266, 1268, 1270, 1274, 1272, 1276];
for i := 0 to High(IDs) do
begin
Result := GetIDEquippedAt(3) = IDs[i];
if Result then ID := IDs[i];
if Result then Break;
end;
if Result then
begin
PickID := ID;
WP := true;
end else
begin
if not InventoryContainsMulti(IDs, Slots) then
begin
Exit;
end else
begin
WP := false;
Item := GetInvItemInfo(Slots[0]);
PickID := Item.ID;
end;
end;
Result := true;
for i := 0 to High(IDs) do
if PickID = IDs[i] then PickRank := i+1;
case PickID of
1266: TPick := 'Bronze';
1268: TPick := 'Iron';
1270: TPick := 'Steel';
1274: TPick := 'Mith';
1272: TPick := 'Addy';
1276: TPick := 'Rune';
end;
AddToDebug('Pick: '+TPick+'.');
ML := GetMySkill(14, true);
case ML of
1..5: MP := 2;
6..20: MP := 3;
21..30: MP := 4;
31..40: MP := 5;
41..99: Mp := 6;
end;
if(PickRank < MP)then AddToDebug(Players[CurrentPlayer].Nick+' can use a better pick...');
end;
function Min_GetObjectTypeAt(TheTile: TPoint): integer;
begin
Result := GetObjectAt(TheTile.x, TheTile.y).objType;
end;
function Min_FindRockTile: boolean;
var
Tiles, NTiles: TPointArray;
Types: TintegerArray;
i, T, TY: integer;
begin
if not R_LoggedIn then Exit;
Tiles := STiles
Types := STypes
for i := 0 to High(STiles) do
begin
if not R_LoggedIn then Exit;
T := Min_GetObjectTypeAt(Tiles[i]);
TY := Types[i];
if (T = TY) then
begin
SetLength(NTiles, Length(NTiles)+1);
NTiles[Length(NTiles)-1] := Tiles[i]
end;
end;
if (Length(NTiles)<1) then Exit;
Result := true;
SortTPAFrom(NTiles, GetMyPos);
RockTiles := NTiles;
SetLength(RockTypes, Length(RockTiles));
for i := 0 to High(NTiles) do
RockTypes[i] := Min_GetObjectTypeAt(NTiles[i]);
end;
function Min_FindRockTileEx(TTiles: TPointArray; TTypes: TIntegerArray): boolean;
var
Tiles, NTiles: TPointArray;
Types: TintegerArray;
i, T, TY: integer;
begin
if not R_LoggedIn then Exit;
Tiles := TTiles
Types := TTypes
for i := 0 to High(Tiles) do
begin
if not R_LoggedIn then Exit;
T := Min_GetObjectTypeAt(Tiles[i]);
TY := Types[i];
if (T = TY) then
begin
SetLength(NTiles, Length(NTiles)+1);
NTiles[Length(NTiles)-1] := Tiles[i]
end;
end;
if (Length(NTiles)<1) then Exit;
Result := true;
SortTPAFrom(NTiles, GetMyPos);
RockTiles := NTiles;
SetLength(RockTypes, Length(RockTiles));
for i := 0 to High(NTiles) do
RockTypes[i] := Min_GetObjectTypeAt(NTiles[i]);
end;
function Min_MineRock: boolean;
var
P: TPoint;
i: integer;
XTiles: TPointArray;
XTypes: TintegerArray;
Found: boolean;
begin
if not R_LoggedIn then Exit;
R_FindRandoms;
While not Result do
begin
if not R_LoggedIn then Exit;
if (Loc = 'rim_') and (ore = 'gold')then
begin
XTiles := [Point(2981, 3233), Point(2982, 3234)];
XTypes := [9718, 9717];
While not Found do
begin
if not R_LoggedIn then Exit;
Found := Min_FindRockTile;
if not Found then
Found := Min_FindRockTileEx(XTiles, XTypes);
end;
end else
if (Loc = 'gld_')then
begin
XTiles := [Point(3046, 9733), Point(3047, 9733), Point(3050, 9738),
Point(3052, 9739), Point(3053, 9737)];
XTypes := [31086, 31087, 31086, 31088, 31087];
While not Found do
begin
if not R_LoggedIn then Exit;
Found := Min_FindRockTileEx(XTiles, XTypes);
if not Found then
Found := Min_FindRockTile;
end;
end else
Found := Min_FindRockTile;
if Found then
begin
//AddToDebug('Found rock tiles...');
for I := 0 to High(RockTiles) do
begin
if not R_LoggedIn then Exit;
//AddToDebug(inttostr(RockTiles[i].x)+', '+inttostr(RockTiles[i].y));
if not (TileOnMS(RockTiles[i], 10)) then
begin
WalkToTile(RockTiles[i], 0, 0);
While CharacterMoving do wait(100+Random(100));
Wait(RandomRange(900, 1300));
end;
//AddToDebug('On MS!');
P := TileToMS(Point(RockTiles[i].x, RockTiles[i].y), 10);
MMouse(P.X, P.Y, 10, 10);
wait(75+Random(75));
Result := IsUpText('Mine');
GetMousePos(x, y);
if Result then Mouse(x, y, 0, 0, true);
RockTile := RockTiles[i];
RockType := RockTypes[i];
if Result then Res_AutoRespond;
if Result then Exit;
end;
end;
end;
end;
procedure Min_AfterMine;
var
T, FT: integer;
begin
if not R_LoggedIn then Exit;
if FindNPCChatText('here to con', clickleft)then Exit;
case Random(2) of
0: wait(10);
1: MMouse(Random(MSX2), Random(MSY2), 0, 0);
end;
MarkTime(FT);
While FlagPresent and (Min_GetObjectTypeAt(RockTile) = RockType) do
begin
if not R_LoggedIn then Exit;
wait(100+Random(100));
if TimeFromMark(FT) > 7000 then Exit;
end;
MarkTime(T);
While (Min_GetObjectTypeAt(RockTile) = RockType) and (TimeFromMark(T) < Players[CurrentPlayer].Integers[0]) do
begin
if not R_LoggedIn then Exit;
if not (GetAnimation > 0) and (TimeFromMark(T) > 2000) then Exit;
wait(50+Random(50));
Scr_FindMyRandoms;
end;
end;
procedure Drop_DropAllBut(ID: Integer);
var
Item: TInvItem;
T, i: integer;
begin
Gametab(4);
for i := 1 to 28 do
begin
Item := GetInvItemInfo(i);
if (Item.ID <> ID)then
begin
MouseItem(i, False);
Wait(RandomRange(50, 80));
ChooseOption('Drop');
MarkTime(T);
While R_ExistsItem(i) and (TimeFromMark(T) < 3500) do wait(100);
end;
end;
end;
procedure Drop_Dropping;
begin
if not R_LoggedIn then Exit;
Scr_CountOres;
Drop_DropAllBut(PickID);
Inc(LoadsDone);
Inc(ReportVars[0]);
Inc(Players[CurrentPlayer].Integers[10]);//Loads
Dec(Players[CurrentPlayer].Integers[11]);
end;
function Bank_Deposit(Slot: Integer): boolean;
var
Item: TInvItem;
T: integer;
begin
if not R_BankScreen then Exit;
Item := GetInvItemInfo(Slot);
if (Item.ID = 14665) then Exit;
if (Item.Stack > 1) or (R_CountItems(Item.ID) > 1) then
begin
MouseItem(Slot, false);
ChooseOption('Deposit-All');
end else MouseItem(Slot, true);
MarkTime(T);
While R_ExistsItem(Slot) and (TimeFromMark(T) < 3500) do wait(100);
Result := not R_ExistsItem(Slot);
end;
procedure Bank_DepositAllBut(ID: Integer; KeepAll: boolean);
var
I, NID: integer;
Item: TInvItem;
begin
NID := ID;
if not R_BankScreen then Exit;
for i := 1 to 28 do
begin
if not R_LoggedIn then Exit;
Item := GetInvItemInfo(i);
if R_ExistsItem(i) then
if not (Item.ID = ID) then
Bank_Deposit(i)
else if (not KeepAll) then NID := -1;
end;
end;
procedure Bank_GetBankOpen;
begin
while not R_Bankscreen do
begin
if not R_LoggedIn then Exit;
R_OpenBankBooth(TB);
if R_PinScreen then R_InPin(Players[CurrentPlayer].Pin);
Scr_FindMyRandoms;
end;
end;
procedure Bank_Banking;
begin
if not R_LoggedIn then Exit;
Scr_CountOres;
Bank_GetBankOpen;
Wait(200 +Random(100));
While InvFull do
begin
if not R_LoggedIn then Exit;
if WP then
begin
MouseBox(384, 299, 407, 314, 1)
Wait(500+Random(800));
end else
if R_InvCount > 1 then Bank_DepositAllBut(PickID, False);
end;
CloseBank;
Inc(LoadsDone);
Inc(ReportVars[0]);
Inc(Players[CurrentPlayer].Integers[10]);//Loads
Dec(Players[CurrentPlayer].Integers[11]);
end;
procedure Scr_SetupSmart;
begin
SmartSetupEx(32, False, true, false);
Wait(1000);
SetTargetDC(SmartGetDC);
end;
procedure Scr_Setup;
var
i: integer;
begin
Scr_SetupSmart;
SetupSRL;
ScriptID := '1196';
if (YourStatsID <> '') then SRLID := YourStatsID;
if (YourStatsPass <> '') then SRLPassword := YourStatsPass;
DeclarePlayers;
for i := 0 to High(Players) do
begin
if not Scr_InStrArray(AllOres, lowercase(Players[i].Strings[0])) then
begin
SetLength(AllOres, Length(AllOres)+1);
AllOres[High(AllOres)] := lowercase(Players[i].Strings[0]);
if (lowercase(Players[i].Strings[0]) = 'coal') then
begin
SetLength(AllOres, Length(AllOres)+1);
AllOres[High(AllOres)] := 'mith';
end;
end;
end;
Scr_WorldSwitch(Players[CurrentPlayer].Booleans[0]);
end;
procedure Scr_SetPlayerVars;
begin
ore := lowercase(Players[CurrentPlayer].Strings[0]);
case lowercase(Players[CurrentPlayer].Strings[1]) of
'vem', 'varrock east':
begin
case ore of
'iron':
begin
STiles := [Point(3285, 3368), Point(3286, 3369), Point(3285, 3369),
Point(3288, 3370)];
STypes := [11955, 11956, 11954, 11956];
end;
'copper':
begin
STiles := [Point(3282, 3369), Point(3282, 3368), Point(3287, 3365),
Point(3286, 3364), Point(3285, 3361), Point(3287, 3361),
Point(3288, 3361), Point(3290, 3362), Point(3289, 3363)];
STypes := [11960, 11962, 11961, 11960, 11961, 11962, 11960, 11962, 11961];
end;
'tin':
begin
STiles := [Point(3281, 3362), Point(3281, 3363), Point(3282, 3364),
Point(3282, 3365), Point(3288, 3366), Point(3289, 3368)];
STypes := [11958, 11957, 11957, 11959, 11957, 11959];
end;
end;
Loc := 'vem_';
TB := 'veb';
end;
'vwm', 'varrock west':
begin
case ore of
'iron':
begin
STiles := [Point(3175, 3366), Point(3175, 3368), Point(3181, 3373)];
STypes := [11955, 11956, 11954];
end;
'tin':
begin
STiles := [Point(3173, 3366), Point(3172, 3366), Point(3173, 3365),
Point(3176, 3365), Point(3177, 3366), Point(3176, 3369),
Point(3181, 3376), Point(3183, 3376), Point(3181, 3377),
Point(3181, 3375)];
STypes := [11957, 11959, 11959, 11950, 11949, 11957, 11957, 11959,
11959, 11958];
end;
'clay':
begin
STiles := [Point(3179, 3371), Point(3180, 3372)];
STypes := [15505, 15503];
end;
end;
Loc := 'vwm_';
TB := 'vwb';
end;
'rim', 'rimmington': begin
case ore of
'copper': begin
STiles := [Point(2977, 3247), Point(2976, 3247), Point(2978, 3248),
Point(2979, 3248), Point(2977, 3245)];
STypes := [9708, 9710, 9708, 9709, 9709];
end;
'tin': begin
STiles := [Point(2984, 3237), Point(2986, 3235)];
STypes := [9714, 9716];
end;
'clay': begin
STiles := [Point(2986, 3239), Point(2987, 3240)];
STypes := [9713, 9711];
end;
'iron': begin
STiles := [Point(2971, 3237), Point(2968, 3239), Point(2969, 3240),
Point(2969, 3242)];
STypes := [9717, 9719, 9717, 9718];
end;
'gold': begin
STiles := [Point(2975, 3234), Point(2977, 3233)];
STypes := [9722, 9720];
end;
end;
Loc := 'rim_';
TB := 'feb';
end;
'guild', 'mining guild': begin
case ore of
'coal': begin
STiles := [Point(3028, 9737), Point(3028, 9739), Point(3029, 9734),
Point(3031, 9739), Point(3032, 9735), Point(3032, 9737),
Point(3032, 9741), Point(3034, 9739), Point(3035, 9734),
Point(3035, 9742), Point(3037, 9733), Point(3037, 9735),
Point(3037, 9739), Point(3038, 9748), Point(3039, 9733),
Point(3039, 9738), Point(3039, 9741), Point(3040, 9732),
Point(3042, 9734), Point(3042, 9739), Point(3043, 9742),
Point(3044, 9737), Point(3044, 9753), Point(3045, 9740),
Point(3045, 9744), Point(3046, 9735), Point(3047, 9737),
Point(3048, 9743), Point(3048, 9747), Point(3048, 9754),
Point(3049, 9734), Point(3049, 9735), Point(3049, 9740),
Point(3051, 9735), Point(3053, 9742), Point(3054, 9739),
Point(3054, 9746)];
STypes := [31068, 31069, 31069, 31070, 31068, 31068, 31068, 31070,
31069, 31069, 31068, 31069, 31070, 31068, 31068, 31068,
31068, 31069, 31070, 31068, 31068, 31069, 31068, 31069,
31070, 31070, 31069, 31068, 31069, 31068, 31070, 31068,
31068, 31069, 31070, 31068, 31069];
end;
end;
Loc := 'gld_';
TB := 'feb';
end;
end;
end;
procedure Scr_PlayerSetup;
begin
LoginPlayer;
Scr_SetPlayerVars;
AddToDebug('Mine: '+Loc+', Bank: '+TB+'.');
Players[CurrentPlayer].Integers[11] := RandomRange(10, 20);
//Players[CurrentPlayer].Integers[11] := 1;
R_SetAngle(True);
Min_FindPick;
Players[CurrentPlayer].Integers[5] := GetMySkill(14, true);
Res_LoadTriggers;
end;
procedure Scr_NextPlayerWithSwitch(Active: boolean);
begin
if RandomPlayer then
RandomNextPlayer(Active)
else
begin
WriteLn('NextPlayer(Active: ' + BoolToStr(Active)+ ');');
Players[CurrentPlayer].Active := Active;
Logout;
if (SRL_Procs[srl_OnNextPlayer] <> nil) then
SRL_Procs[srl_OnNextPlayer]();
PlayerCurTime := (GetSystemTime div 1000);
Players[CurrentPlayer].Worked := Players[CurrentPlayer].Worked +
((PlayerCurTime - PlayerStartTime) / 60);
CurrentPlayer := (CurrentPlayer + 1) mod Length(Players);
while Players[CurrentPlayer].Active = False do
begin
CurrentPlayer := (CurrentPlayer + 1) mod Length(Players);
if (AllPlayersInactive) then Wait(60000); // Everybody False. Endless Loop.
end;
SRL_Logs := SRL_Logs + 1;
Scr_WorldSwitch(Players[CurrentPlayer].Booleans[0]);
LoginPlayer;
end;
end;
function Prg_OreMineCount(TOre: String): integer;
begin
case lowercase(TOre) of
'copper': Result := MCopper;
'tin': Result := MTin;
'iron': Result := MIron;
'clay': Result := MClay;
'gold': Result := MGold;
'mith': Result := MMith;
'coal': Result := MCoal;
end;
end;
function Prg_PlayerActivity(i: integer): string;
begin
if Players[i].Active then Result := 'T' else Result := 'F';
end;
function Prg_OresPerHour: Extended;
var
Mins, Hours: Extended;
begin
Mins := (((TimeFromMark(ScriptStart)-MSSlept) / 1000) / 60);
Hours := Mins / 60;
Result := (Round(TotalOres/Hours));
end;
procedure Prg_ProgessWrite(Var Rep: TStringArray; S: String);
var
FileNum, i: integer;
begin
AddToReport(S);
SetLength(Rep, Length(Rep)+1);
Rep[High(Rep)] := S;
FileNum := RewriteFile(ScriptPath+'[PROGGIE]AwesomeMiner.txt',True);
if( FileNum < 0 )then
AddToDebug('Couldn''t save report!');
for i := 0 to High(Rep) do
WriteFileString(FileNum, Rep[i]+#10);
CloseFile(FileNum);
end;
procedure Prg_ProgressReport;
var
i: integer;
Report: TStringArray;
begin
ChangeReportWidth(560);
ClearReport;
Prg_ProgessWrite(Report, ' _________________________________________________________________');
Prg_ProgessWrite(Report, '/¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\');
Prg_ProgessWrite(Report, padr('| Drags111''s Awesome Reflection Miner', 66)+'|');
Prg_ProgessWrite(Report, padr('| v'+version, 66)+'|');
Prg_ProgessWrite(Report, '|_________________________________________________________________|');
Prg_ProgessWrite(Report, '|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|');
Prg_ProgessWrite(Report, padr('| Script Stats', 66)+'|');
Prg_ProgessWrite(Report, padr('| Worked For '+TimeRunning, 66)+'|');
Prg_ProgessWrite(Report, padr('| Total Loads: '+inttostr(LoadsDone), 66)+'|');
Prg_ProgessWrite(Report, padr('| Responded: '+inttostr(RespondCount), 66)+'|');
Prg_ProgessWrite(Report, padr('| Ores Stats', 66)+'|');
Prg_ProgessWrite(Report, padr('| Ores per Hour: '+floattostr(Prg_OresPerHour), 66)+'|');
Prg_ProgessWrite(Report, padr('| Total: '+inttostr(TotalOres), 66)+'|');
//for i := 0 to High(AllOres) do
// Prg_ProgessWrite(Report, padr('| '+Capitalize(AllOres[i])+': ', 16)+padr(inttostr(Prg_OreMineCount(AllOres[i])), 50)+'|');
Prg_ProgessWrite(Report, padr('| Loads Left for Current Player: '+inttostr(Players[CurrentPlayer].Integers[11]), 66)+'|');
Prg_ProgessWrite(Report, '\_________________________________________________________________/');
Prg_ProgessWrite(Report, '/¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\');
Prg_ProgessWrite(Report, padr('| Player Stats', 66)+'|');
Prg_ProgessWrite(Report, padr('|', 66)+'|');
Prg_ProgessWrite(Report, '| Nick T/F Mine Lvl Ore Ores Loads Location |');
Prg_ProgessWrite(Report, '| ¯¯¯¯ ¯¯¯ ¯¯¯¯ ¯¯¯ ¯¯¯ ¯¯¯¯ ¯¯¯¯¯ ¯¯¯¯¯¯¯¯ |');
for i := 0 to High(Players) do
Prg_ProgessWrite(Report, '| '+padr(Players[i].Nick, 6)+padr(Prg_PlayerActivity(i), 5)+
padr(Players[i].Strings[1], 7)+
padr(inttostr(Players[i].Integers[5]), 6)+
padr(Players[i].Strings[0], 8)+
padr(inttostr(Players[i].Integers[9]), 8)+
padr(inttostr(Players[i].Integers[10]), 8)+
padr(Players[i].Loc, 15)+'|');
Prg_ProgessWrite(Report, '\_________________________________________________________________/');
end;
procedure TakeNap;
var
NapTime, Mins, Secs: longint;
begin
AddToDebug('Taking Nap...');
NapTime := (2 + Random(10)) * 60000;
Mins := NapTime / 60000;
Secs := Random(55000);
AddToDebug('Time to nap! Will be back in ' + inttostr(Mins) + ' minutes and '+ inttostr(Secs / 1000) + ' seconds!');
wait(NapTime + Secs - 60000);
AddToDebug('Logging in in 60 seconds!');
wait(60000);
MSSlept := (MSSlept + NapTime + Secs);
end;
procedure PlayerLoop;
begin
Scr_FindMyRandoms;
if not R_LoggedIn then Exit;
W_FindLocation;
AddToDebug('Current Location: '+Players[CurrentPlayer].Loc);
case lowercase(Players[CurrentPlayer].Loc) of
'bank': begin
if R_InvCount > 1 then
Bank_Banking;
W_WalkTo(Loc+'ToMine');
end;
end;
W_FindLocation;
Scr_FindMyRandoms;
repeat
Scr_FindMyRandoms;
AddToDebug('Starting main loop for player: '+ Players[CurrentPlayer].Nick);
if not R_LoggedIn then Exit;
W_FindLocation;
W_GoInMine;
GameTab(4);
if lowercase(Players[CurrentPlayer].Loc) = 'mine' then
Players[CurrentPlayer].Loc := 'Mining';
AddToDebug('Players Current Location: '+Players[CurrentPlayer].Loc);
Res_AutoRespond;
if (R_GetMMLevels('run') > 50) then SetRun(True);
While not R_InvFull do
begin
if not R_LoggedIn then Exit;
if Min_MineRock then Min_AfterMine;
end;
Players[CurrentPlayer].Integers[5] := GetMySkill(14, true);
if Players[CurrentPlayer].Booleans[1] then
begin
Drop_Dropping;
end else
begin
SetRun(false);
W_WalkTo(Loc+'ToBank');
Bank_Banking;
end;
SendSRLReport;
Prg_ProgressReport;
if not R_LoggedIn then Exit;
if (Loc = 'vwm_') and (lowercase(Players[CurrentPlayer].Strings[0]) = 'clay') then
if (R_GetMMLevels('run') > 70) then SetRun(True);
if Players[CurrentPlayer].Integers[11] > 0 then
if not Players[CurrentPlayer].Booleans[1] then W_WalkTo(Loc+'ToMine');
until(Players[CurrentPlayer].Integers[11] = 0);
end;
begin
Scr_Setup;
ClearDebug;
MarkTime(ScriptStart);
ChangeReportWidth(560);
repeat
Scr_PlayerSetup;
Scr_FindMyRandoms;
if R_LoggedIn then
PlayerLoop;
Logout;
if R_LoggedIn then Writeln('Logout Failed!');
LastPlayer := CurrentPlayer;
if (Players[CurrentPlayer].Integers[11] = 0) then
begin
Players[CurrentPlayer].Loc := 'Waiting';
AddToDebug('Player finished the set of loads!');
AddToDebug('Players Active: '+inttostr(PlayersActive));
if PlayersActive > 1 then Scr_NextPlayerWithSwitch(true) else
begin
TakeNap;
Scr_WorldSwitch(Players[CurrentPlayer].Booleans[0]);
end;
end else
begin
if Players[CurrentPlayer].Loc = 'Mining' then
Players[CurrentPlayer].Loc := 'Inactive';
Scr_NextPlayerWithSwitch(false);
end;
Prg_ProgressReport;
until AllPlayersInactive;
end.
I'll just leave that there…
He sent me an updated version wayy back. :)