SCAR Code:
program restlessghost;
{.include SRL/SRL.scar}
{.include srl/srl/core/doorprofiles.scar}
var
CantHomeTeleport, HomeTeleport, FindNorMalRandomsTime, SST1, SST2, FindFastRandomsTime, door, PleaseWait, H:integer;
zy, zx, lx, ly, y, Hx, hy, x, k :integer;
{=====================================================================================]
DONT TOUCH THIS BELOW IF YOU DONT KNOW WHAT YOUR DOING!
[=====================================================================================}
{===============================================]
this function finds randoms by:wt-fawaki
[===============================================}
Function FindFastRandoms: Boolean;
var
i: Integer;
begin
for i:=1 to 9 do
begin
case I of
1: If FindDead then
Result := True;
2: If FindMod then
Result := True;
3: If FindMime then
Result := True;
4: If FindMaze then
Result := True;
5: If FindQuiz then
Result := True;
6: If FindDemon then
Result := True;
7: begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;
8: begin
if InBlack then
begin
Result := True;
Players[CurrentPlayer].loc := 'InBlack';
Logout;
Exit;
end;
end;
9: begin
if FindFight then
begin
RunTo('N',False);
end;
end;
end;
end;
end;
//credits to WT-FAWAKI-----------------------------------------//
// -- Performs Wait and FindTalk. + calls FindNormalRandoms every 10 secs and
// -- FindFastRandoms every 3 secs.
//----------------------------------------------------------------------------//
Procedure WaitPlus(Time:Integer);
var T: integer;
begin
For T := 1 to Time do
begin
if not LoggedIn then exit;
Wait(200 + Random(50));
FindTalk;
RC;
end;
FindTalk;
MarkTime(FindNorMalRandomsTime);
if FindNorMalRandomsTime - SST1 >(10000 + Random(5000)) then
begin
FindNorMalRandoms;
MarkTime(SST1);
end;
MarkTime(FindFastRandomsTime);
if FindFastRandomsTime - SST2 >(1500 + Random(1500)) then
begin
FindFastRandoms;
MarkTime(SST2);
end;
end;
{===============================================]
this procedure do,s antiban //by: me =)
[===============================================}
procedure antiban;
begin
Case Random(10) Of
1 : HoverSkill('defense', False);
2 : HoverSkill('strenght', False);
3 : begin
GameTab(1+Random(12));
Wait(2000+Random(400));
GameTab(4);
end;
4 : RandomRClick;
5 : PickUpMouse;
6 : HoverSkill('attack', False);
7 : almostlogout;
8 : begin
gametab(9);
gametab(5);
gametab(1);
gametab(2);
end;
9 :begin
mmouse(zx,zy,333,273);
end;
end;
end;
{===============================================]
loads bitmaps //by: me =)
[===============================================}
procedure loadbitmaps;
begin
hometeleport := BitmapFromString2(False, 'a84B1878DA8D8E510A0' +
'3210C44AF944493D84F75F5FE47EA8E5B4C410A55181EE14D9488' +
'58E93ECCF94E6D6063014F4316A469D9AC23D8247C4B7D9B52D63' +
'6ED7BCFC75C5DD7894C17260DCF7BCBC1D2839DC27FC936F94297' +
'5AA5F5F739701F3E274953B6E1D5EB2C4FFED33ABBDFCE797FB5D' +
'E870');
canthometeleport := BitmapFromString2(False, 'a046E278DA8D534BB2C' +
'42008BC129AC1CF524D72FF233D119FC12853E3A2CB6A5AC01601' +
'C0A40F54F415C0C58BD05842E7882F8D07D260700FFAF044318C5' +
'39D09B4C70F65C37C0D8D0D2D0F92086FCAE32CD73D08BDA9E8DB' +
'299F49E92E3AE5F1263C4E62323E51DEDBF2ECDB2DBA3EDAA14C8' +
'118B8295B5D25E714F1845C22BE983366C652A998383AF8AA67A5' +
'E4A592F7AC3C6D31B1A8286AF56C73746498A2CCCBCE5BC55EF72' +
'83619B57FCEC01A815DC34C28982C2388C5B7967797CC2FD1B55B' +
'D9A15CD219CDBD8D7271E6E573D17B50DFC2E42BC1EA98F44D5B9' +
'A27DA2C6D7D189A75327BFEEFAFBC3AB69BC3AD63EB544F28BA52' +
'1D13CCD4A1E2A1F62BB5591A2FFE9A81D5B1C9B7F5B7CACE8503B' +
'D8AE4FFBD85E8A60CED2EDF1DEB3D2C7F6133E7B2BA32757FD5D');
PleaseWait := BitmapFromString(60, 2, 'z78DA33300001373030C060E30' +
'294A8A7C41C52012EF3F1DB458C4A4C71FC2A872BA08F1F890F4F' +
'00A555AC21');
door := BitmapFromString2(False, 'aDD43D78DAC59241128330084' +
'5AFF4090984A53572FF232966615DD8493B6365F12603FF6D0800' +
'30D50D287340E32D940E72F453CD31ED1997E8C71032455F8B1FB' +
'418506B1BF39E7FB02A74495E595F675EE54B6326EAD6620EE777' +
'8E5B8A429C3BEFB0146262FFB47C4F8D583DFFACF5F92ABEDDC39' +
'535788176FEDFFB2C9D55521BB9D8DF6A05CAB');
end;
{===================================================================]
casts hometeleport and checks if you already did it //by: me =)
[===================================================================}
Procedure casthometeleport;
begin
loadbitmaps;//loadsbitmaps
gametab(7);
wait(400+Random(600));
If(FindBitmap(hometeleport, lx, ly)) Then
Begin
wait(100 + Random(150));
Mouse(lx, ly, 5, 5, True);
wait(15000);
gametab(4);
if (FindBitmap(canthometeleport, x, y)) then
begin
writeln('cant use home teleport logging out');
logout;
end
else
WriteLn('your in limbridge, have a nice day!');
end
else
If Not(FindBitmap(HomeTelePort, lx, ly)) Then
begin
WriteLn('couldnt fin spell.');
end;
freebitmap(hometeleport);
freebitmap(canthometeleport);
end;
{============================================================]
made by nielsie and a very BIG UPDATE by: me =)
[============================================================}
Function InTalk: Boolean;
begin
if (FindColorTolerance(x, y, 128, 220, 360, 365, 370, 5)) then
Result := True;
end;
{============================================================]
i updated a function from srl with an extra//by : me XD
[============================================================}
function ClickTextX(b: Integer; txt: string; Left:Boolean): Boolean;
var
a : integer;
begin
repeat
ClickNpcChatText(txt,true);
wait(100 + random(100));
a := a + 1;
until(b = a);
end;
{===============================================]
find and talk stuff //by: me =)
[===============================================}
procedure FindAndTalkToAereck;
begin
if (FindObj(Hx, Hy, 'ereck', 7093564, 10)) then
begin
Mouse(hx, hy, 1, 1, false);
ChooseOption('alk-to');
markTime(H);
repeat
wait(500);
until(InTalk) or (TimeFromMark(k) >= 5000);
if (InTalk) then
begin
writeln('in talk with talk father Aereck');
ClickTextX (1,'continue',true);
ClickTextX (1,'quest',true);
ClickTextX (2,'continue',true);
ClickTextX (1,'help',true);
ClickTextX (9,'continue',true);
end;
end;
end;
{===============================================]
somthing with the door //by: boreas
[===============================================}
procedure GotoSecondEasternMostDoor;
var
MyDoors: array of DoorProfile;
f:integer;
mytpa:array of tpoint;
begin
activateclient;
MyDoors:=GetDoors;
setarraylength(mytpa,getarraylength(mydoors));
for f:= 0 to getarraylength(MyDoors)-1 do
begin
mytpa[f]:=MyDoors[f].midpoint;
end;
mytpa:= RearrangeTPA(mytpa,0,0,true,false);
mouse(mytpa[0].x,mytpa[0].y,2,2,true);
flag;
end;
{===============================================]
handles the door at father Aereck //by: me =)
[===============================================}
function HandleDoor:boolean;
begin
gotosecondeasternmostdoor;
makecompass('W');
lowestangle;
if findcolorspiraltolerance( x, y, MSx1, MSy1, MSx2, MSy2,2309965,75) then
begin
writeln('color found');
mmouse(x,y,0,0);
mouse(x, y, 0, 0, false);
wait(150);
if isuptextmulti('Open','pen','open') then
begin
mouse(x, y, 0, 0, true);
result:=true
writeln('opened door')
end else
if isuptextmulti('ose','Close','lose') then
begin
result:=true
writeln('door already opened' )
end;
end;
end;
{===============================================]
walkings and stuff //by: me =)
[===============================================}
function WalkToUrhney :boolean;
begin
writeln('walking to Urhney')
RadialWalk( 1597519, 170, 180, 65, x, y);
LinearWalk(0,185,65,x,y);
end;
{===============================================]
find and talk stuff //by: me =)
[===============================================}
procedure FindAndTalkToUrhney;
begin
if (FindObj(Hx, Hy, 'rhney', 7028284, 5)) then
begin
Mouse(hx, hy, 1, 1, false);
ChooseOption('alk-to');
markTime(H);
repeat
wait(500);
until(InTalk) or (TimeFromMark(k) >= 10000);
if (InTalk) then
begin
wait(900 + random(400));
writeln('in talk with father Urhney');
ClickTextX (1,'continue',true);
ClickTextX (1,'sent',true);
ClickTextX (2,'continue',true);
ClickTextX (1,'haunting',true);
ClickTextX (11,'continue',true);
end;
end;
end;
{======================================]
walks to ghost // by: me =)
[======================================}
procedure WalkToGhost;
begin
end;
{======================================]
find and talks ghost // by: me =)
[======================================}
procedure FindAndTalkToGhost;
begin
if (FindObj(Hx, Hy, 'ghost', 10661538, 5)) then
begin
Mouse(hx, hy, 1, 1, false);
ChooseOption('alk-to');
markTime(H);
repeat
wait(500);
until(InTalk) or (TimeFromMark(k) >= 5000);
if (InTalk) then
begin
wait(900 + random(400));
writeln('in talk with restless ghost');
ClickTextX (4,'continue',true);
ClickTextX (1,'problem',true);
ClickTextX (12,'continue',true);
end;
end;
end;
{===================================================]
walks to wizard towe for the skull // by: me =)
[===================================================}
procedure WalkToSkull;
begin
end;
{======================================]
takes the skull from altar // by: me =)
[======================================}
procedure GetSkull;
begin
end;
{====================================================]
goes back to ghost and ends the quest// by: me =)
[====================================================}
procedure EndQuest;
begin
end;
{===============================================]
MAINLOOP //by: me =)
[===============================================}
begin
setupsrl;
activateclient;
HandleDoor;
WalkToUrhney;
FindAndTalkToUrhney
end.