Simba Code:
program AKSmelter;
{$DEFINE SMART8}
{$i srl/srl.simba}
{$I SRL/SRL/Misc/SmartGraphics.Simba}
{$i sps/sps.simba}
const
Version = '1,2'; // No Touchy :)
Debug = True; //Write a debug into the debug box?
BarType = 'Gold bar';//bronze, iron, steel, silver, gold, mithril, adamant, or rune.
HowManyBars = 99999; //How many bars to smelt before termination?
CoalBag = False; //True if using a coalbag, and it is in your 1st InvSlot.
OnScreenReport = True;//True if you want a proggy drawn on your screen (You do)
BreakIn = 9999; //About how many minutes to run before taking a break?
BreakFor = 7; //About how many minutes to break for?
RandomBreakIn = 20; //How many minutes of randomness to Add/Subtract from BreakIn?
RandomBreakFor = 5; //How many minutes of randomness to Add/Subtract from BreakFor?
Var
p1, p2, p3, p4:TPoint;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := ' '; // Player username
Pass := ' '; // Player password
Pin := '2908312903812983012'; // Bank Pin
Active := True;
end;
end;
procedure CheckFriends; //An Antiban Procedure by BMWxi
var
NCx, NCy, ONx, ONy :Integer;
begin
if not LoggedIn then LoginPlayer;
if not LoggedIn then Exit;
gametab(tab_friends); //Goes to friends tab
If FindColorTolerance(NCx, NCy, 16683035, 546, 246, 722, 451, 5) Then // Checks if they have changed names,
begin // if they have, It hovers to find their new name.
MMouse(NCx, NCy, 5, 5);
Wait(RandomRange(1000, 2000));
end;
If FindColorTolerance(ONx, ONy, 6619135, 546, 246, 722, 451, 5) Then //Checks to see if friends are online
begin //hovers the names of online friends
MMouse(ONx, ONy, 5, 5);
Wait(RandomRange(1000, 2000));
end else
begin
Wait(RandomRange(500, 1000)); //I added this so It doesn't spam-exit when you have no friends :)
end;
FTab(tab_Inv); //Returns to inventory
end;
var
Bars, AnyInvBarDTM, CoalBagDTM, TinOreDTM, CopperOreDTM, IronOreDTM,
SilverOreDTM, GoldOreDTM, MithrilOreDTM, AdamantOreDTM, RuneOreDTM,
CoalOreDTM, F1aDTM, F1bDTM, F2aDTM, F2bDTM, F2cDTM, F3DTM, B1aDTM, B1bDTM, B1cDTM,
B1dDTM, B2aDTM, B2bDTM, B2cDTM, TotalBreaks, RunTime, StartTime, BreakRounds,
Loads, Bxs, Bys, Bxe, Bye, FurnaceTries, HeartDTM, GoldBarDTM:Integer;
Status:string;
XPPerBar:Extended;
procedure Proggy;
var
SmithingXPEarned, SmithingXPPH, BarsPH, LoadsPH:Integer;
begin
if not LoggedIn then LoginPlayer;
if not LoggedIn then Exit;
wait(100);
RunTime := (TimeFromMark(StartTime) - (TotalBreaks * (BreakFor * 60000)));
SmithingXPEarned := (Bars * (Round(XPPerBar)));
SmithingXPPH := Round((SmithingXPEarned * 3600) / (RunTime / 1000));
BarsPH := Round((Bars * 3600) / (RunTime / 1000));
LoadsPH := Round((Loads * 3600) / (RunTime / 1000));
{Writeln('=========[] AIO AK Smelter ' + Version + '[]=========');
Writeln('[+] By BMWxi [+] Status: ' + Status);
Writeln('==============================================');
Writeln('[] Smelting: ' + BarType + ' (' + FloatToStr(XPPerBar) + ' XP Each)');
Writeln('[] Smithing XP Earned: ' + IntToStr(SmithingXPEarned) + ' Per Hour: ' + IntToStr(SmithingXPPH));
Writeln('[] Loads: ' + IntToStr(Loads) + ' Per Hour: ' + IntToStr(LoadsPH));
Writeln('[] Bars Smelted: ' + IntToStr(Bars) + ' Per Hour: ' + IntToStr(BarsPH));
Writeln('[] Total Time: ' + MsToTime(RunTime, 2));
Writeln('==============================================');}
if not OnScreenReport then Exit;
SMART_ClearCanvasArea(IntToBox(MCX1, MCY1, MCX2, 507));
SMART_DrawTextMulti(False, False, ['=============[] AK AIO Smelter ' + Version + ' []============='], Point(200, 348), StatChars, 1726658);
SMART_DrawTextMulti(False, False, ['[+] By BMWxi [+] Status: ' + Status], Point(200, 360), StatChars, 1726658);
SMART_DrawTextMulti(False, False, ['=============================================='], Point(200, 374), StatChars, 1726658);
SMART_DrawTextMulti(False, False, ['[] Smelting: ' + BarType + ' (' + FloatToStr(XPPerBar) + ' XP Each)'], Point(200, 388), StatChars, 1726658);
SMART_DrawTextMulti(False, False, ['[] Smithing XP Earned: ' + IntToStr(SmithingXPEarned) + ' Per Hour: ' + IntToStr(SmithingXPPH)], Point(200, 404), StatChars, 1726658);
SMART_DrawTextMulti(False, False, ['[] Loads: ' + IntToStr(Loads) + ' Per Hour: ' + IntToStr(LoadsPH)], Point(200, 418), StatChars, 1726658);
SMART_DrawTextMulti(False, False, ['[] Bars Smelted: ' + IntToStr(Bars) + ' Per Hour: ' + IntToStr(BarsPH)], Point(200, 432), StatChars, 1726658);
SMART_DrawTextMulti(False, False, ['[] Total Time: ' + MsToTime(RunTime, 2)], Point(200, 446), StatChars, 1726658);
SMART_DrawTextMulti(False, False, ['=============================================='], Point(200, 460), StatChars, 1726658);
end;
{*******************************************************************************
function BreakHandler(BreakIn, BreakFor, randBreakIn, randBreakFor: Integer): Boolean;
By: Echo_ * Slight modifications by me *
Description: Takes brakes according to the minute values entered
*******************************************************************************}
function BreakHandler(BreakIn, BreakFor, randBreakIn, randBreakFor: Integer): Boolean;
var
w, x, y, z: Integer;
begin
if not LoggedIn then Exit;
w := (BreakIn * 60000);
x := (BreakFor * 60000);
y := RandomRange(-randBreakIn * 60000, randBreakIn * 60000);
z := RandomRange(-randBreakFor * 60000, randBreakFor * 60000);
if (HowManyPlayers = 1) then
begin
if (GetTimeRunning < ((w) + (y) + BreakRounds)) then Exit
else
if (GetTimeRunning > ((w) + (y) + BreakRounds)) then
begin
Status := 'Breaking';
Proggy;
Writeln('Taking a break for about ' + IntToStr(BreakFor) + ' minutes.');
Logout;
Wait((x) + (z));
Writeln('Logging in.');
LoginPlayer;
Result := LoggedIn;
FindNormalRandoms;
IncEx(BreakRounds, (w) + (x));
IncEx(TotalBreaks, 1);
Writeln('The next break will occur in about ' + IntToStr(BreakIn) + ' minutes.');
end;
end;
if (HowManyPlayers > 1) then
begin
if (GetTimeRunning < ((w) + (y) + BreakRounds)) then Exit
else
if (GetTimeRunning > ((w) + (y) + BreakRounds)) then
begin
Writeln('Taking a break for about ' + IntToStr(BreakFor) + ' minutes.');
Logout;
IncEx(BreakRounds, (w));
IncEx(TotalBreaks, 1);
NextPlayer(True);
Exit;
while (LoggedIn) do Wait((x) + (z));
NextPlayer(True);
end;
end;
end;
// End of BreakHandler
//******************************************************************************
procedure SetupAllDTMs;
begin
F1aDTM := DTMFromString('mrAAAAHic42BgYFjCyMCwHojXAfFaIN4MxMeBOA+Iu4G4BqjmKBCvB+JpQLwAiPcAcTcQ9wPxrI40hkNrp6DgptoqsPh2IBYBqsGHGQlgGAAApKEZEA==');
F1bDTM := DTMFromString('mrAAAAHic42BgYFjAyMAwH4jnAfEkIG4G4kogzgPibiDeBVRzC4gvAvE+KD4IxHuAeDYQz+jPYNi/ZSpWvAUoJwJUgw8zEsAwAAAQbxqA');
F2aDTM := DTMFromString('mrAAAAHic42BgYIhjZGDoBOJGIK4A4hQgTgXidCB2AOKFQDXnoPgsEN8E4hdA/BOIFwHx9o40hkNrp2DFc9szGESAavBhRgIYBgCN0Rmy');
F2bDTM := DTMFromString('mrAAAAHic42BgYFjAyMAwH4jnAfEkIG4G4kogzgPibiDeBVRzC4gvAvE+KD4IxHuAeDYQz+jPYNi/ZSpWvAUoJwJUgw8zEsAwAAAQbxqA');
F2cDTM := DTMFromString('m1gAAAHic42JgYHjCwsCwHQ0vB+IFQDwLiCcDcS8QPwKqFWNkYOADYnYgZgTiT0Cxj1D8AYi/AvHKmjiGw2unEMRyQLXEYEYiMQIAAGm6IZw=');
F3DTM := DTMFromString('mrAAAAHic42BgYPgNxF+AmIGRgUEMiI8DmSeB+DQQ7wfiVUCcAcRFQFwJxGeA+BAQ7wTiFUC8oSOdoXvyAjg+snkWChYBqsGHGQlgGAAAyPUZ2w==');
B1aDTM := DTMFromString('m1gAAAHic42JgYGhiZGDwAWIvKHYG4llAPAWI24C4C4jtgPgsUG0NEHcB8SwgXgHEp4A4D4pvA/FEkFxHGkNn7ywUfGjtFIam/DCGhqxQMBskJgJUSwxmJBIjAAAxFBuz');
B1bDTM := DTMFromString('mwQAAAHic42RgYHBjhGB3IPYAYiMgtgJiZyAuAuI2ID4OVPcViN8B8RMgPgvE54H4MhD3AvE8IJ7ek8awf+MUrLht4iwwFgGqI4QZicBwAACZBBu9');
B1cDTM := DTMFromString('mggAAAHicY2NgYLBlZGBwRsLmQGwMxFuAcjeA+BIQnwbiPUC8F4hn96QwHN40CQPLAeWwYUYcGAIAgtEShw==');
B1dDTM := DTMFromString('mggAAAHicY2NgYDjByMBwAQkfBOJdQLwPKPcUiG8D8RUgPgnF0zuzGPavn4GB5YBy2DAjDgwBABNbFgY=');
B2aDTM := DTMFromString('mlwAAAHicY2dgYEhnZGBog+JuIG6H4tlAfBIofwuILwDxYSDeAcSrgHgOEB84cIDh0NopWLEIUB4XZsSDoQAAoZgXzw==');
B2bDTM := DTMFromString('mrAAAAHic42BgYPgGxEKMDAyCQCzGCGGDsAYQ6wPxa6D8byD+BMRPgPg2EJ8H4j1QvLUri+HA+hk4sQhQDT7MSADDAAAE4Bka');
B2cDTM := DTMFromString('mrAAAAHic42BgYPBmYmCogeIoIE4C4kwg9gdiVyCeBlRzGYgPAvFGJLwNSi+sCmc4vGkSTiwHVIMPMxLAMAAALsgZVA==');
CoalBagDTM := DTMFromString('m1gAAAHic42JgYHBgYmCwAGIPIPYBYicgtgFiSyC2hYq5AbE0IwODAhArA7EkEAtAsSRUTB6IhYB4Zmk40FQmgpiVgTjASCRGAABk6gVF');
AnyInvBarDTM := DTMFromString('maQEAAHicrc7NCkBgEIXh+awJSbHwk0vhPigpCxEpkYvnXczO8nPqqTnTLCYUkdkROTHgwKRzi137ghsdVlzYMKrYiCQo4MNDhBQZKri6y1Ei0LtAe930fONYecQ+5gefvHrJCxM=');
TinOreDTM := DTMFromString('mlwAAAHicY2dgYDAHYjUo1gdiByA2A2JHIJ4DxYuAeCUQL4XiuUCcnZYGJJmwYhCJCzDiwVAAAAvQByc=');
CopperOreDTM := DTMFromString('mrAAAAHic42BgYEgG4mAgDoLiaCBOAuJsIM4H4jlAPAuI5wPxYiBeDsQrgXgpEM8G4kOFtkCSCSfmYsAPGAlgGAAAy00Jkg==');
IronOreDTM := DTMFromString('mwQAAAHic42RgYBBiZGBggmI2IOYGYkEgFgZiWSCWA+I5DBC8CIiXAvFKIF4FxMuBeAlUzlxREkgy4cWsDIQBIxEYDgCw+gbh');
SilverOreDTM := DTMFromString('mwQAAAHic42RgYMhmZGCIguJEIE4G4nQgzgfiUiAuA+K5QHVzgHgxEC8B4lVAvBqIF0HFQHL9/dOAJBNezMpAGDASgeEAAF1RCz8=');
CoalOreDTM := DTMFromString('mwQAAAHic42RgYLBlZGDQB2I9IDYEYnMgdgZiHyD2BGI7IJ7NAMELgHgpEK8E4iVAPAuIFwLxCiBWUpICkkx4MSsDYcBIBIYDALBzCFI=');
GoldOreDTM := DTMFromString('mwQAAAHic42RgYOgH4nogrgPiZiDugopNBeIZQDwbiOdA6UVAvBSIVwPxciBeBsTzoXLbJkoDSSa8mJWBMGAkAsMBAA/kDCo=');
AdamantOreDTM := DTMFromString('mwQAAAHic42RgYNgFxKuBeBUUbwbibUC8H4iPAvEJIJ4DxLOAeB4QLwXiZVA9i4F4IVTO2sUaSDLhxawMhAEjERgOAMC/DPg=');
MithrilOreDTM := DTMFromString('mrAAAAHic42BgYHgOxNeg+D4QPwbid0D8EYi/AfEcIJ4LxEuBeAUQr4ayFwDxDCC2sAgGkkw4MSsDfsBIAMMAABFHDR8=');
RuneOreDTM := DTMFromString('mwQAAAHic42RgYJjGyMDQBsU9QNwPxFOBeDYQLwTixUA8hwGCFwPxEiBeCcSroPwFQDwbiB18g4EkE17MykAYMBKB4QAABksL8g==');
HeartDTM := DTMFromString('mwQAAAHic42RgYJBlZWAQAmIRIBYHYhkgVgBiVSBWB2JNIL7AyMBwFogvAvEVIL4JxNehbJDYOSCepygONI0JLwYaRRAwEoHhAAA74gmk');
GoldBarDTM := DTMFromString('mlwAAAHicY2dgYHBiYmCwB2J3IHYFYmcgDgRiEyB+AJR/BsSPgfgWEH8A4odA/AKIFzWIMcR48jJcWi4L5DGhYBEgCcOsaJgRD4YCAN+0DAY=');
end;
procedure FreeAll;
begin
FreeDTM(F1aDTM);
FreeDTM(F1bDTM);
FreeDTM(F2aDTM);
FreeDTM(F2bDTM);
FreeDTM(F3DTM);
FreeDTM(B1aDTM);
FreeDTM(B1bDTM);
FreeDTM(B1cDTM);
FreeDTM(B1dDTM);
FreeDTM(B2aDTM);
FreeDTM(B2bDTM);
FreeDTM(B2cDTM);
FreeDTM(CoalBagDTM);
FreeDTM(AnyInvBarDTM);
FreeDTM(TinOreDTM);
FreeDTM(CopperOreDTM);
FreeDTM(IronOreDTM);
FreeDTM(SilverOreDTM);
FreeDTM(CoalOreDTM);
FreeDTM(GoldOreDTM);
FreeDTM(AdamantOreDTM);
FreeDTM(MithrilOreDTM);
FreeDTM(RuneOreDTM);
FreeDTM(HeartDTM);
FreeDTM(GoldBarDTM);
end;
procedure SemiRandomChat;
begin
case Random(56) of
0..41:MouseBox(346, 483, 400, 500, 1); //Trade
41..56:MouseBox(402, 483, 456, 500, 1); //Assist
end;
end;
procedure GetBarConstants;
begin
case Lowercase (BarType) of
'bronze':
begin
XPPerBar := 6.2;
Bxs :=21;
Bys :=77;
Bxe :=66;
Bye :=122;
end;
'iron':
begin
XPPerBar := 12.5;
Bxs :=121;
Bys :=77;
Bxe :=166;
Bye :=122;
end;
'silver':
begin
XPPerBar := 13.7;
Bxs :=171;
Bys :=77;
Bxe :=116;
Bye :=122;
end;
'steel':
begin
XPPerBar := 17.5;
Bxs :=21;
Bys :=127;
Bxe :=66;
Bye :=172;
end;
'gold':
begin
XPPerBar := 22.5;
Bxs :=71;
Bys :=127;
Bxe :=116;
Bye :=172;
end;
'gold bar':
Begin
XPPerBar := 25;
Bxs :=121;
Bys :=77;
Bxe :=166;
Bye :=122;
End;
'mithril':
begin
XPPerBar := 30.0;
Bxs :=171;
Bys :=127;
Bxe :=216;
Bye :=172;
end;
'adamant':
begin
XPPerBar := 37.5;
Bxs :=21;
Bys :=177;
Bxe :=66;
Bye :=222;
end;
'rune':
begin
XPPerBar := 50.0;
Bxs :=121;
Bys :=227;
Bxe :=166;
Bye :=272;
end;
end;
end;
Procedure LoginCheck;
begin
If LobbyScreen then
MouseBox( 172, 28, 258, 48, Mouse_left);
Wait(500 + Random(400));
If WorldScreen then LoginPlayer;
Wait(1500 + Random(400));
If Not(LobbyScreen or Loggedin) then
LoginPlayerToLob;
If LobbyScreen then
MouseBox( 172, 28, 258, 48, Mouse_left);
Wait(500 + Random(400));
If WorldScreen then LoginPlayer;
end;
procedure DTMWalkToFurnace;
var
PointWalkTime:Integer;
begin
If Random(250) = 1 Then PickUpMouse;
Status := 'Walking to Furnace';
Proggy;
if (RunEnergy(30)) then SetRun(True);
MarkTime(PointWalkTime);
if (ClickDTMRotatedIn(F1aDTM, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/60, [], mouse_Left)) then
begin
If Random(250) = 1 Then PickUpMouse;
Flag;
WriteLn('F1a');
if ClickDTMRotatedIn(F2aDTM, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/60, [], mouse_Left) then
begin
If Random(250) = 1 Then PickUpMouse;
WriteLn('F2a')
Wait(RandomRange(200, 500));
MakeCompass('W');
repeat
Wait(RandomRange(50, 100));
until(not WalkingToFlag(1000)) or (TimeFromMark(PointWalkTime) > 10000) or (not IsMoving);
end else
begin
If Random(250) = 1 Then PickUpMouse;
if ClickDTMRotatedIn(F2bDTM, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/60, [], mouse_Left) then
begin
If Random(250) = 1 Then PickUpMouse;
WriteLn('F2b');
Wait(RandomRange(200, 500));
MakeCompass('W');
repeat
Wait(RandomRange(50, 100));
until(not WalkingToFlag(1000)) or (TimeFromMark(PointWalkTime) > 25000) or (not IsMoving);
end else
begin
If Random(250) = 1 Then PickUpMouse;
if ClickDTMRotatedIn(F2cDTM, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/60, [], mouse_Left) then
begin
WriteLn('F2c');
Wait(RandomRange(200, 500));
MakeCompass('W');
repeat
Wait(RandomRange(50, 100));
until(not WalkingToFlag(1000)) or (TimeFromMark(PointWalkTime) > 25000) or (not IsMoving);
end;
end;
end;
end else
begin
If Random(250) = 1 Then PickUpMouse;
if (ClickDTMRotatedIn(F1bDTM, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/60, [], mouse_Left)) then
begin
If Random(250) = 1 Then PickUpMouse;
Flag;
WriteLn('F1b');
if ClickDTMRotatedIn(F2aDTM, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/60, [], mouse_Left) then
begin
If Random(250) = 1 Then PickUpMouse;
WriteLn('F2a')
Wait(RandomRange(200, 500));
MakeCompass('W');
repeat
Wait(RandomRange(50, 100));
until(not WalkingToFlag(1000)) or (TimeFromMark(PointWalkTime) > 25000) or (not IsMoving);
end else
begin
If Random(250) = 1 Then PickUpMouse;
if ClickDTMRotatedIn(F2bDTM, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/60, [], mouse_Left) then
begin
If Random(250) = 1 Then PickUpMouse;
WriteLn('F2b');
Wait(RandomRange(200, 500));
MakeCompass('W');
repeat
Wait(RandomRange(50, 100));
until(not WalkingToFlag(1000)) or (TimeFromMark(PointWalkTime) > 25000) or (not IsMoving);
end else
begin
If Random(250) = 1 Then PickUpMouse;
if ClickDTMRotatedIn(F2cDTM, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/60, [], mouse_Left) then
begin
WriteLn('F2c');
Wait(RandomRange(200, 500));
MakeCompass('W');
repeat
Wait(RandomRange(50, 100));
until(not WalkingToFlag(1000)) or (TimeFromMark(PointWalkTime) > 25000) or (not IsMoving);
end;
end;
end;
end;
end;
end;
procedure DTMWalkToBank;
var
PointWalkTime:Integer;
begin
If Random(250) = 1 Then PickUpMouse;
Status := 'Walking to Bank';
Proggy;
if (RunEnergy(30)) then SetRun(True);
MarkTime(PointWalkTime);
if (ClickDTMRotatedIn(B1aDTM, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/60, [], mouse_Left)) then
begin
If Random(250) = 1 Then PickUpMouse;
Flag;
WriteLn('B1a');
if ClickDTMRotatedIn(B2aDTM, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/60, [], mouse_Left) then
begin
If Random(250) = 1 Then PickUpMouse;
WriteLn('B2a')
Wait(RandomRange(200, 500));
MakeCompass('N');
repeat
Wait(RandomRange(50, 100));
until(not WalkingToFlag(1000)) or (TimeFromMark(PointWalkTime) > 10000) or (not IsMoving);
end else
begin
If Random(250) = 1 Then PickUpMouse;
if ClickDTMRotatedIn(B2bDTM, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/60, [], mouse_Left) then
begin
If Random(250) = 1 Then PickUpMouse;
WriteLn('B2b');
Wait(RandomRange(200, 500));
MakeCompass('N');
repeat
Wait(RandomRange(50, 100));
until(not WalkingToFlag(1000)) or (TimeFromMark(PointWalkTime) > 25000) or (not IsMoving);
end else
begin
If Random(250) = 1 Then PickUpMouse;
if ClickDTMRotatedIn(B2cDTM, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/60, [], mouse_Left) then
begin
If Random(250) = 1 Then PickUpMouse;
WriteLn('B2c');
Wait(RandomRange(200, 500));
MakeCompass('N');
repeat
Wait(RandomRange(50, 100));
until(not WalkingToFlag(1000)) or (TimeFromMark(PointWalkTime) > 25000) or (not IsMoving);
end;
end;
end;
end else
begin
If Random(250) = 1 Then PickUpMouse;
if (ClickDTMRotatedIn(B1bDTM, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/60, [], mouse_Left)) then
begin
If Random(250) = 1 Then PickUpMouse;
Flag;
WriteLn('B2c');
if ClickDTMRotatedIn(B2aDTM, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/60, [], mouse_Left) then
begin
If Random(250) = 1 Then PickUpMouse;
WriteLn('B2a')
Wait(RandomRange(200, 500));
MakeCompass('N');
repeat
Wait(RandomRange(50, 100));
until(not WalkingToFlag(1000)) or (TimeFromMark(PointWalkTime) > 25000) or (not IsMoving);
end else
begin
If Random(250) = 1 Then PickUpMouse;
if ClickDTMRotatedIn(B2bDTM, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/60, [], mouse_Left) then
begin
If Random(250) = 1 Then PickUpMouse;
WriteLn('B2b');
Wait(RandomRange(200, 500));
MakeCompass('N');
repeat
Wait(RandomRange(50, 100));
until(not WalkingToFlag(1000)) or (TimeFromMark(PointWalkTime) > 25000) or (not IsMoving);
end else
begin
If Random(250) = 1 Then PickUpMouse;
if ClickDTMRotatedIn(B2cDTM, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/60, [], mouse_Left) then
begin
If Random(250) = 1 Then PickUpMouse;
WriteLn('B2c');
Wait(RandomRange(200, 500));
MakeCompass('N');
repeat
Wait(RandomRange(50, 100));
until(not WalkingToFlag(1000)) or (TimeFromMark(PointWalkTime) > 25000) or (not IsMoving);
end;
end;
end;
end else
begin
If Random(250) = 1 Then PickUpMouse;
if (ClickDTMRotatedIn(B1cDTM, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/60, [], mouse_Left)) then
begin
If Random(250) = 1 Then PickUpMouse;
Flag;
WriteLn('B1c');
if ClickDTMRotatedIn(B2aDTM, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/60, [], mouse_Left) then
begin
If Random(250) = 1 Then PickUpMouse;
WriteLn('B2a')
Wait(RandomRange(200, 500));
MakeCompass('N');
repeat
Wait(RandomRange(50, 100));
until(not WalkingToFlag(1000)) or (TimeFromMark(PointWalkTime) > 25000) or (not IsMoving);
end else
begin
If Random(250) = 1 Then PickUpMouse;
if ClickDTMRotatedIn(B2bDTM, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/60, [], mouse_Left) then
begin
If Random(250) = 1 Then PickUpMouse;
WriteLn('B2b');
Wait(RandomRange(200, 500));
MakeCompass('N');
repeat
Wait(RandomRange(50, 100));
until(not WalkingToFlag(1000)) or (TimeFromMark(PointWalkTime) > 25000) or (not IsMoving);
end else
begin
If Random(250) = 1 Then PickUpMouse;
if ClickDTMRotatedIn(B2cDTM, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/60, [], mouse_Left) then
begin
If Random(250) = 1 Then PickUpMouse;
WriteLn('B2c');
Wait(RandomRange(200, 500));
MakeCompass('N');
repeat
Wait(RandomRange(50, 100));
until(not WalkingToFlag(1000)) or (TimeFromMark(PointWalkTime) > 25000) or (not IsMoving);
end;
end;
end;
end else
begin
If Random(250) = 1 Then PickUpMouse;
if (ClickDTMRotatedIn(B1dDTM, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/60, [], mouse_Left)) then
begin
If Random(250) = 1 Then PickUpMouse;
Flag;
WriteLn('B1d');
if ClickDTMRotatedIn(B2aDTM, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/60, [], mouse_Left) then
begin
If Random(250) = 1 Then PickUpMouse;
WriteLn('B2a')
Wait(RandomRange(200, 500));
MakeCompass('N');
repeat
Wait(RandomRange(50, 100));
until(not WalkingToFlag(1000)) or (TimeFromMark(PointWalkTime) > 25000) or (not IsMoving);
end else
begin
If Random(250) = 1 Then PickUpMouse;
if ClickDTMRotatedIn(B2bDTM, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/60, [], mouse_Left) then
begin
If Random(250) = 1 Then PickUpMouse;
WriteLn('B2b');
Wait(RandomRange(200, 500));
MakeCompass('N');
repeat
Wait(RandomRange(50, 100));
until(not WalkingToFlag(1000)) or (TimeFromMark(PointWalkTime) > 25000) or (not IsMoving);
end else
begin
If Random(250) = 1 Then PickUpMouse;
if ClickDTMRotatedIn(B2cDTM, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/60, [], mouse_Left) then
begin
If Random(250) = 1 Then PickUpMouse;
WriteLn('B2c');
Wait(RandomRange(200, 500));
MakeCompass('N');
repeat
Wait(RandomRange(50, 100));
until(not WalkingToFlag(1000)) or (TimeFromMark(PointWalkTime) > 25000) or (not IsMoving);
end;
end;
end;
end;
end;
end;
end;
end;
procedure Setup;
var
CBx, CBy:Integer;
begin
SetupAllDTMs;
p1 := Point(243,320); //Bank
p2 := Point(262,287);
p3 := Point(268,262);
p4 := Point(262,232); //Furnace
Addonterminate('FreeAll');
MarkTime(RunTime);
if IsActionBarOpen then ToggleActionBar(False);
if CoalBag then
begin
if FindDTM(CoalBagDTM, CBx, CBy, 560, 210, 600, 250) then
begin
SMART_DrawBoxEx(false, false, intToBox(560, 210, 600, 250), clGreen);
WriteLn('Coalbag Detected!');
end else
begin
SMART_DrawBoxEx(false, false, intToBox(560, 210, 600, 250), clRed);
WriteLn('Error 404: Coalbag not found. Please put your coalbag in the first slot of your inventory and restart the script!');
TerminateScript;
end;
end;
end;
Procedure WalkToFurnace;
begin
if (not LoggedIn) then LoginPlayer;
If Random(100) = 1 Then PickUpMouse;
SPS_BlindWalk(p2);
If Random(100) = 1 Then PickUpMouse;
SPS_BlindWalk(p3);
If Random (10) = 1 Then
Begin
If Random(100) = 1 Then PickUpMouse;
SPS_Walktopos(p4);
End;
Flag;
If Random(100) = 1 Then PickUpMouse;
MakeCompass('W');
end;
Procedure WalkToBank;
begin
if (not LoggedIn) then LoginPlayer;
If Random(100) = 1 Then PickUpMouse;
ClickNorth(SRL_ANGLE_HIGH);
If Random(100) = 1 Then PickUpMouse;
SPS_BlindWalk(p3);
If Random(100) = 1 Then PickUpMouse;
SPS_BlindWalk(p2);
If Random(100) = 1 Then PickUpMouse;
SPS_Walktopos(p1);
Wait(RandomRange(950,1150));
If Random(100) = 1 Then PickUpMouse;
end;
procedure Bank;
var
tmpCTS, i, N, r, Counter, ABx, ABy, TOx, TOy, COx, COy, IOx, IOy, SOx, SOy,
CoalOx, CoalOy, GOx, GOy, MOx, MOy, AOx, AOy, ROx, ROy, VHx, VHy:Integer;
BankTPA:TPointArray;
begin
if not LoggedIn then LoginPlayer;
if not LoggedIn then Exit;
repeat
wait(RandomRange(50,100));
until not IsMoving;
Status := 'Banking';
Proggy;
tmpCTS := GetToleranceSpeed;
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.16, 0.91);
FindColorsTolerance(BankTPA, 10204113, 200, MSY1, 350, MSY2, 4);
SetColorToleranceSpeed(tmpCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);
N := High(BankTPA);
if (N < 1) and not(BankScreen) then
begin
WriteLn('Unable to find bank');
WalkToBank;
Wait(RandomRange(1050,1150));
Flag;
Bank;
end;
MarkTime(Counter);
for i := 0 to N do
begin
r := random(N);
wait(RandomRange(100, 250));
MMouse(BankTPA[r].x, BankTPA[r].y, 10, 5);
Wait(RandomRange(100, 175));
if WaitUpText('ank Bank', 1000) then
Break;
if (TimeFromMark(Counter) > (RandomRange(3000, 4000))) and not(BankScreen) then
begin
WriteLn('Unable to find bank');
WalkToBank;
Wait(RandomRange(1050,1150));
Flag;
Bank;
end;
end;
If Not(BankScreen) Then
Begin
WriteLn('We found the Bank, TPAs are awesome');
ClickMouse2(True);
Flag;
End;
repeat
Wait(RandomRange(50, 100));
until(BankScreen) or (PinScreen) or (not LoggedIn);
if PinScreen then InPin(Players[CurrentPlayer].Pin);
repeat
Wait(RandomRange(50, 100));
until(BankScreen) or (not LoggedIn);
Wait(RandomRange(1000, 1500));
if not LoggedIn then
Begin
LoginCheck;
Bank;
End;
if FindDTM(HeartDTM, VHx, VHy, MIX1, MIY1, MIX2, MIY2) then
begin
WriteLn('Found Hearts! <3');
MMouse(VHx, VHy, 5, 5);
ClickMouse2(False);
WaitOption('All', 500);
end;
case Lowercase (BarType) of
'bronze':
begin
if (not (FindDTM(TinOreDTM, TOx, TOy, 35, 85, 117, 126))) or (not (FindDTM(CopperOreDTM, COx, COy, 35, 85, 117, 126))) then
begin
SMART_DrawBoxEx(false, false, intToBox(35, 85, 117, 126), clRed);
WriteLn('Copper or Tin ore are not in the Primary and Secondary ore spots! Please put them there and restart the script!');
TerminateScript;
end else
begin
SMART_DrawBoxEx(false, false, intToBox(35, 85, 117, 126), clGreen);
WriteLn('Found Copper and Tin ore in the Primary and Secondary ore slots!');
end;
if ((GetBankItemAmount(0, 0)) < 15) or ((GetBankItemAmount(1, 0)) < 15) then
begin
WriteLn('Ores low, terminating script.');
Wait(RandomRange(500, 1000));
Logout;
TerminateScript;
end;
if (FindDTM(TinOreDTM, TOx, TOy, MIX1, MIY1, MIX2, MIY2)) then
begin
MMouse(TOx, TOy, 5, 5);
ClickMouse2(False)
WaitOption('All', 500);
end;
if (FindDTM(CopperOreDTM, COx, COy, MIX1, MIY1, MIX2, MIY2)) then
begin
MMouse(COx, COy, 5, 5);
ClickMouse2(False)
WaitOption('All', 500);
end;
If not InvEmpty then
begin
bars := bars + (CountItems('dtm', AnyInvBarDTM, []));
InvMouse((RandomRange(1, (CountItems('dtm', AnyInvBarDTM, [])))), mouse_Right);
WaitOption('All', 500);
Loads := Loads + 1
end;
Withdraw(0, 0, 14);
Wait(RandomRange(200, 500));
Withdraw(1, 0, 14);
end;
'iron':
begin
if (not (FindDTM(IronOreDTM, IOx, IOy, 35, 85, 74, 126))) then
begin
SMART_DrawBoxEx(false, false, intToBox(35, 85, 74, 126), clRed);
WriteLn('Iron ore is not in the Primary ore slot! Please put it there and restart the script!');
TerminateScript;
end else
begin
SMART_DrawBoxEx(false, false, intToBox(35, 85, 74, 126), clGreen);
WriteLn('Found Iron ore in the Primary ore slot!');
end;
if ((GetBankItemAmount(0, 0)) < 29) then
begin
WriteLn('Ores low, terminating script.');
Wait(RandomRange(500, 1000));
Logout;
TerminateScript;
end;
if (FindDTM(IronOreDTM, IOx, IOy, MIX1, MIY1, MIX2, MIY2)) then
begin
MMouse(IOx, IOy, 5, 5);
ClickMouse2(False)
WaitOption('All', 500);
end;
If not InvEmpty then
begin
bars := bars + (CountItems('dtm', AnyInvBarDTM, []));
InvMouse((RandomRange(1, (CountItems('dtm', AnyInvBarDTM, [])))), mouse_Right);
WaitOption('All', 500);
Loads := Loads +1
end;
Withdraw(0, 0, 28);
end;
'silver':
begin
if (not (FindDTM(SilverOreDTM, SOx, SOy, 35, 85, 74, 126))) then
begin
SMART_DrawBoxEx(false, false, intToBox(35, 85, 74, 126), clRed);
WriteLn('Silver ore is not in the Primary ore slot! Please put it there and restart the script!');
TerminateScript;
end else
begin
SMART_DrawBoxEx(false, false, intToBox(35, 85, 74, 126), clGreen);
WriteLn('Found Silver ore in the Primary ore slot!');
end;
if ((GetBankItemAmount(0, 0)) < 29) then
begin
WriteLn('Ores low, terminating script.');
Wait(RandomRange(500, 1000));
Logout;
TerminateScript;
end;
if (FindDTM(SilverOreDTM, SOx, SOy, MIX1, MIY1, MIX2, MIY2)) then
begin
MMouse(SOx, SOy, 5, 5);
ClickMouse2(False)
WaitOption('All', 500);
end;
If not InvEmpty then
begin
bars := bars + (CountItems('dtm', AnyInvBarDTM, []));
InvMouse((RandomRange(1, (CountItems('dtm', AnyInvBarDTM, [])))), mouse_Right);
WaitOption('All', 500);
Loads := Loads +1
end;
Withdraw(0, 0, 28);
end;
'steel':
begin
if (not (FindDTM(IronOreDTM, IOx, IOy, 33, 85, 74, 126))) then
begin
SMART_DrawBoxEx(false, false, intToBox(33, 85, 74, 126), clRed);
WriteLn('Iron ore is not in the Primary ore slot! Please put it there and restart the script!');
TerminateScript;
end else
begin
SMART_DrawBoxEx(false, false, intToBox(33, 85, 74, 126), clGreen);
WriteLn('Found Iron ore in the Primary ore slot!');
end;
if (not (FindDTM(CoalOreDTM, CoalOx, CoalOy, 76, 85, 117, 126))) then
begin
SMART_DrawBoxEx(false, false, intToBox(76, 85, 117, 126), clRed);
WriteLn('Coal Ore is not in the Secondary ore slot! Please put it there and restart the script!');
TerminateScript;
end else
begin
SMART_DrawBoxEx(false, false, intToBox(76, 85, 117, 126), clGreen);
WriteLn('Found Coal ore in the Secondary ore slot!');
end;
if ((GetBankItemAmount(0, 0)) < 19) or ((GetBankItemAmount(1, 0)) < 37) then
begin
WriteLn('Ores low, terminating script.');
Wait(RandomRange(500, 1000));
Logout;
TerminateScript;
end;
if (FindDTM(IronOreDTM, IOx, IOy, MIX1, MIY1, MIX2, MIY2)) then
begin
MMouse(IOx, IOy, 5, 5);
ClickMouse2(False)
WaitOption('All', 500);
InvMouse(1, mouse_Right);
WaitOption('Empty', 500);
end;
if CoalBag then
begin
if (InvCount > 1) then
begin
bars := bars + (CountItems('dtm', AnyInvBarDTM, []));
InvMouse((RandomRange(2, ((CountItems('dtm', AnyInvBarDTM, [])) +1))), mouse_Right);
if ((CountItems('dtm', AnyInvBarDTM, [])) = 1) then
begin
WaitOption('sit', 500);
end else
WaitOption('All', 500);
Loads := Loads +1
end;
MouseBankSlot(2, mouse_Right);
WaitOption('All', 500);
Wait(RandomRange(50, 100));
InvMouse(1, mouse_Right);
WaitOption('Fill', 500);
Wait(RandomRange(50, 100));
Withdraw(0, 0, 18);
Wait(RandomRange(50, 100));
MouseBankSlot(2, mouse_Right);
WaitOption('All', 500);
end else
begin
if not InvEmpty then
begin
bars := bars + (CountItems('dtm', AnyInvBarDTM, []));
InvMouse((RandomRange(1, (CountItems('dtm', AnyInvBarDTM, [])))), mouse_Right);
if ((CountItems('dtm', AnyInvBarDTM, [])) = 1) then
begin
WaitOption('Deposit', 500);
end else
WaitOption('All', 500);
Loads := Loads +1
end;
Withdraw(1, 0, 18);
Wait(RandomRange(200, 500));
Withdraw(0, 0, 10);
end;
end;
'gold':
begin
if (not (FindDTM(GoldOreDTM, GOx, GOy, 35, 85, 74, 126))) then
begin
SMART_DrawBoxEx(false, false, intToBox(33, 85, 74, 126), clRed);
WriteLn('Gold ore is not in the Primary ore slot! Please put it there and restart the script!');
TerminateScript;
end else
begin
SMART_DrawBoxEx(false, false, intToBox(35, 85, 74, 126), clGreen);
WriteLn('Found Gold ore in the Primary ore slot!');
end;
if ((GetBankItemAmount(0, 0)) < 29) then
begin
WriteLn('Ores low, terminating script.');
Wait(RandomRange(500, 1000));
Logout;
TerminateScript;
end;
If Not(LoggedIn) Then LoginPlayer;
if (FindDTM(GoldOreDTM, GOx, GOy, MIX1, MIY1, MIX2, MIY2)) then
begin
MMouse(GOx, GOy, 5, 5);
ClickMouse2(False)
WaitOption('All', 500);
end;
If Not(LoggedIn) Then LoginPlayer;
If not InvEmpty then
begin
bars := bars + (CountItems('dtm', AnyInvBarDTM, []));
DepositAll;
Loads := Loads +1
end;
Withdraw(0, 0, 28);
If Not(LoggedIn) Then LoginCheck;
end;
'gold bar':
begin
if (not (FindDTM(GoldBarDTM, GOx, GOy, 35, 85, 74, 126))) then
begin
SMART_DrawBoxEx(false, false, intToBox(33, 85, 74, 126), clRed);
WriteLn('Gold Bar is not in the Primary ore slot! Please put it there and restart the script!');
TerminateScript;
end else
begin
SMART_DrawBoxEx(false, false, intToBox(35, 85, 74, 126), clGreen);
WriteLn('Found Gold Bar in the Primary ore slot!');
end;
if ((GetBankItemAmount(0, 0)) < 29) then
begin
WriteLn('Bars low, terminating script.');
Wait(RandomRange(500, 1000));
Logout;
TerminateScript;
end;
If Not(LoggedIn) Then LoginCheck;
if (FindDTM(GoldBarDTM, GOx, GOy, MIX1, MIY1, MIX2, MIY2)) then
begin
MMouse(GOx, GOy, 5, 5);
ClickMouse2(False)
WaitOption('All', 500);
end;
If Not(LoggedIn) Then LoginPlayer;
If not InvEmpty then
begin
DepositAll;
Loads := Loads +1
end;
Withdraw(0, 0, 28);
If Not(LoggedIn) Then LoginPlayer;
end;
'mithril':
begin
if (not (FindDTM(MithrilOreDTM, MOx, MOy, 33, 85, 74, 126))) then
begin
SMART_DrawBoxEx(false, false, intToBox(33, 85, 74, 126), clRed);
WriteLn('Mithril ore is not in the Primary ore slot! Please put it there and restart the script!');
TerminateScript;
end else
begin
SMART_DrawBoxEx(false, false, intToBox(33, 85, 74, 126), clGreen);
WriteLn('Found Mithril ore in the Primary ore slot!');
end;
if (not (FindDTM(CoalOreDTM, CoalOx, CoalOy, 76, 85, 117, 126))) then
begin
SMART_DrawBoxEx(false, false, intToBox(76, 85, 117, 126), clRed);
WriteLn('Coal Ore is not in the Secondary ore slot! Please put it there and restart the script!');
TerminateScript;
end else
begin
SMART_DrawBoxEx(false, false, intToBox(76, 85, 117, 126), clGreen);
WriteLn('Found Coal ore in the Secondary ore slot!');
end;
if ((GetBankItemAmount(0, 0)) < 11) or ((GetBankItemAmount(1, 0)) < 41) then
begin
WriteLn('Ores low, terminating script.');
Wait(RandomRange(500, 1000));
Logout;
TerminateScript;
end;
if (FindDTM(MithrilOreDTM, MOx, MOy, MIX1, MIY1, MIX2, MIY2)) then
begin
MMouse(MOx, MOy, 5, 5);
ClickMouse2(False)
WaitOption('All', 500);
end;
if CoalBag then
begin
if (InvCount > 1) then
begin
bars := bars + (CountItems('dtm', AnyInvBarDTM, []));
InvMouse((RandomRange(2, ((CountItems('dtm', AnyInvBarDTM, [])) +1))), mouse_Right);
WaitOption('All', 500);
Loads := Loads +1
end;
MouseBankSlot(2, mouse_Right);
WaitOption('All', 500);
InvMouse(1, mouse_Right);
WaitOption('Fill', 500);
Wait(RandomRange(50, 100));
Withdraw(0, 0, 10);
Wait(RandomRange(50, 100));
MouseBankSlot(2, mouse_Right);
WaitOption('All', 500);
end else
begin
if not InvEmpty then
begin
bars := bars + (CountItems('dtm', AnyInvBarDTM, []));
InvMouse((RandomRange(1, (CountItems('dtm', AnyInvBarDTM, [])))), mouse_Right);
WaitOption('All', 500);
Loads := Loads +1
end;
Withdraw(0, 0, 5);
Wait(RandomRange(200, 500));
MouseBankSlot(2, mouse_Right);
WaitOption('All', 500);
end;
end;
'adamant':
begin
if (not (FindDTM(AdamantOreDTM, AOx, AOy, 33, 85, 74, 126))) then
begin
SMART_DrawBoxEx(false, false, intToBox(33, 85, 74, 126), clRed);
WriteLn('Adamant ore is not in the Primary ore slot! Please put it there and restart the script!');
TerminateScript;
end else
begin
SMART_DrawBoxEx(false, false, intToBox(33, 85, 74, 126), clGreen);
WriteLn('Found Adamant ore in the Primary ore slot!');
end;
if (not (FindDTM(CoalOreDTM, CoalOx, CoalOy, 76, 85, 117, 126))) then
begin
SMART_DrawBoxEx(false, false, intToBox(76, 85, 117, 126), clRed);
WriteLn('Coal Ore is not in the Secondary ore slot! Please put it there and restart the script!');
TerminateScript;
end else
begin
SMART_DrawBoxEx(false, false, intToBox(76, 85, 117, 126), clGreen);
WriteLn('Found Coal ore in the Secondary ore slot!');
end;
if ((GetBankItemAmount(0, 0)) < 8) or ((GetBankItemAmount(1, 0)) < 43) then
begin
WriteLn('Ores low, terminating script.');
Wait(RandomRange(500, 1000));
Logout;
TerminateScript;
end;
if (FindDTM(AdamantOreDTM, AOx, AOy, MIX1, MIY1, MIX2, MIY2)) then
begin
MMouse(AOx, AOy, 5, 5);
ClickMouse2(False)
WaitOption('All', 500);
end;
if CoalBag then
begin
if (InvCount > 1) then
begin
bars := bars + (CountItems('dtm', AnyInvBarDTM, []));
InvMouse((RandomRange(2, ((CountItems('dtm', AnyInvBarDTM, [])) +1))), mouse_Right);
WaitOption('All', 500);
Loads := Loads +1
end;
MouseBankSlot(2, mouse_Right);
WaitOption('All', 500);
Wait(RandomRange(50, 100));
InvMouse(1, mouse_Right);
WaitOption('Fill', 500);
Wait(RandomRange(50, 100));
Withdraw(0, 0, 7);
Wait(RandomRange(50, 100));
MouseBankSlot(2, mouse_Right);
WaitOption('All', 500);
end else
begin
if not InvEmpty then
begin
bars := bars + (CountItems('dtm', AnyInvBarDTM, []));
InvMouse((RandomRange(1, (CountItems('dtm', AnyInvBarDTM, [])))), mouse_Right);
WaitOption('All', 500);
Loads := Loads +1
end;
Withdraw(0, 0, 4);
Wait(RandomRange(200, 500));
MouseBankSlot(2, mouse_Right);
WaitOption('All', 500);;
end;
end;
'rune':
begin
if (not (FindDTM(RuneOreDTM, ROx, ROy, 33, 85, 74, 126))) then
begin
SMART_DrawBoxEx(false, false, intToBox(33, 85, 74, 126), clRed);
WriteLn('Rune ore is not in the Primary ore slot! Please put it there and restart the script!');
TerminateScript;
end else
begin
SMART_DrawBoxEx(false, false, intToBox(33, 85, 74, 126), clGreen);
WriteLn('Found Rune ore in the Primary ore slot!');
end;
if (not (FindDTM(CoalOreDTM, CoalOx, CoalOy, 76, 85, 117, 126))) then
begin
SMART_DrawBoxEx(false, false, intToBox(76, 85, 117, 126), clRed);
WriteLn('Coal Ore is not in the Secondary ore slot! Please put it there and restart the script!');
TerminateScript;
end else
begin
SMART_DrawBoxEx(false, false, intToBox(76, 85, 117, 126), clGreen);
WriteLn('Found Coal ore in the Secondary ore slot!');
end;
if ((GetBankItemAmount(0, 0)) < 7) or ((GetBankItemAmount(1, 0)) < 49) then
begin
WriteLn('Ores low, terminating script.');
Wait(RandomRange(500, 1000));
Logout;
TerminateScript;
end;
if (FindDTM(RuneOreDTM, ROx, ROy, MIX1, MIY1, MIX2, MIY2)) then
begin
MMouse(ROx, ROy, 5, 5);
ClickMouse2(False)
WaitOption('All', 500);
end;
if CoalBag then
begin
if (InvCount > 1) then
begin
bars := bars + (CountItems('dtm', AnyInvBarDTM, []));
InvMouse((RandomRange(2, ((CountItems('dtm', AnyInvBarDTM, [])) +1))), mouse_Right);
WaitOption('All', 500);
Loads := Loads +1
end;
MouseBankSlot(2, mouse_Right);
WaitOption('All', 500);
Wait(RandomRange(100, 150));
InvMouse(1, mouse_Right);
WaitOption('Fill', 500);
Wait(RandomRange(50, 100));
Withdraw(0, 0, 6);
Wait(RandomRange(50, 100));
MouseBankSlot(2, mouse_Right);
WaitOption('All', 500);
end else
begin
if not InvEmpty then
begin
bars := bars + (CountItems('dtm', AnyInvBarDTM, []));
InvMouse((RandomRange(1, (CountItems('dtm', AnyInvBarDTM, [])))), mouse_Right);
WaitOption('All', 500);
Loads := Loads +1
end;
Withdraw(0, 0, 3);
Wait(RandomRange(50, 100));
MouseBankSlot(2, mouse_Right);
WaitOption('All', 500);
end;
end;
end;
SMART_ClearCanvas;
Wait(RandomRange(200, 500));
If Random(500) = 1 Then
Begin
CloseBank;
If Random(100) = 1 Then CheckFriends;
End;
Wait(RandomRange(200, 500));
end;
procedure SmeltBars;
var
tmpCTS, i, N, r, t, Counter, BBx, BBy:Integer;
FurnaceTPA:TPointArray;
begin
if not LoggedIn then LoginPlayer;
if (not LoggedIn) or (InvEmpty) then Exit;
FindNormalRandoms;
Wait(RandomRange(345, 805));
if (FurnaceTries > 5) then
begin
WriteLn('Failed to find the furnace too many times, trying again.');
Exit;
end;
Flag;
tmpCTS := GetToleranceSpeed;
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.02, 2.30);
FindColorsTolerance(FurnaceTPA, 6207962, MSX1, MSY1, MSX2, MSY2, 5);
SetColorToleranceSpeed(tmpCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);
N := High(FurnaceTPA);
if (N < 1) then
begin
FurnaceTries := FurnaceTries + 1;
WriteLn('We have failed to find the furnace ' + IntToStr(FurnaceTries) + ' times in a row.');
WriteLn('Trying ' + IntToStr(5 - FurnaceTries) + ' more times until Termination.');
Wait(RandomRange(200, 500));
ClickDTMRotatedIn(F3DTM, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/60, [], mouse_Left);
repeat
wait(RandomRange(50,100));
until not IsMoving;
Flag;
SmeltBars;
Exit;
end;
MarkTime(Counter);
for i := 0 to N do
begin
r := random(N);
wait(RandomRange(200, 350));
MMouse(FurnaceTPA[r].x, FurnaceTPA[r].y, -10, -10);
Wait(RandomRange(100, 175));
if WaitUpText('lt F', 1000) then
Break;
if (TimeFromMark(Counter) > 3000) then
begin
FurnaceTries := FurnaceTries + 1;
WriteLn('We have failed to find the furnace ' + IntToStr(FurnaceTries) + ' times in a row.');
WriteLn('Trying ' + IntToStr(5 - FurnaceTries) + ' more times until Termination.');
Wait(RandomRange(200, 500));
ClickDTMRotatedIn(F3DTM, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/60, [], mouse_Left);
SPS_Walktopos(p3);
SPS_Walktopos(p4);
MakeCompass('w');
Flag;
SmeltBars;
Exit;
end;
end;
ClickMouse2(True);
Flag;
MarkTime(t);
repeat
wait(RandomRange(250, 300));
until((GetColor(502, 27)) = 2929149) Or (TimeFromMark(t) > 5000);
if ((GetColor(502, 27)) = 2929149) then
begin
WriteLn('We found the furnace, TPAs are awesome');
begin
FindNormalRandoms;
if Debug then
WriteLn('Trying to smelt ' + BarType);
If Not(LoggedIn) Then LoginCheck;
if FindColor(BBx, BBy, 1290732, Bxs, Bys, Bxe, Bye) then
begin
SMART_DrawBoxEx(true, false, intToBox(Bxs, Bys, Bxe, Bye), clGreen);
WriteLn('Smelting ' + BarType)
end else
begin
if ((FindColor(BBx, BBy, 1269431, 21, 127, 66, 172)) and (BarType = 'steel')) then
begin
WriteLn('Selecting Steel');
Wait(RandomRange(50,200));
MouseBox(25, 131, 62, 168, 1);
SMART_DrawBoxEx(true, false, intToBox(21, 127, 66, 172), clGreen);
WriteLn('Smelting Steel');
end else
begin
WriteLn('Could not smelt '+ BarType +'. Re-looping');
Exit;
end;
end;
end;
begin
MouseBox(262, 303, 408, 325, 1);
SMART_ClearCanvas;
repeat
wait(RandomRange(50, 100));
until((GetColor(293, 180)) = 263402);
WriteLn('Waiting for smelting to finish...');
Wait(500);
Status := 'Smelting...';
Proggy;
repeat
If Random(1000) = 1 Then RandomMovement;
wait(RandomRange(100, 350));
If Random(250) = 1 Then CheckFriends;
Wait(Random(50));
If Random(200) = 1 Then ExamineInv;
If Random(150) = 1 Then HoverSkill('Smithing', False);
If Random(150) = 1 Then HoverSkill('Crafting', False);
If Random(200) = 1 Then RandomRClick;
If Random(100) = 1 Then PickUpMouse;
If Random(50) = 1 Then MMouseOffClient('rand');
if LevelUp then
SaveScreenshot('C:\Simba\Screenshots\screenshot_LevelUp@ ' + TheTime + '.png');
until not ((GetColor(293, 180)) = 263402);
FurnaceTries := 0;
end;
FurnaceTries := 0;
end Else SmeltBars;
FurnaceTries := 0;
end;
begin
SRL_SixHourFix := True;
SetupSRL;
DeclarePlayers;
SPS_AnyAngle := True;
GetBarConstants;
SPS_Setup(Runescape_Surface,['ak']);
repeat
MarkTime(StartTime);
LoginCheck;
FindNormalRandoms;
SemiRandomChat;
ClickNorth(SRL_ANGLE_HIGH);
Setup;
repeat
Bank;
DTMWalkToFurnace;
Flag;
SmeltBars;
FurnaceTries := 0;
DTMWalkToBank;
until(not LoggedIn) or (Bars > HowManyBars);
until (Bars > HowManyBars) or (not LoggedIn);
FreeAll;
Proggy;
Logout;
end.