SRL Archive - S.M.A.R.T. Bugs and Improvements.

Wont work


Macrosoft

2007-11-20 19:05:32

I run the script and scar closes itself????

Anyone know what Im doing wrong?

rogeruk

2007-11-20 19:15:55

Post the script. You havnt set it up correctly.

Macrosoft

2007-11-20 19:22:20

program TutIslandRunner;
{.include SRL/SRL/Misc/Smart.scar}
{.include SRL/SRL.scar}
{.include SRL/SRL/Skill/Magic.scar}

procedure DeclarePlayers;
begin
NumberOfPlayers(2);

Players[0].Name := '';
Players[0].Pass := '';

Players[1].Name := '';
Players[1].Pass := '';
end;

var
MMArrow, TopMMArrow, MSArrow, TopMSArrow, Done: Integer;

procedure LoadBitmaps;
begin
MMArrow := BitmapFromString(15, 14, 'z78DAEDD24B0E80200C84E' +
'12B3142425CB6E2DCFF485EC0C2E0236EECE25F7E49A129750672' +
'6707DCD97C89FACB8FC98D563DEAA7727851DC688551E56B1C384' +
'ABB5B80CE3597D9CA6F0E1A2B4CE9A57FC40BE6C0BF6D9EF8BA79' +
'00C3A2078F');

TopMMArrow := BitmapFromString(6, 5, 'z78DA737372B3343671C3' +
'4F3ABA991B3A52421A80802184C42B8B0C0C71C90200FB5828A4');

MSArrow := BitmapFromString(21, 23, 'z78DAEDD3310AC0200C85E' +
'12B456D1147A3E6FE472A38554A4B6A0D8112877FF47B0802700F' +
'35AA1838058163BAE90A7AA5929053D37FA6E7889C9ACEBAB350D' +
'E9B56FB04A7E59E9EA16FD88A742F2E0C1B905248127D740537B0' +
'DD7143A6E8FD974EB9E3BF5072E7DE61A9FB62C39DEB825B37C77' +
'15C8E7800DECE700D');

TopMSArrow := BitmapFromString(8, 5, 'z78DA737374333732721B' +
'04A40108184248A25522034362540200128F35BE');
end;

procedure FreeBitmaps;
begin
try
FreeBitmap(MMArrow);
FreeBitmap(TopMMArrow);
FreeBitmap(MSArrow);
FreeBitmap(TopMSArrow);
except end;
end;

function GetBlueNPCText: string;
var
x, y, i: Integer;
Names: array[0..1] of string;
begin
if (not LoggedIn) then Exit;
if FindColor(x, y, 16711680, MCX1, MCY1, MCX2, MCY2) then
for i := 0 to 1 do
Names[i] := Trim(GetTextAtEx(x -(4 + i), y -1, 0, NPCChars, False, False, 0, 2, 16711680, 50, True, tr_AllChars));

Result := Names[0]
if Length(Names[0]) < Length(Names[1]) then
Result := Names[1];
end;

procedure HandleTalk;
var
x, y: Integer;
begin
if (not LoggedIn) then Exit;
repeat
repeat
Wait(450 + Random(300));
if FindColor(x, y, 8388608, MCX1, MCY1, MCX2, MCY2) then
if (GetColor(x +6, y +3) = 8388608) then
if (GetColor(x +74, y +3) = 8388608) then
begin
Mouse(RandomRange(x, x +100), RandomRange(y +2, y +4), 2, 2, True);
Wait(500 +Random(500));
end;
until not ClickContinue(True, True);
if AreTalking then
Wait(700 +Random(100));
until (not (FindColor(x, y, 16711680, MCX1, MCY1, MCX2, MCY2)) or (not AreTalking)) and (not FindColor(x, y, 8388608, MCX1, MCY1, MCX2, MCY2));
end;

function FindFire(var fx, fy: Integer): Boolean;
var
i, x, y: Integer;
tp: TPoint;
Colors: TIntegerArray;
P, Points: TPointArray;
aPoints: array of TPointArray;
begin
if (not LoggedIn) then Exit;
Colors := [3718128, 4309484, 3710152, 3640496, 12348];
for i := 0 to 4 do
begin
FindColorsTolerance(P, Colors[i], MSX1, MSY1, MSX2, MSY2, 5);
Points := CombineTPA(P, Points);
end;
aPoints := TPAtoATPAEx(Points, 35, 35);
SortATPAFromSize(aPoints, 280, True);
SetLength(Points, 0);
Result := (Length(aPoints) > 0);
if Result then
begin
Result := Length(aPoints[0]) > 160;
tp := MiddleTPA(aPoints[0]);
x := tp.x; y := tp.y;
if FindColorSpiralTolerance(x, y, 3718128, tp.x -5, tp.y -5, tp.x +5, tp.y +5, 7) then
begin
fx := x;
fy := y;
end else
begin
fx := tp.x;
fy := tp.y;
end;
end;
SetLength(Colors, 0);
SetLength(p, 0);
SetLength(Points, 0);
SetLength(aPoints, 0);
end;

procedure FirstEmptySlot(var B: TBox);
var
i: Integer;
a: TBox;
begin
if (not LoggedIn) then Exit;
for i := 1 to 28 do
if not ExistsItem(i) then
begin
a := InvBox(i);
if (a.x1 > b.x1) or (a.y1 > b.y1) then
Break
else
begin
B := a;
Break;
end;
end;
end;

procedure DropItemsNoNames(Names: TStringArray);
var
x, y, i: Integer;
p: TBox;
begin
for i := 1 to 28 do
if ExistsItem(i) then
begin
p := InvBox(i);
MMouse((p.x1 + p.x2) /2, (p.y1 + p.y2) /2, 2, 2);
Wait(100 +Random(25));
if not IsUpTextMultiCustom(Names) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
Wait(100 +Random(100));
ChooseOption('Drop');
end;
Wait(50 +Random(75));
end;
end;

function FindItemColorName(var p: TBox; Name: String; Color, Tol: Integer; CheckName: Boolean): Boolean;
var
i, x, y: Integer;
begin
for i := 1 to 28 do
if ExistsItem(i) then
begin
p := InvBox(i);
if FindColorTolerance(x, y, Color, p.x1, p.y1, p.x2, p.y2, Tol) then
if CheckName then
begin
MMouse((p.x1 + p.x2) /2, (p.y1 + p.y2) /2, 2, 2);
Wait(150 +Random(75));
if IsUpTextMultiCustom([Name]) then
begin
Result := True;
Exit;
end;
end else
begin
Result := True;
Exit;
end;
Wait(50 +Random(75));
end;
end;

procedure FilterOnMM(var Points: TPointArray);
var
i, n, c: Integer;
p: TPointArray;
begin
n := Length(Points) -1;
for i := 0 to n do
if rs_OnMiniMap(Points[i].x, Points[i].y) then
begin
SetLength(p, c +1);
p[c] := Points[i];
c := c +1;
end;
Points := p;
SetLength(p, 0);
end;

function GetLadderColor: Integer;
var
Points: TPointArray;
Colors: TIntegerArray;
p: Array[0..1] of Integer;
n, i, c: Integer;
begin
if (not LoggedIn) then Exit;
ColorToleranceSpeed(0);
FindColorsTolerance(Points, 1786726, MMX1, MMY1, MMX2, MMY2, 70);
FilterOnMM(Points);
Colors := GetColors(Points);
SetLength(Points, 0);
ClearSameIntegers(Colors);
n := Length(Colors);
p[1] := 200;
for i := 0 to n -1 do
begin
c := CountColor(Colors[i], MMX1, MMY1, MMX2, MMY2);
if (c > 15) and (c < 150) then
if (c < p[1]) then
begin
p[0] := Colors[i];
p[1] := c;
end;
end;
Result := p[0];
if (Result = 0) then
Result := FindLadderColor;
ColorToleranceSpeed(1);
SetLength(Colors, 0);
end;

function FindLadders: TPointArray;
var
n, c: Integer;
Points: TPointArray;
tmp: Array of TPointArray;
begin
if (not LoggedIn) then Exit;
c := GetLadderColor;
if (c < 1) then Exit;
FindColorsSpiralTolerance(MMCX, MMCY, Points, c, MMX1, MMY1, MMX2, MMY2, 0);
if (Length(Points) < 1) then Exit;
tmp := TPAtoATPAEx(Points, 8, 12);
n := Length(tmp);
SetLength(Result, n);
for c := 0 to n -1 do
Result[c] := MiddleTPA(tmp[c]);
SetLength(tmp, 0);
end;

function MsToMin(Ms: LongInt): Integer;
begin
Result := (Ms/1000)/60;
end;

function MsToSec(Ms: LongInt): Integer;
begin
Result := Ms/1000;
end;

function FindMMArrow(var x, y: integer):Boolean;
var
c, tx, ty: integer;
begin
try
repeat
Wait(50);
c := c +1
until (c > 50) or (FindBitmapToleranceIn(TopMMArrow, tx, ty, MMX1, MMY1, MMX2, MMY2, 10)) or (not LoggedIn);

if c > 50 then
begin
c := 0;
repeat
Wait(50);
c := c +1
until (c > 50) or (FindBitmapToleranceIn(MMArrow, tx, ty, MMX1, MMY1, MMX2, MMY2, 10)) or (not LoggedIn);
if c > 50 then
Exit;
end;

Result := True;
x := tx +4;
y := ty +6;
except end;
end;

function FindMSArrow(var x, y: integer):Boolean;
var
c, tx, ty: integer;
begin
try
repeat
Wait(50);
c := c +1
until (c > 50) or (FindBitmapToleranceIn(TopMSArrow, tx, ty, MSX1, MSY1, MSX2, MSY2, 10)) or (not LoggedIn);

if c > 50 then
begin
c := 0;
repeat
Wait(50);
c := c +1
until (c > 50) or (FindBitmapToleranceIn(MSArrow, tx, ty, MSX1, MSY1, MSX2, MSY2, 10)) or (not LoggedIn);
if (c > 50) then
Exit;
end;

Result := True;
x := tx +4;
y := ty +6;
except end;
end;

function FindFastMSArrow(var x, y: integer):Boolean;
var
c, tx, ty: integer;
begin
try
repeat
Wait(50);
c := c +1
until (c > 3) or (FindBitmapToleranceIn(TopMSArrow, tx, ty, MSX1, MSY1, MSX2, MSY2, 10)) or (not LoggedIn);

if c > 3 then
begin
c := 0;
repeat
Wait(50);
c := c +1
until (c > 3) or (FindBitmapToleranceIn(MSArrow, tx, ty, MSX1, MSY1, MSX2, MSY2, 10)) or (not LoggedIn);
if c > 3 then
Exit;
end;

Result := True;
x := tx +4;
y := ty +6;
except end;
end;

function WalkToMMArrow(SureWalk: Boolean): Boolean;
var
tx, ty: integer;
begin
if(not(LoggedIn))then Exit;
if (SureWalk) or (not SureWalk and not FindFastMSArrow(tx, ty)) then
if FindMMArrow(tx, ty) then
begin
MFNF(tx, ty, 1, 1);
FFlag(0);
Result := True;
end;
end;

function FindNpcByArrow(var x, y: integer; Color, Tol: Integer; Name: String; RightClick: Boolean): Boolean;
var
c, tx, ty: integer;
Points: TPointArray;
p: TPoint;
begin
repeat
if (not LoggedIn) then Exit;
if FindMSArrow(tx, ty) then
begin
x := tx; y := ty;
if FindColorSpiralTolerance(x, y, Color, tx -10, ty -10, tx +10, ty +10, Tol) then
begin
tx := 0; ty := 0;
FindColorsSpiralTolerance(tx, ty, Points, Color, x -10, y -10, x +10, y +10, Tol);
P := MiddleTPA(Points);
SetLength(Points, 0);
tx := p.x; ty := p.y;
MMouse(tx, ty, 0, 0);
end else
MMouse(tx, ty +15, 4, 4);
Wait(50);
if IsUpTextMultiCustom(['Talk-to', 'to '+Name, Name]) then
begin
if RightClick then
begin
GetMousePos(tx, ty);
Mouse(tx, ty, 0, 0, False);
end
x := tx; y := ty;
Result := True;
Exit;
end
end else WalkToMMArrow(c > 20);
c := c +1;
until(c > 50)
end;

function TalkToNpcByArrow(Name: String; Color, Tol: Integer): Boolean;
var
i, c, tx, ty: integer;
begin
if (not LoggedIn) or AreTalking then Exit;
WalkToMMArrow(False);
repeat
if (not LoggedIn) then Exit;
if FindNpcByArrow(tx, ty, Color, Tol, Name, True) then
begin
if ChooseOption('Talk') then
begin
FFlag(0);
i := 0;
repeat
if AreTalking then
begin
Result := True;
Exit;
end
Wait(200);
i := i +1;
until (i > 20);
end;
end
c := c +1
if ((c mod 3) = 0) then WalkToMMArrow(c > 3);
until c > 10
end;

function FindObjByArrow(var x, y: Integer; Name, Option: String; Color, Tol: Integer; Click: Boolean): Boolean;
var
c, tx, ty: integer;
Points: TPointArray;
p: TPoint;
begin
repeat
if (not LoggedIn) then Exit;
if FindMSArrow(tx, ty) then
begin
x := tx; y := ty;
if FindColorSpiralTolerance(x, y, Color, tx -15, ty -15, tx +15, ty +15, Tol) then
begin
tx := 0; ty := 0;
FindColorsSpiralTolerance(tx, ty, Points, Color, x -15, y -15, x +15, y +15, Tol);
p := MiddleTPA(Points);
SetLength(Points, 0);
MMouse(p.x, p.y, 0, 0)
end else
MMouse(tx, ty +15, 4, 4);
Wait(50);
if IsUpTextMultiCustom([Name, Name + ' / ', Name]) then
begin
if Click then
begin
GetMousePos(tx, ty);
Mouse(tx, ty, 0, 0, False);
Wait(200);
Result := ChooseOption(Option);
end else Result := True;
x := tx; y := ty;
Exit;
end
end else WalkToMMArrow(c > 20);
c := c +1;
until(c > 50)
end;

function MyFindObjTPA(var x, y: integer; Colors: TIntegerArray; Tol, ObjWidth, ObjHeight: Integer; UpTexts: TStringArray; SortSize: Boolean): Boolean;
var
i, n: Integer;
P, Points: TPointArray;
aPoints: array of TPointArray;
begin
if (not LoggedIn) then Exit;
n := Length(Colors);
for i := 0 to n -1 do
begin
FindColorsSpiralTolerance(MSCX, MSCY, P, Colors[i], MSX1, MSY1, MSX2, MSY2, Tol);
Points := CombineTPA(P, Points);
end;
aPoints := TPAtoATPAEx(Points, ObjWidth, ObjHeight);
if SortSize then
SortATPAFromSize(aPoints, (ObjWidth * ObjHeight), True);
SetLength(Points, 0);
n := Length(aPoints);
for i := 0 to n - 1 do
begin
MiddleTPAEx(aPoints[i], x, y);
MMouse(x, y, 2, 2);
Wait(100 + Random(50));
if IsUpTextMultiCustom(UpTexts) then
begin
GetMousePos(x, y);
Result := True;
Exit;
end;
end;
SetLength(p, 0);
SetLength(Points, 0);
SetLEngth(aPoints, 0);
end;

function UseArrowObjTillText(Name, Option, TillText: String; Color, Tol, Tries: Integer): Boolean;
var
i, c, x, y, t: Integer;
begin
t := GetSystemTime;
repeat
if (not LoggedIn) then Exit;
c := 0;
if FindObjByArrow(x, y, Name, Option, Color, Tol, True) then
repeat
if (c > 0) and FlagPresent then
begin
Mouse(MMCX, MMCY, 0, 0, True);
Break;
end else
FFlag(0);
if (not Pos('lease W', TillText) <> 0) then
ChatWait;
c := c +1;
Wait(150 +Random(150));
if (Length(TillText) < 1) then
if not FindColor(x, y, 16711680, MCX1, MCY1, MCX2, MCY2) then
begin
Result := True;
Exit;
end;
if Pos(TillText, GetBlueNPCText) <> 0 then
begin
Result := True;
Exit;
end;
until (c > 125) or (not LoggedIn) or ((GetSystemTime - t) > 45000);
i := i +1;
Wait(500 +Random(250));
until (i > Tries) or ((GetSystemTime - t) > 45000);
end;

function UseTPAObjTillText(Names: TStringArray; Option, TillText: String; Colors: TIntegerArray; Tol, w, h, Tries: Integer; SortSize: Boolean): Boolean;
var
i, c, x, y, t: Integer;
begin
t := GetSystemTime;
repeat
if (not LoggedIn) then Exit;
c := 0;
if MyFindObjTPA(x, y, Colors, Tol, w, h, Names, SortSize) then
begin
Mouse(x, y, 0, 0, False);
Wait(150);
if ChooseOption(Option) then
repeat
if (c > 0) and FlagPresent then
begin
Mouse(MMCX, MMCY, 0, 0, True);
Break;
end else
FFlag(0);
if (not Pos('lease W', TillText) <> 0) then
ChatWait;
c := c +1;
Wait(150 +Random(150));
if Pos(TillText, GetBlueNPCText) <> 0 then
begin
Result := True;
Exit;
end;
until (c > 50) or (not LoggedIn) or ((GetSystemTime - t) > 45000);
end;
i := i +1;
until (i > Tries) or ((GetSystemTime - t) > 30000);
end;

function FindMoster(var cx, cy: Integer; Color: TIntegerArray; UpText: TStringArray; ClickAway: Boolean): Boolean;
var
ms, a, b, c, i, t, x, y, x1, y1, x2, y2: Integer;
Start: Boolean;
begin
if (not LoggedIn) then Exit;
ms := MouseSpeed;
MouseSpeed := 25;
for t := 0 to 10 do
begin
for b := 0 to (GetArrayLength(Color)-1) do
begin
if (FindColorSpiralTolerance(cx, cy, color[b], MSX1, MSY1, MSX2, MSY2, 20)) then
begin
Start := True;
Break;
end;
end;
if(Start)then
begin
x1 := 245;
y1 := 165;
x2 := 277;
y2 := 185;
repeat
if not(LoggedIn)then
break;
a := a + 1;
if (a = 1) then
c := c + 1
else If (a = 3) then
c := c + 1;
for i := 1 to c do
begin
if (a = 1) then
begin
x1 := x1 + 30;
x2 := x2 + 30;
end else
if (a = 2) then
begin
y1 := y1 - 20;
y2 := y2 - 20;
end else
if (a = 3) then
begin
x1 := x1 - 30;
x2 := x2 - 30;
end else
if (a = 4) then
begin
y1 := y1 + 20;
y2 := y2 + 20;
end;
if (x1 = 485) and (x2 = 517) then
x2 := x2 - 2;
if (y1 = 325) and (y2 = 345) then
y2 := y2 - 7;
if (x2 > 515) then
Break;
for b := 0 to (GetArrayLength(Color)-1) do
begin
if (FindColorTolerance(cx, cy, Color[b], x1, y1, x2, y2, 20)) then
begin
MMouse(cx, cy, 0, 0);
Wait(25 +Random(50));
if ((cx - 15) < 0) then
cx := 15;
if ((cy - 40) < 0) then
cy := 40;
if ((cx + 15) > MSX2) then
cx := MSX2 - 15;
if ((cy + 30) > MSY2) then
cy := MSX2 - 30;
if (IsUpTextMultiCustom(UpText)) then
if (not FindColor(x, y, 255, cx -15, cy -40, cx +15, cy +30)) and (not FindColor(x, y, 65280, cx -15, cy -40, cx +15, cy +30)) then
begin
Result := True;
MouseSpeed := ms;
GetMousePos(cx, cy);
Exit;
end
end;
end;
end;
if (a = 4) then
a := 0;
until (x2 > 515) or (Result = True);
end;
end;
if ClickAway then MouseFlag(RandomRange(MMCX -5, MMCX +5), RandomRange(MMCY -5, MMCY +5), 2, 2);
MouseSpeed := ms;
end;

procedure OpenTab(Tab: Integer);
var
c: Integer;
Info: TIntegerArray;
begin
if (not LoggedIn) then Exit;
case Tab of
1 : Info := [547, 184, 65536];
2 : Info := [565, 179, 65536];
3 : Info := [609, 175, 986896];
4 : Info := [642, 173, 65536];
5 : Info := [674, 170, 65536];
6 : Info := [702, 176, 65536];
7 : Info := [741, 175, 65536];
8 : Info := [575, 474, 65536];
9 : Info := [608, 474, 65536];
11: Info := [668, 486, 65536];
12: Info := [710, 470, 65536];
13: Info := [752, 475, 65536];
else Exit;
end;

repeat
c := c +1;
Wait(20);
until (GetColor(Info[0], Info[1]) = Info[2]) or (c > 300) or TabExists(Tab) or (not LoggedIn);
Mouse(Info[0], Info[1], 4, 4, True);

c := 0;
repeat
c := c +1;
Wait(20);
until (GetCurrentTab = Tab) or (c > 300);
SetLength(Info, 0);
end;

procedure DeActivate(Write, Loc: String);
begin
WriteLn(Players[CurrentPlayer].Name + ' ' + Write);
Players[CurrentPlayer].Loc := Loc;
LogOut;
end;

function FindFastBlackChat(txt: String): Boolean;
var
x, y: Integer;
begin
Result := IsTextInAreaEx(26, 363, 495, 455, x, y, txt, 0, NPCChars, False, False, 0, 1, 0);
end;

function BarPos: Integer;
var
c: T2DIntArray;
i, x, cc: Integer;
H, S, L: Extended;
begin
c := GetBitmapAreaColors(73, 309, 492, 309);
for x := 418 downto 0 do
if (((x +2) mod 20) = 0) then
begin
ColorToHSL(c[x][0], H, S, L);
if (L > 36.5) then
begin
cc := 0;
for i := x downto x -18 do
begin
ColorToHSL(c[i][0], H, S, L);
if (L > 36.5) then
cc := cc +1;
end;
if (cc > 15) then
begin
Result := x +2;
Exit;
end;
end;
end;
end;

function GetSP: Integer;
var
S: String;
x, y, l: Integer;
begin
if (not LoggedIn) then Exit;
S := GetBlueNPCText;
l := Length(s);
case BarPos of
0: for Result := 1 to 5 do
case Result of
1: if (Pos('Getting started', S) <> 0) then if FindColor(x, y, 3358280, 180, 20, 335, 30) then Exit;
2: if (Pos('Getting started', S) <> 0) then Exit;
3: if (l < 1) then if FindFastBlackChat('Player') then Exit;
4: if (Pos('Player controls', S) <> 0) then Exit;
5: if (Pos('Interacting', S) <> 0) then Exit;
end;
20: for Result := 6 to 11 do
case Result of
6: if (Pos('Moving around', S) <> 0) then Exit;
7: if (Pos('Viewing the items', S) <> 0) then Exit;
8: if (Pos('Cut down', S) <> 0) then Exit;
9: if (Pos('Making a fire', S) <> 0) then Exit;
10: if (l < 1) then if FindFastBlackChat('You g') then Exit;
11: if (Pos('Your skill', S) <> 0) then Exit;
end;
40: for Result := 12 to 14 do
case Result of
12: if (Pos('Catch some', S) <> 0) then Exit;
13: if (Pos('Cooking your', S) <> 0) or (Pos('Burning your', S) <> 0) then Exit;
14: if (Pos('Well done, you', S) <> 0) then Exit;
end;
60: for Result := 15 to 17 do
case Result of
15: if (Pos('Find your next', S) <> 0) then if FindFastBlackChat('Follow') then Exit;
16: if (Pos('Find your next', S) <> 0) then Exit;
17: if (Pos('Making dough', S) <> 0) or (Pos('Cooking dough', S) <> 0) then Exit;
end;
80: for Result := 18 to 19 do
case Result of
18: if (Pos('Cooking dough', S) <> 0) then Exit;
19: if (Pos('The music player', S) <> 0) then Exit;
end;
100: for Result := 20 to 23 do
case Result of
20: if (Pos('Emotes', S) <> 0) then if FindFastBlackChat('Now, how') then Exit;
21: if (Pos('Emotes', S) <> 0) then Exit;
22: if (Pos('Running', S) <> 0) then Exit;
23: if (Pos('Run to', S) <> 0) then Exit;
end;
120: for Result := 24 to 27 do
case Result of
24: if(l < 1) then if FindFastBlackChat('Talk') then Exit;
25: if(l < 1) then if FindFastBlackChat('Open') then Exit;
26: if (Pos('Your Quest', S) <> 0) then Exit;
27: if(l < 1) then if FindFastBlackChat('Mov') then Exit;
end;
140: for Result := 28 to 33 do
case Result of
28: if (Pos('Mining and', S) <> 0) then Exit;
29: if (Pos('Prospecting', S) <> 0) then Exit;
30: if (Pos('s tin', S) <> 0) then Exit;
31: if (Pos('s copper', S) <> 0) then Exit;
32: if (Pos('Mining', S) <> 0) then if (not FindFastBlackChat('need some c')) then Exit;
33: if (Pos('Mining', S) <> 0) then Exit;
end;
160: for Result := 34 to 37 do
case Result of
34: if (Pos('Smelting', S) <> 0) then Exit;
35: if (Pos('made a bronze', S) <> 0) then Exit;
36: if (Pos('Smithing', S) <> 0) then Exit;
37: if (Pos('finished', S) <> 0) then Exit;
end;
180: for Result := 38 to 44 do
case Result of
38: if (Pos('Combat', S) <> 0) and (not (Pos('terface', S) <> 0)) then Exit;
39: if (Pos('Wielding weapons', S) <> 0) then Exit;
40: if (Pos('your worn', S) <> 0) then Exit;
//41: if (Pos('Worn', S) <> 0) and (Pos('terface', S) <> 0) then Exit;
//42: if (Pos('holding your dagger', S) <> 0) then Exit;
43: if (Pos('Unequipping', S) <> 0) then Exit;
44: if (Pos('Combat', S) <> 0) and (Pos('terface', S) <> 0) then Exit;
end;
200: for Result := 45 to 47 do
case Result of
45: if (Pos('your combat', S) <> 0) and (Pos('terface', S) <> 0) then Exit;
46: if (Pos('Attacking', S) <> 0) then Exit;
47: if (Pos('your first kill', S) <> 0) then Exit;
end;
220: for Result := 48 to 49 do
case Result of
48: if (Pos('Rat ranging', S) <> 0) then Exit;
49: if (Pos('Moving on', S) <> 0) then Exit;
end;
260: for Result := 50 to 51 do
case Result of
50: if (Pos('Banking', S) <> 0) then Exit;
51: if (Pos('your bank box', S) <> 0) then Exit;
end;
280: for Result := 52 to 53 do
case Result of
52: if (Pos('Financial advice', S) <> 0) then Exit;
53: if (l < 1) then if FindFastBlackChat('Continue') then Exit;
end;
300: for Result := 54 to 59 do
case Result of
54: if (Pos('Prayer', S) <> 0) then if (not (Pos('menu', S) <> 0)) then Exit;
55: if (Pos('Prayer menu', S) <> 0) then Exit;
56: if (l < 1) then if FindFastBlackChat('Prayer menu') then Exit;
57: if (l < 1) then if FindFastBlackChat('Friends list') then Exit;
58: if (Pos('your friends list', S) <> 0) then Exit;
59: if (Pos('nore list', S) <> 0) then Exit;
end;
320: for Result := 60 to 60 do
case Result of
60: if (l < 1) then if FindFastBlackChat('final') then Exit;
end;
340: for Result := 61 to 62 do
case Result of
61: if (Pos('Your final', S) <> 0) then if (not (Pos('menu', S) <> 0)) then Exit;
62: if (Pos('Open up your final', S) <> 0) then Exit;
end;
400: for Result := 63 to 64 do
case Result of
63: if (Pos('Cast Wind Strike', S) <> 0) then Exit;
64: if (Pos('You have almost', S) <> 0) then Exit;
end;
end;
if (Pos('Worn', S) <> 0) and (Pos('terface', S) <> 0) then
Result := 41
else
if (Pos('holding your dagger', S) <> 0) then
Result := 42
else
if (Pos('your bank box', S) <> 0) then
Result := 51
else
Result := 0;
end;

procedure Design;
var
Clicks, i, c, c0, c6: Integer;
Points: TPointArray;
begin
if (not LoggedIn) then Exit;
SetLength(Points, 24);
if (Random(2) = 0) then
Mouse(450, 290, 15, 10, True);
for i := 0 to 23 do
if (i < 7) then
Points[i] := IntToPoint(50, 90 + (35 * i))
else
if (i < 14) then
Points[i] := IntToPoint(167, 90 + (35 * (i -7)))
else
if (i < 19) then
Points[i] := IntToPoint(350, 95 + (35 * (i -14)))
else
Points[i] := IntToPoint(466, 95 + (35 * (i -19)))
Clicks := RandomRange(24, 40);
for i := 0 to Clicks do
begin
c := Random(24);
if (c = 0) then
c0 := c0 +1
else
if (c = 6) then
c6 := c6 +1;
Mouse(Points[c].x, Points[c].y, 10, 5, True);
Wait(Random(400));
end;
if ((c0 -c6) = 0) then
begin
if (Random(2) = 0) then
Mouse(Points[0].x, Points[0].y, 10, 5, True)
else
Mouse(Points[6].x, Points[6].y, 10, 5, True);
Wait(Random(400));
end;

Mouse(260, 285, 15, 15, True);
repeat
Wait(10);
until (GetColor(233, 284) <> 0) or (not LoggedIn);
if (not LoggedIn) then
DeActivate('got stuck on RS Guide - Design', 'Design');
end;

procedure RSGuide(SP: Integer);
var
a: Integer;
begin
if (SP = 0) then SP := 1;
for a := SP to 5 do
begin
if (not LoggedIn) then Exit;
case a of
1: Design;
2: begin
if not TalkToNpcByArrow('RuneScape Guide', 397450, 10) then
DeActivate('got stuck on RS Guide - Finding Tutor', 'Finding RS Guide');
HandleTalk;
end;
3: OpenTab(11);
4: begin
if not TalkToNpcByArrow('RuneScape Guide', 397450, 10) then
DeActivate('got stuck on RS Guide - Finding Tutor', 'Finding RS Guide');
HandleTalk;
end;
5: if not UseArrowObjTillText('Door', 'Open', 'oving', 800847, 5, 3) then
DeActivate('got stuck on RS Guide - Finding Door', 'Finding Door');
end;
end;
end;

procedure Chop(HM: Integer);
var
x, y, i, t, Time, HowMany: Integer;
begin
if (not LoggedIn) then Exit;
WalkToMMArrow(False);
GameTAb(4);
t := GetSystemTime;
Time := 120000;
HowMany := HM;
Wait(1500 +Random(2000));
repeat
if UseTPAObjTillText(['Tree', 'Chop Down Tree', 'own Tr'], 'Chop', 'Click', [1853502, 1663578, 3829093], 10,70, 70, 5, False) then
i := i + 1;
HandleTalk;
until ((GetSystemTime - t) > Time) or (i >= HowMany) or (not LoggedIn)
if (i < HM) and (not FindColorTolerance(x, y, 6721970, MIX1, MIY1, MIX2, MIY2, 10)) then
DeActivate('got stuck on Survival Expert - Chopping logs', 'WoodCutting');
HandleTalk;
end;

procedure MakeFire;
var
x, y, i, c, t, Time, HowMany: Integer;
TB, Log: TBox;
GoOn: Boolean;
begin
TB := InvBox(2);
HowMany := 1;
GameTab(4);
for i := 1 to HowMany do
begin
if (not LoggedIn) then Exit;
GoOn := True;
t := GetSystemTime;
Time := 30000;
while FindColorTolerance(x, y, 12862, 245, 160, 255, 170, 10) and ((GetSystemTime - t) < Time) and (GoOn) do
MouseFlag(RandomRange(MMCX -5, MMCX +5), RandomRange(MMCY -5, MMCY +5), 2, 2);
Time := 45000;
c := 2;
while not FindColor(x, y, 16777215, TB.x1, TB.y1, TB.x2, TB.y2) and ((GetSystemTime - t) < Time) and (GoOn) do
begin
c := c +1;
if ((c mod 3) = 0) then
Mouse((TB.x1 + TB.x2) /2, (TB.y1 + TB.y2) /2, 2, 2, True);
Wait(700 +Random(1200));
end;
if not FindItemColorName(Log, 'og', 6721970, 10, False) then
begin
Chop(1);
if not FindItemColorName(Log, 'og', 6721970, 10, False) then GoOn := False;
end;
Time := 60000;
c := 2;
while FindColor(x, y, 65536, Log.x1, Log.y1, Log.x2, Log.y2) and ((GetSystemTime - t) < Time) and (GoOn) do
begin
c := c +1;
if ((c mod 3) = 0) then
Mouse((Log.x1 + Log.x2) /2, (Log.y1 + Log.y2) /2, 2, 2, True);
Wait(700 +Random(1200));
if FindColor(x, y, 8388608, 180, 420, 330, 450) then
if (GetColor(x +6, y +3) = 8388608) then
if (GetColor(x +74, y +3) = 8388608) then
if (GetColor(79, 400) <> 0) then
begin
MouseFlag(RandomRange(MMCX -5, MMCX +5), RandomRange(MMCY -5, MMCY +5), 2, 2);
HowMany := HowMany +1;
GoOn := False;
t := GetSystemTime;
Break;
end;
end;
Time := 120000;
Wait(500);
while (Pos('ease w', LowerCase(GetBlueNPCText)) <> 0) and ((GetSystemTime - t) < Time) and (GoOn) do
begin
Wait(800 +Random(200));
if FindColor(x, y, 8388608, 180, 420, 330, 450) then
if (GetColor(x +6, y +3) = 8388608) then
if (GetColor(x +74, y +3) = 8388608) then
if (GetColor(79, 400) <> 0) then
begin
MouseFlag(RandomRange(MMCX -5, MMCX +5), RandomRange(MMCY -5, MMCY +5), 2, 2);
HowMany := HowMany +1;
GoOn := False;
t := GetSystemTime;
Break;
end else HandleTalk;
end;
HandleTalk;
if ((GetSystemTime - t) > Time) then Break;
end;
if ((GetSystemTime - t) > Time) then
DeActivate('got stuck on Survival Expert - Making Fire', 'FireMaking');
end;

procedure Fish(HM: Integer);
var
x, y, i, c, t, Time, HowMany: Integer;
begin
if (not LoggedIn) then Exit;
WalkToMMArrow(False);
GameTab(4);
ColorToleranceSpeed(2);
t := GetSystemTime;
Time := 120000;
HowMany := HM;
c := 0;
repeat
c := c +1;
if ((c mod HowMany +1) = 0) then WalkToMMArrow(True);
if UseTPAObjTillText(['Net Fishing spot', 'Net', 'ishing', 'ing spot'], 'Net', 'ooking', [15181944], 30, 10, 10, 5, False) then
i := i + 1;
HandleTalk;
until ((GetSystemTime - t) > Time) or (i >= HowMany) or (not LoggedIn)
if (i < HM) and (not FindColorTolerance(x, y, 6652339, MIX1, MIY1, MIX2, MIY2, 15)) then
DeActivate('got stuck on Survival Expert - Fishing', 'Fishing');
HandleTalk;
ColorToleranceSpeed(1);
end;

procedure CookShrimp;
var
x, y, fx, fy, i, c, t, Time, HowMany: Integer;
p: TBox;
begin
HowMany := 3;
GameTab(4);
for i := 1 to HowMany do
begin
if (not LoggedIn) then Exit;
t := GetSystemTime;
Time := 30000;
if FindItemColorName(p, 'rimp', 9214127, 10, False) then
begin
if not FindFire(fx, fy) then
begin
MakeFire;
Wait(1500 +Random(1500));
if not FindFire(fx, fy) then
if not (Pos('ell don', GetBlueNPCText) <> 0) then
DeActivate('got stuck on Survival Expert - Cooking', 'Cooking Shrimp');
end;
c := 2;
Time := 15000;
while not FindColor(x, y, 16777215, p.x1, p.y1, p.x2, p.y2) and ((GetSystemTime - t) < Time) do
begin
c := c +1;
if ((c mod 3) = 0) then
Mouse((p.x1 + p.x2) /2, (p.y1 + p.y2) /2, 2, 2, True);
Wait(700 +Random(1200));
end;
Mouse(fx, fy, 0, 0, False);
c := 0;
Time := 45000;
FirstEmptySlot(p);
if ChooseOption('Fire') then
begin
while ((GetSystemTime - t) < Time) do
begin
if (c > 0) and FlagPresent then
Break
else
FFlag(0);
c := c +1;
Wait(400 +Random(400));
if (not FindColorTolerance(x, y, 10858436, p.x1, p.y1, p.x2, p.y2, 10)) then Break;
end;
end else HowMany := HowMany +1;
if ((GetSystemTime - t) >= Time) then HowMany := HowMany +1;
HandleTalk;
end else
begin
if ((GetSystemTime - t) >= Time) then Break;
Fish(1);
end;
if (Pos('ell don', GetBlueNPCText) <> 0) and (HowMany = 3) then Break;
end;
end;

procedure SurvivalExpert(SP: Integer);
var
a: Integer;
begin
if (SP = 0) then SP := 6;
for a := SP to 14 do
begin
if (not LoggedIn) then Exit;
case a of
6: begin
SetBar('Brightness', 4);
WalkToMMArrow(True);
if not TalkToNpcByArrow('Survival Expert', 3619168, 10) then
DeActivate('got stuck on Survival Expert - Finding Tutor', 'Finding Survival Expert');
HandleTalk;
end;
7: OpenTab(4);
8: begin
WalkToMMArrow(False);
Chop(2);
end;
9: MakeFire;
10: begin
OpenTab(2);
Wait(500 +Random(2000));
end;
11: begin
if not TalkToNpcByArrow('Survival Expert', 3619168, 10) then
DeActivate('got stuck on Survival Expert - Finding Tutor', 'Finding Survival Expert');
HandleTalk;
end;
12: begin
WalkToMMArrow(False);
Fish(3);
end;
13: CookShrimp;
14: begin
DropItemsNoNames(['axe', 'inder', 'net', 'ronze', 'hield', 'ow', 'rune']);
WalkToMMArrow(True);
Wait(1000 +Random(1000));
if not UseArrowObjTillText('Gate', 'Open', 'ind', 9269, 5, 5) then
DeActivate('got stuck on Survival Expert - Finding Gate', 'Finding Gate');
end;
end;
end;
end;

function MakeDough: Boolean;
var
c, inv, x, y, t, Time: Integer;
a, b: TBox;
begin
if (not LoggedIn) then Exit;
t := GetSystemTime;
GameTab(4);
ColorToleranceSpeed(2);
if FindItemColorName(a, 'ucket', 10124155, 11, False) then
if FindItemColorName(b, 'ot of', 16185079, 11, False) then
begin
inv := InvCount;
Time := 10000;
c := 2;
while not FindColor(x, y, 16777215, b.x1, b.y1, b.x2, b.y2) and ((GetSystemTime - t) < Time) do
begin
c := c +1;
if ((c mod 3) = 0) then
Mouse((b.x1 + b.x2) /2, (b.y1 + b.y2) /2, 2, 2, True);
Wait(700 +Random(1200));
end;
Time := 20000;
c := 2;
while FindColorTolerance(x, y, 10124155, a.x1, a.y1, a.x2, a.y2, 5) and ((GetSystemTime - t) < Time) do
begin
c := c +1;
if ((c mod 3) = 0) then
Mouse((a.x1 + a.x2) /2, (a.y1 + a.y2) /2, 2, 2, True);
Wait(700 +Random(1200));
end;
Time := 40000;
repeat
Wait(700 +Random(1200));
HandleTalk;
until ((GetSystemTime - t) > Time) or (FindColorTolerance(x, y, 10666691, MIX1, MIY1, MIX2, MIY2, 8)) or (InvCount > inv) or (not LoggedIn);
end else
begin
ColorToleranceSpeed(1);
Exit;
end;
ColorToleranceSpeed(1);
if not FindItemColorName(b, 'ough', 10666691, 5, False) then
DeActivate('got stuck on Master Chef - Making Dough', 'Making Dough')
else
Result := True;
end;

procedure CookBread;
var
x, y, i, c, t, Time, HowMany: Integer;
a: TBox;
begin
HowMany := 1;
for i := 1 to HowMany do
begin
if (not LoggedIn) then Exit;
FirstEmptySlot(a);
t := GetSystemTime;
MakeDough;
if FindItemColorName(a, 'ough', 10666691, 5, False) then
begin
if (i = 1) then
WalkToMMArrow(True);
t := GetSystemTime;
Time := 15000;
c := 2;
while not FindColor(x, y, 16777215, a.x1, a.y1, a.x2, a.y2) and ((GetSystemTime - t) < Time) do
begin
c := c +1;
if ((c mod 3) = 0) then
Mouse((a.x1 + a.x2) /2, (a.y1 + a.y2) /2, 2, 2, True);
Wait(700 +Random(1200));
end;
MakeCompass('E');
t := GetSystemTime;
Time := 40000;
if MyFindObjTPA(x, y, [923761], 10, 20, 40, ['Range', 'ange'], False) then
begin
Mouse(x, y, 0, 0, False);
Wait(50 +Random(200));
if ChooseOption('Use') then
while ((GetSystemTime - t) < Time) do
begin
Wait(800 +Random(700));
if FindColorTolerance(x, y, 1715933, a.x1, a.y1, a.x2, a.y2, 10) then
begin
HowMany := HowMany +1;
Break;
end;
if FindColorTolerance(x, y, 1146008, a.x1, a.y1, a.x2, a.y2, 10) then Break;
end;
if ((GetSystemTime - t) > Time) then
DeActivate('got stuck on Master Chef - Cooking', 'Cooking Bread');
end;
HandleTalk;
end else
if UseTPAObjTillText(['aster', 'Master Chef', 'hef'], 'alk', 'lick', [7448433, 7757405], 10, 50, 50, 3, False) then
begin
HandleTalk;
HowMany := HowMany +1;
end else
if not FindItemColorName(a, 'read', 1146008, 5, False) then
DeActivate('got stuck on Master Chef - Cooking', 'Cooking Bread');
end;
if not FindItemColorName(a, 'read', 1146008, 5, False) then
DeActivate('got stuck on Master Chef - Cooking', 'Cooking Bread');
MakeCompass('N');
end;

procedure MasterChef(SP: Integer);
var
a, i, x, y: Integer;
begin
if (SP = 0) then SP := 15;
for a := SP to 22 do
begin
if (not LoggedIn) then Exit;
case a of
15: begin
WalkToMMArrow(True);
while (FindColor(x, y, 0, 115, 445, 400, 450)) and (i <= 5) do
begin
UseArrowObjTillText('Door', 'Open', 'ind', 1725292, 10, 3);
Wait(500 +Random(1000));
i := i +1;
end
if (FindColor(x, y, 0, 115, 445, 400, 450)) then
DeActivate('got stuck on Master Chef - Finding Door', 'Finding Door');
end;
16: begin
if not TalkToNpcByArrow('Master Chef', 15856115, 10) then
DeActivate('got stuck on Survival Expert - Finding Tutor', 'Finding Master Chef');
HandleTalk;
end;
17: CookBread;
18: begin
DropItemsNoNames(['axe', 'inder', 'net', 'ronze', 'hield', 'ow', 'rune']);
OpenTab(13);
end;
19: begin
WalkToMMArrow(True);
if not UseArrowObjTillText('Door', 'Open', 'motes', 2056574, 10, 3) then
DeActivate('got stuck on Survival Expert - Finding Door', 'Finding Door');
end;
20: OpenTab(12);
21: begin
Wait(1500 +Random(1000));
DoEmote(Random(5));
Wait(500 +Random(500));
DoEmote(Random(5) +5);
end;
22: begin
OpenTab(11);
SetRun(True);
end;
end;
end;
end;

procedure QuestGuide(SP: Integer);
var
a: Integer;
begin
if (SP = 0) then SP := 23;
for a := SP to 27 do
begin
if (not LoggedIn) then Exit;
case a of
23: begin
MFNF(645, 25, 1, 1);
Flag;
MFNF(680, 40, 1, 1);
Flag;
MFNF(646, 35, 1, 1);
Flag;
WalkToMMArrow(True);
if not UseArrowObjTillText('Door', 'Open', '', 1591647, 10, 3) then
DeActivate('got stuck on Guest Guide - Finding Door', 'Finding Door');
end;
24: begin
if not TalkToNpcByArrow('uest', 3957796, 10) then
DeActivate('got stuck on Guest Guide - Finding Tutor', 'Finding Tutor');
HandleTalk;
end;
25: OpenTab(3);
26: begin
if not TalkToNpcByArrow('uest', 3957796, 10) then
DeActivate('got stuck on Guest Guide - Finding Tutor', 'Finding Tutor');
HandleTalk;
end;
27: begin
WalkToMMArrow(True);
if not UseArrowObjTillText('Ladder', 'limb', 'Mining', 0, 20, 3) then
DeActivate('got stuck on Guest Guide - Finding Ladder', 'Finding Ladder');
end;
end;
end;
end;

procedure Smelt;
var
c, inv, x, y, t, Time: Integer;
a: TBox;
begin
if (not LoggedIn) then Exit;
GameTab(4);
t := GetSystemTime;
ColorToleranceSpeed(2);
if FindColorTolerance(x, y, 8092805, MIX1, MIY1, MIX2, MIY2, 5) and FindItemColorName(a, 'ore', 3505111, 5, False) then
begin
inv := InvCount;
Time := 10000;
c := 2;
while not FindColor(x, y, 16777215, a.x1, a.y1, a.x2, a.y2) and ((GetSystemTime - t) < Time) do
begin
c := c +1;
if ((c mod 3) = 0) then
Mouse((a.x1 + a.x2) /2, (a.y1 + a.y2) /2, 2, 2, True);
Wait(700 +Random(1200));
end;
Time := 40000;
if FindObjByArrow(x, y, 'urnac', 'urnace', 2763308, 10, True) then
repeat
Wait(700 +Random(1200));
until (Inv > InvCount) or ((GetSystemTime - t) > Time);
HandleTalk;
end;
ColorToleranceSpeed(1);
HandleTalk;
if not (Pos('made', GetBlueNPCText) <> 0) then
DeActivate('got stuck on Mining Instructor - Smelting', 'Smelting');
end;

procedure Smith;
var
c, x, y, t, Time: Integer;
a: TBox;
begin
if (not LoggedIn) then Exit;
GameTab(4);
t := GetSystemTime;
ColorToleranceSpeed(0);
if FindItemColorName(a, 'bar', 924451, 5, True) then
begin
Time := 10000;
c := 2;
while not FindColor(x, y, 16777215, a.x1, a.y1, a.x2, a.y2) and ((GetSystemTime - t) < Time) do
begin
c := c +1;
if ((c mod 3) = 0) then
Mouse((a.x1 + a.x2) /2, (a.y1 + a.y2) /2, 2, 2, True);
Wait(700 +Random(1200));
end;
Time := 40000;
if FindObjByArrow(x, y, 'nvil', 'nvil', 3618620, 10, True) then
repeat
Wait(700 +Random(1200));
until FindColor(x, y, 3358280, 160, 20, 360, 30) or ((GetSystemTime - t) > Time);
if FindColor(x, y, 3358280, 160, 20, 360, 30) then
if FindColorTolerance(x, y, 16777215, 10, 40, 510, 300, 2) then
begin
Mouse(x +15, y -15, 2, 2, True);
repeat
Wait(700 +Random(1200));
until not FindColor(x, y, 8388608, 160, 20, 360, 30) or ((GetSystemTime - t) > Time) or (not LoggedIn);
Wait(1000 +Random(1000));
HandleTalk;
end;
end;
ColorToleranceSpeed(1);
HandleTalk;
if not (Pos('finished', GetBlueNPCText) <> 0) then
DeActivate('got stuck on Mining Instructor - Smithing', 'Smithing');
end;

procedure MiningInstructor(SP: Integer);
var
a, x, y, i, HowMany, t, Time: Integer;
begin
if (SP = 0) then SP := 28;
for a := SP to 37 do
begin
if (not LoggedIn) then Exit;
case a of
28: begin
MFNF(625, 140, 1, -1);
Flag;
//WalkToMMArrow(False);
if not TalkToNpcByArrow('ining', 8535166, 10) then
DeActivate('got stuck on Mining Instructor - Finding Tutor', 'Finding Mining Instructor');
HandleTalk;
end;
29: begin
WalkToMMArrow(False);
UseTPAObjTillText(['Mine', 'Rocks'], 'rospe', 'lick', [8553101, 7631997], 15, 40, 40, 5, False);
HandleTalk;
if not (Pos('tin', GetBlueNPCText) <> 0) then
begin
WalkToMMArrow(False);
UseTPAObjTillText(['Mine', 'Rocks'], 'rospe', 'lick', [8553101, 7631997], 15, 40, 40, 5, False);
HandleTalk;
if not (Pos('tin', GetBlueNPCText) <> 0) then
DeActivate('got stuck on Mining Instructor - Prospecting', 'Prospecting');
end;
end;
30: begin
WalkToMMArrow(True);
if (not LoggedIn) then Exit;
UseTPAObjTillText(['Mine', 'Rocks'], 'rospe', 'lick', [4348020, 3689828], 15, 40, 40, 5, False);
HandleTalk;
if not (Pos('coppe', GetBlueNPCText) <> 0) then
begin
WalkToMMArrow(False);
UseTPAObjTillText(['Mine', 'Rocks'], 'rospe', 'lick', [4348020, 3689828], 15, 40, 40, 5, False);
HandleTalk;
if not (Pos('tin', GetBlueNPCText) <> 0) then
DeActivate('got stuck on Mining Instructor - Prospecting', 'Prospecting');
end;
end;
31: begin
WalkToMMArrow(False);
if not TalkToNpcByArrow('ining', 8535166, 10) then
DeActivate('got stuck on Mining Instructor - Finding Tutor', 'Finding Mining Instructor');
HandleTalk;
end;
32: begin
WalkToMMArrow(False);
HowMany := 2;
t := GetSystemTime;
Time := 30000;
for i := 1 to HowMany do
begin
if not UseTPAObjTillText(['Mine', 'Rocks'], 'ine', 'lick', [8553101, 7631997], 15, 40, 40, 5, False) then
begin
if FindSymbol(x, y, 'anvil') then
MouseFlag(x -10, y -20, 1, 1);
HowMany := HowMany +1;
end;
if ((GetSystemTime - t) > Time) or (not LoggedIn) then Break;
HandleTalk;
end;
HandleTalk;
if (not (Pos('Mining', GetBlueNPCText)) <> 0) and (not (FindFastBlackChat('need some c'))) then
DeActivate('got stuck on Mining Instructor - Mining', 'Mining tin');
end;
33: begin
WalkToMMArrow(True);
HowMany := 2;
t := GetSystemTime;
for i := 1 to HowMany do
begin
if not UseTPAObjTillText(['Mine', 'Rocks'], 'ine', 'lick', [4348020, 3689828], 15, 40, 40, 5, False) then
begin
if FindSymbol(x, y, 'anvil') then
MouseFlag(x +35, y -10, 1, 1);
HowMany := HowMany +1;
end;
if ((GetSystemTime - t) > Time) or (not LoggedIn) then Break;
HandleTalk;
end;
HandleTalk;
Wait(500 +Random(500));
if (BarPos < 160) then
DeActivate('got stuck on Mining Instructor - Mining', 'Mining tin');
end;
34: begin
WalkToMMArrow(True);
Smelt;
end;
35: begin
WalkToMMArrow(False);
if not TalkToNpcByArrow('ining', 8535166, 10) then
DeActivate('got stuck on Mining Instructor - Finding Tutor', 'Finding Mining Instructor');
HandleTalk;
end;
36: begin
WalkToMMArrow(False);
Smith;
end;
37: begin
DropItemsNoNames(['axe', 'inder', 'net', 'ronze', 'hield', 'ow', 'rune']);
WalkToMMArrow(True);
if not UseArrowObjTillText('Gate', 'Open', 'ombat', 9276824, 10, 5) then
DeActivate('got stuck on Mining Instructor - Finding Gate', 'Finding Gate');
end;
end;
end;
end;

procedure Fight;
var
x, y, i, HowMany, t, Time: Integer;
begin
if (not LoggedIn) then Exit;
WalkToMMArrow(False);
HowMany := 1;
t := GetSystemTime;
Time := 20000;
for i := 1 to HowMany do
if FindMoster(x, y, [8950419], ['Att', 'ack', 'rat'], True) then
begin
t := GetSystemTime;
Mouse(x, y, 0, 0, False);
Wait(50 +Random(200));
if ChooseOption('ttack') then
begin
Time := 13000;
repeat
if FlagPresent then FFlag(0);
Wait(700 +Random(700));
until (FindColor(x, y, 65280, 217, 129, 297, 209)) or ((GetSystemTime - t) > Time) or (not LoggedIn);
Time := 60000;
while (FindColor(x, y, 65280, 217, 129, 297, 209)) and ((GetSystemTime - t) < Time) and (LoggedIn) do
Wait(500);
HandleTalk;
if not (Pos('Well', GetBlueNPCText) <> 0) then HowMany := HowMany +1;
end;
end else
begin
if ((GetSystemTime - t) > Time) then Break;
HowMany := HowMany +1;
end;
HandleTalk;
if not (Pos('Well', GetBlueNPCText) <> 0) then
DeActivate('got stuck on Combat Instructor - Prospecting', 'Fighting Rats');
end;

procedure PassGate;
var
x, y, tx, ty, d, c, i, t, Time: Integer;
Doors: Array of DoorProfile;
b: Boolean;
begin
if (not LoggedIn) then Exit;
MouseFlag(640, 140, 2, 2);
Wait(1000 +Random(2000));
Doors := GetDoors;
t := GetSystemTime;
Time := 15000;
while ((GetSystemTime - t) < Time) and (Length(Doors) < 2) do
begin
Wait(1000 +Random(500));
Doors := GetDoors;
end;
if (Length(Doors) > 0) then
begin
b := True;
d := GetColor(Doors[0].MidPoint.x, Doors[0].MidPoint.y);
for i := 0 to Length(Doors) -1 do
if Doors[i].MidPoint.y < Doors[c].MidPoint.y then c := i;
MFNF(Doors[c].MidPoint.x, Doors[c].MidPoint.y, -1, 1);
Flag;
Wait(1000 +Random(2000));
c := 0;
Doors := GetDoors;
for i := 0 to Length(Doors) -1 do
if Doors[i].MidPoint.y < Doors[c].MidPoint.y then c := i;
tx := Doors[c].MidPoint.x; ty := Doors[c].MidPoint.y;
end else
begin
x := MMX2; y := 0;
if (d > 0) then
b := FindColorSpiral(x, y, d, MMX1, MMY1, MMX2, MMY2)
else
if FindColorSpiralTolerance(x, y, 255, MMX1, MMY1, MMX2, MMY2, 5) then
begin
b := True;
d := GetColor(x, y);
end;
if b then
begin
MFNF(x, y, -1, 1);
Flag;
Wait(700 +Random(3000));
x := MMCX; y := MMCY;
b := FindColorSpiral(tx, ty, d, MMX1, MMY1, MMX2, MMY2);
end else
DeActivate('got stuck on Combat Instructor - Leaving Rat Cave', 'Leaving Rat Cave');
end;
SetLength(Doors, 0);
for i := 0 to 2 do
if MyFindObjTPA(x, y, [8684686], 10, 10, 20, ['pen G', 'ate', 'Ope'], False) then
begin
Mouse(x, y, 0, 0, False);
Wait(100 +Random(100));
t := GetSystemTime;
Time := 10000;
c := 0;
if ChooseOption('pen') then
begin
while ((GetSystemTime - t) < Time) do
begin
if FlagPresent then c := c +1;
Wait(500);
end;
if b then
begin
if (GetColor(tx, ty) <> d) and (c < 25) then Exit;
end else
if MyFindObjTPA(x, y, [8684686], 10, 10, 100, ['pen G', 'ate', 'Ope'], False) then
if (x < (MSCX -5)) and (c < 25) then Exit;
end;
Wait(1500 +Random(1000));
end;
DeActivate('got stuck on Combat Instructor - Leaving Rat Cave', 'Leaving Rat Cave');
end;

procedure Range;
var
x, y, a, i, c, t, Time, HowMany: Integer;
Doors: Array of DoorProfile;
begin
if (not LoggedIn) then Exit;
HowMany := 1;
GameTab(5);
Doors := GetDoors;
t := GetSystemTime;
Time := 15000;
while ((GetSystemTime - t) < Time) and (Length(Doors) < 2) do
begin
Wait(1000 +Random(500));
Doors := GetDoors;
end;
if (Length(Doors) > 0) then
begin
for i := 0 to Length(Doors) -1 do
if Doors[i].MidPoint.y < Doors[c].MidPoint.y then c := i;
MFNF(Doors[c].MidPoint.x -25, Doors[c].MidPoint.y -10, 1, 1);
Flag;
end;
SetLength(Doors, 0);
t := GetSystemTime;
Time := 30000;
for i := 1 to HowMany do
if FindMoster(x, y, [8950419], ['Att', 'ack', 'rat'], True) then
begin
Mouse(x, y, 0, 0, True);
a := GetAmount(668, 249);
t := GetSystemTime;
Time := 5000;
while ((GetSystemTime - t) < Time) and (a = GetAmount(668, 249)) do
Wait(1000 +Random(500));
if a <> GetAmount(668, 249) then
begin
Time := 13000;
while ((GetSystemTime - t) < Time) and (not FindFastMSArrow(x, y)) do
Wait(500);
Time := 65000;
c := 0;
while ((GetSystemTime - t) < Time) and FindMSArrow(x, y) do
begin
HandleTalk;
if a <> GetAmount(668, 249) then
a := GetAmount(668, 249)
else
c := c +1;
if (c > 9) then
begin
MouseFlag(RandomRange(MMCX, MMCX +5), RandomRange(MMCY -7, MMCY +7), 2, 2);
HowMany := HowMany +1;
Break;
end;
Wait(1200 +Random(400));
end;
end else
begin
MouseFlag(RandomRange(MMCX -5, MMCX +5), RandomRange(MMCY -5, MMCY +5), 2, 2);
Wait(2000 +Random(1000));
HowMany := HowMany +1;
end;
end else
if ((GetSystemTime - t) > Time) then
begin
if not (Pos('oving', GetBlueNPCText) <> 0) then
DeActivate('got stuck on Combat Instructor - Ranging', 'Ranging Rats')
else
Break;
end else
HowMany := HowMany +1;

HandleTalk;
if not (Pos('oving', GetBlueNPCText) <> 0) then
DeActivate('got stuck on Combat Instructor - Ranging', 'Ranging Rats');
end;

procedure CombatInstructor(SP: Integer);
var
b, x, y, c, dtm: Integer;
P: TPointArray;
a: TBox;
begin
if (SP = 0) then SP := 38;
for b := SP to 49 do
begin
if (not LoggedIn) then Exit;
case b of
38: begin
WalkToMMArrow(False);
if not TalkToNpcByArrow('ombat', 8535166, 10) then
DeActivate('got stuck on Combat Instructor - Finding Tutor', 'Finding Combat Instructor');
HandleTalk;
end;
39: begin
OpenTab(5);
Wait(500 +Random(2000));
end;
40: begin
Mouse(604, 432, 15, 15, True);
while (not FindColor(x, y, 2070783, 30, 35, 275, 45)) and (c < 10) do
Wait(500 +Random(500));
if (not FindColor(x, y, 2070783, 30, 35, 275, 45)) then
DeActivate('got stuck on Combat Instructor - Equiping', 'EquipScreen');
end;
41: begin
ColorToleranceSpeed(0);
Wait(300 +Random(200));
if FindItemColorName(a, 'agger', 1893349, 5, True) then
Mouse((a.x1 + a.x2) /2, (a.y1 + a.y2) /2, 2, 2, True)
else
begin
Mouse(486, 41, 3, 3, True);
Wait(2000);
DeActivate('got stuck on Combat Instructor - Wielding', 'Wielding Dagger');
end;
ColorToleranceSpeed(1);
end;
42: begin
Wait(500 +Random(1500));
c := 2;
while (GetColor(486, 41) = 65536) and (LoggedIn) do
begin
c := c +1;
if ((c mod 3) = 0) then
Mouse(485, 41, 4, 4, True);
Wait(700 +Random(1200));
end;
if not LoggedIn then
DeActivate('got stuck on Combat Instructor - Wielding', 'Closing WieldScreen');

if not TalkToNpcByArrow('ombat', 8535166, 10) then
DeActivate('got stuck on Combat Instructor - Finding Tutor', 'Finding Combat Instructor');
HandleTalk;
end;
43: begin
TakeOff(5);
OpenTab(4);
dtm := DTMFromString('78DA63B4636260A861644006EBD6883048026' +
'990E87F206004A9A940550391859140DA13A82687801A2BA09A66' +
'FC6A0074AB087D');
if FindDTM(dtm, x, y, MIX1, MIY1, MIX2, MIY2) then
Mouse(x, y, 2, 2, True);
FreeDtm(Dtm);
dtm := DTMFromString('78DA63B463626098C1C8800C629CE51924813' +
'448F43F10303A02D574A3AA81C8C24820ED0054B398801A3FA09A' +
'D9F8D5000049620859');
if FindDTM(dtm, x, y, MIX1, MIY1, MIX2, MIY2) then
Mouse(x, y, 2, 2, True);
FreeDtm(Dtm);
Wait(1000 +Random(2000));
if not (Pos('Combat', GetBlueNPCText) <> 0) then
DeActivate('got stuck on Combat Instructor - Wielding', 'Wielding Sword + Shield');
end;
44: OpenTab(1);
//if not TalkToNpcByArrow('ombat', 8535166, 10) then
//DeActivate('got stuck on Combat Instructor - Finding Tutor', 'Finding Combat Instructor');
45: begin
HandleTalk;
WalkToMMArrow(True);
if not UseArrowObjTillText('ate', 'Open', 'Attacking', 8684686, 10, 5) then
DeActivate('got stuck on Combat Instructor - Finding Gate', 'Finding Gate');
end;
46: Fight;
47: begin
PassGate;
WalkToMMArrow(True);
if not TalkToNpcByArrow('ombat', 8535166, 10) then
DeActivate('got stuck on Combat Instructor - Finding Tutor', 'Finding Combat Instructor');
HandleTalk;
end;
48: begin
GameTab(4);
Wait(300 +Random(400));
ColorToleranceSpeed(2);
if LoggedIn then
if FindItemColorName(a, 'Shortbow', 940161, 8, True) and FindColor(x, y, 65535, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse((a.x1 + a.x2) /2, (a.y1 + a.y2) /2, 2, 2, True);
Mouse(x +8, y +15, 2, 2, True);
end else
DeActivate('got stuck on Combat Instructor - Wielding', 'Wielding Arrows + Bow');
ColorToleranceSpeed(1);
Wait(300 +Random(500));
Range;
end;
49: begin
p := FindLadders;
if (Length(p) < 1) then
DeActivate('got stuck on Combat Instructor - Finding Ladder', 'Finding Ladder');
MouseFlag(p[0].x, p[0].y, 2, 2);
SetLength(p, 0);
if not UseTPAObjTillText(['limb', 'mb-up', 'p La', 'Ladder'], 'limb', 'ankin', [9270, 10049, 1322043, 604236], 15, 30, 90, 5, False) then
DeActivate('got stuck on Combat Instructor - Finding Ladder', 'Finding Ladder');
end;
end;
end;
end;

function OpenTheBank(Location: String): Boolean;
var
x, y, i, l, c: Integer;
Info: TIntegerArray;
Booths, t: TPointArray;
begin
if (not LoggedIn) then Exit;
case LowerCase(Location) of
'akb', 'al kharid': Info := [130, 180, 606291, 4];
'lb', 'lumbridge': Info := [270, 100, 6196388, 9];
'veb', 'varrock east': Info := [200, 290, 2971236, 10];
'vwb', 'varrock west': Info := [270, 270, 5689318, 25];
'feb', 'falador east': Info := [220, 260, 4612728, 14];
'fwb', 'falador west': Info := [300, 300, 4612728, 14];
'db', 'draynor': Info := [175, 145, 605006, 4];
'tut': Info := [267, 133, 540757, 10];
else
begin
WriteLn('Unknown bank: '+Location);
Exit;
end;
end;

MakeCompass('n');
FindColorsSpiralTolerance(Info[0], Info[1], Booths, Info[2], MSX1, MSY1, MSX2, MSY2, Info[3])
SetArrayLength(t, 0);
t := Booths;
SetArrayLength(Booths, 0);
Booths := ReArrangeAndShortenArray(t, 14);
l := GetArrayLength(Booths) -1;
for i := 0 to l do
begin
Wait(100);
if (LowerCase(Location) = 'vwb') or (LowerCase(Location) = 'varrock west') then
begin
Booths[i].X := Booths[i].X + 5;
Booths[i].Y := Booths[i].Y - 20;
end;
MMouse(Booths[i].X, Booths[i].Y, 0, 0);
Wait(50);
if IsUpTextMultiCustom(['ooth']) Then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
Wait(100);
if ChooseOption('Use') then
begin
FFLag(0);
MarkTime(c);
repeat
Wait(100);
until (AreTalking) or (TimeFromMark(c) > 3000);
Result := AreTalking;
if Result then Exit;
end;
end;
end;
end;

procedure FinancialAdvisor(SP: Integer);
var
a, i: Integer;
begin
if (SP = 0) then SP := 50;
for a := SP to 53 do
begin
if (not LoggedIn) then Exit;
case a of
50: begin
WalkToMMArrow(True);
if not OpenTheBank('tut') then
DeActivate('got stuck on Financial Advisor - Opening Bank', 'Opening Bank');
HandleTalk;
ClickNpcChatText('es', True);
repeat
Wait(500 +Random(500));
i := i +1;
until BankScreen or (i > 15);
if not BankScreen then
DeActivate('got stuck on Financial Advisor - Opening Bank', 'Opening Bank');
end;
51: begin
CloseBank;
WalkToMMArrow(False);
if not UseArrowObjTillText('Door', 'Open', 'inancia', 1525855, 10, 5) then
DeActivate('got stuck on Financial Advisor - Finding Door', 'Finding Door');
end;
52: begin
if not TalkToNpcByArrow('inancial', 16119286, 10) then
DeActivate('got stuck on Financial Advisor - Finding Tutor', 'Finding Financial Advisor');
HandleTalk;
end;
53: begin
WalkToMMArrow(False);
if not UseArrowObjTillText('Door', 'Open', 'raye', 1725807, 10, 5) then
DeActivate('got stuck on Financial Advisor - Finding Door', 'Finding Door');
end;
end;
end;
end;

procedure BrotherBrace(SP: Integer);
var
a, i, x, y: Integer;
begin
if (SP = 0) then SP := 54;
for a := SP to 60 do
begin
if (not LoggedIn) then Exit;
case a of
54: begin
MFNF(640, 130, -1, -1);
FFlag(0);
ColorToleranceSpeed(0);
while (not AreTalking) and (i < 10) and (LoggedIn) do
begin
i := i +1;
WalkToMMArrow(True);
Wait(1000 +Random(2000));
if CountColorTolerance(7105908, 641, 81, 645, 85, 45) > 16 then
begin
if TalkToNpcByArrow('rothe', 8365780, 10) then Break;
end else
if MyFindObjTPA(x, y, [{3063803, 2254726, 2703192, 1791600}1812704], 10, 35, 70, ['Larg', 'arge d', 're door'], True) then
if ((x + 30) < MSCX) or (i > 3) then
begin
if IsUpTextMultiCustom(['pen']) then
begin
Mouse(x, y, 0, 0, False);
Wait(50 +Random(100));
ChooseOption('pen');
end else
if TalkToNpcByArrow('rothe', 8365780, 10) then Break;
end else
if TalkToNpcByArrow('rothe', 8365780, 10) then Break;
end;
if not AreTalking then
DeActivate('got stuck on Brother Brace - Finding Tutor', 'Finding Brother Brace');
ColorToleranceSpeed(1);
HandleTalk;
end;
55: OpenTab(6);
56: begin
if not TalkToNpcByArrow('rothe', 8365780, 10) then
DeActivate('got stuck on Brother Brace - Finding Tutor', 'Finding Brother Brace');
HandleTalk;
end;
57: OpenTab(8);
58: OpenTab(9);
59: begin
if not TalkToNpcByArrow('rothe', 8365780, 10) then
DeActivate('got stuck on Brother Brace - Finding Tutor', 'Finding Brother Brace');
HandleTalk;
end;
60: begin
if not UseArrowObjTillText('Door', 'Open', 'inal', 1591648, 10, 5) then
DeActivate('got stuck on Brother Brace - Finding Door', 'Finding Door');
WalkToMMArrow(True);
end;
end;
end;
end;

procedure WalkToFence;
var
x, y: Integer;
pa: TPointArray;
p: TPoint;
begin
if (not LoggedIn) then Exit;
x := MMCX; y := MMCY;
if FindColorSpiralTolerance(x, y, 3428720, MMX1, MMY1, MMX2, MMY2, 20) then
if rs_OnMiniMap(x, y) then
if ScanMMColorExact(x, y, GetColor(x, y)) then
begin
FindColorsTolerance(pa, GetColor(x, y), x -15, y -5, x +15, y +5, 0);
p := MiddleTPA(pa);
SetLength(pa, 0);
x := p.x;
y := p.y;
for y := p.y to p.y +25 do
if SimilarColors(GetColor(x, y), 16117224, 50) then
Break;
if (y = p.y) then y := y +19;
MouseFlag(x, y, 0, 1);
Exit;
end;
MouseFlag(641, 74, 0, 1);
end;

procedure MageChickens;
var
x, y, a, i, c, t, Time, HowMany: Integer;
begin
WalkToFence;
t := GetSystemTime;
Time := 30000;
HowMany := 2;
for i := 1 to HowMany do
begin
if (not LoggedIn) then Exit;
GameTab(4);
a := RuneAmount('inv', 'air');
if not Cast('2') then
if (Pos('almost', GetBlueNPCText) <> 0) then
Break
else
if UseTPAObjTillText(['alk', 'k to', 'agic', 'uctor'], 'Talk', 'ontinu', [9527313], 10, 35, 35, 5, False) then
begin
HandleTalk;
if not Cast('2') then Break;
end else
Break;
if FindMoster(x, y, [595305, 4499386], ['Chic', 'icken'], False) then
begin
Mouse(x, y, 0, 0, True);
t := GetSystemTime;
Time := 5000;
GameTab(4);
while ((GetSystemTime - t) < Time) and (a = RuneAmount('inv', 'air')) do
Wait(1000 +Random(500));
if a <> RuneAmount('inv', 'air') then
begin
Time := 13000;
while ((GetSystemTime - t) < Time) and (not FindFastMSArrow(x, y)) do
Wait(500);
Time := 50000;
c := 0;
if ((GetSystemTime - t) < Time) then
while ((GetSystemTime - t) < Time) and FindMSArrow(x, y) do
begin
HandleTalk;
if not Cast('2') then Break;
if i > HowMany then Break;
if not FindMoster(x, y, [595305, 4499386], ['Att', 'ack', 'Chic', 'icken'], False) then
Break
else
i := i +1;
Wait(500 +Random(400));
end;
end else
begin
Wait(2000 +Random(1000));
HowMany := HowMany +1;
end;
end else
if ((GetSystemTime - t) > Time) then
begin
if not (Pos('almost', GetBlueNPCText) <> 0) then
DeActivate('got stuck on Magic Instructor - Mage', 'Maging');
end else HowMany := HowMany +1;
end;
HandleTalk;
if not (Pos('almost', GetBlueNPCText) <> 0) then
DeActivate('got stuck on Magic Instructor - Mage', 'Maging');
end;

procedure MagicInstructor(SP: Integer);
var
a, x, y: Integer;
begin
if (SP = 0) then SP := 61;
for a := SP to 65 do
begin
if (not LoggedIn) then Exit;
case a of
61: begin
MouseFlag(670, 133, 1, 1);
WalkToMMArrow(True);
if not TalkToNpcByArrow('agic', 9527313, 10) then
DeActivate('got stuck on Magic Instructor - Finding Tutor', 'Finding Magic Instructor');
HandleTalk;
end;
62: begin
OpenTab(7);
if not TalkToNpcByArrow('agic', 9527313, 10) then
DeActivate('got stuck on Magic Instructor - Finding Tutor', 'Finding Magic Instructor');
HandleTalk;
end;
63: MageChickens;
64: begin
if not TalkToNpcByArrow('agic', 9527313, 10) then
DeActivate('got stuck on Magic Instructor - Finding Tutor', 'Finding Magic Instructor');
HandleTalk;
ClickNPCChatText('es', True);
HandleTalk;
Wait(1000 +Random(2000));
if FindSymbol(x, y, 'Fish') or FindSymbol(x, y, 'Arrow') or FindSymbol(x, y, 'Water') then
begin
DeActivate('succesfully finished the Island!', 'Done!');
Done := Done +1;
end else
DeActivate('got stuck on Magic Instructor - Going to MainLand', 'Going to MainLand');
end;
end;
end;
end;

function HowManySpaces(i: String): String;
begin
Result := i + StringOfChar(' ', 45 - Length(i));
end;

procedure ProgressReport;
var
i: Integer;
Time: String;
begin
ClearDebug;
for i := 1 to 3 do
Time := Replace(Trim(Time + ' ' + IntToStr(ScriptTime(i))), ' ', ':');
Writeln('/~~~~~~~~~~~~~~~ Nielsie95 ~~~~~~~~~~~~~~~~~~~\');
Writeln('||~~~~~~~~ Tutorial Island Runner ~~~~~~~~~~~||');
Writeln('||~~~~~~~~~~~~ Progress Report ~~~~~~~~~~~~~~||');
Writeln('||~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~||');
Writeln(HowManySpaces('|| Worked: '+ Time) + '||');
Writeln(HowManySpaces('|| Player: '+ IntToStr(CurrentPlayer +1) + '/'+IntToStr(Length(Players))) + '||');
Writeln(HowManySpaces('|| Succesfully done: '+ IntToStr(Done) + ' players') + '||');
WriteLn('|| ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ||');
for i := 0 to Length(Players) -1 do
Writeln(HowManySpaces('|| ['+IntToStr(i)+']'+Players[i].Name+': '+Players[i].Loc) + '||');
Writeln('\~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/');
end;

procedure ScriptTerminate;
begin
FreeBitmaps;
ProgressReport;
end;

var
SP, i, t, c: Integer;
begin
SmartSetup('se1', False, True);
while not(SmartReady) do Wait(100);
SetTargetDC(SmartGetDC);
if not(LoggedIn) then
while not(SmartGetColor(386, 249) = 65535) do Wait(100);
ClearDebug;
ClearReport;
ChangeReportWidth(320);
AddToReport('- - - - - - - - - - - - - - - - - - -');
AddToReport(' Nielsie95 Tut Island Runner 0.75');
AddToReport('- - - - - - - - - - - - - - - - - - -');
WriteLn('Tutorial Island Runner 0.75 / SRL 4.0 by Nielsie95');
DeclarePlayers;
for i := 0 to Length(Players) -1 do
Players[i].Active := True;
if (Length(Players) < 1) then
begin
WriteLn('Please setup your players correctly and restart the script..');
TerminateScript;
end;
LoadBitmaps;
MouseSpeed := 15 +Random(4);
repeat
LoginPlayer;
HighestAngle;
HandleTalk;
SP := GetSP;
if (GetSP > 0) then
WriteLn('Starting Point: '+IntToStr(SP))
else
begin
WriteLn('Unknown Starting Point!');
Exit;
end;
c := GetSystemTime;
for i := 1 to 9 do
begin
AddToReport(' ');
AddToReport('- - - - - - - - - - - - - - - - - - -');
AddToReport(' '+Players[CurrentPlayer].Name);
AddToReport('- - - - - - - - - - - - - - - - - - -');
t := GetSystemTime;
case i of
1: if (SP <= 5) then
begin
RSGuide(SP);
SP := 0;
end;
2: if (SP <= 14) then
begin
SurvivalExpert(SP);
SP := 0;
end;
3: if (SP <= 22) then
begin
MasterChef(SP);
SP := 0;
end;
4: if (SP <= 27) then
begin
QuestGuide(SP);
SP := 0;
end;
5: if (SP <= 37) then
begin
MiningInstructor(SP);
SP := 0;
end;
6: if (SP <= 49) then
begin
CombatInstructor(SP);
SP := 0;
end;
7: if (SP <= 53) then
begin
FinancialAdvisor(SP);
SP := 0;
end;
8: if (SP <= 60) then
begin
BrotherBrace(SP);
SP := 0;
end;
9: if (SP <= 64) then
begin
MagicInstructor(SP);
SP := 0;
end;
end;
if (not LoggedIn) then Break;
if (SP = 0) then
case i of
1: AddToReport(' RS Guide took ' + IntToStr(MsToSec(GetSystemTime - t)) +' sec.');
2: AddToReport(' Survival Expert took ' + IntToStr(MsToSec(GetSystemTime - t)) +' sec.');
3: AddToReport(' Master Chef took ' + IntToStr(MsToSec(GetSystemTime - t)) +' sec.');
4: AddToReport(' Quest Guide took ' + IntToStr(MsToSec(GetSystemTime - t)) +' sec.');
5: AddToReport(' Mining Instructor took '+ IntToStr(MsToSec(GetSystemTime - t)) +' sec.');
6: AddToReport(' Combat Instructor took '+ IntToStr(MsToSec(GetSystemTime - t)) +' sec.');
7: AddToReport(' Financial Advisor took '+ IntToStr(MsToSec(GetSystemTime - t)) +' sec.');
8: AddToReport(' Brother Brace took ' + IntToStr(MsToSec(GetSystemTime - t)) +' sec.');
9: begin
AddToReport(' Magic Instructor took '+ IntToStr(MsToSec(GetSystemTime - t)) +' sec.');
AddToReport('- - - - - - - - - - - - - - - - - - -');
AddToReport(' Total Time: '+ IntToStr(MsToMin(GetSystemTime - c)) +' mins.');
AddToReport('- - - - - - - - - - - - - - - - - - -');
end;
end;
end;
if ((CurrentPlayer +1) >= Length(Players)) then Break;
NextPlayer(False);
ProgressReport;
until False;
end.

Timer

2007-11-20 19:30:03

Oh, Scar Closes For Me TOO Though It Was Spost Too

.Hide
&
.Show

???

Macrosoft

2007-11-20 19:33:31

nothing came up after it hid…

rogeruk

2007-11-20 19:51:02

Works fine for me. Loads up client and runs.

Macrosoft

2007-11-20 19:52:26

hmmm, do you have firefox open, what scar version do u have, and what version of java do you have?

rogeruk

2007-11-20 19:58:38

Firefox is open, not on RS tho.

SCAR 3.13 SRL4 #7
1.6 Update 3

P1nky

2007-11-20 20:04:46

i think you should use 3.12…. not 3.13

Serial_KillaZ

2007-11-20 20:15:00

Samn thing happends for me too!

And im using Scar 3.12.

Macrosoft

2007-11-20 20:19:29

do i need to download java?

I seem to already have it…

Bobarkinator

2007-11-20 21:32:13

You need the latest version of java.

Macrosoft

2007-11-20 21:36:14

somethings wrong with my comp and I cant

I think I already have it, otherwise I wouldn't be able to play rs right?

Bobarkinator

2007-11-20 21:47:03

RS doesn't need the latest version.

Esteban

2007-11-20 21:55:52

Go to Control Panel (if on windows) > Add or Remove Programs. You should find java somewhere in the list of programs. What is the version of Java do you have installed?

Also, make sure you have the updated SCAR 3.13. If you haven't downloaded 3.13 in the past day, install it again, it was updated ;).

Bobarkinator

2007-11-20 22:00:49

Go to Start Menu -> Run and type in "cmd /k java -version" without the quotes, post what is at the very top of the window, it should say "java version "…"" where … is a number, if it's not recognized then java is not installed.

Macrosoft

2007-11-20 22:28:18

1.4.2

ill try to get later version

think its working now

I was trying to download java something else (lol)

Edit: Arg tried to download but got some "packet not found" error while it was preparing the instalation

Edit: woring now, had to do the offline instalation?

Bobarkinator

2007-11-21 00:03:34

Yes, the offline installation is what you want, I've never done the online so I really don't know what to expect with that.

Macrosoft

2007-11-21 17:36:41

got it working!

BenLand100

2007-11-22 22:48:21

Java 1.4.2 is like… A year and a half old… Where have you been? :) Anyway, I believe SMART needs version 1.6.0+. Might work on version 1.5.0_07, but I'd just go ahead and get 1.6.0+ ;)

Macrosoft

2007-11-22 23:19:09

yeah got it working, works great!

wow I love this, I am autoing now…Amazing!