Well, i have started on it! The problems are that it doesn't have any fail safes hardly at all. I have made it so that it will actually USE the player setup! and i have put in some flag functions. It doesn't walk at all, and it doesn't even leave the church…. I think i know how to fix that, but i can't test it right now as i don't have a character that hasn't tried the quest, could i borrow one from you? I won't steal it, you can even set recovery questions!
EDIT: i thought that might sound ridiculous, so here is the code!
program TheRestlessGhost;
{.include SRL/SRL.scar}
{.include SRL/SRL/skill/magic.scar}
var
x,y,Amulet,Skull : integer;
Const
HomeTeleport = True;//Say true if you want to Teleport to the church the second visit//
procedure DeclarePlayers;
begin
HowManyPlayers := 3;
CurrentPlayer := 0;
NumberOfPlayers(HowManyPlayers);
Players[0].Name := 'Username';
Players[0].Pass := 'Password';
Players[0].Nick := 'ndwi';
Players[0].Active := True;
Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := '';
Players[1].Active := false;
Players[2].Name := '';
Players[2].Pass := '';
Players[2].Nick := '';
Players[2].Active := false;
end;
procedure StartQuest;
begin
LoginPlayer;
if not Loggedin then LoginPlayer;
WriteLn('Attempting to Start Quest!');
if (FindObjCustom(X, Y, ['ath','her','aer','reck'], [8537403,2438967,6699578,7906002], 3)) then
begin
Mouse(x,y,1,1,False);
ChooseOption('alk');
Wait(7000);
ClickToContinue;
WriteLn('Talking To Father Aereck.');
Wait(5000);
ClickNPCChatText('uest',True);
Wait(2000);
ClickToContinue;
Wait(2000);
ClickToContinue;
Wait(2000);
ClickNPCChatText('help',True);
Wait(2000);
ClickToContinue;
Wait(2000);
ClickToContinue;
Wait(2000);
ClickToContinue;
Wait(2000);
ClickToContinue;
Wait(2000);
ClickToContinue;
Wait(2000);
ClickToContinue;
Wait(2000);
ClickToContinue;
Wait(2000);
ClickToContinue;
Wait(2000);
ClickToContinue;
WriteLn('Hooray! Quest Started!');
end;
end;
Function OpenDoor: Boolean; //Mady By Wizzup?
Begin
ColorToleranceSpeed(2);
If FindObj(x, y, 'oor', 737880, 5) Then
Begin
GetMousePos(x, y);
Wait(100);
If IsUpText('pen') Then
Begin
Mouse(x, y, 0, 0, True);
Result := True;
WriteLn('Door Found and Opened');
Wait(50);
FFlag(0);
End
Else Result := IsUpText('lose');
End;
ColorToleranceSpeed(1);
End;
procedure ToFatherUrnhey;
begin
RadialWalk(3494514,285,290,20,3,3);
OpenDoor;
RadialRoadWalk(FindRoadColor,239,244,40,3,3);
Flag;
RadialRoadWalk(FindRoadColor,145,140,49,3,3);
flag;
RadialRoadWalk(FindRoadColor,210,200,22,3,3);
flag;
RadialWalk(8162641,264,259,49,3,3);
flag;
RadialWalk(3436585,244,239,59,3,3);
flag;
RadialWalk(5075754,235,230,55,3,3);
flag;
RadialWalk(2848573,250,245,45,3,3);
flag;
RadialWalk(8162641,270,275,48,3,3);
flag;
RadialWalk(8162641,270,265,48,3,3);
flag;
RadialWalk(2836573,280,285,48,3,3);
flag;
RadialWalk(2195571,275,270,72,3,3);
flag;
RadialWalk(2057336,254,260,54,3,3);
flag;
WriteLn('We Made It To Father Urnhey');
end;
Function OpenDoor2: Boolean; //Mady By Wizzup?
Begin
ColorToleranceSpeed(2);
If FindObj(x, y, 'oor', 5010054, 5) Then
Begin
GetMousePos(x, y);
Wait(100);
If IsUpText('pen') Then
Begin
Mouse(x, y, 0, 0, True);
Result := True;
WriteLn('Door Found and Opened');
Wait(50);
FFlag(0);
End
Else Result := IsUpText('lose');
End;
ColorToleranceSpeed(1);
End;
Function OpenDoor3: Boolean; //Mady By Wizzup?
Begin
ColorToleranceSpeed(2);
If FindObj(x, y, 'oor', 2242633, 5) Then
Begin
GetMousePos(x, y);
Wait(100);
If IsUpText('pen') Then
Begin
Mouse(x, y, 0, 0, True);
Result := True;
WriteLn('Door Found and Opened');
Wait(50);
FFlag(0);
End
Else Result := IsUpText('lose');
End;
ColorToleranceSpeed(1);
End;
procedure TalkToFatherUrnhey;
begin
if (FindObjCustom(X, Y, ['ath','her','urh','ney'], [8537403,2438967,6699578,7906002], 3)) then
begin
Mouse(x,y,1,1,False);
if (ChooseOption('rnhey') then
begin
end else
begin
ToFatherUrnhey;
end
Wait(2000);
ClickToContinue;
Wait(2000);
ClickNPCChatText('alk',True);
Wait(2000);
ClickToContinue;
Wait(2000);
ClickToContinue;
Wait(2000);
ClickNPCChatText('aunt',True);
Wait(2000);
ClickToContinue
Wait(2000);
ClickToContinue;
Wait(2000);
ClickToContinue;
Wait(2000);
ClickToContinue;
Wait(2000);
ClickToContinue;
Wait(2000);
ClickToContinue;
Wait(2000);
ClickToContinue;
Wait(2000);
ClickToContinue;
Wait(2000);
ClickToContinue;
Wait(2000);
ClickToContinue;
WriteLn('We Got Ghost Speak Amulet');
Amulet := DTMFromString('78DA63E4656060106740014B6634836946289' +
'F511448B031A0014654355C40829B801A7E22CC9105129C04D4C8' +
'010941026AC431FD85A106E47745026A3880842C013520F70A115' +
'0230524D8F1AB0100D788035B');
if(FindDTM(Amulet,x,y,0,0,700,700))then
begin
Mouse(x,y,2,2,true);
end;
end;
end;
procedure BackToTheChurch;
begin
if (Hometeleport = true) then
begin
Cast('Home teleport')
exit
end;
WriteLn('Going Back To The Church!')
RadialWalk(2848626,107,112,59,3,3);
flag;
RadialWalk(2836573,87,92,42,3,3);
flag;
RadialWalk(8162641,72,79,61,3,3);
flag;
RadialWalk(8162641,77,84,50,3,3);
flag;
RadialWalk(8162641,77,84,63,3,3);
flag;
RadialWalk(8162641,73,78,29,3,3);
flag;
If FindSymbol(x,y,'Short cut') then
Mouse(x,y,1,1,True);
Wait(3000);
RadialRoadWalk(FindRoadColor,344,349,62,3,3);
flag;
OpenDoor;
end;
procedure TalkToGhost;
begin
if (FindObjCustom(X, Y, ['off','Coff','fin','ffi'], [2766142,1781307,2568505,2633010], 3)) then
Mouse(x,y,2,2,True);
if (FindObjCustom(X, Y, ['est','less','host','gho'], [10267037,8688009,5594967,10596001], 3)) then
Mouse(x,y,2,2,False);
ChooseOption('alk');
ClickToContinue;
Wait(2000+random(250));
ClickToContinue;
Wait(2000+random(250));
ClickToContinue
Wait(2000+random(250));
ClickNPCChatText('oble',True);
Wait(2000+random(250));
ClickToContinue;
Wait(2000+random(250));
ClickToContinue;
Wait(2000+random(250));
ClickToContinue;
Wait(2000+random(250));
ClickToContinue;
Wait(2000+random(250));
ClickToContinue;
Wait(2000+random(250));
ClickToContinue;
Wait(2000+random(250));
ClickToContinue;
Wait(2000+random(250));
ClickToContinue;
Wait(2000+random(250));
ClickToContinue;
Wait(2000+random(250));
ClickToContinue;
Wait(2000+random(250));
ClickToContinue;
Wait(2000+random(250));
ClickToContinue;
Wait(2000+random(250));
OpenDoor;
end;
procedure ToWizardTower;
begin
RadialRoadWalk(FindRoadColor, 233, 227, 44, 3, 3);
flag;
RadialWalk(8162641,264,259,49,3,3);
flag;
RadialWalk(3436585,244,239,59,3,3);
flag;
RadialWalk(5075754,235,230,55,3,3);
flag;
RadialWalk(2848573,250,245,45,3,3);
flag;
RadialWalk(8162641,270,275,48,3,3);
flag;
RadialWalk(8162641,270,265,48,3,3);
flag;
RadialWalk(2836573,280,285,48,3,3);
flag;
RadialWalk(2195571,275,270,72,3,3);
flag;
RadialWalk(2057336,254,260,54,3,3);
flag;
RadialWalk(8162641,263,268,70,3,3);
flag;
RadialWalk(8162641,271,276,56,3,3);
If FindSymbol(x,y,'Dungeon') then
Mouse(x,y,1,1,True);
Wait(3000);
RadialWalk(1670221,307,312,70,3,3);
flag;
RadialWalk(1670262,288,293,61,3,3);
flag;
RadialWalk(11568240,310,317,55,3,3);
flag;
RadialWalk(2842217,315,320,73,3,3);
flag;
RadialWalk(7566716,235,240,65,3,3);
flag;
RadialWalk(7566716,194,199,63,3,3);
If FindSymbol(x,y,'Water') then
Mouse(x,y,1,1,True);
Wait(3000);
WriteLn('We are at the Wizard Tower and are getting the Skull!');
RadialWalk(9138033,260,265,30,3,3);
OpenDoor3;
If FindObj(x, y, 'adder', 14678, 5) then
Mouse(x,y,2,2,False);
ChooseOption('limb');
RadialWalk(1006458,162,167,49,3,3);
flag;
RadialWalk(1006458,195,190,34,3,3);
MakeCompass('E');
OpenDoor3;
MakeCompass('N');
Wait(500);
RadialWalk(1006458,37,42,38,3,3);
If FindObj(x, y, 'ltar', 10408144, 5) then
Mouse(x,y,2,2,False);
ChooseOption('earch');
WriteLn('Woot! We got the Skull!');
RadialWalk(1006458, 221, 226, 45, 3,3);
GameTab(7);
Cast('Home Teleport');
Wait(5000);
WriteLn('We Are At Lumbridge!');
GameTab(4);
end;
procedure TalkToGhostAndFinishQuest;
begin
Skull := DTMFromString('78DA631462606090644001C7F7AC04D38C503' +
'EA33890E06140038CA86AB881840001359C404282801A2E20214F' +
'841A4522DCA34A400DC8EF1A04D488010965026AA480842C01353' +
'240429A801A3920214E400DC81E2122DCC34B408D0011712A0224' +
'B888885361FC6A00CF32052F');
RadialRoadWalk(FindRoadColor,100,105,61,3,3);
flag;
RadialRoadWalk(FindRoadColor,173,178,49,3,3);
flag;
RadialRoadWalk(FindRoadColor,156,151,40,3,3);
OpenDoor;
if (FindObjCustom(X, Y, ['off','Coff','fin','ffi'], [2766142,1781307,2568505,2633010], 3)) then
Mouse(x,y,2,2,True);
if(FindDTM(Skull,x,y,0,0,700,700))then
begin
Mouse(x,y,2,2,true);
end;
if (FindObjCustom(X, Y, ['off','Coff','fin','ffi'], [2766142,1781307,2568505,2633010], 3)) then
Mouse(x,y,2,2,True);
Logout;
NextPlayer(true);
end;
begin
SetupSRL;
ClearDebug;
ActivateClient;
Wait(1000);
DeclarePlayers;
StartQuest;
ToFatherUrnhey;
OpenDoor2;
TalkToFatherUrnhey;
BackToTheChurch;
TalkToGhost;
ToWizardTower;
TalkToGhostAndFinishQuest;
end.