Home
2012-03-18 13:29:21
Lodestone Teleport function.
Please see Example how to use, I did not add If Cast('Home') then..
Because it's up to scripter what kind of spellbook they are using currently.
It doesn't close Window even if it didn't teleport because I find it extremely Bot like. Scripter can do this
Ex.
~Home
Please see Example how to use, I did not add If Cast('Home') then..
Because it's up to scripter what kind of spellbook they are using currently.
It doesn't close Window even if it didn't teleport because I find it extremely Bot like. Scripter can do this
Ex.
If not LodestoneTeleport('Varrock') then CloseWindow; (*
LodestoneScreen
~~~~~~~~~~
.. code-block:: pascal
function BankScreen: Boolean;
Finds LodestoneScreen. Returns true if Found.
.. note::
Author: Home
Example:
.. code-block:: pascal
If LodestoneScreen then
WriteLn('Lodestone Network screen is open!');
*)
function LodestoneScreen :Boolean;
begin
Result := CountColor(12378347, 172, 26, 345, 42) > 500;
end;
(*
LodestoneTeleport
~~~~~~~~~~~~~
.. code-block:: pascal
function LodestoneTeleport(Where :String) :Boolean;
Teleports you to chosen location via Lodestone teleport.
.. note::
Author: Home
Example:
.. code-block:: pascal
If CastHomeTeleport then
Lodestoneteleport('Lumbridge');
*)
function LodestoneTeleport(Where :String) :Boolean;
var
TPA :TPointArray;
TSA :TStringArray;
Box :TBox;
CTS, I :Integer;
begin
If not LoggedIn then Exit;
If not LodestoneScreen then Exit;
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(1);
TSA := ['Lunar Isle', 'Yanille', 'Ardougne', 'Seers Village', 'Catherby', 'Taverley',
'Burthorpe', 'Edgeville', 'Falador', 'Port Sarim', 'Draynor Village', 'Lumbridge',
'Varrock', 'Al Kharid', 'Bandit Camp'];
TPA := [Point(45, 78), Point(160, 262), Point(167, 211), Point(192, 158), Point(223, 181),
Point(253, 180), Point(251, 145), Point(293, 160), Point(278, 206), Point(276, 249), Point(308, 211),
Point(327, 243), Point(345, 182), Point(362, 229), Point(326, 297)];
for I := 0 to 14 do
If Capitalize(Where) = TSA[I] then
begin
MMouse(TPA[I].X, TPA[I].Y, 2, 2);
If WaitFindColors(TPA, 11447982, MSX1, MSY1, MSX2, MSY2, 0, 3000) then
If Length(TPA) <> 0 then
begin
Box := GetTPABounds(TPA);
If FindTextTPAMulti(12378347, 0, Box.X1, Box.Y1, Box.X2, Box.Y2, ['Click', 'to', 'teleport', 'this'], smallChars, Nothing) then
begin
ClickMouse2(Mouse_Left);
Result := True;
end;
end;
end;
ColorToleranceSpeed(CTS);
end; ~Home