NexPB
2012-01-25 11:43:59
How Long have You Played Runescape?
4 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
Java, basic understanding off html, php, css
Are you a member of any other communities?
Powerbot
Tell us about yourself…
Please show us one (or multiple) of your scripts.
My GlowResourceMiner:
My GlowArtisansWorkshop:
My AstralCrafter (pouch repairing started but not done):
4 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
Java, basic understanding off html, php, css
Are you a member of any other communities?
Powerbot
Tell us about yourself…
From: NexPB
My name is Lorenzo 16 years old. I spent most of my computer time learning more about scripting.
Please show us one (or multiple) of your scripts.
My GlowResourceMiner:
program GlowResourceMiner;
{$DEFINE SMART}
{$DEFINE SRL5}
{$IFDEF SRL5}
{$i srl/srl.simba}
{$ELSE}
{$i srl/srl.scar}
{$ENDIF}
{$i srl/srl/misc/paintsmart.simba}
{Made by NexPB. Thread: http://villavu.com/forum/showthread.php?t=72857}
const
Ore = 'iron';
OrePrice = 330;
HowManyOresToMine = 1000;//Ores to mine each player.
World = 10; //World you want to login.
LampXpIn = 'Farming';//Skill you want exp in from the genie.
var
resourceDTM, oreDTM, AColor, BColor, startXp: Integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;//change to your belongs.
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := '';
Pass := '';
Nick := '';
Active := True;
Pin := '';
Integers[0] := 0;// ores mined.
Integers[1] := HowManyOresToMine;
Integers[2] := 0;
BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];//Random event prices.
end;
{
with Players[1] do
begin
Name := '';
Pass := '';
Nick := '';
Active := True;
Pin := '';
Integers[0] := 0;// ores mined.
Integers[1] := HowManyOresToMine;
Integers[2] := 0;
BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];//Random event prices.
end;
with Players[2] do
begin
Name := '';
Pass := '';
Nick := '';
Active := True;
Pin := '';
Integers[0] := 0;// ores mined.
Integers[1] := HowManyOresToMine;
Integers[2] := 0;
BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];//Random event prices.
end;
}
end;
procedure Report;
var
XpGained, Profit: Integer;
begin
XpGained := GetXPBarTotal - StartXp;
Profit := Players[CurrentPlayer].Integers[0] * OrePrice;
Writeln('========= GlowResourceMiner ==========');
Writeln('|= Player : ' + Players[CurrentPlayer].Name);
Writeln('|= Time Running : ' + TimeRunning);
Writeln('|= Xp gained : ' + IntToStr(XpGained));
Writeln('|= Ores mined : ' + IntToStr(Players[CurrentPlayer].Integers[0]));
Writeln('|= Profit : ' + IntToStr(Profit));
Writeln('======================================');
end;
procedure LoadInfo(Ore: String);
begin
Case (Lowercase(Ore)) of
'iron', 'iron ore':
begin
AColor := 2964582;
BColor := 3294064;
oreDTM := DTMFromString('mrAAAAHic42BgYKhlYmAoAuISIK4G4nYg7gbiRiAuBeLdjAwMe4D4CBCfBuKjjBCxDUC8DYgNZUUZfG21gSYxYcWsQBIfZiSAYQAAup0LRw==');
end;
end;
end;
procedure AntiRandoms;
begin
FindNormalRandoms;
LampSkill := (LampXpIn);
LevelUp;
end;
procedure StartUpClient;
begin
Smart_Server := World;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
DeclarePlayers;
ActivateClient;
end;
procedure StopScript(s: string);
begin
WriteLn(s);
Logout;
TerminateScript;
end;
function ClickObject(col, col2, height, width, tol: integer; uptext, action: String; LeftClick: boolean): boolean;
var
i, x, y, cts: Integer;
tpa: TPointArray;
atpa: T2DPointArray;
pt: TPoint;
begin
if not LoggedIn then Exit;
cts := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX, MSCY, tpa, col, MSX1, MSY1, MSX2, MSY2, tol);
if Length(tpa) = 0 then FindColorsTolerance(tpa, col2, MSX1, MSY1, MSX2, MSY2, tol);
ColorToleranceSpeed(cts);
atpa := TPAtoATPAEx(tpa, height, width);
SortATPAFrom(atpa, Point(MSCX, MSCY));
for i := 0 to High(atpa) do
begin
pt := MiddleTPA(atpa[i]);
MMouse(pt.x, pt.y, 4, 4);
if (WaitUpText(uptext, 650)) then
begin
GetMousePos(x, y);
if (not(LeftClick)) then
begin
Mouse(x, y, 0, 0, False);
wait(500 + random(150));
ChooseOption(action);
if (DidRedClick) then
Begin
wait(600+random(350));
result := true;
Exit;
end else
Exit;
end else
if (LeftClick) then
begin
Mouse(x, y, 0, 0, true);
if (DidRedClick) then
begin
wait(600+random(350));
result := true;
Exit;
end else
Exit;
end;
end else Exit;
end;
end;
function AtResource: boolean;
var
x, y: Integer;
angle: Extended;
begin
resourceDTM := DTMFromString('mggAAAHicY2NgYJjIxMDQBsQzgXguELcCcQsQezMyMPgDsR8QuwOxMxCHA3F/ZTxDdHgEw5f3HxneMTIzuDq4MHz49pOBH2gWNsyIA0MAAM/iD3c=');
if (PercentBlackMM >= 35) then
if (FindDTMRotated(resourceDTM, x, y, MMX1, MMY1, MMX2, MMY2, -PI*2, PI*2, 0.2, angle)) then
begin
result := true;
end;
FreeDTM(resourceDTM);
end;
function FindResourceEntrance(x, y: Integer): boolean;
var
cts, i: Integer;
tpa: TPointArray;
atpa: T2DPointArray;
pt: TPoint;
begin
if not LoggedIn then Exit;
cts := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX, MSCY, tpa, 2175656, MSX1, MSY1, MSX2, MSY2, 5);
if Length(tpa) = 0 then FindColorsTolerance(tpa, 4079680, MSX1, MSY1, MSX2, MSY2, 5);
ColorToleranceSpeed(cts);
atpa := TPAtoATPAEx(tpa, 20, 20);
SortATPAFrom(atpa, Point(MSCX, MSCY));
for i := 0 to High(atpa) do
begin
pt := MiddleTPA(atpa[i]);
MMouse(pt.x, pt.y, 4, 4);
if (WaitUpTextMulti(['yster', 'entrance'], 550)) then
begin
GetMousePos(x, y);
result := true;
end else
Exit;
end;
end;
function EnterResource: boolean;
var
x, y: Integer;
begin
if AtResource then Exit;
if (FindResourceEntrance(x, y)) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, mouse_Right);
if (ChooseOption('nter')) then
if (DidRedClick) then
begin
wait(3000 + random(350));
result := true;
end else
Exit;
end else
MakeCompass(170+random(30));
end;
function ExitResource: boolean;
begin
result := ClickObject(2175656, 4079680, 25, 25, 5, 'yster', 'xit', false);
end;
Function Mining: Boolean; // thanks to flight explained me this ;D
var
PBox: TBox;
begin
PBox := IntToBox(245, 130, 285, 195);
Result := (AveragePixelShift(PBox, 250, 500) > 2000);
end;
function MineOre: boolean;
var
OldMouseSpeed: Integer;
begin
if (InvFull) then Exit;
AntiRandoms;
OldMouseSpeed := MouseSpeed;
MouseSpeed := RandomRange(19, 23);
repeat
AntiRandoms;
while (Mining) do
begin
Wait(20);
end;
if (ClickObject(AColor, BColor, 20, 10, 5, 'ocks', 'ine', true)) then
begin
MouseSpeed := OldMouseSpeed;
result := true;
end else
MakeCompass('n');
MouseSpeed := OldMouseSpeed;
Exit;
until (InvFull) or not (LoggedIn);
end;
function CloseBankX: Boolean;// FRM SRL FOLDER
var
i, Timer: Integer;
begin
Result := False;
if DepositScreen then
begin
Timer := GetTimeRunning + 8000;
repeat
Mouse(434, 42, 5, 5, mouse_left);
for i := 0 to 30 do
begin
if not DepositScreen then
begin
Result:= True;
Break;
end;
Wait(100);
end;
Wait(Random(100));
until (GetTimeRunning > Timer) or Result;
end;
end;
procedure Bank;
var
i, x, y: integer;
box, box2: TBox;
begin
if not DepositScreen then exit;
if (DepositScreen) then
Players[CurrentPlayer].Integers[0] := Players[CurrentPlayer].Integers[0] + CountItemsIn('deposit box', 'dtm', oreDTM, []);
begin
for i := 1 to 28 do
begin
box := DepositItemBox(i);
box2 := IntToBox(92, 29, 396, 54);
if (FindDTM(oreDTM, x, y, box.X1, box.Y1, box.X2, box.Y2)) then
begin
QuickDeposit(SRL_DEPOSIT_ALL);
wait(650 + random(350));
end else
CloseBankX;
end;
end;
end;
procedure Loop;
begin
AntiRandoms;
if DepositScreen then
begin
Bank;
end;
if not (InvFull) then
begin
if (AtResource) then
begin
ExitResource;
end else
MineOre;
end else
if (AtResource) then
begin
ClickObject(6916508, 6581876, 20, 20, 5, 'eposit', 'eposit', false);
end else
if (not (AtResource)) then
EnterResource;
end;
begin
StartUpClient;
SMART_ClearCanvas;
repeat
if not LoggedIn then LogInPlayer;
if (Players[CurrentPlayer].Integers[2] = 0) then
begin
if not IsXPBarOpen then ToggleXPBar(true);
startXp := GetXPBarTotal;
Inc(Players[CurrentPlayer].Integers[2]);
end;
repeat
AntiRandoms;
SetAngle(SRL_ANGLE_HIGH);
LoadInfo(Ore);
Loop;
FreeDTM(oreDTM);
until (Players[CurrentPlayer].Integers[1] <= Players[CurrentPlayer].Integers[0]) or (not LoggedIn);
Report;
Players[CurrentPlayer].Active := False;
Logout;
if (not(AllPlayersInactive)) then
begin
NextPlayer(Players[CurrentPlayer].Active);
end;
until (AllPlayersInactive);
StopScript('Script stopped got our ores we needed to mine or logged out.');
end.
My GlowArtisansWorkshop:
program GlowArtisansWorkshop;
{$DEFINE SMART}
{$DEFINE SRL5}
{$IFDEF SRL5}
{$i srl/srl.simba}
{$ELSE}
{$i srl/srl.scar}
{$ENDIF}
{$i srl/srl/misc/paintsmart.simba}
{ Made by NexPB
- Will smith your bars in Artisans workshop.
}
const
Bars = 'steel'; //bars your going to use (just material without bar)
World = 10;//server you want to login.
LampXpIn = 'Smithing';//Skill you want exp in from the genie.
var
BarScreenDTM, BarInvDTM: Integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := '';
Pass := '';
Nick := '';
Active := True;
Pin := '';
Strings[0] := Bars;
Integers[0] := 0;
Integers[1] := 0;
BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];//Random event prices.
end;
end;
procedure AntiRandoms;
begin
FindNormalRandoms;
LampSkill := (LampXpIn);
LevelUp;
end;
procedure StartUpClient;
begin
Smart_Server := World;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
DeclarePlayers;
ActivateClient;
end;
procedure GetInfo;
begin
case Lowercase(Players[CurrentPlayer].Strings[0]) of
'iron':
begin
BarInvDTM := DTMFromString('mbQAAAHicY2VgYMhkYmBIBOIMIM4F4gIgfsjIwPAIiG8D8XUgfgzECdHRQNVMcOxga8vACmShY0YsGAwAi2cIcA==');
BarScreenDTM := DTMFromString('mWAAAAHicY2FgYIgEYicg9gPicCCewcjAMAeIFwHxUiBuqatjMDcxYbA0N2ewsbRk4AKqQcaMaBgEAKLVB2Q=');
end;
'steel':
begin
BarInvDTM := DTMFromString('mggAAAHicY2NgYAhmYmBwA2IfIA4C4kggdgfi+4wQfBOIrwDxVSB+AcQtdXVAXUwo2MTIiIELyMKGGXFgCAAAXSsJeg==');
BarScreenDTM := DTMFromString('mbQAAAHicY2VgYNgAxHOAeDEQrwHiHUA8lZGBYQYQzwfixUA8D4j7OzsZpvb1MVQWlzA0VFczbFq1ioELqBYdM2LBYAAAADAO0A==');
end;
end;
end;
procedure FreeDTMs;
begin
FreeDTM(BarScreenDTM);
FreeDTM(BarInvDTM);
end;
procedure AntiBan;
begin
case Random(1200) of
1..11: PickUpMouse;
21..31: RandomMovement;
61..71: BoredHuman;
81..91: wait(500 + random(1250));
end;
end;
function ClickObject(col, height, width, tol: integer; uptext, action: String; LeftClick: boolean): boolean;
var
i, x, y, cts: Integer;
tpa: TPointArray;
atpa: T2DPointArray;
pt: TPoint;
begin
if not LoggedIn then Exit;
cts := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX, MSCY, tpa, col, MSX1, MSY1, MSX2, MSY2, tol);
if Length(tpa) = 0 then Exit;
ColorToleranceSpeed(cts);
atpa := TPAtoATPAEx(tpa, height, width);
SortATPAFrom(atpa, Point(MSCX, MSCY));
for i := 0 to High(atpa) do
begin
pt := MiddleTPA(atpa[i]);
MMouse(pt.x, pt.y, 4, 4);
wait(300 + random(250));
if (WaitUpText(uptext, 555)) then
begin
GetMousePos(x, y);
if (not(LeftClick)) then
begin
Mouse(x, y, 0, 0, False);
wait(500 + random(150));
ChooseOption(action);
if (DidRedClick) then
Begin
wait(600+random(350));
result := true;
Exit;
end else
Exit;
end else
if (LeftClick) then
begin
Mouse(x, y, 0, 0, true);
if (DidRedClick) then
begin
wait(600+random(350));
result := true;
Exit;
end else
Exit;
end;
end;
end;
end;
function WorkshopScreen: Boolean;
var
x, y: Integer;
begin
if (FindText(x, y, 'ingots', SmallChars, 45, 47, 293, 69)) then
begin
writeln('Workshop screen is open.');
result := true;
end else
Exit;
end;
function BarInInv: Boolean;
var
x, y: Integer;
begin
result := FindDTM(BarInvDTM, x, y, MIX1, MIY1, MIX2, MIY2);
end;
Function SmithAnim: Boolean;
var
PBox: TBox;
begin
PBox := IntToBox(245, 130, 285, 195);
Result := (AveragePixelShift(PBox, 250, 500) > 400);
end;
function FindBars(var x, y: Integer): boolean;
var
i: Integer;
box: Array [1..5] of TBox;
begin
box[1] := IntToBox(25, 115, 110, 235);
box[2] := IntToBox(120, 115, 205, 235);
box[3] := IntToBox(215, 115, 300, 235);
box[4] := IntToBox(310, 115, 395, 235);
box[5] := IntToBox(405, 115, 490, 235);
for i := 1 to High(box) do
begin
writeln('Box := ' + IntToStr(box[i].x1) + ', ' + IntToStr(box[i].y1) + ', ' + IntToStr(box[i].x2) + ', ' + IntToStr(box[i].y2));
if (FindDTM(BarScreenDTM, x, y, box[i].x1, box[i].y1, box[i].x2, box[i].y2)) then
begin
SMART_DrawBox(box[i]);
MMouse(x, y, 5, 5);
writeln('found dtm in box');
if (IsUpText('Make')) then
begin
GetMousePos(x, y);
result := true;
end;
end;
end;
end;
procedure WithdrawBars;
var
x, y: Integer;
begin
if not LoggedIn then exit;
if PinScreen then InPin(Players[CurrentPlayer].Pin);
if (WorkshopScreen) then
begin
if (FindBars(x, y)) then
begin
writeln('Clicked bars');
Mouse(x, y, 5, 5, mouse_Left);
end;
end else
if not (WorkshopScreen) then
begin
ClickObject(5988713, 35, 35, 5, 'melter', 'Withdraw-i', false);
end;
end;
function DepositArmour: Boolean;
begin
Result := ClickObject(6514803, 20, 20, 5, 'Chute', 'eposit', true);
end;
function FindInstruction: String;
Var
box: TBox;
begin
box := IntToBox(207, 37, 309, 54);
SMART_DrawBox(box);
Result := GetTextAtExWrap(box.x1, box.y1, box.x2, box.y2, 0, 5, 2, 16777215, 5, StatChars);
end;
function SmithItem(i: Integer): Boolean;
var
StartX, StartY, x, y: Integer;
begin
if not LoggedIn then Exit;
if not BarInInv then Exit;
AntiRandoms;
StartY := 436;
case (i) of
0: StartX := 150;
1: StartX := 225;
2: StartX := 300;
3: StartX := 375;
end;
if (ClickObject(6712951, 15, 15, 5, 'nvil', 'Smith', true)) then
begin
if (DidRedClick) then wait(500 + random(350));
if (FindText(x, y, 'Smith', SmallChars, MCX1, MCY1, MCX2, MCY2)) then
begin
MMouse(StartX, StartY, 5, 5);
if (WaitUptext('ake', 650)) then
begin
wait (350 + random(350));
ClickMouse2(mouse_Left);
result := true;
end else
Exit;
end else
Exit;
end;
end;
procedure SmithArmour;
var
OldInstruc: String;
begin
if not LoggedIn then Exit;
if not BarInInv then Exit;
AntiRandoms;
OldInstruc := FindInstruction;
writeln(OldInstruc);
case (FindInstruction) of
'Helm':
begin
if (OldInstruc = FindInstruction) then
begin
if (SmithItem(0)) then
repeat
Antiban;
until not BarInInv or (OldInstruc <> FindInstruction);
end else Exit;
end;
'Boots':
begin
if (OldInstruc = FindInstruction) then
begin
if (SmithItem(2)) then
repeat
Antiban;
until not BarInInv or (OldInstruc <> FindInstruction);
end else Exit;
end;
'Chestplate':
begin
if (OldInstruc = FindInstruction) then
begin
if (SmithItem(1)) then
repeat
Antiban;
until not BarInInv or (OldInstruc <> FindInstruction);
end else Exit;
end;
'Gauntlets':
begin
if (OldInstruc = FindInstruction) then
begin
if (SmithItem(3)) then
repeat
Antiban;
until not BarInInv or (OldInstruc <> FindInstruction);
end else Exit;
end;
end;
end;
procedure Report;
var
XpGained: Integer;
begin
XpGained := GetXPBarTotal - Players[CurrentPlayer].Integers[0];
Writeln('========= GlowResourceMiner ==========');
Writeln('|= Player : ' + Players[CurrentPlayer].Name);
Writeln('|= Time Running : ' + TimeRunning);
Writeln('|= Xp gained : ' + IntToStr(XpGained));
Writeln('======================================');
end;
procedure StopScript(s: string);
begin
WriteLn(s);
FreeDTMs;
Logout;
TerminateScript;
end;
procedure Loop;
begin
AntiRandoms;
if (BarInInv) then
begin
SmithArmour;
end else
if not (InvEmpty) then
begin
DepositArmour;
end else
WithdrawBars;
end;
begin
StartUpClient;
if not LoggedIn then
LoginPlayer;
if (Players[CurrentPlayer].Integers[1] = 0) then
begin
if not IsXPBarOpen then ToggleXPBar(true);
Players[CurrentPlayer].Integers[0] := GetXPBarTotal;
Inc(Players[CurrentPlayer].Integers[1]);
end;
repeat
GetInfo;
MakeCompass('n');
SetAngle(SRL_ANGLE_HIGH);
Loop;
Report;
FreeDTMs;
until not LoggedIn;
StopScript('Player logged out.');
end.
My AstralCrafter (pouch repairing started but not done):
program MasterAstrals;
{$DEFINE SMART}
{$DEFINE SRL5}
{$IFDEF SRL5}
{$i srl/srl.simba}
{$i srl/srl/skill/magic.simba}
{$ELSE}
{$i srl/srl.scar}
{$i srl/srl/skill/magic.scar}
{$ENDIF}
{$i sps/sps.simba}
{
Made by NexPB: MasterAstrals
Supports:
- Small, Large and Giant pouches.
- SRL - Stats.
}
const
SRLStats_Username = ''; //srl STATS username
SRLStats_Password = ''; //srl STATS pass
World = 10;//server you want to login.
LampXpIn = 'Farming';//Skill you want exp in from the genie.
EatFood = 'tuna'; // only tuna for the moment
var
essBMP, astralBMP, lawDTM, foodDTM, astralExp, cosmicDTM, airDTM, giantDTM, largeDTM, smallDTM, brokenGiantDTM, brokenLargeDTM, brokenSmallDTM: Integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := '';
Pass := '';
Nick := '';
Active := true;
Pin := '';
Integers[0] := 0;//astrals made
Integers[1] := 0;//ess used
Integers[2] := 0;//profit
Integers[3] := 0;//xpgained
BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];//Random event prices.
end;
end;
procedure AntiRandoms;
begin
FindNormalRandoms;
LampSkill := (LampXpIn);
LevelUp;
end;
procedure StartUpClient;
begin
Smart_Server := World;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
if (SRLStats_Username = '') then
begin
writeln('No SRL account entered using Anonymous.');
SetupSRLStats(667, 'Anonymous', 'anon1337');
end else
writeln('Using SRL account ' + SRLStats_Username);
SetupSRLStats(667, SRLStats_Username, SRLStats_Password);
DeclarePlayers;
ActivateClient;
end;
procedure GetInfo;
begin
essBMP := BitmapFromString(12, 13, 'meJx9zuEKwiAYheF7HENERGSttb' +
'ZlayYisa69Ax+JfLPg/flwOM555/y6BrRt0T8TCuGFYtxTeqNpui/' +
'LA7kvhiSc5TjeUCnzZpbDMCNiVQnWdZe+v/6RYNaeiVUlMWNOYEyy' +
'h1pbMCbZmlIGkTwyklJqVDIYtiaEQoyVazBtK8n8YphqGlFlJMl8A' +
'AEevhg=');
astralBMP := BitmapFromString(17, 12, 'meJyN0P8KgjAQB/AnFCvLZAyRMc' +
'Yw02yYP7IxInqZnsP36uBgDKsl3F/bPru7L+dSiIOUxzyviqIuSzW' +
'9pl+l9cOYJ2OCL1PD1Yy3OyjPn2617dj3GlWasiWkaQarKM1AZRmH' +
'CT1Eqc4qQlJX4V5+lSR0pv72imPiKnc1G+NMRdu9VQjxyhP+erNDZ' +
'SGeu6u5qj5fwjACZSEoeP8ZCCokQbCCQogKyNcYQUGj6tS8AWsjRh8=');
lawDTM := DTMFromString('mlwAAAHicY2dgYMhgYmBIAOIoIE6HstOAOB6IPzAyMHwB4vdQ+jcQ/wTi/0Asp3QTjitLihlCAgIYcjMygCYyMfADSVyYEQ+GAgB/eBDT');
cosmicDTM := DTMFromString('mbQAAAHicY2VgYChgYmCoBuJaIC4D4nIgvssIwU+B+CUQvwHi2zflwbi2vJwhOCAAqJOJgQtIomNGLBgMAKyqDRs=');
airDTM := DTMFromString('mbQAAAHicY2VgYJBgZGCQA2IVIJZihPCToTgLiPOBuBiI7129CsbTJvQzRISEAHUyMXABSXTMiAWDAQCvYAqs');
largeDTM := DTMFromString('mggAAAHicY2NgYJjNxMAwhwlCzwLiBUC8FIgfMzIwXAXil0D8BogfAvEzIPZysWRQkRUA0wwMTAxhIUEMuprKDKxAHjbMiANDAACGxgyY');
giantDTM := DTMFromString('mbQAAAHicY2VgYChkQuByIK4E4oeMDAzvgPgWED8F4jdAHBHgDFTNxJCdmcbg72EDZrMCSXTMiAWDAQDqsAns');
smallDTM := DTMFromString('mggAAAHicY2NgYDjGBMFHgXgPEB8C4pNA/IiRgeEaEL9khLDvQWkvF0sGLSVhoE4mMA7zc2KIi41iYAXysGFGHBgCANaDDT0=');
astralExp := 9;
case Lowercase(EatFood) of
'tuna': foodDTM := DTMFromString('mbQAAAHicY2VgYKhmZGCoB+I8IC4B4lYgjgLieCCOBuI0II4B4cAAoGomFMwKJNExIxYMBgC+rgVq');
end;
end;
procedure FreeInfo;
begin
FreeDTM(lawDTM);
FreeBitmap(astralBMP);
FreeBitmap(essBMP);
FreeDTM(foodDTM);
FreeDTM(cosmicDTM);
FreeDTM(airDTM);
FreeDTM(largeDTM);
FreeDTM(giantDTM);
FreeDTM(smallDTM);
end;
procedure Report;
begin
Stats_Commit;
Writeln('========= MasterAstrals ==========');
Writeln('|= Player : ' + Players[CurrentPlayer].Name);
Writeln('|= Time Running : ' + TimeRunning);
Writeln('|= Xp gained : ' + ToStr(Players[CurrentPlayer].Integers[3]));
Writeln('|= Astrals made : ' + ToStr(Players[CurrentPlayer].Integers[0]));
Writeln('|= Ess used : ' + ToStr(Players[CurrentPlayer].Integers[1]));
Writeln('==================================');
end;
procedure StopScript(s: string);
begin
WriteLn(s);
FreeInfo;
Report;
Logout;
TerminateScript;
end;
function InArea(Pt1, Pt2: TPoint): Boolean;
var
p: TPoint;
Box: TBox;
begin
p := SPS_GetMyPos;
Box := PointToBox(Pt1, Pt2);
if (PointInBox(p, Box)) then
begin
writeln('Player found in area.');
Result := true;
end else
Result := false;
end;
function AtTeleportArea: boolean;
begin
result := (InArea(Point(275, 955),Point(300, 980)));
end;
function AtBank: boolean;
begin
result := (InArea(Point(230, 945), Point(260, 960)));
end;
function EssInInv: boolean;
var
x, y: Integer;
begin
result := FindBitmapToleranceIn(essBMP, x, y, MIX1, MIY1, MIX2, MIY2, 26);
end;
function LoadWalkingDTM(WalkNumber: Integer): Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: array[0..4] of TDTMPointDef;
TempTDTM: TDTM;
begin
case WalkNumber of
1:
begin
dtmMainPoint.x := 669;
dtmMainPoint.y := 350;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 3752770;
dtmMainPoint.Tolerance := 15;
dtmSubPoints[0].x := 669;
dtmSubPoints[0].y := 350;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 3752770;
dtmSubPoints[0].Tolerance := 15;
dtmSubPoints[1].x := 662;
dtmSubPoints[1].y := 347;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 1335857;
dtmSubPoints[1].Tolerance := 15;
dtmSubPoints[2].x := 664;
dtmSubPoints[2].y := 356;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 3097671;
dtmSubPoints[2].Tolerance := 15;
dtmSubPoints[3].x := 681;
dtmSubPoints[3].y := 339;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 1191745;
dtmSubPoints[3].Tolerance := 15;
dtmSubPoints[4].x := 678;
dtmSubPoints[4].y := 348;
dtmSubPoints[4].AreaSize := 0;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 11430244;
dtmSubPoints[4].Tolerance := 15;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
2:
begin
dtmMainPoint.x := 692;
dtmMainPoint.y := 335;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 3949892;
dtmMainPoint.Tolerance := 15;
dtmSubPoints[0].x := 692;
dtmSubPoints[0].y := 335;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 3949892;
dtmSubPoints[0].Tolerance := 15;
dtmSubPoints[1].x := 693;
dtmSubPoints[1].y := 328;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 1388610;
dtmSubPoints[1].Tolerance := 15;
dtmSubPoints[2].x := 674;
dtmSubPoints[2].y := 350;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 4022634;
dtmSubPoints[2].Tolerance := 15;
dtmSubPoints[3].x := 657;
dtmSubPoints[3].y := 308;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 1532722;
dtmSubPoints[3].Tolerance := 15;
dtmSubPoints[4].x := 678;
dtmSubPoints[4].y := 300;
dtmSubPoints[4].AreaSize := 0;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 3626848;
dtmSubPoints[4].Tolerance := 15;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
3:
begin
dtmMainPoint.x := 675;
dtmMainPoint.y := 345;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 7770005;
dtmMainPoint.Tolerance := 17;
dtmSubPoints[0].x := 675;
dtmSubPoints[0].y := 345;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 7770005;
dtmSubPoints[0].Tolerance := 18;
dtmSubPoints[1].x := 674;
dtmSubPoints[1].y := 331;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 1390663;
dtmSubPoints[1].Tolerance := 18;
dtmSubPoints[2].x := 664;
dtmSubPoints[2].y := 342;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 1518913;
dtmSubPoints[2].Tolerance := 18;
dtmSubPoints[3].x := 659;
dtmSubPoints[3].y := 330;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 10259844;
dtmSubPoints[3].Tolerance := 18;
dtmSubPoints[4].x := 676;
dtmSubPoints[4].y := 350;
dtmSubPoints[4].AreaSize := 0;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 1518913;
dtmSubPoints[4].Tolerance := 18;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
4:
begin
dtmMainPoint.x := 665;
dtmMainPoint.y := 232;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 13354176;
dtmMainPoint.Tolerance := 15;
dtmSubPoints[0].x := 665;
dtmSubPoints[0].y := 232;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 13354176;
dtmSubPoints[0].Tolerance := 15;
dtmSubPoints[1].x := 636;
dtmSubPoints[1].y := 226;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 1584964;
dtmSubPoints[1].Tolerance := 15;
dtmSubPoints[2].x := 631;
dtmSubPoints[2].y := 259;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 13354176;
dtmSubPoints[2].Tolerance := 15;
dtmSubPoints[3].x := 643;
dtmSubPoints[3].y := 194;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 7319486;
dtmSubPoints[3].Tolerance := 15;
dtmSubPoints[4].x := 629;
dtmSubPoints[4].y := 204;
dtmSubPoints[4].AreaSize := 0;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 10523274;
dtmSubPoints[4].Tolerance := 15;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
5:
begin
dtmMainPoint.x := 681;
dtmMainPoint.y := 231;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 15065049;
dtmMainPoint.Tolerance := 15;
dtmSubPoints[0].x := 681;
dtmSubPoints[0].y := 231;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 15065049;
dtmSubPoints[0].Tolerance := 15;
dtmSubPoints[1].x := 668;
dtmSubPoints[1].y := 195;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 6010310;
dtmSubPoints[1].Tolerance := 15;
dtmSubPoints[2].x := 655;
dtmSubPoints[2].y := 207;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 10006443;
dtmSubPoints[2].Tolerance := 15;
dtmSubPoints[3].x := 664;
dtmSubPoints[3].y := 249;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 15722979;
dtmSubPoints[3].Tolerance := 15;
dtmSubPoints[4].x := 672;
dtmSubPoints[4].y := 233;
dtmSubPoints[4].AreaSize := 0;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 13091516;
dtmSubPoints[4].Tolerance := 15;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
end;
end;
function AtAltar: boolean;
var
altarDTM, x, y: Integer;
begin
altarDTM := LoadWalkingDTM(5);
if (DTMRotated(altarDTM, x, y, MMX1, MMY1, MMX2, MMY2)) then
begin
if (Distance(x, y, MMCX, MMCY) < 15) then
begin
writeln('AtAltar := true');
result := true;
end else
MouseMM(x, y, 3, 3);
Flag;
end;
FreeDTM(altarDTM);
end;
procedure WalkToAltar;
var
i, x, y, walkDTM, altarDTM: Integer;
Path: TPointArray;
begin
altarDTM := LoadWalkingDTM(5);
if not (DTMRotated(altarDTM, x, y, MMX1, MMY1, MMX2, MMY2)) then
Path := [Point(290, 970),Point(290, 1020),Point(300, 1075)];
SPS_WalkPath(Path);
for i := 1 to 5 do
begin
walkDTM := LoadWalkingDTM(i);
if (DTMRotated(walkDTM, x, y, MMX1, MMY1, MMX2, MMY2)) then
begin
writeln('found walkDTM ' + IntToStr(i));
MouseMM(x , y, 2, 2);
Flag;
end;
FreeDTM(walkDTM);
end;
FreeDTM(altarDTM);
end;
procedure RepairPouch;
var
x, y, spellDTM, arrowDTM, a1, a2: Integer;
begin
spellDTM := DTMFromString('mbQAAAHicY2VgYJjBxMDQD8QTgXgBFN9jhOBHQPwAiO8C8evXrxjqD30C6mAEYxCbC8hCx4xYMBgAABtxDsc=');
arrowDTM := DTMFromString('mbQAAAHicY2VgYLjMyMBwHoivA/EtID4HxJpMDAw6UKwKxUL8vAz8fDwMRjrKDNUFUQwLJlUwcAH1o2NGLBgMAKBzCP8=')
if (FindDTM(cosmicDTM, x, y, MIX1, MIY1, MIX2, MIY2) and FindDTM(airDTM, x, y, MIX1, MIY1, MIX2, MIY2) and FindBitmapToleranceIn(astralBMP, x, y, MIX1, MIY1, MIX2, MIY2, 17))then
begin
if (GetCurrentTab = tab_Magic) then
begin
if (FindDTM(spellDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
begin
Mouse(x, y, 5, 5, mouse_Left);
if (FindDTM(arrowDTM, a1, a2, MSX1, MSY1, MSX2, MSY2)) then
begin
if (FindText(x, y, 'Dark mage', SmallChars, MSX1, MSY1, MSX2, MSY2)) then
begin
MouseMM(x, y, 3, 3);
if (IsUpText('peak')) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, mouse_Left);
wait(10000 + random(2000));
end else
Exit;
end else
repeat
Mouse(a1, a2, 3, 3, mouse_Left);
wait(50 + random(25));
until (FindText(x, y, 'Dark mage', SmallChars, MSX1, MSY1, MSX2, MSY2));
end else
Mouse(x, y, 5, 5, mouse_Left);
end else
Exit;
end else
FTab(tab_Magic);
end;
FreeDTM(spellDTM);
FreeDTM(arrowDTM);
end;
function FindAltar(x, y: Integer): boolean;
var
cts, i: Integer;
tpa: TPointArray;
atpa: T2DPointArray;
pt: TPoint;
begin
if not LoggedIn then Exit;
cts := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX, MSCY, tpa, 8551552, MSX1, MSY1, MSX2, MSY2, 6);
if Length(tpa) = 0 then
begin
FindColorsSpiralTolerance(MSCX, MSCY, tpa, 8814723, MSX1, MSY1, MSX2, MSY2, 6);
end;
ColorToleranceSpeed(cts);
SetColorSpeed2Modifiers(0.2, 0.2);
atpa := TPAtoATPAEx(tpa, 35, 35);
SortATPAFrom(atpa, Point(MSCX, MSCY));
for i := 0 to High(atpa) do
begin
pt := MiddleTPA(atpa[i]);
MMouse(pt.x, pt.y, 4, 4);
if (WaitUpText('ltar', 550)) then
begin
GetMousePos(x, y);
result := true;
end else
Exit;
end;
end;
function EmptyPouches: boolean;
var
x, y, emptied: Integer;
begin
if (emptied < 3) then
begin
if (FindDTM(giantDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
begin
Mouse(x, y, 5, 5, mouse_Right);
ChooseOption('mpty');
wait(200 + random(250));
end;
if (FindDTM(largeDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
begin
Mouse(x, y, 5, 5, mouse_Right);
ChooseOption('mpty');
wait(200 + random(250));
end;
if (FindDTM(smallDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
begin
Mouse(x, y, 5, 5, mouse_Right);
ChooseOption('mpty');
wait(200 + random(250));
end;
end else
result := true;
end;
procedure ClickAltar;
var
x, y: Integer;
begin
if not LoggedIn then Exit;
if (FindAltar(x, y)) then
begin
GetMousePos(x, y);
MMouse(x, y, 0, 0);
if (WaitUpText('ltar', 550)) then
begin
Mouse(x, y, 0, 0, mouse_right);
if (ChooseOption('rune')) then
begin
wait(3000+random(150));
end;
end else
Exit;
end else
Exit;
end;
procedure CraftEss;
begin
ClickAltar;
wait(100 + random(100));
EmptyPouches;
wait(100 + random(100));
ClickAltar;
end;
function Teleport: boolean;
var
x, y, spellDTM: Integer;
begin
if AtTeleportArea then Exit;
spellDTM := DTMFromString('mggAAAHicY2NgYEhjYmBIZ4LQBUAcC8RJQPyEkYHhHRDfBuKnUPwAiBlmADEDIwpmClzPwApkYcOMODAEAAB4rAmU');
if (GetCurrentTab = tab_Magic) then
begin
if (FindDTM(spellDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
begin
MMouse(x, y, 3, 3);
if (WaitUpText('eleport', 450)) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, mouse_Left);
FTab(tab_Inv);
wait(3100 + random(250));
result := true;
Exit;
end else
Exit;
end else
FreeDTM(spellDTM);
StopScript('Didn''t find available spell.');
end else
FTab(tab_Magic);
FreeDTM(spellDTM);
end;
function OpenBankLunar: boolean;
var
cts, i, x, y: Integer;
tpa: TPointArray;
atpa: T2DPointArray;
pt: TPoint;
begin
if not LoggedIn then Exit;
cts := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX, MSCY, tpa, 6189178, MSX1, MSY1, MSX2, MSY2, 4);
if Length(tpa) = 0 then
begin
ColorToleranceSpeed(cts);
Exit;
end;
ColorToleranceSpeed(cts);
atpa := TPAtoATPAEx(tpa, 30, 30);
SortATPAFrom(atpa, Point(MSCX, MSCY));
for i := 0 to High(atpa) do
begin
pt := MiddleTPA(atpa[i]);
MMouse(pt.x, pt.y, 4, 4);
if (WaitUpTextMulti(['ank', 'ooth'], 650)) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, mouse_Right);
if (ChooseOption('Bank')) then
begin
if DidRedClick then
begin
wait(1500 + random(200));
result := true;
end else
Exit;
end else
Exit;
end else
Exit;
end;
end;
function FillPouch: boolean;
var
x, y, filled: Integer;
begin
if not(BankScreen) then Exit;
if BankScreen then
begin
if (filled < 3) then
begin
if (FindDTM(giantDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
begin
Mouse(x, y, 5, 5, mouse_Right);
ChooseOption('ill');
wait(400 + random(250));
Inc(filled);
end else
if (FindDTM(giantDTM, x, y, MBX1, MBY1, MBX2, MBY2)) then
begin
Mouse(x, y, 5, 5, mouse_Right);
wait(400 + random(250));
end else
StopScript('Did''nt find pouches.');
if (FindDTM(largeDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
begin
Mouse(x, y, 5, 5, mouse_Right);
ChooseOption('ill');
wait(400 + random(250));
Inc(filled);
end else
if (FindDTM(largeDTM, x, y, MBX1, MBY1, MBX2, MBY2)) then
begin
Mouse(x, y, 5, 5, mouse_Right);
wait(400 + random(250));
end else
StopScript('Did''nt find pouches.');
if (FindDTM(smallDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
begin
Mouse(x, y, 5, 5, mouse_Right);
ChooseOption('ill');
wait(400 + random(250));
Inc(filled);
end else
if (FindDTM(smallDTM, x, y, MBX1, MBY1, MBX2, MBY2)) then
begin
Mouse(x, y, 5, 5, mouse_Right);
wait(400 + random(250));
end else
StopScript('Did''nt find pouches.');
end else
writeln('Filled all pouches');
result := true;
end;
end;
procedure WithdrawEss;
var
x, y, freeSpace, essUsed, expGained: Integer;
begin
if not InvFull then
begin
if FindBitmapToleranceIn(essBMP, x, y, MBX1, MBY1, MBX2, MBY2, 26) then
begin
freeSpace := (28 - InvCount);
Mouse(x, y, 3, 3, mouse_Right);
if (ChooseOption('-All')) then
begin
essUsed := (freeSpace);
expGained := essUsed * astralExp;
stats_IncVariable('Pure Essence (Crafted)', essUsed);
stats_IncVariable('Runecrafting EXP (Gained)', expGained);
Players[CurrentPlayer].Integers[1] := Players[CurrentPlayer].Integers[1] + essUsed;
Players[CurrentPlayer].Integers[3] := Players[CurrentPlayer].Integers[1] * astralExp;
wait(950+random(250));
end;
end else
StopScript('No pure ess in bank.');
end;
end;
procedure Banking;
var
HPColor: String;
x, y, astralsMade: Integer;
begin
If PinScreen then InPin(Players[CurrentPlayer].Pin);
AntiRandoms;
if (BankScreen) then
begin
Report;
GetMMLevels('hp', HPColor);
if (HPColor = 'Orange') then
begin
repeat
GetMMLevels('hp', HPColor);
if (FindDTM(foodDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
begin
Mouse(x, y, 3, 3, mouse_Right);
ChooseOption('Eat');
wait(600+random(250));
GetMMLevels('hp', HPColor);
end else
if (FindDTM(foodDTM, x, y, MBX1, MBY1, MBX2, MBY2)) then
begin
Mouse(x, y, 3, 3, mouse_Left);
wait(600+random(250));
end else
StopScript('Out of food.. stopping script.');
until (HPColor = 'Green');
end else
if (FindBitmapToleranceIn(astralBMP, x, y, MIX1, MIY1, MIX2, MIY2, 17)) then
begin
astralsMade := GetAmount(x, y);
stats_IncVariable('Astral Runes (Crafted)', astralsMade);
Players[CurrentPlayer].Integers[0] := Players[CurrentPlayer].Integers[0] + astralsMade;
Mouse(x, y, 3, 3, mouse_Right);
ChooseOption('-All');
writeln('Found astrals banking them.');
end;
if not (FindDTM(lawDTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
begin
if (FindDTM(lawDTM, x, y, MBX1, MBY1, MBX2, MBY2)) then
begin
Mouse(x, y, 3, 3, mouse_Right);
ChooseOption('-All');
end else
if not ((FindDTM(lawDTM, x, y, MBX1, MBY1, MBX2, MBY2)) or (FindDTM(lawDTM, x, y, MIX1, MIY1, MIX2, MIY2))) then
StopScript('No law found in inv or bank = stopping script.');
end;
WithdrawEss;
wait(150 + random(100));
FillPouch;
wait(150 + random(100));
WithdrawEss;
wait(150 + random(100));
end else
OpenBankLunar;
end;
function TeleOtherScreen: boolean;
var
box: TBox;
str: String;
begin
box := IntToBox(292, 274, 338, 294);
str := GetTextAtExWrap(box.x1, box.y1, box.x2, box.y2, 0, 5, 10, 192, 10, SmallChars);
if (str = 'Decline') then
begin
Result := true;
end else
Exit;
end;
procedure DeclineScreen;
begin
if (TeleOtherScreen) then
begin
Mouse(314, 286, 5, 5, mouse_Left);
wait(500+random(100));
end else
Exit;
end;
procedure Loop;
var
Path: TPointArray;
begin
if (TeleOtherScreen) then
begin
DeclineScreen;
end;
if (EssInInv) then
begin
if (AtAltar) then
begin
CraftEss;
end else
WalkToAltar;
end else
if (AtBank) then
begin
repeat
Banking;
until InvFull;
end else
if (AtTeleportArea) then
begin
repeat
Path := [Point(255, 975),Point(235, 955)];
SPS_WalkPath(Path);
until AtBank;
end else
Teleport;
end;
begin
StartUpClient;
if not LoggedIn then
LoginPlayer;
SPS_Setup(RUNESCAPE_SURFACE, ['0_2']);
repeat
GetInfo;
MakeCompass('n');
SetAngle(SRL_ANGLE_HIGH);
Loop;
FreeInfo;
until (False);
end.