SRL Archive - Help and Support

Wine of Zamorak Telegrabber


Dervish

2010-09-02 06:03:13

Well this is my latest project, without any doubt my longest :

program WoZTG;

{$i srl/srl/misc/smart.scar}
{$i SRL/SRL.scar}
{$i SRL/SRL/skill/magic.scar}
{$i Reflection/Reflection.simba}

var
SoADTM,Runs,Wines,
Tries,x,y,i,CurrentWorld_ ,
CPrice, HMR: Integer;
BankerNPC: TNPC;
LawRune, AirRune, WaterRune: TInvItem;
ClickPoint, WalkPointA, WalkPointB,
WalkPointC, WalkPointD, WalkPointE,
WoZTile : TTile;
MarkedWorlds : TIntegerArray;

const
MemberWorld = false;
PvPWorld = false;

procedure MarkWorld;
begin

MarkedWorlds[((high(MarkedWorlds))+1)] := CurrentWorld_;

end;


procedure AntiBan;
begin

case random(10) of
0: RandomAngle(true);
1: HoverSkill('magic',false);
2: RandomMovement;
3: BoredHuman;
end;
RandomAngle(true);
FindNormalRandoms;
Wait(1000+random(250));

end;

procedure ChangeWorldMark(mark: boolean);
begin

if (mark) then
MarkWorld;

repeat
CurrentWorld_ := RandomWorld(MemberWorld,PvPWorld);
for x:=0 to high(MarkedWorlds) do
begin
if (CurrentWorld_ = MarkedWorlds[x]) then
break;
end;
until(false);

SelectWorld(CurrentWorld_);
LoginPlayer;

end;


procedure DeclarePlayers;
begin

HowManyPlayers:= 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := ''; //username
Players[0].Pass := ''; //password
Players[0].Nick := ''; //3-4 letters of your username
Players[0].Active := true;

end;



function VerifyUptext(x,y : integer; text: string) : boolean;
begin
Wait(200+random(100));
MMouse(x,y,2,2);
Wait(200+random(100));
If (IsUpText(text)) then
result := true;
end;


procedure ReportStatus(report : String);
begin
Writeln(report);
Disguise(report);
Status(report);
end;


Procedure Startup;
begin
Cleardebug;
Writeln('Wine of Zamorak Telegrabber - by Dervish.');
Writeln('Setting up...');
SetupSRL;
DeclarePlayers;
CPrice := StrToInt(Readln('Current Price of Wine ?'));
HMR := StrToInt(Readln('How many runs ?'));
CurrentWorld_ := RandomWorld(MemberWorld,PvPWorld);
SelectWorld(CurrentWorld);
WoZTile := IntToPoint(2931,3515);
Runs := 0;
Wines := 0;
LoginPlayer;
ReportStatus('Logging in Player');
Wait(3000);
FindNormalRandoms;
end;


Procedure Bank(What: string);
begin

If (not(LoggedIn)) then
begin
LoginPlayer;
Wait(3000);
if (FindNormalRandoms) then
begin
Writeln('You seem to be stuck in a random.');
TerminateScript;
end;
end;

//Checks if you are in the bank.
if (MeInBox(IntToBox(2943,3373,2949,3368))) then
begin
Players[CurrentPlayer].Loc := 'bank';
ReportStatus('Position looks fine, checking runes');
end else;

//If you aren't...
begin
Writeln('Player not in the bank.');
TerminateScript;
end;

case What of


'runes' :
begin

//Checks for Law Runes.
If not R_ItemIDExists(LawRune,563) then
begin
ReportStatus('No laws in inventory, checking bank.');
Tries:=0;

Repeat
Case random(2) of
0: R_OpenBankBooth('fwb');
1: begin
if(FindNPC(6200,BankerNPC)) then
begin
ClickPoint := TileToMS(BankerNPC.Tile, random(5));
Writeln('Found the banker..');
MMouse(ClickPoint.x,ClickPoint.y,2,2);
If (IsUpText('anker')) then
begin
Wait(250+random(150));
GetMousePos(ClickPoint.x,ClickPoint.y);
Mouse(ClickPoint.x,Clickpoint.y,0,0,false);
Wait(150+random(100));
ChooseOption('ank');
end;
end else;
Writeln('No banker found..');
end;
end;
Wait(1000+random(500));
Until((BankScreen) or (Tries = 20));

If not (BankScreen) then
begin
ReportStatus('Tried to open the bank 20 times, stopping...');
TerminateScript;
end else;
begin
SearchBank('law');
repeat
If not (FindBitmapIn(bmp_Rune_Law,x,y,MSX1,MSY1,MSX2,MSY2)) then
begin
ReportStatus('No laws in inventory nor bank...');
TerminateScript;
end else;
begin
if(VerifyUpText(x,y,'law')) then
begin
GetMousePos(x,y);
Mouse(x,y,0,0,false);
Wait(200+random(100));
ChooseOption('All');
Wait(200+random(100));
CloseBank;
end else;
begin
Writeln('The item we thought we found was not a law rune.');
Inc(Tries);
end;
end;
until((Tries = 20) or (not(bankscreen)));
if (Tries = 20) then
begin
Writeln('Tried to find Law Runes 20 times, in vain.');
TerminateScript;
end;
end;
end else;

//If you do have Law Runes.
Writeln('Law Runes in inventory, checking air rune supply');

//Checks for Air Runes.
If not R_ItemIDExists(AirRune,556) then
begin
ReportStatus('No air runes in inventory, checking if staff is equipped.');
Gametab(26);
If not(IsEquippedID(1381)) then
begin
Reportstatus('No Staff equipped either, checking Bank.');
Tries:=0;

Repeat
Case random(2) of
0: R_OpenBankBooth('fwb');
1: begin
if(FindNPC(6200,BankerNPC)) then
begin
ClickPoint := TileToMS(BankerNPC.Tile, random(5));
Writeln('Found the banker..');
MMouse(ClickPoint.x,ClickPoint.y,2,2);
Wait(200+random(100));
If (IsUpText('anker')) then
begin
GetMousePos(ClickPoint.x,ClickPoint.y);
Mouse(ClickPoint.x,Clickpoint.y,0,0,false);
Wait(100+random(100));
ChooseOption('ank');
end;
end else;
Writeln('No banker found..');
end;
end;
Wait(1000+random(500));
Until((BankScreen) or (Tries = 20));

If not (BankScreen) then
begin
ReportStatus('Tried to open the bank 20 times, stopping...');
TerminateScript;
end else;

begin
SearchBank('air');
If findDTM(SoADTM,x,y,MSX1,MSY1,MSX2,MSY2) then
begin
ReportStatus('Found Staff of Air');
Case random(2) of
0: begin
MMouse(x,y,2,2);
Wait(200+random(100));
If(IsUpTextMultiCustom(['staff of air',
'air', 'taff of air', 'of air'])) then
begin
Mouse(x,y,2,2,true);
Wait(200+random(100));
end;
end;
1: begin
MMouse(x,y,2,2);
Wait(200+random(100));
If(IsUpTextMultiCustom(['staff of air',
'air','taff of air','of air'])) then
begin
GetMousePos(x,y);
Wait(100+random(50));
Mouse(x,y,0,0,false);
Wait(200+random(100));
ChooseOption('1');
Wait(200+random(100));
end;
Closebank;
FindDTM(SoADTM,x,y,MIX1,MIY1,MIX2,MIY2);
Wait(200+random(100));
Mouse(x,y,1,1,true);
end;
end;
end else;
begin
Reportstatus('No staff, going for runes...');
Tries := 0;

repeat
If not (FindBitmapIn(bmp_Rune_Air,x,y,MSX1,MSY1,MSX2,MSY2)) then
begin
ReportStatus('No airs in inventory nor bank...');
TerminateScript;
end else;
begin
if(VerifyUpText(x,y,'air')) then
begin
GetMousePos(x,y);
Mouse(x,y,0,0,false);
Wait(200+random(100));
ChooseOption('All');
Wait(200+random(100));
CloseBank;
end else;
begin
Writeln('The item we thought we found was not an air rune.');
Inc(Tries);
end;
end;
Wait(1000+random(500));
until((Tries = 20) or (not(bankscreen)));

if (Tries = 20) then
begin
Writeln('Tried to find Air Runes 20 times, in vain.');
TerminateScript;
end;

end;
ReportStatus('Runes found and withdrawed from the bank.');
end;
end else;
Writeln('You seem to have the staff of air equipped !');
end else;

//If you do have Air Runes.
Writeln('Air Runes in inventory.');

//If you have Air and Law Runes.
ReportStatus('It would seem you have both Air / Laws aviable.');
//Checks for Law Runes.

If not R_ItemIDExists(WaterRune,555) then
begin
ReportStatus('No water runes in inventory, checking bank.');
Tries:=0;

Repeat
Case random(2) of
0: R_OpenBankBooth('fwb');
1: begin
if(FindNPC(6200,BankerNPC)) then
begin
ClickPoint := TileToMS(BankerNPC.Tile, random(5));
Writeln('Found the banker..');
MMouse(ClickPoint.x,ClickPoint.y,2,2);
Wait(200+random(100));
If (IsUpText('anker')) then
begin
GetMousePos(ClickPoint.x,ClickPoint.y);
Mouse(ClickPoint.x,Clickpoint.y,0,0,false);
Wait(200+random(100));
ChooseOption('ank');
end;
end else;
Writeln('No banker found..');
end;
end;
Wait(1000+random(500));
Until((BankScreen) or (Tries = 20));

If not (BankScreen) then
begin
ReportStatus('Tried to open the bank 20 times, stopping...');
TerminateScript;
end else;
begin
SearchBank('water rune');
repeat
If not (FindBitmapIn(bmp_Rune_Water,x,y,MSX1,MSY1,MSX2,MSY2)) then
begin
ReportStatus('No water runes in inventory nor bank...');
TerminateScript;
end else;
begin
if(VerifyUpText(x,y,'water')) then
begin
GetMousePos(x,y);
Mouse(x,y,0,0,false);
Wait(200+random(100));
ChooseOption('All');
Wait(200+random(100));
CloseBank;
end else;
begin
Writeln('The item we thought we found was not a water rune.');
Inc(Tries);
end;
end;
until((Tries = 20) or (not(bankscreen)));
if (Tries = 20) then
begin
Writeln('Tried to find Water Runes 20 times, in vain.');
TerminateScript;
end;
end;
end else;

//If you do have Water Runes.
Writeln('Water Runes in inventory, checking air rune supply');

end;


'wine' :
begin

tries := 0;

Repeat
Case random(2) of
0: R_OpenBankBooth('fwb');
1: begin
if(FindNPC(6200,BankerNPC)) then
begin
ClickPoint := TileToMS(BankerNPC.Tile, random(5));
Writeln('Found the banker..');
MMouse(ClickPoint.x,ClickPoint.y,2,2);
Wait(200+random(100));
If (IsUpText('anker')) then
begin
GetMousePos(ClickPoint.x,ClickPoint.y);
Mouse(ClickPoint.x,Clickpoint.y,0,0,false);
Wait(100+random(100));
ChooseOption('ank');
end;
end else;
Writeln('No banker found..');
end;
end;
Wait(1000+random(500));
Until((BankScreen) or (Tries = 20));

If not (BankScreen) then
begin
ReportStatus('Tried to open the bank 20 times, stopping...');
TerminateScript;
end else;

R_DepositAllID(245);
Inc(Runs);

end;


end;

end;


function ChurchPath: TTileArray;
begin

//Randomized paths
Case random(15) of

0 : begin
SetLength(Result, 14);

Result[0] := Point(2949, 3377);
Result[1] := Point(2960, 3383);
Result[2] := Point(2966, 3393);
Result[3] := Point(2961, 3407);
Result[4] := Point(2959, 3417);
Result[5] := Point(2951, 3422);
Result[6] := Point(2947, 3435);
Result[7] := Point(2945, 3448);
Result[8] := Point(2943, 3457);
Result[9] := Point(2943, 3467);
Result[10] := Point(2942, 3478);
Result[11] := Point(2942, 3488);
Result[12] := Point(2940, 3502);
Result[13] := Point(2939, 3513);

end;

1 : begin
SetLength(Result, 14);

Result[0] := Point(2952, 3379);
Result[1] := Point(2963, 3385);
Result[2] := Point(2965, 3397);
Result[3] := Point(2963, 3406);
Result[4] := Point(2958, 3417);
Result[5] := Point(2951, 3426);
Result[6] := Point(2947, 3437);
Result[7] := Point(2946, 3448);
Result[8] := Point(2944, 3458);
Result[9] := Point(2943, 3471);
Result[10] := Point(2942, 3482);
Result[11] := Point(2942, 3491);
Result[12] := Point(2940, 3502);
Result[13] := Point(2941, 3513);

end;

2 : begin
SetLength(Result, 14);

Result[0] := Point(2949, 3378);
Result[1] := Point(2960, 3382);
Result[2] := Point(2963, 3394);
Result[3] := Point(2962, 3406);
Result[4] := Point(2957, 3418);
Result[5] := Point(2948, 3428);
Result[6] := Point(2947, 3440);
Result[7] := Point(2943, 3451);
Result[8] := Point(2943, 3462);
Result[9] := Point(2943, 3476);
Result[10] := Point(2942, 3487);
Result[11] := Point(2943, 3496);
Result[12] := Point(2940, 3503);
Result[13] := Point(2939, 3513);

end;

3 : begin
SetLength(Result, 14);

Result[0] := Point(2949, 3382);
Result[1] := Point(2963, 3389);
Result[2] := Point(2964, 3404);
Result[3] := Point(2959, 3415);
Result[4] := Point(2949, 3421);
Result[5] := Point(2948, 3431);
Result[6] := Point(2948, 3438);
Result[7] := Point(2945, 3447);
Result[8] := Point(2943, 3458);
Result[9] := Point(2943, 3471);
Result[10] := Point(2941, 3481);
Result[11] := Point(2942, 3491);
Result[12] := Point(2940, 3502);
Result[13] := Point(2939, 3513);

end;

4 : begin
SetLength(Result, 14);

Result[0] := Point(2949, 3379);
Result[1] := Point(2962, 3382);
Result[2] := Point(2966, 3393);
Result[3] := Point(2962, 3405);
Result[4] := Point(2958, 3417);
Result[5] := Point(2949, 3424);
Result[6] := Point(2947, 3437);
Result[7] := Point(2945, 3450);
Result[8] := Point(2943, 3462);
Result[9] := Point(2943, 3471);
Result[10] := Point(2940, 3482);
Result[11] := Point(2942, 3491);
Result[12] := Point(2940, 3501);
Result[13] := Point(2941, 3513);

end;

5 : begin
SetLength(Result, 19);

Result[0] := Point(2950, 3378);
Result[1] := Point(2959, 3380);
Result[2] := Point(2965, 3384);
Result[3] := Point(2965, 3393);
Result[4] := Point(2966, 3400);
Result[5] := Point(2964, 3413);
Result[6] := Point(2955, 3420);
Result[7] := Point(2948, 3423);
Result[8] := Point(2946, 3432);
Result[9] := Point(2946, 3438);
Result[10] := Point(2946, 3447);
Result[11] := Point(2942, 3453);
Result[12] := Point(2942, 3460);
Result[13] := Point(2943, 3467);
Result[14] := Point(2941, 3477);
Result[15] := Point(2941, 3487);
Result[16] := Point(2942, 3495);
Result[17] := Point(2940, 3502);
Result[18] := Point(2940, 3514);

end;

6 : begin
SetLength(Result, 19);

Result[0] := Point(2949, 3378);
Result[1] := Point(2953, 3382);
Result[2] := Point(2964, 3382);
Result[3] := Point(2966, 3390);
Result[4] := Point(2964, 3398);
Result[5] := Point(2964, 3405);
Result[6] := Point(2960, 3412);
Result[7] := Point(2951, 3420);
Result[8] := Point(2948, 3428);
Result[9] := Point(2947, 3440);
Result[10] := Point(2946, 3446);
Result[11] := Point(2943, 3456);
Result[12] := Point(2943, 3464);
Result[13] := Point(2943, 3473);
Result[14] := Point(2941, 3482);
Result[15] := Point(2943, 3492);
Result[16] := Point(2941, 3500);
Result[17] := Point(2940, 3510);
Result[18] := Point(2939, 3514);

end;

7 : begin
SetLength(Result, 16);

Result[0] := Point(2949, 3380);
Result[1] := Point(2953, 3383);
Result[2] := Point(2962, 3385);
Result[3] := Point(2964, 3399);
Result[4] := Point(2960, 3410);
Result[5] := Point(2954, 3420);
Result[6] := Point(2947, 3430);
Result[7] := Point(2947, 3441);
Result[8] := Point(2943, 3451);
Result[9] := Point(2943, 3462);
Result[10] := Point(2944, 3473);
Result[11] := Point(2940, 3480);
Result[12] := Point(2941, 3489);
Result[13] := Point(2941, 3498);
Result[14] := Point(2940, 3509);
Result[15] := Point(2939, 3514);

end;

8 : begin
SetLength(Result, 15);

Result[0] := Point(2949, 3379);
Result[1] := Point(2959, 3383);
Result[2] := Point(2964, 3388);
Result[3] := Point(2965, 3399);
Result[4] := Point(2966, 3407);
Result[5] := Point(2959, 3417);
Result[6] := Point(2950, 3425);
Result[7] := Point(2948, 3436);
Result[8] := Point(2946, 3447);
Result[9] := Point(2943, 3459);
Result[10] := Point(2941, 3470);
Result[11] := Point(2941, 3482);
Result[12] := Point(2943, 3494);
Result[13] := Point(2941, 3502);
Result[14] := Point(2938, 3514);

end;

9 : begin
SetLength(Result, 13);

Result[0] := Point(2949, 3378);
Result[1] := Point(2961, 3383);
Result[2] := Point(2965, 3395);
Result[3] := Point(2963, 3406);
Result[4] := Point(2956, 3417);
Result[5] := Point(2948, 3428);
Result[6] := Point(2948, 3441);
Result[7] := Point(2943, 3454);
Result[8] := Point(2944, 3467);
Result[9] := Point(2941, 3480);
Result[10] := Point(2943, 3490);
Result[11] := Point(2940, 3502);
Result[12] := Point(2939, 3514);

end;

10: begin
SetLength(Result, 13);

Result[0] := Point(2949, 3378);
Result[1] := Point(2962, 3383);
Result[2] := Point(2967, 3391);
Result[3] := Point(2965, 3405);
Result[4] := Point(2961, 3415);
Result[5] := Point(2951, 3422);
Result[6] := Point(2948, 3435);
Result[7] := Point(2946, 3449);
Result[8] := Point(2943, 3462);
Result[9] := Point(2943, 3478);
Result[10] := Point(2941, 3491);
Result[11] := Point(2941, 3503);
Result[12] := Point(2939, 3514);

end;

11: begin
SetLength(Result, 14);

Result[0] := Point(2950, 3378);
Result[1] := Point(2960, 3383);
Result[2] := Point(2966, 3394);
Result[3] := Point(2964, 3406);
Result[4] := Point(2960, 3418);
Result[5] := Point(2950, 3424);
Result[6] := Point(2949, 3435);
Result[7] := Point(2947, 3447);
Result[8] := Point(2944, 3456);
Result[9] := Point(2943, 3468);
Result[10] := Point(2941, 3481);
Result[11] := Point(2942, 3491);
Result[12] := Point(2940, 3501);
Result[13] := Point(2939, 3513);

end;

12: begin
SetLength(Result, 14);

Result[0] := Point(2949, 3379);
Result[1] := Point(2963, 3382);
Result[2] := Point(2964, 3391);
Result[3] := Point(2964, 3402);
Result[4] := Point(2959, 3414);
Result[5] := Point(2949, 3423);
Result[6] := Point(2947, 3435);
Result[7] := Point(2946, 3449);
Result[8] := Point(2944, 3461);
Result[9] := Point(2944, 3472);
Result[10] := Point(2940, 3483);
Result[11] := Point(2942, 3492);
Result[12] := Point(2939, 3502);
Result[13] := Point(2940, 3512);

end;

13: begin
SetLength(Result, 14);

Result[0] := Point(2950, 3378);
Result[1] := Point(2959, 3383);
Result[2] := Point(2964, 3396);
Result[3] := Point(2961, 3409);
Result[4] := Point(2953, 3420);
Result[5] := Point(2948, 3433);
Result[6] := Point(2947, 3444);
Result[7] := Point(2944, 3453);
Result[8] := Point(2943, 3464);
Result[9] := Point(2943, 3475);
Result[10] := Point(2940, 3485);
Result[11] := Point(2943, 3494);
Result[12] := Point(2940, 3503);
Result[13] := Point(2940, 3513);

end;

end;

end;

function BankPath: TTileArray;
begin

case random(5) of
0: begin
SetLength(Result, 3);

Result[0] := Point(2958, 3384);
Result[1] := Point(2950, 3378);
Result[2] := Point(2946, 3369);
end;

1: begin
SetLength(Result, 2);

Result[0] := Point(2954, 3382);
Result[1] := Point(2945, 3372);
end;

2: begin
SetLength(Result, 2);

Result[0] := Point(2953, 3381);
Result[1] := Point(2944, 3370);
end;

3: begin
SetLength(Result, 3);

Result[0] := Point(2952, 3383);
Result[1] := Point(2949, 3375);
Result[2] := Point(2944, 3369);
end;

4: begin
SetLength(Result, 3);

Result[0] := Point(2952, 3383);
Result[1] := Point(2947, 3374);
Result[2] := Point(2945, 3369);
end;
end;
end;

{procedure WalkPath_;
var
path: TPointArray;

begin
path := LoadPath;
for x := 0 to High(Path) do
begin
WalkToTile(path[x], 1, 0);
end;
Wait(500+Random(300));
end;}


procedure EnterChurch;
begin

If (not(LoggedIn)) then
begin
LoginPlayer;
Wait(3000);
if (FindNormalRandoms) then
begin
Writeln('You seem to be stuck in a random.');
TerminateScript;
end;
end;

WalkPointA := IntToPoint(2933,3516);
WalkPointB := IntToPoint(2934,3515);
WalkPointC := IntToPoint(2935,3515);
WalkPointD := IntToPoint(2935,3514);
WalkPointE := IntToPoint(2936,3515);

//Random Tiles in the Church it will walk you to.
Case random(5) of
0: WalkToTile((WalkPointA),0,0);
1: WalkToTile((WalkPointB),0,0);
2: WalkToTile((WalkPointC),0,0);
3: WalkToTile((WalkPointD),0,0);
4: WalkToTile((WalkPointE),0,0);
end;

end;


procedure WalkToChurch;
begin

If (not(LoggedIn)) then
begin
LoginPlayer;
Wait(3000);
if (FindNormalRandoms) then
begin
Writeln('You seem to be stuck in a random.');
TerminateScript;
end;
end;

FindNormalRandoms;

//Location check + Walk to church
If (Players[CurrentPlayer].Loc = 'bank') then
begin
ReportStatus('Everything seems fine,'+
'starting walking procedure.');
Wait(1000);
WalkPath(ChurchPath);

If (not(TileOnMM(PointToTile(IntToPoint(2934,3515))))) then
begin
ReportStatus('Player seems to have got lost'+
'between the bank and the chapel.');
TerminateScript;
end else;
begin
EnterChurch;
Players[CurrentPlayer].loc := 'Chapel';
end;

end else;

//If the Location != Bank...
begin
ReportStatus('Your player should be at the bank yet he is not...');
TerminateScript;
end;
end;


procedure TeleGrab;

var
WoZArray : TGroundItemArray;

begin

If (not(LoggedIn)) then
begin
LoginPlayer;
Wait(3000);
if (FindNormalRandoms) then
begin
Writeln('You seem to be stuck in a random.');
TerminateScript;
end;
end;

If (Players[CurrentPlayer].Loc = 'church') then
begin
ReportStatus('It would seem you are at the church.');
Wait(1000+random(350));
ReportStatus('Looking for other players.');

If ((high(GetPlayers)) > 0) then
begin
ReportStatus('It would seem that there are players in this world.');
ChangeWorldMark(true);
end else;

begin
WoZArray := GetItemsAt(PointToTile(WoZTile));
for i := 0 to high(WoZArray) do
begin

if ((WoZArray[i].ID=245)) then
begin
ClickPoint := TileToMS(Point(2931,3515),random(7));
if (VerifyUpText(ClickPoint.x,ClickPoint.y,'ine')) then
begin
ReportStatus('Wine found.');
Cast('Telekinetic Grab',false);
GetMousePos(x,y);
case random(2) of
1: Mouse(x,y,0,0,true);
2: begin
Mouse(x,y,0,0,false);
Wait(250+random(150));
ChooseOption('ine of');
end;
end;
Wait(500+random(250));
Inc(Wines);
end else;
exit;
end else;
AntiBan;

end;
end;
end;
end;


procedure WalkBack;
begin

If (not(LoggedIn)) then
begin
LoginPlayer;
Wait(3000);
if (FindNormalRandoms) then
begin
Writeln('You seem to be stuck in a random.');
TerminateScript;
end;
end;

Cast('Falador Teleport',false);

if (MeInBox(IntToBox(2961,3382,2969,3376))) then
begin
Wait(2000+random(500));
WalkPath(BankPath);
end;

end;


procedure ProgressReport;
begin

Writeln('[==================================]');
Writeln('[Wine of Zamorak Telegrabber=======]');
Writeln('[by Dervish========================]');
Writeln('[==================================]');
Writeln((Padr('[Ran '+ TimeRunning, 35))+']');
Writeln((Padr('[Runs : '+ IntToStr(Runs), 35))+']');
Writeln((Padr('[Wines : '+ IntToStr(Wines),35))+']');
Writeln(Padr('[Magic Exp : '+ IntToStr(Wines*43),35)+']');
Writeln(Padr('[Gold Earned : '+IntToStr(Wines*CPrice),35)+']');
Writeln('[==================================]');

end;

procedure ScriptTerminate;
begin

ClearDebug;
ProgressReport;

end;

procedure MainLoop;
begin

Startup;
repeat
Bank('Runes');
WalkToChurch;
EnterChurch;
repeat
TeleGrab;
until(InvFull);
WalkBack;
Bank('Wine');
until(Runs >= HMR);

end;

begin
MainLoop;
end.

I want to know your thoughts before releasing it for testing, and if you find errors / mistakes / stuff to add or stuff which I missed out on.