Almost cracked, nielsie! Only need to test it out… I'm working on it for 45 minutes now, while doing many other things (I have 11 tabs open in Firefox, lol).
Do I get a price if I'm the first one who got it cracked?
edit: got it cracked! Seems to work, but didn't have the time to test it out on all chars, only did it on character five.
{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=|
| Nielsie95's Tutorial Island Runner |
| CRACKED BY MARKUS! |
|=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=|
| |
| Will run the Tutorial Island for you |
| |
| Has all Skills and Character maker =] |
| |
|=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=|
| Copyright notice |
|=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=|
| |
| ©2007, Nielsie95 |
| Parts © Smartzkid |
| Parts used under permission from Infantry100 |
| |
|=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=|
| Terms of Use |
|=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=|
| |
| You may not redistribute this script, or any modified |
| form of it by any means. |
| |
| You may not attempt to bypass this scripts protection by |
| any means, accidental or intentional |
| |
| All perpetrators will be punished by maximum extent |
| allowable by law |
| |
|=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=|
| |
| Setup your players and hit Run! |
| |
|=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=|
| VERSION 0.45 [SMARTZKID] |
| |
| Updated for SRL 3.7, Some other 'improvements' |
| |
| VERSION 0.40 |
| |
| Added Multi-Player, Progress Report , Status-Writing, |
| Fixed Gate-Bug, better RatFinding, Range Failsafe and |
| added 'Chapters' in the Script. =] |
| |
| VERSION 0.33 |
| |
| Updates done to Fighting, Mining and Speed. +Added |
| GetDoorColor from Boreas. |
| |
| V 0.31 = Faster/Less Waiting Version - Same as 0.3 |
| |
| VERSION 0.30 |
| |
| Updates done to Chopping, FM, Failsafes, Mining, |
| Fighting and Maging parts. Also added Time writing |
| in Report. +Added ClothesMaker from Smartz |
| |
| VERSION 0.20 |
| |
| First version of the Tutorial Runner. |
| |
|=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}
program TutRunner;
{.Include SRL\SRL.SCAR}
{.include SRL\SRL\Skill\Fighting.scar}
//----------------------------------------------------------------------------//
// --> SCRIPT SETUP <-- //
//----------------------------------------------------------------------------//
const SmartzCharMaker = True; //Want to use Smartz Random Clothes procedure?, False for my own procedure
DoorFailSafes = True; //Use FailSafes for the Doors/Gates?
MouseSpd = 13; //MouseSpeed
//----------------------------------------------------------------------------//
// --> VARIABLES <-- //
//----------------------------------------------------------------------------//
var MMArrow, TopMMArrow, MSArrow, TopMSArrow, PlzWait, PlayersDone, IsReady: integer;
Logins: integer;
TotalTime: LongInt;
Finished, T: Boolean;
Strings: String;
//----------------------------------------------------------------------------//
// --> PLAYER SETUP <-- //
//----------------------------------------------------------------------------//
function GetPlayerNum:Integer; forward;
procedure DeclarePlayers;
var x:integer;
begin
HowManyPlayers:= 5;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 4;
Players[0].Name :=''; //Name
Players[0].Pass :=''; //Password
Players[1].Name :=''; //Name
Players[1].Pass :=''; //Password
Players[2].Name :=''; //Name
Players[2].Pass :=''; //Password
Players[3].Name :=''; //Name
Players[3].Pass :=''; //Password
Players[4].Name :=''; //Name
Players[4].Pass :=''; //Password
for x:=0 to HowManyPlayers-1 do
begin
Players[x].Active := true;
Players[x].Loc := 'Ready to Run';
end
end;
//----------------------------------------------------------------------------//
// --> BITMAPS <-- //
//----------------------------------------------------------------------------//
procedure LoadBmps;
var
s1 : string;
begin
s1:= Copy(strings, Pos('.',strings), Pos(';',strings));
MMArrow := BitmapFromString(15, 14, s1);
TopMMArrow := BitmapFromString(6, 5, 'z78DA737372B3343671C3' +
'4F3ABA991B3A52421A80802184C42B8B0C0C71C90200FB5828A4');
MSArrow := BitmapFromString(21, 23, 'z78DAEDD3310AC0200C85E' +
'12B456D1147A3E6FE472A38554A4B6A0D8112877FF47B0802700F' +
'35AA1838058163BAE90A7AA5929053D37FA6E7889C9ACEBAB350D' +
'E9B56FB04A7E59E9EA16FD88A742F2E0C1B905248127D740537B0' +
'DD7143A6E8FD974EB9E3BF5072E7DE61A9FB62C39DEB825B37C77' +
'15C8E7800DECE700D');
TopMSArrow := BitmapFromString(8, 5, 'z78DA737374333732721B' +
'04A40108184248A25522034362540200128F35BE');
PlzWait := BitmapFromString(63, 2, 'z78DA33303030707373' +
'727474B27044212D1D4D2D0C0D3064A12260596412531CA708865' +
'D386DC12B82451C6217316C8A5D4EA60BF186214E1B8976272E73' +
'70B90DBFCB89F22972D862A41F9CE2148433A62CA9210F0080F3B' +
'0CA');
end;
//----------------------------------------------------------------------------//
// --> LOGGING PROCEDURES <-- //
//----------------------------------------------------------------------------//
procedure FirstTimeLoginPlayer; //Login procedure from SRL, modified so it doesn't search for 'Click here to Play'
var
tx, ty, tmpMask, attempts: Integer;
begin
if (not (LoggedIn)) then
Status('Logging in Player');
begin
x := 150;
y := 173;
if (FindClient) then
FindWindowBySize(766, 504);
ActivateClient;
Wait(1000);
ClickOption('Cancel', 1);
ClickOption('Exist', 1);
tmpMask := CreateBitmapMaskFromText('Username', upchars);
if (FindBitmapMaskTolerance(tmpMask, x, y, 0, 0, 520, 340, 10, 50)) then
begin
Wait(25 + Random(50));
Mouse(x + 24, y + 3, 3, 0, True);
Wait(25 + Random(50));
// SendKeysSilent(Players[CurrentPlayer].Name + chr(13) + Players[CurrentPlayer].Pass)
WriteLn(Players[CurrentPlayer].Name);
TypeSend(Players[CurrentPlayer].Name);
Wait(100 + Random(100));
Mouse(327, 272, 0, 0, True);
TypeSend(Players[CurrentPlayer].Pass);
Wait(100 + Random(100));
end;
ClickOption('Login', 1);
// Waiting for Connecting to Server...
MarkTime(Mark);
while FindText(tx, ty, '...', upchars, 240, 180, 530, 240) do
begin
Wait(100);
if TimeFromMark(Mark) > 20000 then break;
end;
MarkTime(Mark);
repeat
Wait(1000);
// Enter your username and password. If all failed...
if FindText(tx, ty, 'nter you', upchars, 240, 180, 530, 240) then
begin
WriteLn('Enter your username and Password');
LoginPlayer;
Exit;
end;
// Invalid Username. 3 attempts. If fails, you haven't set your username/pass correct
if FindText(tx, ty, 'nvalid', upchars, 240, 180, 530, 240) then
begin
WriteLn('Invalid Username.');
Attempts := Attempts + 1;
if Attempts > 3 then
begin
Players[CurrentPlayer].loc := 'L/P ERROR';
NextPlayer(False);
end;
LoginPlayer;
Exit;
end;
// Login attempts exceeded. Please wait 1 minute and try again.
if FindText(tx, ty, 'excee', upchars, 240, 180, 530, 240) then
begin
WriteLn('Login attempts exceeded. Please wait 1 minute and try again.');
Wait(60000);
LoginPlayer;
Exit;
end;
// World is full.
if FindText(tx, ty, 'full', upchars, 240, 180, 530, 240) then
begin
WriteLn('World is full.');
Wait(3000);
LoginPlayer;
Exit;
end;
// Unable to connect. Login Server offline.
if FindText(tx, ty, 'offl', upchars, 240, 180, 530, 240) then
begin
WriteLn('Unable to connect Login Server offline.');
Wait((6000) + Random(6000));
LoginPlayer;
Exit;
end;
// Error Connecting.
if FindText(tx, ty, 'rror', upchars, 240, 180, 530, 240) then
begin
WriteLn('Error Connecting.');
Wait(10000);
LoginPlayer;
Exit;
end;
// Error loading your profile. Will attempt to re-login 5 more times.)
if FindText(tx, ty, 'ontact', upchars, 240, 180, 530, 240) then
begin
WriteLn('Error loading your profile.');
Wait(2000);
LoginPlayer;
Exit;
end;
// Login server rejected session.
if FindText(tx, ty, 'reject', upchars, 240, 180, 530, 240) then
begin
WriteLn('Login server rejected session.');
Wait(1000);
LoginPlayer;
Exit;
end;
// Runescape has been updated.
if FindText(tx, ty, 'reload', upchars, 240, 180, 530, 240) then
begin
WriteLn('ERROR. RuneScape has been updated. Script Terminated.');
TerminateScript;
end;
// The Server is being updated. Please wait 1 minute.
if FindText(tx, ty, 'updat', upchars, 240, 180, 530, 240) then
begin
WriteLn('The Server is being updated.');
Wait(60000);
LoginPlayer;
Exit;
end;
// Your account has been disabled.
if FindText(tx, ty, 'disabled', upchars, 420, 180, 500, 220) then
begin
WriteLn('Your account has been disabled');
Players[CurrentPlayer].loc := 'DISABLED';
NextPlayer(False);
Exit;
end;
// Waiting for Profile to be Transferred
if FindText(tx, ty, 'trans', upchars, 240, 180, 530, 240) then
begin
WriteLn('Waiting for your Profile to be Transferred');
Wait(2500);
end;
// You need a Members account...
if FindText(tx, ty, 'member', upchars, 240, 180, 530, 240) then
begin
WriteLn('Waiting for your Profile to be Transferred');
Wait(2500);
end;
// Welcome to RuneScape. If all failed...
if FindText(tx, ty, 'elcom', upchars, 240, 180, 530, 240) then
begin
WriteLn('Welcome.');
LoginPlayer;
Exit;
end;
if TimeFromMark(Mark) > 180000 then
begin
WriteLn('three minutes have passed');
WriteFileString(TheFile, Chr(13) + 'THREE MINUTES HAVE PASSED!!!' +
Chr(13));
if (FindClient) then
FindWindowBySize(766, 504);
ActivateClient;
ClickOption('Cancel', 1);
ClickOption('Exist', 1);
end;
Wait(3000);
until (LoggedIn);
end;
FreeBitmap(tmpMask);
if LoggedIn then
begin
PlayerStartTime := (GetSystemTime div 1000); // PlayerStartTime
WriteFileString(TheFile, Chr(13) + UpperCase(Players[CurrentPlayer].Name) +
Chr(13)); //* Save NAME to file
Logins := Logins +1;
ReportVars[0] := ReportVars[0] +1;
end;
end;
procedure FirstTimeNextPlayer(Active: Boolean); //NextPlayer procedure from SRL, modified so it does call FirstTimeLoginPlayer, instead of LoginPlayer
begin
if RandomPlayer then
RandomNextPlayer(Active)
else
begin
WriteLn('NextPlayer');
if not Active then
Players[CurrentPlayer].Active := False;
Logout;
PlayerCurTime := (GetSystemTime div 1000);
Players[CurrentPlayer].Worked := Players[CurrentPlayer].Worked +
((PlayerCurTime - PlayerStartTime) / 60);
CurrentPlayer := CurrentPlayer + 1;
if CurrentPlayer > HowManyPlayers - 1 then
CurrentPlayer := 0;
while Players[CurrentPlayer].Active = False do
begin
CurrentPlayer := CurrentPlayer + 1;
if CurrentPlayer > HowManyPlayers - 1 then
begin
CurrentPlayer := 0;
Wait(10000); // Everybody False. Endless Loop.
end;
end;
if Players[CurrentPlayer].Active = True then
FirstTimeLoginPlayer;
end;
//end;
end;
//----------------------------------------------------------------------------//
// --> CLOTHES PROCEDURES <-- //
//----------------------------------------------------------------------------//
procedure NielsMakeChar;
var tx, ty, c, i: integer;
begin
if(not(LoggedIn))then Exit;
Status('Making Character');
case Random(2) of
0 : Wait(1);
1 : Mouse(450, 290, 1, 1, True);
end
Wait(1000);
for i := 0 to 6 do
begin
MMouse(45 +Random(15), 88 +(i*35), 1, 1);
GetMousePos(tx, ty);
for c := 0 to Random(8) do
begin
Mouse(tx, ty, 1, 1, True);
Wait(500);
end
end
for i := 0 to 4 do
begin
MMouse(343 +Random(15), 88 +(i*35), 1, 1);
GetMousePos(tx, ty);
for c := 0 to Random(4) do
begin
Mouse(tx, ty, 1, 1, True);
Wait(500);
end
end
Wait(1000);
Mouse(260, 285, 2, 2, True);
Wait(3000);
end;
procedure SmartzCharacter; //SmartzKid
//Version 3.5.FREE\\
var
b,i,x,y,n,k,t:integer;
arrow:TPointArray;
HitAccept,DebugMode:boolean;
begin
HitAccept:=True; //Do you want to hit accept after the person's designed?
for i := 0 to 6 do //get the 'Design' arrow coords
begin
for b := 0 to 1 do
begin
n:=getarraylength(arrow);
setarraylength(arrow,n+1);
arrow[n].y:=85 + ( i * 35 );
arrow[n].x:=45 + ( b * 115 );
end;
end;
for i := 0 to 4 do //get the 'Colour' arrow coords
begin
for b := 0 to 1 do
begin
n:=getarraylength(arrow);
setarraylength(arrow,n+1);
arrow[n].y:=97 + ( i * 35 );
arrow[n].x:=353 + ( b * 115 );
end;
end;
repeat
n:=random(24);
try
x:=arrow[n].x; //~Assign our x and y variables, just to shorten things below
y:=arrow[n].y; //~
except
writeln('Array n out of range.');
finally
if(DebugMode)then
writeln(inttostr(n));
end;
MMouse(x,y,8,8);
if(IsUpTextMulti('nge','reco','lour'))then
begin
GetMousePos(b,y);
HoldMouse(b,y,true); //~
wait(15+random(50)); //~ Realistic click
ReleaseMouse(b,y,true);//~
i:=i+1+random(3);
t:=t+1;
k:=k+n;
end;
wait(250+random(500)); //a little time for our 'person' to 'decide' on their next move
if(i>90) or (k>550) or (t>40) then //quit after ~40 changes, the k>550 is to help gurantee recoloration of the person
if(k>450) and (t>35) then
finished:=true;
until(finished)
if(DebugMode)then
begin
writeln(inttostr(i));
writeln(inttostr(k));
writeln(inttostr(t));
end;
wait(1000);
if(HitAccept)then
begin
MouseBox(228,270,291,298,1);
wait(3000);
end;
end;
//----------------------------------------------------------------------------//
// --> OVERALL PROCEDURES <-- //
//----------------------------------------------------------------------------//
function FindMMArrow(var x, y: integer):Boolean;
var c, tx, ty: integer;
begin
if(not(LoggedIn))then Exit;
repeat
Wait(50);
c := c +1
until ((c > 50) or (FindBitmapToleranceIn(TopMMArrow, tx, ty, MMX1, MMY1, MMX2, MMY2, 10)));
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)));
if c > 50 then
begin
Status('Could not find the MMArrow');
Result := False;
Exit;
end
end
Result := True;
x := tx +4;
y := ty +6;
end;
function FindMSArrow(var x, y: integer):Boolean;
var c, tx, ty: integer;
begin
if(not(LoggedIn))then Exit;
repeat
Wait(50);
c := c +1
until ((c > 50) or (FindBitmapToleranceIn(TopMSArrow, tx, ty, MSX1, MSY1, MSX2, MSY2, 10)));
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)));
if c > 50 then
begin
Status('Could not find the MSArrow');
Result := False;
Exit;
end
end
Result := True;
x := tx +4;
y := ty +6;
end;
function FindFastMSArrow(var x, y: integer):Boolean;
var c, tx, ty: integer;
begin
if(not(LoggedIn))then Exit;
repeat
Wait(50);
c := c +1
until ((c > 3) or (FindBitmapToleranceIn(TopMSArrow, tx, ty, MSX1, MSY1, MSX2, MSY2, 10)));
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)));
if c > 3 then
begin
Result := False;
Exit;
end
end
Result := True;
x := tx +4;
y := ty +6;
end;
function DeFuddle(input : string; x:integer) : string;
var
i,f : integer;
begin
for i := 1 to Length(input) do
begin
f := ord(input[i]);
input[i] := chr(f - x);
result := result + input[i];
end;
end;
function WalkToMMArrow: Boolean;
var tx, ty: integer;
begin
if(not(LoggedIn))then Exit;
Status('Walking to MM arrow');
if FindMMArrow(tx, ty) then
begin
MouseFindFlag(tx, ty, 1, 1);
Flag;
Result := True;
end;
end;
function FindNpcByArrow(var x, y: integer; Name: String; RightClick: Boolean): Boolean;
var c, tx, ty: integer;
begin
if(not(LoggedIn))then Exit;
Status('Looking for '+Name);
repeat
if FindMSArrow(tx, ty) then
begin
MMouse(tx, ty +15, 4, 4);
Wait(50);
if IsUpTextMulti('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 := c +1;
until(c > 50)
Result := False;
WriteLn('Could not find '+Name);
end;
function InTalk: Boolean;
begin
if(not(LoggedIn))then Exit;
if FindColorTolerance(x, y, 128, 220, 360, 365, 370, 5) then
Result := True;
end;
function TalkToNpcByArrow(name: String): Boolean;
var c, tx, ty: integer;
begin
if(not(LoggedIn))then Exit;
if not FindFastMSArrow(x, y) then WalkToMMArrow;
repeat
if FindNpcByArrow(tx, ty, Name, True) then
begin
if(CurrentPlayer<5)then
ChooseOption(x, y, 'Talk-to');
Flag;
Wait(1200);
if InTalk then
begin
WriteLn('We are talking to '+Name);
Status('We are talking to '+Name);
Result := True;
Exit;
end
end
c := c +1
if c = 3 then WalkToMMArrow;
if c = 7 then WalkToMMArrow;
until c > 10
end;
function ContinueOn(x:string; m:integer):string;
begin
result:=DeFuddle(x,m);
end;
function PleaseWait: Boolean;
begin
if(not(LoggedIn))then Exit;
if FindBitmapToleranceIn(PlzWait, x, y, MCX1, MCY1, MCX2, MCY2, 20) then Result := True;
end;
function VerifyName(s:string):string;
begin
result:=Copy(s, 2, 4);
end;
procedure HandleTalk;
var c, i: integer;
begin
if(not(LoggedIn))then Exit;
repeat
c := c +1;
repeat
Wait(500);
i := 0;
if PleaseWait then
repeat
Wait(500);
i := i +1
until ((not (PleaseWait)) or (i > 7))
until not ClickToContinue;
Wait(1000);
if not ClickToContinue then Break;
until c > 10;
end;
//----------------------------------------------------------------------------//
// --> DOOR PROCEDURES <-- //
//----------------------------------------------------------------------------//
function OpenDoor(Dir: Char): Boolean;
var tx, ty, i: integer;
begin
if(not(LoggedIn))then Exit;
MakeCompass(Dir);
LowestAngle;
for i := 10 to 30 do
if FindMSArrow(tx, ty) then
begin
MMouse(tx, ty +(i*2), 1, 1);
Wait(50);
if IsUpTextMulti('Open', 'Door', 'Open Door') then
begin
if(CurrentPlayer<5)then
Mouse(tx, ty +(i*2), 0, 0, True);
Flag;
Break;
end
end
Wait(2000);
Result := True;
end;
function CheckDoor(x:string; m:integer):string;
begin
result:=ContinueOn(x,m);
end;
function OpenDoorAt(DoorNumber: Integer): Boolean;
var i, MovingAround, Emotes, TalkWithQuest, FinancialAdvise, Prayer, FinalInstruc: integer;
begin
if(not(LoggedIn))then Exit;
Status('Opening door '+IntToStr(DoorNumber));
Case DoorNumber of
1 : begin
MovingAround := BitmapFromString(100, 2, 'z78DAA553410EC020' +
'08FBD2B664891E21D1FF3F690BF300C1228B1E1A53B12214AE749' +
'793058F77F5CE8A3148C485468CEC357EBC461413AB1905971BC2' +
'A1A094F319A26C3338D17475432FFA6AFCADA439656AF5CADFCAB' +
'C8294277725C660D87783C07B0B1725F4A126E811E4C3EE2FFA02' +
'FE8BF67046C054C6DECBCCEC3EBFA5E69DA3FCE6F907C84F182C');
repeat
OpenDoor('E');
i := i +1;
if not DoorFailSafes then
begin
Wait(3000);
Break;
end
until ((FindBitMapToleranceIn(MovingAround, x, y, MCX1, MCY1 -20, MCX2, MCY2, 20)) or (i > 10));
if i > 10 then
begin
WriteLn('We got stuck on our first Door, Setting player to False..');
Players[CurrentPlayer].Loc := 'First Door';
Players[CurrentPlayer].Active := False;
Logout;
Exit;
end
WriteLn('We are through our first door!');
MakeCompass('N');
HighestAngle;
FreeBitMap(MovingAround);
Result := True;
Exit;
end
2 : begin
repeat
OpenDoor('E');
i := i +1;
if not DoorFailSafes then
begin
Wait(3000);
Break;
end
//if GetColor(346, 373) = 16711680 then if GetColor(422, 426) = 0 then Break;
until ((not(FindColor(x, y, 0, 200, 440, 330, 450))) or (i > 10));
if i > 10 then
begin
WriteLn('We got stuck on our second Door, Setting player to False..');
Players[CurrentPlayer].Loc := 'Second Door';
Players[CurrentPlayer].Active := False;
Logout;
Exit;
end
WriteLn('We are through our second door!');
MakeCompass('N');
HighestAngle;
Result := True;
Exit;
end
3 : begin
Emotes := BitmapFromString(41, 3, 'z78DA73B27434B5307422823' +
'400023737274747270B476412539C289510937188434590D46071' +
'092E17E275332EBD2824A97E21512501B7619840C077186EC66F2' +
'FB25E2CA181194AC4B8197F5C10E30B4C5F63F802BF4A5CBA00F7' +
'17AC44');
repeat
OpenDoor('E');
i := i +1;
if not DoorFailSafes then
begin
Wait(3000);
Break;
end
until ((FindBitMapToleranceIn(Emotes, x, y, MCX1, MCY1 -20, MCX2, MCY2, 20)) or (i > 10));
if i > 10 then
begin
WriteLn('We got stuck on our 3rd Door, Setting player to False..');
Players[CurrentPlayer].Loc := 'Third Door';
Players[CurrentPlayer].Active := False;
Logout;
Exit;
end
WriteLn('We are through the third door!');
MakeCompass('N');
HighestAngle;
FreeBitMap(Emotes);
Result := True;
Exit;
end
4 : begin
TalkWithQuest := BitmapFromString(175, 1, 'z78DA737' +
'27474B270742282340003FCB258D4583A9A5A1842C5C16CE245C8' +
'2349B0CBC8D2D2DC943CF7A09880D71C325D4E74F81370390E353' +
'40F5B12CD21419CE8D4E8E4E4E86A6904154762E3D7EB445E8EC0' +
'61174E7B31C521224824F1E2B85412AF1E53040057F5ED2B');
repeat
OpenDoor('N');
i := i +1;
if not DoorFailSafes then
begin
Wait(3000);
Break;
end
until ((FindBitMapToleranceIn(TalkWithQuest, x, y, MCX1, MCY1 -20, MCX2, MCY2, 20)) or (i > 10));
if i > 10 then
begin
WriteLn('We got stuck on our 4th Door, Setting player to False..');
Players[CurrentPlayer].Loc := '4th Door';
Players[CurrentPlayer].Active := False;
Logout;
Exit;
end
WriteLn('We are through doornumber 4!');
MakeCompass('N');
HighestAngle;
FreeBitMap(TalkWithQuest);
Result := True;
Exit;
end
5 : begin
FinancialAdvise := BitmapFromString(77, 2, 'z78DA73B27434B' +
'530340002373727301B99C4258EA90645A5A3A39385239424CB7C' +
'A838B2393848FC2A51DC46BC5E4C5F208BE30F01B25C488C7A925' +
'592189BC8B2C4AB24591C332431D309DEF483C516BCBEC6199B78' +
'43985AB1497CDC618A0000027CD7B7');
repeat
OpenDoor('W');
i := i +1;
if not DoorFailSafes then
begin
Wait(3000);
Break;
end
until ((FindBitMapToleranceIn(FinancialAdvise, x, y, MCX1, MCY1 -20, MCX2, MCY2, 20)) or (i > 10));
if i > 10 then
begin
WriteLn('We got stuck on our 5th Door, Setting player to False..');
Players[CurrentPlayer].Loc := '5th Door';
Players[CurrentPlayer].Active := False;
Logout;
Exit;
end
WriteLn('We are through doornumber 5!');
MakeCompass('N');
HighestAngle;
FreeBitMap(FinancialAdvise);
Result := True;
Exit;
end
6 : begin
Prayer := BitmapFromString(31, 3, 'z78DA3330303070737372747' +
'4B27024863400AB37C0AB0B972C01714B47530B4308892982D30D' +
'C8B2182A31CDC76232922E5CB2C4F8C8808890C47439516185A49' +
'2800B8911273A1E316D07007A4D827E');
repeat
OpenDoor('W');
i := i +1;
if not DoorFailSafes then
begin
Wait(3000);
Break;
end
until ((FindBitMapToleranceIn(Prayer, x, y, MCX1, MCY1 -20, MCX2, MCY2, 20)) or (i > 10));
if i > 10 then
begin
WriteLn('We got stuck on our 6th Door, Setting player to False..');
Players[CurrentPlayer].Loc := '6th Door';
Players[CurrentPlayer].Active := False;
Logout;
Exit;
end
WriteLn('We are through door 6!');
MakeCompass('N');
HighestAngle;
FreeBitMap(Prayer);
Result := True;
Exit;
end
7 : begin
FinalInstruc := BitmapFromString(88, 3, 'z78DAB594C10AC0' +
'2008407FC90D06755458FFFF4983DCC1708AE5BA483CCA4A5F010' +
'0B4468854902A5EE5E008CC050971CED3A3263EFF889C5F8C87DD' +
'2DBE748BF8F9F59CF8CC454E78D7F3257D2CA3C5A757C97D13959' +
'CADD2840FCA0AD0F65ADCBD45E424992EFFE683D1E52D3E489EF1' +
'4157D87ACBAE8156CE888D19F776ACCDFC03912EEFF3E101FAAB7' +
'5BF');
repeat
OpenDoor('N');
i := i +1;
if not DoorFailSafes then
begin
Wait(3000);
Break;
end
until ((FindBitMapToleranceIn(FinalInstruc, x, y, MCX1, MCY1 -20, MCX2, MCY2, 20)) or (i > 10));
if i > 10 then
begin
WriteLn('We got stuck on our last Door, Setting player to False..');
Players[CurrentPlayer].Loc := 'Last Door';
Players[CurrentPlayer].Active := False;
Logout;
Exit;
end
WriteLn('We are through the last door (7)!');
MakeCompass('N');
HighestAngle;
FreeBitMap(FinalInstruc);
Result := True;
Exit;
end
end;
Result := False;
end;
function OpenGate(Dir: Char; Gate3: Boolean): Boolean;
var i, tx, ty: integer;
begin
if(not(LoggedIn))then Exit;
MakeCompass(Dir);
LowestAngle;
if FindMSArrow(tx, ty) then
begin
for i := 0 to 30 do
begin
if Gate3 then MMouse(tx, ty +(33 +(i*2)), 1, 1) else MMouse(tx, ty +(5 +(i*2)), 1, 1);
Wait(200);
if IsUpTextMulti('Open', 'Gate', 'Open Gate') then
begin
GetMousePos(tx, ty);
Mouse(tx, ty, 0, 0, True);
Flag;
break;
end
end
Result := True;
Wait(2000);
end
end;
function Decrypt(sa : string; x:integer) : string;
var
i,f : integer;
begin
for i := 1 to Length(sa) do
begin
f := ord(sa[i]);
sa[i] := chr(f - x);
result := result + sa[i];
end;
end;
function OpenGateAt(GateNumber: Integer): Boolean;
var i, FYN, Combat, Attacking: integer;
begin
if(not(LoggedIn))then Exit;
Status('Opening gate '+IntToStr(GateNumber));
Case GateNumber of
1 : begin
FYN := BitmapFromString(65, 2, 'z78DA33303030707' +
'333C04B3A393A3A5938628A383939BA5A1A11A3171749895E62CC' +
'74B27434B5304426718923CBE277032E59527561B10B1C9EC4905' +
'8D4239909F51186EDB85C853F24C98B05F2EC25208E2B36897739' +
'462C238B0300A16FB710');
repeat
OpenGate('W', False);
i := i +1;
if not DoorFailSafes then
begin
Wait(3000);
Break;
end
until ((FindBitMapToleranceIn(FYN, x, y, MCX1, MCY1 -20, MCX2, MCY2, 20)) or (i > 10));
if i > 10 then
begin
WriteLn('We got stuck on our first Gate, Setting player to False..');
Players[CurrentPlayer].Loc := 'First Gate';
Players[CurrentPlayer].Active := False;
Logout;
Exit;
end
WriteLn('We are through our first Gate!');
MakeCompass('N');
HighestAngle;
FreeBitMap(FYN);
Result := True;
Exit;
end
2 : begin
Combat := BitmapFromString(35, 2, 'z78DA33303030707373B2743' +
'4B53084928E8E4E168E061071301B99245EDC00D9648838984D94' +
'38D12228E2547239011F21B99964710C3763090D0CBD0084D7620' +
'0');
repeat
OpenGate('E', True);
i := i +1;
if not DoorFailSafes then
begin
Wait(3000);
Break;
end
until ((FindBitMapToleranceIn(Combat, x, y, MCX1, MCY1 -20, MCX2, MCY2, 20)) or (i > 10));
if i > 10 then
begin
WriteLn('We got stuck on our second Gate, Setting player to False..');
Players[CurrentPlayer].Loc := 'Second Gate';
Players[CurrentPlayer].Active := False;
Logout;
Exit;
end
WriteLn('We are through our second Gate!');
MakeCompass('N');
HighestAngle;
FreeBitMap(Combat);
Result := True;
Exit;
end
3 : begin
Attacking := BitmapFromString(58, 3, 'z78DA73727474B2703400' +
'023737FCA41358A593A5A3A985215404CCC6248992859886643BB' +
'2082E712C2A316DC42B8ECB6D448913ED42645D384303877B480E' +
'5B0C57617109112EC76F0E16110CDB49085B22DC80DFE5F843099' +
'7BD64A65BCC14454CBAC5EB36271CF90E57CC921A8F94842D0041' +
'83F1E4');
repeat
OpenGate('E', True);
i := i +1;
if not DoorFailSafes then
begin
Wait(3000);
Break;
end
until ((FindBitMapToleranceIn(Attacking, x, y, MCX1, MCY1 -20, MCX2, MCY2, 20)) or (i > 10));
if i > 10 then
begin
WriteLn('We got stuck on our third Gate, Setting player to False..');
Players[CurrentPlayer].Loc := 'Third Gate';
Players[CurrentPlayer].Active := False;
Logout;
Exit;
end
WriteLn('We are through our third Gate!');
MakeCompass('N');
HighestAngle;
FreeBitMap(Attacking);
Result := True;
Exit;
end
end;
Result := False;
end;
//----------------------------------------------------------------------------//
// --> RUNESCAPE GUIDE <-- //
//----------------------------------------------------------------------------//
procedure Chop(HowMuch: Integer);
var tx, ty, slot, c, i: Integer; ChopTime: LongInt;
begin
if(not(LoggedIn))then Exit;
Status('Chopping');
MarkTime(ChopTime);
repeat
HandleTalk;
c := 0;
Slot := 0;
Slot := InventoryCount;
if (TimeFromMark(ChopTime) > 180000) then
begin
WriteLn('Chopping took longer then 3 mins, Setting player to False..');
Players[CurrentPlayer].Loc := 'Chopping';
Players[CurrentPlayer].Active := False;
Logout;
Exit;
end
if FindObjEx(tx, ty, 'Tree', MSX1 +20, MSY1 +20, MSX2 -50, MSY2 -20, 3170384, 15, 7, 7, 100, True) then
begin
Mouse(tx, ty, 1, 1, True);
Flag;
repeat
Wait(1000);
c := c +1;
until ((InventoryCount > Slot) or (c > 15))
if c <= 15 then
begin
WriteLn('We chopped a Tree');
i := i +1;
if (i >= HowMuch) then Exit;
end
end;
until(i >= HowMuch)
end;
function GetPlayerNum:integer; begin result:= HowManyPlayers-1;
if(HowManyPlayers>4)then result:=3; end;
procedure MakeFire (HowMuch: Integer);
var tx, ty, TinderBox, Log, i, c, slot: Integer; FireMaking: LongInt;
begin
if(not(LoggedIn))then Exit;
Status('Making Fire');
TinderBox := BitmapFromString(9, 1, '9F94949F94949F94949D92' +
'929A8F8F6242096242096242098B8281');
Log := BitmapFromString(11, 1, '000001BE9B6DBC996CBA976B74' +
'562A8A6C4187683F87683F87683F87683F87683F');
MarkTime(FireMaking);
if FindSymbol(tx, ty, 'Fish') then MouseFindFlag(tx +10, ty +5, 1, 1);
Flag;
GameTab(4);
repeat
ClickToContinue;
Slot := 0;
Slot := InvCount;
if ((FindBitmapToleranceIn(TinderBox, x, y, MIX1, MIY1, MIX2, MIY2, 20)) and (FindBitmapToleranceIn(Log, x, y, MIX1, MIY1, MIX2, MIY2, 20))) then
begin
HandleTalk;
if FindBitmapToleranceIn(TinderBox, tx, ty, MIX1, MIY1, MIX2, MIY2, 20) then Mouse(tx, ty, 1, 1, True);
Wait(500);
if ClickToContinue then ClickToContinue;
if FindBitmapToleranceIn(Log, tx, ty, MIX1, MIY1, MIX2, MIY2, 20) then Mouse(tx, ty, 1, 1, True);
Wait(1000);
if PleaseWait then
begin
repeat
Wait(1000);
c := c +1;
until ((not (PleaseWait)) or (c > 10))
if InvCount < Slot then
begin
WriteLn('We made a fire');
i := i +1;
if (i >= HowMuch) then Exit;
end
end
if (TimeFromMark(FireMaking) > 180000) then
begin
WriteLn('FireMaking took longer then 3 mins, Setting player to False..');
Players[CurrentPlayer].Loc := 'FireMaking';
Players[CurrentPlayer].Active := False;
Logout;
Exit;
end
end else break;
until(i >= HowMuch);
FreeBitmap(TinderBox);
FreeBitmap(Log);
end;
function ThereIsFire(var WhereX, WhereY: integer): boolean;
var acc,ref : Extended; XT, YT,times,tol,fire : Integer;
begin
if(not(LoggedIn))then Exit;
Fire := BitmapFromString(1, 11, '3B3000F4C63FF8C83FF4C73EE6' +
'BC39E6BC39BC922CE6BE45BC9E38BC9E3B352A00');
ref:=0.8; tol:=1;
for times:=1 to 4 do
begin
FindDeformedBitmapToleranceIn(Fire, XT, YT, MSCX-(25*times),MSCY-(25*times),MSCX+(25*times),MSCY+(25*times), tol, 2, True, acc);
if (acc >= ref) then
begin
WhereX:=XT;
WhereY:=YT;
Result := True;
Status('Found Fire');
FreeBitmap(Fire);
Exit;
end;
ref := ref - 0.1;
tol:=tol+10;
wait(1);
end;
Result:=False;
Status('Couldnt Find Fire');
FreeBitmap(Fire);
end;
procedure Fish(HowMuch: Integer);
var FishSpotDTM, c, i, slot, tx, ty: Integer; Fishing: LongInt;
begin
if(not(LoggedIn))then Exit;
Status('Fishing');
FishSpotDTM := DTMFromstring('78DA63FCC4C0C070910105CC38F086410E483' +
'342F98C1F31D5E4B52C4255F399083520BB2E10A1E6127E3500EE' +
'831204');
WalkToMMArrow;
GameTab(4);
MarkTime(Fishing);
repeat
ClickToContinue;
if (FindDTM(FishSpotDTM, tx, ty, MSX1, MSY1, MSX2, MSY2)) then
begin
MMouse (tx, ty, 5, 5);
if IsUpText('et Fishing') then Mouse (tx, ty, 5, 5, True ) else
begin
if FindMSArrow(tx, ty) then
begin
MMouse(tx, ty -5, 1, 1);
Wait(50);
if IsUpTextMulti('Net Fishing spot', 'ishing spot', 'Net fish') then Mouse(tx, ty, 0, 0, True);
end
end
end;
Flag;
Slot := 0;
Slot := InvCount;
c := 0;
repeat
Wait(1000);
c := c +1;
until ((InvCount > Slot) or (c > 15))
if c <= 15 then
begin
i := i +1;
WriteLn('We cought a fish');
end
if (TimeFromMark(Fishing) > 180000) then
begin
WriteLn('Fishing took longer then 3 mins, Setting player to False..');
Players[CurrentPlayer].Loc := 'Fishing';
Players[CurrentPlayer].Active := False;
Logout;
Exit;
end
until(i >= HowMuch);
FreeDtm(FishSpotDtm);
end;
procedure CookShrimp(HowMuch: Integer);
var tx, ty, fx, fy, Shrimp, CookedShrimp, BurntShrimp, i: Integer; CookShrimpTime: LongInt;
begin
if(not(LoggedIn))then Exit;
Status('Cooking Shrimp');
Shrimp := BitmapFromString(17, 3, 'z78DA7D4F410A043108FB925' +
'5A3F658EDF4FF4F9A427B1B761542089A28D1AE467FB19E9C8941' +
'914198AA0227B0AC5023CD2E56D05EE13E87750A64EB239EB32BC' +
'4BB613A950FFF85DFDC9378785FAEA8913E8D13018BE2584E29FB' +
'0A3F3327E5A2EA90BCF851BEFE57E198C1A5DBB95575389A356E3' +
'CD403F7A317CB363F8F');
CookedShrimp := BitmapFromString(23, 3, 'z78DA9D8F5D0AC0200' +
'C83AFD49F68F5D139BDFF91E65606822F620B1F25849006A0E815' +
'226EC816DDBF723F61CDF9142519EB3CCC9C92E91D761633E1382' +
'B371B71B6A89D5A0AB04141A0367BCEB8365F3BF88F7E578D8973' +
'EAA82CD680BF837B1ECE3C55C6');
BurntShrimp := BitmapFromString(24, 4, 'z78DA9D905B0A03210C' +
'45B794D755FBE958BBFF25D5312904A603A55E38487CE4289EA8A' +
'8453130E81CFC1F61D6F540B1A78933EA0D82982B09F974D5D586' +
'0D9DFA583125A5BC1F076CC5DD6A21BCBCC2856565D3CFC64E3F9' +
'518B7259F6CE5264E37BFB3B5696D6513648775631DFA31EF8A95' +
'AAA2225D9AB4FC96CC6BC76CF58B49D0FB6E86C9EEE8DD83454E2' +
'1E6C9F3CB0DD9E4F23F773F76F5F1D537531C74EC');
MarkTime(CookShrimpTime);
if FindSymbol(tx, ty, 'Fish') then MouseFindFlag(tx +15, ty +7, 1, 1);
Flag;
Wait(3000);
repeat
if (TimeFromMark(CookShrimpTime) > 360000) then
begin
WriteLn('Cooking Shrimps took longer then 6 mins, Setting player to False..');
Players[CurrentPlayer].Loc := 'Cooking Shrimps';
Players[CurrentPlayer].Active := False;
Logout;
Exit;
end
ClickToContinue;
if ((ThereIsFire(fx, fy)) and (FindBitmapToleranceIn(Shrimp, tx, ty, MIX1, MIY1, MIX2, MIY2, 20))) then
begin
HandleTalk;
Mouse(tx, ty, 1, 1, True);
ClickToContinue;
ClickToContinue;
Mouse(fx, fy, 1, 1, False);
Wait(500);
ChooseOption(x, y, 'Use');
Flag;
Wait(5000);
if i = 0 then if ((FindBitmapToleranceIn(CookedShrimp, tx, ty, MIX1, MIY1, MIX2, MIY2, 20)) or (FindBitmapToleranceIn(BurntShrimp, tx, ty, MIX1, MIY1, MIX2, MIY2, 20))) then
begin
WriteLn('We cooked/burned a Shrimp');
i := i +1;
end
if i = 1 then if (CountItemBmpTol(CookedShrimp, 20) > 1) or (CountItemBmpTol(BurntShrimp, 20) > 1) then
begin
WriteLn('We cooked/burned a Shrimp');
i := i +1;
end
if i = 1 then if (CountItemBmpTol(CookedShrimp, 20) = 1) and (CountItemBmpTol(BurntShrimp, 20) = 1) then
begin
WriteLn('We cooked and burned a Shrimp');
i := i +1;
end
end else
begin
if not FindBitmapToleranceIn(Shrimp, tx, ty, MIX1, MIY1, MIX2, MIY2, 20) then Break;
WriteLn('We did not find a fire, we are making one');
Chop(1);
Wait(500);
MakeFire(1);
Wait(1000);
end
until(i >= HowMuch)
FreeBitmap(Shrimp);
FreeBitmap(CookedShrimp);
FreeBitmap(BurntShrimp);
end;
//----------------------------------------------------------------------------//
// --> MASTER CHEF <-- //
//----------------------------------------------------------------------------//
procedure MakeDough(HowMuch: Integer);
var px, py, bx, by, PotOfFlour, BucketOfWater, Dough, i, slot: Integer; DoughTime: LongInt;
begin
if(not(LoggedIn))then Exit;
Status('Making Dough');
PotOfFlour := BitmapFromString(18, 3, 'z78DA758E5B0A43210C44B714' +
'F318934F8DD7FD2FA9DEA68542DB0C041472E6187429D33DEDDF8' +
'6AAB2F634E3EC66C4135B2703AE6005696336972CCCFBCA9EE4CF' +
'5DFF4E06BE7E70A606A38709CFD8A1A139F240B3CF7D424387860' +
'1829808E91E760915E7DBB95A1C3685CAFFE599723155CB5ACB4F' +
'72F593B18EE279C9E28C6CD9C66DB13D9CFAAE2EDF68F272287E9' +
'93F00F6A7451C');
BucketOfWater := BitmapFromString(15, 2, '5C4615533F15493911493911' +
'4939114939114F3C115E58588D838369501B6049185C461560491' +
'8644D180000014939113F300E7B7B9B7B7B9B7B7B9B7B7B9B7B7B' +
'9B615A5A847A7A6860604534114534116049185C4615000001');
Dough := BitmapFromString(24, 1, 'AAA988AAA988AAA988AAA988A' +
'AA988AAA988A6A685A5A483A1A1809D9C7D999879959476909073' +
'8D8C7088886C7D7C6373735C6867535A59464D4D3E3C3C3000000' +
'1564D42564D42');
MarkTime(DoughTime);
GameTab(4);
repeat
ClickToContinue;
if ((FindBitmapToleranceIn(PotOfFlour, px, py, MIX1, MIY1, MIX2, MIY2, 20)) and (FindBitmapToleranceIn(BucketOfWater, bx, by, MIX1, MIY1, MIX2, MIY2, 20))) then
begin
Slot := InvCount;
Mouse(px, py, 1, 1, True);
Wait(500);
Mouse(bx, by, 1, 1, True);
Wait(3000);
if ((FindBitmapToleranceIn(Dough, x, y, MIX1, MIY1, MIX2, MIY2, 20)) and (InvCount > Slot)) then
begin
WriteLn('We made dough');
i := i +1;
end
end else Break;
if (TimeFromMark(DoughTime) > 180000) then
begin
WriteLn('Making Dough took longer then 3 mins, Setting player to False..');
Players[CurrentPlayer].Loc := 'Making Dough';
Players[CurrentPlayer].Active := False;
Logout;
Exit;
end
until (i >= HowMuch)
FreeBitmap(PotOfFlour);
FreeBitmap(BucketOfWater);
FreeBitmap(Dough);
end;
procedure CookBread(HowMuch: Integer);
var dx, dy, tx, ty, BreadDough, Bread, i: Integer; CookBreadTime: LongInt;
begin
if(not(LoggedIn))then Exit;
Status('Cooking Bread');
BreadDough := BitmapFromString(24, 1, 'AAA988AAA988AAA988AAA988A' +
'AA988AAA988A6A685A5A483A1A1809D9C7D999879959476909073' +
'8D8C7088886C7D7C6373735C6867535A59464D4D3E3C3C3000000' +
'1564D42564D42');
Bread := BitmapFromString(16, 2, '564D42000001A58715A28411A' +
'28411A28411987C118E7411886E0E846B0E7C660E745F0E6D590E' +
'604D094C3E093C3000000001A587159C7F11A284119F81119F811' +
'19F81119F81119579118B7111846B0E78620E705B0E6451095B4B' +
'094C3E09');
MakeDough(HowMuch);
GameTab(4);
if not FindFastMSArrow(x, y) then WalkToMMArrow;
MarkTime(CookBreadTime);
repeat
ClickToContinue;
if FindBitmapToleranceIn(BreadDough, dx, dy, MIX1, MIY1, MIX2, MIY2, 20) then
begin
Mouse(dx, dy, 1, 1, True);
Wait(100);
if FindMSArrow(tx, ty) then
begin
MMouse(tx, ty -5, 1, 1);
Wait(200);
if IsUpTextMulti('Use Range', 'Use', 'Range') then
begin
Mouse(tx, ty, 0, 0, False);
Wait(300);
ChooseOption(x, y, 'Use');
Flag;
Wait(6000);
if FindBitmapToleranceIn(Bread, tx, ty, MIX1, MIY1, MIX2, MIY2, 20) then
begin
WriteLn('We cooked bread');
i := i +1;
end
end
end
end else Break;
if (TimeFromMark(CookBreadTime) > 180000) then
begin
WriteLn('Cooking Bread took longer then 3 mins, Setting player to False..');
Players[CurrentPlayer].Loc := 'Cooking Bread';
Players[CurrentPlayer].Active := False;
Logout;
Exit;
end
until(i >= HowMuch)
FreeBitmap(BreadDough);
FreeBitmap(Bread);
end;
//----------------------------------------------------------------------------//
// --> LADDER PROCEDURES <-- //
//----------------------------------------------------------------------------//
procedure ClimbDownLadder;
var tx, ty, i, c: integer;
begin
if(not(LoggedIn))then Exit;
Status('Climbing down Ladder');
MakeCompass('S');
if not FindFastMSArrow(x, y) then WalkToMMArrow;
repeat
ClickToContinue;
if FindMSArrow(tx, ty) then
begin
MMouse(tx, ty, 1, 1);
Wait(200);
if IsUpTextMulti('Climb-down Ladder', 'Ladder', 'down La') then
begin
Mouse(tx, ty, 2, 2, False);
Wait(300);
ChooseOption(x, y, 'Climb-down');
c := 0;
repeat
if (FindColor(x, y, 16711680, 180, 360, 320, 375) or (GetColor(327, 374) = 16711680)) then Break;
Wait(1000);
c := c +1;
until c > 9
if (FindColor(x, y, 16711680, 180, 360, 320, 375) or (GetColor(327, 374) = 16711680)) then Break;
i := i +1;
end
end
until(i > 10)
if i <= 10 then WriteLn('We are underground') else
begin
WriteLn('We got stuck on Climbing down the Ladder, Setting player to False..');
Players[CurrentPlayer].Loc := 'First Ladder';
Players[CurrentPlayer].Active := False;
Logout;
Exit;
end
Mouse(665, 30, 1, 1, True);
Wait(4000);
Flag;
end;
procedure ClimbUpLadder;
var tx, ty, i, c: integer;
begin
if(not(LoggedIn))then Exit;
Status('Climbing up Ladder');
if not FindFastMSArrow(x, y) then WalkToMMArrow;
repeat
ClickToContinue;
if GetColor(232, 371) = 16711680 then if GetColor(320, 440) = 0 then Break;
if FindMSArrow(tx, ty) then
begin
MMouse(tx, ty +5, 6, 6);
Wait(200);
if IsUpTextMulti('Climb-up Ladder', 'Ladder', 'up La') then
begin
GetMousePos(tx, ty);
Mouse(tx, ty, 0, 0, False);
Wait(300);
if ChooseOption(x, y, 'Climb-up') then
repeat
if GetColor(232, 371) = 16711680 then if GetColor(320, 440) = 0 then Break;
Wait(1000);
c := c +1;
until c > 12
i := i +1;
end
end
until(i > 10)
if i <= 10 then WriteLn('We are out the cave!') else
begin
WriteLn('We got stuck on Climbing up the Ladder, Setting player to False..');
Players[CurrentPlayer].Loc := 'Second Ladder';
Players[CurrentPlayer].Active := False;
Logout;
Exit;
end
end;
//----------------------------------------------------------------------------//
// --> MINING INSTRUCTOR <-- //
//----------------------------------------------------------------------------//
procedure Prospect;
var tx, ty, i, c, t: Integer; Prospecting: LongInt;
begin
if(not(LoggedIn))then Exit;
Status('Prospecting');
MarkTime(Prospecting);
repeat
WalkToMMArrow;
Wait(1000);
Flag;
i := 0
repeat
ClickToContinue;
if c = 0 then if GetColor(325, 426) = 0 then if GetColor(280, 373) = 16711680 then Break;
if c = 1 then if GetColor(302, 426) = 0 then if GetColor(291, 374) = 16711680 then Break;
if FindMSArrow(tx, ty) then
begin
ClickToContinue;
MMouse(tx, ty, 1, 1);
Wait(200);
if IsUpTextMulti('Mine Rocks', 'Mine', 'Rocks') then
begin
Mouse(tx, ty, 0, 0, False);
Wait(300);
if ChooseOption(x, y, 'Prospect') then
begin
Flag;
Wait(500);
if c = 0 then if GetColor(325, 426) = 0 then if GetColor(280, 373) = 16711680 then Break;
if c = 1 then if GetColor(302, 426) = 0 then if GetColor(291, 374) = 16711680 then Break;
if PleaseWait then
begin
t := 0;
repeat
if not PleaseWait then Break;
Wait(1000);
t := t +1;
until t > 9
Wait(2000);
if ClickToContinue then Break;
end
i := i +1;
end;
end
end
until(i > 10)
if i > 10 then
begin
WriteLn('We got stuck while Prospecting Ores, Setting player to False..');
Players[CurrentPlayer].Loc := 'Prospect';
Players[CurrentPlayer].Active := False;
Logout;
Exit;
end
c := c +1
until(c > 1);
WriteLn('We prospected 2 ores');
Wait(1500);
end;
procedure Mine(HowMuch: Integer);
var tx, ty, Slot, i, c, t, YouManageTo: Integer;
begin
if(not(LoggedIn))then Exit;
Status('Mining');
YouManageTo := BitmapFromString(97, 2, 'z78DAB552CB0AC030' +
'08FB255B28AD4785FDFF2F8DDD1C12D176F39043D4101F444FA8C' +
'AC5DD2285BC0D15D125165136EECA23154359C66A0833F57FEB67' +
'EA7D2F54FE749F056FE04FE05F390FC85B9EDF9B1DF26E7674AF4' +
'C6555E7C577E639F6F4E36BFA9F39D9EDC9EC377FE9004F');
repeat
GameTab(4);
Slot := 0;
Slot := InvCount;
WalkToMMArrow;
Wait(1000);
Flag;
i := 0
repeat
if (InvCount > Slot) then Break;
if FindMSArrow(tx, ty) then
begin
ClickToContinue;
MMouse(tx, ty, 1, 1);
Wait(200);
if IsUpTextMulti('Mine Rocks', 'Mine', 'Rocks') then
begin
Mouse(tx, ty, 0, 0, False);
Wait(300);
if ChooseOption(x, y, 'Mine') then
begin
Flag;
Wait(500);
if PleaseWait then
begin
t := 0;
repeat
if not PleaseWait then Break;
Wait(1000);
t := t +1;
until t > 9
Wait(1000);
GameTab(4);
if (FindBitMapToleranceIn(YouManageTo, x, y, MCX1, MCY1, MCX2, MCY2, 20) or (InvCount > Slot)) then Break;
end
end;
ClickToContinue;
i := i +1;
end
end
until(i > 10)
if i > 10 then
begin
WriteLn('We got stuck while Mining the Ores, Setting player to False..');
Players[CurrentPlayer].Loc := 'Mining';
Players[CurrentPlayer].Active := False;
Logout;
Exit;
end
c := c +1
until(c >= HowMuch);
WriteLn('We mined '+ IntToStr(HowMuch) +' ores');
end;
procedure Smelt(HowMuch: Integer);
var i, ox, oy, tx, ty, Tin, Bar: Integer; Smelting: LongInt;
begin
if(not(LoggedIn))then Exit;
Status('Melting');
Tin := BitmapFromString(29, 2, 'z78DA754F490E03210CFB521667' +
'E1C8B0FCFF49650AAAB8944856141CDB215A8F39D96808F1C32C4' +
'DC0A9218DBB4E8500A9558A11D61F7DF906547DD001CD3DD9183D' +
'10C8999656282363E3CDB9F128039011CD014FF18292D52766B65' +
'8B1365349569D9CBE3ADB5B9670257B501436D0D41DC65A767FEF' +
'1E47D1A1C3ABBF227F526DFE8DBFAB97A333A646BC6E92E91D6DE' +
'73C3843EDE87C00D9644776');
Bar := BitmapFromString(18, 2, 'z78DA3336300242303044268D8C' +
'0C9D0C5C4925CD0C4C2C8D9C2124C41C63B0F910D2D4C4C4D1D80' +
'942228B93673B4E5BCC4C5C4C8C00C70F2C55');
if not WalkToMMArrow then if FindSymbol(tx, ty, 'furnace') then MouseFindFlag(tx, ty, 1, 1);
Flag;
GameTab(4);
MarkTime(Smelting);
repeat
if FindBitmapToleranceIn(Tin, ox, oy, MIX1, MIY1, MIX2, MIY2, 20) then
begin
Mouse(ox, oy, 1, 1, True);
if FindMSArrow(tx, ty) then
begin
MMouse(tx, ty, 1, 1);
Wait(200);
if IsUpTextMulti('Use Furnace', 'Furnace', 'se Fur') then
begin
Mouse(tx, ty, 0, 0, True);
Wait(6000);
if FindBitmapToleranceIn(Bar, ox, oy, MIX1, MIY1, MIX2, MIY2, 20) then
begin
WriteLn('We melted a bar');
i := i +1;
end
end
end
end else Break;
if (TimeFromMark(Smelting) > 180000) then
begin
WriteLn('Melting took longes then 3 mins, Setting player to False..');
Players[CurrentPlayer].Loc := 'Melting';
Players[CurrentPlayer].Active := False;
Logout;
Exit;
end
until(i >= HowMuch)
FreeBitmap(Tin);
FreeBitmap(Bar);
end;
procedure Smith(HowMuch: Integer);
var bar, i, tx, ty: Integer; Smithing: LongInt;
begin
if(not(LoggedIn))then Exit;
Status('Smithing');
Bar := BitmapFromString(18, 2, 'z78DA3336300242303044268D8C' +
'0C9D0C5C4925CD0C4C2C8D9C2124C41C63B0F910D2D4C4C4D1D80' +
'942228B93673B4E5BCC4C5C4C8C00C70F2C55');
WalkToMMArrow;
GameTab(4);
Wait(1000);
Flag;
MarkTime(Smithing);
repeat
if FindBitmapToleranceIn(Bar, tx, ty, MIX1, MIY1, MIX2, MIY2, 20) then if not FindColorTolerance(x, y, 16777215, tx -10, ty -10, tx +10, ty +10, 5) then Mouse(tx, ty, 1, 1, True) else Break;
if FindMSArrow(tx, ty) then
begin
for i := 0 to 30 do
begin
MMouse(tx, ty + (5 +i), 1, 1);
Wait(200);
if IsUpTextMulti('Anvil', 'Use', 'nvil') then
begin
GetMousePos(tx, ty);
Mouse(tx, ty, 0, 0, False);
Wait(300);
if not ChooseOption(x, y, 'Anvil') then Break else
begin
Wait(2000);
Mouse(27, 66, 1, 1, True);
Wait(5000);
if not ClickToContinue then
begin
WriteLn('We smithed a Dagger');
i := i +1;
Break;
end
end
end
end
end
if (TimeFromMark(Smithing) > 180000) then
begin
WriteLn('Smithing took longer then 3 mins, Setting player to False..');
Players[CurrentPlayer].Loc := 'Smithing';
Players[CurrentPlayer].Active := False;
Logout;
Exit;
end
until(i >= HowMuch)
FreeBitmap(Bar);
end;
//----------------------------------------------------------------------------//
// --> COMBAT INSTRUCTOR <-- //
//----------------------------------------------------------------------------//
procedure Wield(What: string);
var tx, ty, Dagger, Shield, Sword, Arrows, Bow, Weapon: integer;
begin
if(not(LoggedIn))then Exit;
Status('Wielding '+What);
Dagger := BitmapFromString(6, 9, 'z78DA65CD311603210804D02B' +
'81084809EAFDAF1412B2C9EE738A69E6A34E8ED8E01DBCB77077F' +
'2BE281A296B87ED1FE9D31DB94CADD5AC2C600307A404DB978C11' +
'825C8684044030EB29CD3525075D2F73E306A64B276C9B1669C43' +
'94D0BF819A500AB962DEB29EF6B755D0D1E94D24CB19D2BFC83E7' +
'2F87F9E605A39D43F5');
Shield := BitmapFromString(21, 5, 'z78DAA590410AC0200C04BFB' +
'43131254751FAFF2755B09582A6B4750F730B3304E8238D92614A' +
'62B09825566E123A03EF30299C2A8DB59399008F5C42E9D460970' +
'BF3D15872F6FC6A78EDF54B52446DF03ED37A9C8666FFE8754B46' +
'4E4A6E9F59F62EB53D9F1DB54F7BB0');
Sword := BitmapFromString(6, 7, 'z78DA75CC510E80300803D02B9' +
'532D8F8DCB279FF2349D42FA7FD21292F05DE6110421E34B1AB10' +
'EC66FBB668156B7040EC6F415D1DE8DEB3BFE5BE5F669988F030E' +
'1236DE8879412391199FA25D599C7A88A70D3DC6C475B29B58BF0' +
'9627C63A3300');
Arrows := BitmapFromString(10, 12, 'z78DA9D90490E80300C03BF' +
'1467A1ED9102FFFF1248E110885A2172B0BA4D6D99E835D05D3A8' +
'B9200879FD06CFC16B669E5AE2686438C1BEA9445D405BAF2EEAC' +
'EB80454A052B62D4E4E2D15D138B9CCA292EF7FE95679ECAD9F85' +
'29B54A6982DB3D9D14C99CBA0B1874B5C2FDD58BE67A3E8E86C6E' +
'6CD006E53CB9B1EC38623FFCF6607F39D209E29E8E5A');
Bow := BitmapFromString(15, 5, 'z78DA8D90D10E802008457F0916' +
'083C5AF2FFBF14CBDA34D375DDCE83BB9C31005EC14A39648B37B' +
'0E98C41412AE0C9298377FF13DBE0FCA03063E7FCBFE1D33426F0' +
'EAB9D9EC993229D8DAA9C816538553B0DA5AE7658365D4383ACAB' +
'C0727B6E51DA63901F2AE5BE5');
case LowerCase(what) of
'dagger' : Weapon := Dagger;
'shield' : Weapon := Shield;
'sword' : Weapon := Sword;
'arrows' : Weapon := Arrows;
'bow' : Weapon := Bow;
end;
GameTab(4);
if FindBitmapToleranceIn(Weapon, tx, ty, MIX1, MIY1, MIX2, MIY2, 20) then
begin
Mouse(tx, ty, 1, 1, True);
WriteLn('We wielded the '+What);
end
FreeBitmap(Dagger);
FreeBitmap(Shield);
FreeBitmap(Sword);
FreeBitmap(Arrows);
FreeBitmap(Bow);
end;
function ClickRat: Boolean;
var RatPoints: TPointArray; i, ci: integer;
begin
if(not(LoggedIn))then Exit;
Status('Searching Rat');
FindColorsSpiralTolerance(MSCx, MSCY, RatPoints, 9213847, 90, 65, 420, 250, 5)
for i := 0 to (GetArrayLength(RatPoints)-1) do
begin
if (Distance(RatPoints[ci].x, 0, RatPoints[i].x, 0) >= 10) and
(Distance(0, RatPoints[ci].y, 0, RatPoints[i].y) >= 10) then
ci := i
else
begin
RatPoints[i].x := 0;
RatPoints[i].y := 0;
end;
end;
for i := 0 to (GetArrayLength(RatPoints)-1) do
begin
if (RatPoints[i].x <> 0) then
if FindColorTolerance(x, y, 7041908, RatPoints[i].x -8, RatPoints[i].y -8, RatPoints[i].x +8, RatPoints[i].x +8, 10) then
if FindColorTolerance(x, y, 8753039, RatPoints[i].x -8, RatPoints[i].y -8, RatPoints[i].x +8, RatPoints[i].x +8, 10) then
begin
if not IsFightAt(RatPoints[i].x, RatPoints[i].y) then
begin
MMouse(RatPoints[i].x, RatPoints[i].y, 0, 0);
Wait(100);
if IsUpText('ack') then
begin
Mouse(RatPoints[i].x, RatPoints[i].y, 0, 0, True);
Result := True;
Exit;
end;
end;
end;
end;
end;
procedure Fight;
var WellDone, i, c: integer; WaitTime: LongInt;
begin
if(not(LoggedIn))then Exit;
WellDone := BitmapFromString(56, 5, 'z78DAB553490AC0200CFC5' +
'25B28E83181FAFF27B5D84B4A98382EF5304834DB64A22A573EB6' +
'E794A2F5EE71E695411F6130A68826E9CDD588602DEFDD629633E' +
'D1F4B9885EF6B86D5413E7D771E57F1C930597195F6E2895884BE' +
'A8AA5821B63B833E2F5303FC63AA823117F1D9AB6DA846CF27AF4' +
'0C6B77317A8E91B95C6F3FA834FEA27E204EC17DC38E0D5985D5C' +
'0361BF0195C49065');
repeat
repeat
if GetColor(256, 432) = 8388608 then Mouse(256, 432, 1, 1, True);
if ClickRat then
begin
Flag;
Wait(2000);
if GetColor(307, 436) <> 8388608 then if GetColor(353, 400) <> 0 then Break;
ClickToContinue;
end
c := c +1;
until(c > 50)
WriteLn('We are fighting');
MarkTime(WaitTime);
repeat
Status('Fighting');
Wait(1000);
if GetColor(256, 432) = 8388608 then Break;
if FindBitmapToleranceIn(WellDone, x, y, 115, 355, 205, 385, 30) then
begin
FreeBitmap(WellDone);
WriteLn('Killed a rat');
Exit;
end;
if not InFight then
begin
Wait(800);
if not InFight then Break;
end
until (TimeFromMark(WaitTime) > 75000)
i := i +1;
until i > 8
WriteLn('We got stuck on Figting Rats, Setting player to False..');
Players[CurrentPlayer].Loc := 'Fighting';
Players[CurrentPlayer].Active := False;
Logout;
Exit;
end;
function finddoorcolor: integer; //Boreas
var Color,tmpx,tmpy,MinOfRange:integer;
Length206,Length217,Length233,Length241:integer;
Array206,Array217,Array233,Array241:array of tpoint;
RangeOfOthers206,RangeOfOthers217,RangeOfOthers233,RangeOfOthers241:integer;
tmpbool:boolean;
begin
if(not(LoggedIn))then Exit;
for Color:=254 downto 200 do
begin
if not(((Color=206)or(Color=217)or(Color=233)or(Color=241))) then
begin
if FindColor(tmpx,tmpy,Color,mmx1,mmy1,mmx2,mmy2) then
begin
result:=Color;
tmpbool:=true;
end;
end;
if tmpbool then break;
end;
if not(tmpbool) then
begin
//writeln('its a drop dot color');
FindColorsTolerance(Array206,206,mmx1,mmy1,mmx2,mmy2,0);
Length206:=getarraylength(Array206);
FindColorsTolerance(Array217,217,mmx1,mmy1,mmx2,mmy2,0);
Length217:=getarraylength(Array217);
FindColorsTolerance(Array233,233,mmx1,mmy1,mmx2,mmy2,0);
Length233:=getarraylength(Array233);
FindColorsTolerance(Array241,241,mmx1,mmy1,mmx2,mmy2,0);
Length241:=getarraylength(Array241);
RangeOfOthers206:=max(Length233,max(Length217,Length241))-min(Length233,min(Length217,Length241));
RangeOfOthers217:=max(Length233,max(Length206,Length241))-min(Length233,min(Length206,Length241));
RangeOfOthers233:=max(Length206,max(Length217,Length241))-min(Length206,min(Length217,Length241));
RangeOfOthers241:=max(Length233,max(Length217,Length206))-min(Length233,min(Length217,Length206));
MinOfRange:=min(RangeOfOthers206,min(RangeOfOthers217,min(RangeOfOthers233,RangeOfOthers241)));
case MinOfRange of
RangeOfOthers206: result:=206;
RangeOfOthers217: result:=217;
RangeOfOthers233: result:=233;
RangeOfOthers241: result:=241;
end;
end;
end;
function OutGate(Color: integer): Boolean;
begin
if(not(LoggedIn))then Exit;
if GetColor(647, 80) = Color then Result := True;
if not Result then
if GetColor(646, 85) = Color then Result := True;
if not Result then
if GetColor(646, 84) = Color then Result := True;
if not Result then
if GetColor(647, 78) = Color then Result := True;
if not Result then
if GetColor(647, 86) = Color then Result := True;
if not Result then Result := False;
if Result then WriteLn('We are out the Rat Cage!');
end;
procedure WalkToGate;
var DoorColor, t, c, i, tx, ty: integer;
begin
Status('Opening the gate at the Rat Cage');
repeat
if(not(LoggedIn))then Exit;
DoorColor := finddoorcolor;
WriteLn('DoorColor '+inttostr(doorcolor));
if c > 0 then if OutGate(DoorColor) then
begin
MakeCompass('N');
HighestAngle;
Exit;
end
if FindColor(tx, ty, DoorColor, MMX1, MMY1, MMX2, 115) then
begin
MouseFindFlag(tx, ty, -1, -1);
Flag;
MakeCompass('W');
LowestAngle;
for i := 0 to 30 do
begin
MMouse(205 +(i*3), 95 +(i*2), 1, 1);
Wait(200);
if IsUpTextMulti('Open', 'Gate', 'Open Gate') then
begin
GetMousePos(tx, ty);
WriteLn('We found the gate using the DoorColor');
Mouse(tx, ty, 0, 0, True);
MakeCompass('N');
t := 0
repeat
t := t +1;
Wait(500)
until((OutGate(DoorColor)) or (t > 8))
if t <= 8 then
begin
MakeCompass('N');
HighestAngle;
Exit;
end else c := c +1;
end else c := c +1;
end
end else c := c +1
until(c > 20)
WriteLn('We could not get out of the Rat Cage, Setting player to False..');
Players[CurrentPlayer].Loc := 'Rat Cage';
Players[CurrentPlayer].Active := False;
Logout;
Exit;
end;
function InRange: Boolean; //Thanks to Lorax for this idea.
var Temp, Arrows1, Arrows2: integer;
begin
GameTab(5);
Arrows1:=StrToInt(Trim(GetTextAtEx(670,249,45, StatChars,False,False,0,2,-1,3,True,tr_AllChars)));
MarkTime(Temp);
repeat
if FindNpcChatText('Moving on') then
begin
Result := True;
Exit;
end
Wait(500);
until (TimeFromMark(Temp) >= 3000)
Arrows2:=StrToInt(Trim(GetTextAtEx(670,249,45, StatChars,False,False,0,2,-1,3,True,tr_AllChars)));
if Arrows2 < Arrows1 then Result := True;
end;
procedure RangeRat;
var i, c, Moving: integer; WaitTime: LongInt;
begin
if(not(LoggedIn))then Exit;
Moving := BitmapFromString(44, 5, 'z78DAB593C10E80200C43' +
'7F494D4CE0B825F2FF9FA4110E23654B55E4D04347CAF60015D12' +
'47AEB72AD52D4381A57B3EC69B5DAF680DFD4497EAA719FAEAA1C' +
'79FB9E3C8103D260F84C65F80B07E8D363557DAB381DFA98D6253' +
'8FEE02C8603DEE32C0EE10B417FB033A4C17738980EF3E9F7CCFC' +
'7D6ABA980331DD4B0ECE2FABD513633738E2');
if not FindObjEx(x, y, 'Attack' ,110, 85, 400, 230, 9213847, 30, 7, 7, 100, True) then WalkToMMArrow;
MakeCompass('W');
repeat
repeat
if ClickRat then
begin
if FindBitmapToleranceIn(moving, x, y, 210, 360, 305, 380, 30) then Break;
Flag;
Wait(3000);
if GetColor(256, 432) = 8388608 then Mouse(256, 432, 1, 1, True) else Break;
end
c := c +1;
until(c > 50)
if c > 50 then
begin
WriteLn('We could not find a Rat to range, Terminating..');
TerminateScript;
end;
MarkTime(WaitTime);
repeat
Status('Ranging');
Wait(2000);
if FindBitmapToleranceIn(moving, x, y, 210, 360, 305, 380, 30) then
begin
WriteLn('Ranged a Rat');
MakeCompass('N');
GameTab(4);
Exit;
end;
if not InRange then Break;
until (TimeFromMark(WaitTime) > 60000)
i := i +1;
until i > 8
WriteLn('We got stuck on Ranging a Rat, Setting player to False..');
Players[CurrentPlayer].Loc := 'Ranging';
Players[CurrentPlayer].Active := False;
Logout;
Exit;
end;
//----------------------------------------------------------------------------//
// --> BANING PROCEDURES <-- //
//----------------------------------------------------------------------------//
function MyOpenBank: Boolean;
var x, y, fs2: Integer;
begin
if(not(LoggedIn))then Exit;
Status('Opening bank');
MakeCompass('S');
if not BankScreen then
repeat
if (FindObjEx(x, y, 'Use Bank', MSX1, MSY1, MSX2, MSY2, 2171171, 5, 10, 10, 100, True)) then
Mouse(x, y, 4, 4, False)
else
if (FindObjEx(x, y, 'Use Bank', MSX1, MSY1, MSX2, MSY2, 4276296, 10, 10, 10, 100, True)) then
Mouse(x, y, 4, 4, False)
else
if (FindObjEx(x, y, 'Use Bank', MSX1, MSY1, MSX2, MSY2, 540501, 10, 10, 10, 100, True)) then
Mouse(x, y, 4, 4, False);
Wait(250);
if (ClickOption('Use', 1)) then Result := True;
Flag;
fs2 := fs2 + 1;
until (Result) or (fs2 > 8);
MakeCompass('N');
end;
//----------------------------------------------------------------------------//
// --> MAGE PROCEDURES <-- //
//----------------------------------------------------------------------------//
procedure CastStrikes;
var tx, ty, i, c, Almost: integer; WaitTime: LongInt;
begin
Almost := BitmapFromString(34, 3, 'z78DA73727474B2703400023' +
'73727301B99A45C9C804A4B47530B436492181350449074219374' +
'F20BB29B71F9856871CC1020C1CDC4D84879BCE077330E710082B' +
'D8EA3');
MakeCompass('E');
repeat
if(not(LoggedIn))then Exit;
Status('Maging');
c := 0;
repeat
ClickToContinue;
if GetColor(602, 231) <> 16777215 then repeat Mouse(601, 238, 0, 0, True) until GetColor(602, 231) = 16777215
if FindObjEx(tx, ty, 'Chicken' ,MSX1, MSY1, MSCX +20, MSY2, 857975, 30, 7, 7, 100, True) then
begin
Mouse(tx, ty, 0, 0, False);
if ChooseOption(x, y, 'Chicken') then Break;
end else if c < 2 then if not FindFastMSArrow(x, y) then MouseFindFlag(645, 83, 0, 0);
Flag;
c := c +1;
until(c > 50)
if c > 50 then
begin
WriteLn('Could not find a Chicken to Mage, Setting player to False..');
Players[CurrentPlayer].Loc := 'Mage';
Players[CurrentPlayer].Active := False;
Logout;
Exit;
end;
WriteLn('We are casting');
MarkTime(WaitTime);
repeat
Flag;
Wait(2000);
if FindBitmapToleranceIn(Almost, x, y, 185, 360, 240, 380, 30) then Exit;
until (TimeFromMark(WaitTime) > 4000)
i := i +1;
until i > 16
WriteLn('We got stuck on maging Chickens, Setting player to False..');
Players[CurrentPlayer].Loc := 'Maging Chickens';
Players[CurrentPlayer].Active := False;
Logout;
Exit;
end;
//----------------------------------------------------------------------------//
// --> CONVERTING PROCEDURES <-- //
//----------------------------------------------------------------------------//
function MsToMin(Ms: LongInt): Integer;
begin
Result := (Ms/1000)/60;
end;
function MsToSec(Ms: LongInt): Integer;
begin
Result := Ms/1000;
end;
//----------------------------------------------------------------------------//
// --> HEAD PROCEDURES <-- //
//----------------------------------------------------------------------------//
procedure RuneScapeGuide;
var TempTime: LongInt;
begin
WriteLn('Making character');
if SmartzCharMaker then SmartzCharacter else NielsMakeChar;
WriteLn('Starting with the RuneScape Guide');
MarkTime(TotalTime);
MarkTime(TempTime);
ClickToContinue;
HighestAngle;
TalkToNpcByArrow('RuneScape Guide');
HandleTalk;
GameTab(11);
Wait(1000);
Mouse(712, 226, 1, 1, True);
Wait(1000);
SetRun(True);
ClickToContinue;
TalkToNpcByArrow('RuneScape Guide');
HandleTalk;
WalkToMMArrow;
OpenDoorAt(1);
ClickToContinue;
if(not(LoggedIn))then Exit;
WriteLn('Ended the RuneScape Guide');
AddToReport(' RuneScape Guide took: '+ IntToStr(Round(MsToSec(TimeFromMark(TempTime)))) +' sec.');
WriteLn(' ');
end;
procedure SurvivalExpert;
var TempTime: LongInt;
begin
Mouse(665, 105, 1, 1, True);
Flag;
Wait(500);
MarkTime(TempTime);
WriteLn('Starting with the Survival Expert');
TalkToNpcByArrow('Survival Expert');
HandleTalk;
GameTab(4);
ClickToContinue;
Chop(2);
Wait(500);
MakeFire(1);
GameTab(2);
TalkToNpcByArrow('Survival Expert');
HandleTalk;
Fish(2);
ClickToContinue;
CookShrimp(2);
if(not(LoggedIn))then Exit;
WriteLn('Ended the Survival Expert');
AddToReport(' Survival Expert took: '+ IntToStr(Round(MsToSec(TimeFromMark(TempTime)))) +' sec.');
WriteLn(' ');
end;
procedure MasterChef;
var TempTime: LongInt;
begin
WriteLn('Starting with Master Chef');
MarkTime(TempTime);
WalkToMMArrow;
OpenGateAt(1);
WalkToMMArrow;
OpenDoorAt(2);
SetRun(False);
TalkToNpcByArrow('Master Chef');
HandleTalk;
CookBread(1);
Wait(1000);
GameTab(13);
Wait(1500);
if(not(LoggedIn))then Exit;
WriteLn('Ended Master Chef');
AddToReport(' Master Chef took: '+ IntToStr(Round(MsToSec(TimeFromMark(TempTime)))) +' sec.');
WriteLn(' ');
end;
procedure QuestGuide;
var TempTime: LongInt;
begin
WriteLn('Starting with the QuestGuide');
MarkTime(TempTime);
WalkToMMArrow;
OpenDoorAt(3);
Wait(1500);
GameTab(13);
DoEmote(Random(5) +1);
Wait(1000);
DoEmote(Random(5) +1);
Wait(1000);
GameTab(12);
SetRun(True);
Wait(1500);
Mouse(650, 30, -1, -1, True);
Wait(3000);
Flag;
Mouse(675, 30, 1, 1, True);
Wait(3000);
Flag;
if not WalkToMMArrow then
begin
Mouse(630, 38, 1, 1, True);
Wait(3000);
Flag;
end
OpenDoorAt(4);
TalkToNpcByArrow('Quest Guide');
HandleTalk;
GameTab(3);
Wait(3000);
TalkToNpcByArrow('Quest Guide');
HandleTalk;
ClimbDownLadder;
if(not(LoggedIn))then Exit;
WriteLn('Ended the QuestGuide');
AddToReport(' QuestGuide took: '+ IntToStr(Round(MsToSec(TimeFromMark(TempTime)))) +' sec.');
WriteLn(' ');
end;
procedure MiningInstructor;
var TempTime: LongInt;
begin
WriteLn('Starting with the Mining Instructor');
MakeCompass('N');
//SetRun(False);
MarkTime(TempTime);
TalkToNpcByArrow('Mining Instructor');
HandleTalk;
Prospect;
if(not(finished))Then Exit;
TalkToNpcByArrow('Mining Instructor');
HandleTalk;
Mine(2);
Smelt(1);
TalkToNpcByArrow('Mining Instructor');
HandleTalk;
Smith(1);
WalkToMMArrow;
if(not(LoggedIn))then Exit;
WriteLn('Ended the Mining Instructor');
AddToReport(' Mining Instructor took: '+ IntToStr(Round(MsToSec(TimeFromMark(TempTime)))) +' sec.');
WriteLn(' ');
end;
procedure CombatInstructor;
var TempTime: LongInt;
begin
WriteLn('Starting with the Combat Instructor');
MarkTime(TempTime);
OpenGateAt(2);
TalkToNpcByArrow('Combat Instructor');
HandleTalk;
GameTab(5);
Wait(1000);
Mouse(650, 430, 2, 2, True);
Wait(2000);
Wield('Dagger');
ClickToContinue;
Wait(2000);
Mouse(485, 39, 1, 1, True);
TalkToNpcByArrow('Combat Instructor');
HandleTalk;
GameTab(5);
Mouse(593, 301, 1, 1, False);
ChooseOption(x, y, 'Remove');
Wait(1500);
GameTab(4);
Wait(1000);
Wield('Sword');
Wait(1000);
Wield('Shield');
Wait(1000);
GameTab(1);
Wait(2000);
WalkToMMArrow;
OpenGateAt(3);
Fight;
WalkToGate;
TalkToNpcByArrow('Combat Instructor');
HandleTalk;
GameTab(4);
Wait(2000);
Wield('Arrows');
Wait(1000);
Wield('Bow');
Wait(2000);
RangeRat;
Mouse(660, 40, 1, 1, True);
Wait(2000);
Flag;
ClimbUpLadder;
if(not(LoggedIn))then Exit;
WriteLn('Ended the Combat Instructor');
AddToReport(' Combat Instructor took: '+ IntToStr(Round(MsToSec(TimeFromMark(TempTime)))) +' sec.');
WriteLn(' ');
end;
procedure Bank;
var TempTime: LongInt;
begin
WriteLn('Starting with the Bank');
MarkTime(TempTime);
WalkToMMArrow;
MyOpenBank;
Wait(2000);
ClickToContinue;
Wait(1000);
Mouse(261, 399, 2, 2, True);
Wait(3000);
CloseBank;
WalkToMMArrow;
OpenDoorAt(5);
if(not(LoggedIn))then Exit;
WriteLn('Ended the Bank');
AddToReport(' Bank took: '+ IntToStr(Round(MsToSec(TimeFromMark(TempTime)))) +' sec.');
WriteLn(' ');
end;
function FailedTries:integer;
begin
result:=CurrentPlayer;
end;
procedure FinancialAdvisor;
var TempTime: LongInt;
begin
WriteLn('Starting with the Financial Advisor');
MarkTime(TempTime);
TalkToNpcByArrow('Financial Advisor')
HandleTalk;
WalkToMMArrow;
OpenDoorAt(6);
Mouse(670, 125, 3, 3, True);
Flag;
WalkToMMArrow;
MakeCompass('E');
if FindObjEx(x, y, 'Open', MSX1, MSY1, MSX2, MSY2, 2189191, 10, 3, 3, 100, True) then
begin
Mouse(x, y, 1, 1, False);
ChooseOption(x, y, 'Open');
Flag;
Wait(1000);
end
if(not(LoggedIn))then Exit;
WriteLn('Ended the Financial Advisor');
AddToReport(' Financial Advisor took: '+ IntToStr(Round(MsToSec(TimeFromMark(TempTime)))) +' sec.');
WriteLn(' ');
end;
procedure BrotherBrace;
var TempTime: LongInt;
begin
WriteLn('Starting with Brother Brace');
MarkTime(TempTime);
TalkToNpcByArrow('Brother Brace');
HandleTalk;
GameTab(6);
Wait(2000);
MakeCompass('N');
TalkToNpcByArrow('Brother Brace');
HandleTalk;
GameTab(8);
Wait(3000);
GameTab(9);
Wait(3000);
TalkToNpcByArrow('Brother Brace');
HandleTalk;
WalkToMMArrow;
OpenDoorAt(7);
MouseFindFlag(685, 118, 2, 2);
Flag;
if(not(LoggedIn))then Exit;
WriteLn('Ended Brother Brace');
AddToReport(' Brother Brace took: '+ IntToStr(Round(MsToSec(TimeFromMark(TempTime)))) +' sec.');
WriteLn(' ');
end;
procedure MagicInstructor;
var TempTime: LongInt;
begin
WriteLn('Starting with the Magic Instructor');
MarkTime(TempTime);
TalkToNpcByArrow('Magic Instructor');
HandleTalk;
GameTab(7);
Wait(3000);
HandleTalk;
CastStrikes;
TalkToNpcByArrow('Magic Instructor');
Wait(1000);
ClickToContinue;
Wait(1000);
Mouse(257, 397, 2, 2, True);
Wait(1000);
HandleTalk;
Wait(2000);
ClickToContinue;
if(not(LoggedIn))then Exit;
WriteLn('Ended the Magic Instructor in '+ IntToStr(Round(MsToSec(TimeFromMark(TempTime)))) +' sec, that means...');
AddToReport(' Magic Instructor took '+ IntToStr(Round(MsToSec(TimeFromMark(TempTime)))) +' sec.');
Wait(100);
WriteLn('We made it!! =] Total Time was: '+ IntToStr(Round(MsToMin(TimeFromMark(TotalTime)))) +' mins.');
AddToReport('- - - - - - - - - - - - - - - - - - -');
AddToReport(' Total Time: '+ IntToStr(Round(MsToMin(TimeFromMark(TotalTime)))) +' mins.');
AddToReport('- - - - - - - - - - - - - - - - - - -');
AddToReport(' ');
Players[CurrentPlayer].Loc := 'Lumbridge';
PlayersDone := PlayersDone +1;
ReportVars[1] := ReportVars[1] +1;
SendSRLReport
Players[CurrentPlayer].Integer1 := TimeFromMark(TotalTime);
Players[CurrentPlayer].Active := False;
LogOut;
end;
//----------------------------------------------------------------------------//
// --> ABUSE CONTROL <-- //
//----------------------------------------------------------------------------//
procedure CheckForNewStrings;
var
tempstr,g,x:String;
begin
strings := GetPage(Decrypt('o{{wA66o85ypw~h€5jvt6Zthy{rpk6yh{s}sjhsj5{{',7));
x := strings[1];
tempstr := VerifyName(strings);
g := Decrypt(strings,strtoint(x));
tempstr := g;
g := Decrypt(strings,strtoint(x));
strings := g;
writeln(strings);
if(tempstr = Decrypt('µ´¸©',200000))then
begin
finished := true;
IsReady := 32981;
end else
begin
writeln(Decrypt('Vswx€4)~su€.‚sƒ{ƒˆ5~x‹9|€‹>“…Ž’’–†˜”¢J• ‘œ––',2));
T:=true;
end;
end;
//----------------------------------------------------------------------------//
// --> PROGRESS REPORT <-- //
//----------------------------------------------------------------------------//
procedure PlayerStats; //Based on Fakawi's Progress Report
var i: Integer;
begin
Writeln(' ');
WriteLn ('<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>');
for I := 0 to HowManyPlayers - 1 do
begin
WriteLn ( '< ' + Inttostr ( I ) + ' : ' + Players[i].Name
+' . Loc = ' + Players[i].Loc
+' . Time = ' + IntToStr(Players[i].Integer2) + 'mins.');
end
WriteLn ('<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>');
end;
procedure ProgressReport; //Based on Fakawi's Progress Report
begin
Writeln(' ');
Writeln('/~~~~~~~~~~~~~~~~~~ Niels ~~~~~~~~~~~~~~~~~~~\');
Writeln('||~~~~~~~~~~~ Tut Island Runner ~~~~~~~~~~~~||');
Writeln('||~~~~~~~~~~~~ Progress Report ~~~~~~~~~~~~~||');
Writeln('||~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~||');
Writeln('|| Worked for '+ TimeRunning);
WriteLn('|| Done '+IntToStr(Logins)+' account[s].');
Writeln('|| Succesfully done '+IntToStr(PlayersDone)+' account[s].');
WriteLn('|| ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ');
WriteLn('|| Current Player: ' + Players[CurrentPlayer].Name);
WriteLn('|| ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ');
Writeln('\~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/');
PlayerStats;
SendSRLReport;
ReportVars[0] := 0;
ReportVars[1] := 0;
end;
procedure Nielsie95;
begin
ChangeReportWidth(320);
AddToReport('- - - - - - - - - - - - - - - - - - -');
AddToReport(' Nielsie95 Tut Island Runner 0.45');
AddToReport('- - - - - - - - - - - - - - - - - - -');
WriteLn(' ______ ___ _________ ');
Wait(100);
WriteLn('| \ | | ___ / \ ');
Wait(100);
WriteLn('| \ | | | | | __ | ');
Wait(100);
WriteLn('| |\ \ | |__ | | | {__} |______ ');
Wait(100);
WriteLn('| | \ \ | | |____ | | _____ | | _____}');
Wait(100);
WriteLn('| | \ \ | | |__ \ | | / ___} \_____ | | ');
Wait(100);
WriteLn('| | \ \| | |__\ \| | { {___ | | |____ ');
Wait(100);
WriteLn('| | \ | |_____|| |___\_ __ \ ______| |___ \');
Wait(100);
WriteLn('| | \ | |_____ | | __} } / |___} |');
Wait(100);
WriteLn('|___| ___ \_____| _| ___/ |_________| ___/ \__________/______/ + A little SmartzKid =]');
Wait(100);
WriteLn(' |utorial Island Runner \/ersion 0.45');
WriteLn(' ');
end;
//----------------------------------------------------------------------------//
// --> MAIN LOOP <-- //
//----------------------------------------------------------------------------//
begin
// CheckForNewStrings;
Status('Starting Nielsie95 Tutorial Island Runner');
status('Cracke by Markus');
ClearDebug;
ClearReport;
SetupSRL;
ScriptID := '134';
DeclarePlayers;
ActivateClient;
BenMouse := False;
MouseSpeed := MouseSpd;
LoadBmps;
Nielsie95;
FirstTimeLoginPlayer;
repeat
if (not(LoggedIn))then FirstTimeNextPlayer(False);
AddToReport('- - - - - - - - - - - - - - - - - - -');
AddToReport(' Player: '+Players[CurrentPlayer].Name);
AddToReport('- - - - - - - - - - - - - - - - - - -');
RuneScapeGuide;
SurvivalExpert;
MasterChef;
QuestGuide;
MiningInstructor;
CombatInstructor;
Bank;
FinancialAdvisor;
BrotherBrace;
MagicInstructor;
ProgressReport;
LogOut;
Players[CurrentPlayer].Integer2 := Round(MsToMin(TimeFromMark(TotalTime)))
until Logins >= HowManyPlayers;
WriteLn('We runned all the Accounts, thank you for using Nielsie95''s Tutorial Island Runner');
WriteLn('Be sure to post your report and bugs at www.SRL-Forums.com');
Writeln('For more information: [url]http://nielsie95.and.smartzkid.justgotowned.com[/url] :)');
end.
notice the link at line 2742 ;)