SCAR Code:
program HomePort;
{.include srl/SRL.scar}
var
tx, ty, HomePort: Integer;
procedure DeclareDTM;
begin
HomePort := DTMFromString('78DA63B462626078CF8002FEFDFB07A619A17' +
'C461BA09A3744A8F948408D25916ADE10A186909BAD89F4170135' +
'00EC68213B');
end;
function Tab(number: Integer): Boolean; //gametab from srl edited by omgwoot.
var
c: Integer;
begin
case number of
1: if (not (GetColor(541, 174) = 1910385)) then
begin
repeat Mouse(541, 174, 5, 5, True);
c := c + 1;
until (c >= 1)
end;
2: if (not (GetColor(573, 176) = 1778795)) then
begin
repeat Mouse(578, 185, 5, 5, True);
c := c + 1;
until (c >= 1)
end;
3: if (not (GetColor(601, 175) = 1910385)) then
begin
repeat Mouse(607, 185, 5, 5, True);
c := c + 1;
until (c >= 1)
end;
4: if (not (GetColor(633, 173) = 1976437)) then
begin
repeat Mouse(643, 186, 5, 5, True);
c := c + 1;
until (c >= 1)
end;
5: if (not (GetColor(665, 172) = 1910385)) then
begin
repeat Mouse(671, 184, 5, 5, True);
c := c + 1;
until (c >= 1)
end;
6: if (not (GetColor(699, 174) = 1910385)) then
begin
repeat Mouse(706, 187, 5, 5, True);
c := c + 1;
until (c >= 1)
end;
7: if (not (GetColor(732, 175) = 1910385)) then
begin
repeat Mouse(741, 185, 5, 5, True);
c := c + 1;
until (c >= 1)
end;
8: if (not (GetColor(528, 474) = 1778795)) then
begin
repeat Mouse(537, 474, 5, 5, True);
c := c + 1;
until (c >= 1)
end;
9: if (not (GetColor(622, 497) = 1910385)) then
begin
repeat Mouse(572, 480, 5, 5, True);
c := c + 1;
until (c >= 1)
end;
10: if (not (GetColor(599, 470) = 1910385)) then
begin
repeat Mouse(609, 475, 5, 5, True);
c := c + 1;
until (c >= 1)
end;
11: if (not (GetColor(631, 469) = 1778795)) then
begin
repeat Mouse(637, 476, 5, 5, True);
c := c + 1;
until (c >= 1)
end;
12: if (not (GetColor(667, 472) = 1910385)) then
begin
repeat Mouse(669, 475, 5, 5, True);
c := c + 1;
until (c >= 1)
end;
13: if (not (GetColor(698, 477) = 1910385)) then
begin
repeat Mouse(706, 485, 5, 5, True);
c := c + 1;
until (c >= 1)
end;
14: if (not (GetColor(732, 471) = 1976437)) then
begin
repeat Mouse(740, 479, 5, 5, True);
c := c + 1;
until (c >= 1)
end;
end;
if (c < 3) then
begin
Result := True;
Wait(10);
end;
end;
Procedure CastHomePort;
var c, p : integer;
Begin
c := 9938070;
tab(7);
lowestangle;
If(Finddtm(HomePort, tx, ty, 553, 206, 735, 460)) Then
begin
wait(100 + Random(150));
Mouse(tx, ty, 5, 5, True);
wait(100);
repeat
wait(100);
marktime(p);
until findcolortolerance(x, y, 9938070, 246, 155, 301, 193, 5)or(TimeFromMark(p)>30000)
if findcolortolerance(x, y, c, 246, 155, 301, 193, 5) then
begin
writeln('Successfully Teleported "Home"!');
wait(17000+random(1500));
end;
if TimeFromMark(p)>30000 then
begin
WriteLn('Didn''t Find The Spell, HomePort, or You Casted it Not To Long Ago!');
// put the actions you want to happen if you can't use spell here
end;
end;
end;
Begin
SetupSRL;
Declaredtm;
activateclient;
wait(1000);
CastHomePort;
end.
SCAR Code:
procedure compass( dir : string);
begin
case lowercase(dir) of
'n': if not finddtm(N, x, y, 540, 1, 579, 40) then
begin
keydown(VK_LEFT);
repeat
wait(50);
until
finddtm(N, x, y, 540, 1, 579, 40);
keyup(VK_LEFT);
end;
's': if not finddtm(S, x, y, 540, 1, 579, 40) then
begin
keydown(VK_LEFT);
repeat
wait(50);
until
finddtm(N, x, y, 540, 1, 579, 40);
keyup(VK_LEFT);
end;
'e': if not finddtm(E, x, y, 540, 1, 579, 40) then
begin
keydown(VK_LEFT);
repeat
wait(50);
until
finddtm(E, x, y, 540, 1, 579, 40);
keyup(VK_LEFT);
end;
'w': if not finddtm(W, x, y, 540, 1, 579, 40) then
begin
keydown(VK_LEFT);
repeat
wait(50);
until
finddtm(W, x, y, 540, 1, 579, 40);
keyup(VK_LEFT);
end;
end;
end;