PDA

View Full Version : Lodestone Teleport - [ yes i know it already is in slr! ]



NoUserName
06-14-2012, 11:26 AM
Hey all was haying big problems with lodestone tele included in slr so out come a little custom code!


//NoUserName
//LodeStone Teleporting
procedure LodeStoneTel(Location : string);
begin
if Lowercase(Location) = 'draynor' then
begin
if lodestonescreen then
begin
MMouse(306, 207, 5, 5);
Wait(200 + random(300));
ClickMouse2(1);
Wait(200 + random(300));
end;
end;

if Lowercase(Location) = 'fally' then
begin
if lodestonescreen then
begin
MMouse(275, 203, 5, 5);
Wait(200 + random(300));
ClickMouse2(1);
Wait(200 + random(300));
end;
end;

if Lowercase(Location) = 'port sarim' then
begin
if lodestonescreen then
begin
MMouse(272, 245, 5, 5);
Wait(200 + random(300));
ClickMouse2(1);
Wait(200 + random(300));
end;
end;

if Lowercase(Location) = 'edgeville' then
begin
if lodestonescreen then
begin
MMouse(291, 154, 5, 5);
Wait(200 + random(300));
ClickMouse2(1);
Wait(200 + random(300));
end;
end;
end;

procedure tel(Loc : string);
{ Valid Arguments -
'Draynore, Port Sarim, edgeville, fally }

var
HomeDTM, x, y, i, p, t, k: Integer;
begin
if (GameTab(28) = False) then
begin
GameTab(28);
end;
MarkTime(t);
HomeDTM := DTMFromString('m1gAAAHic42JgYGhnhuAJUNwL5TcDcR0QN0 DFtjMyMKwD4q1AvBOI9wLxASDeD8Q7gHgTEG8E4n1HPjG0zblB EIswEAcYicQIAAA5ASEJ');
repeat
If LodestoneScreen then
begin
repeat
LodeStoneTel(Loc);
Wait(RandomRange(500, 500));
if FindSymbol(x, y,'lodestone') then
begin
p:=p+1;
exit;
end;

if (TimeFromMark(t) > 20000) and (TimeFromMark(t) < 21000) then
begin
if FindDTM(HomeDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
k:=k+1;
Writeln('Forgot to tele! - Redo!');
mmouse (x, y, 7, 7);
ClickMouse2(mouse_left);
end;
end;
until(p=1)
end else
if FindDTM(HomeDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
if (FindSymbol(x, y,'lodestone')) then
begin
exit;
end;
mmouse (x, y, 7, 7);
ClickMouse2(mouse_left);
Writeln('Found Home!');
Wait(RandomRange(2000, 1000));
end else
begin
Writeln('Error Finding Home DTM');
i:=i+1;
end;
until(i=4)or (p=1);
FreeDTM(HomeDTM);
end;


use to call it


tel('location here');


can add more locations is people would like hope this actually might help some one because i know it saved me a lot off problems! =]

putonajonny
06-14-2012, 11:40 AM
The only problem with the current one is that the uptext overlaps the window so it can't be read properly, therefore doesn't click, That's all that needs to be changed...

NoUserName
06-14-2012, 02:11 PM
ahhh was driving me up the wall created this piece in pure frustration lol

Sin
06-14-2012, 02:31 PM
Use a case statement :p

SwagDaddy
06-14-2012, 02:53 PM
Use a case statement :p

Something like this?

procedure LodeStoneTel(Location : string);
begin
Case Lowercase(Location) of
'draynor':
begin
if lodestonescreen then
begin
MMouse(306, 207, 5, 5);
Wait(200 + random(300));
ClickMouse2(1);
Wait(200 + random(300));
end;
end;

'fally':
begin
if lodestonescreen then
begin
MMouse(275, 203, 5, 5);
Wait(200 + random(300));
ClickMouse2(1);
Wait(200 + random(300));
end;
end;

'port sarim':
begin
if lodestonescreen then
begin
MMouse(272, 245, 5, 5);
Wait(200 + random(300));
ClickMouse2(1);
Wait(200 + random(300));
end;
end;

'edgeville':
begin
if lodestonescreen then
begin
MMouse(291, 154, 5, 5);
Wait(200 + random(300));
ClickMouse2(1);
Wait(200 + random(300));
end;
end;
end;
end;

Wanted to try it out since I'm learning still

NoUserName
06-18-2012, 10:32 AM
Yea was. Going to use case statements but as i did it with if statements and it worked i didnt change it, nice structure though

honeyhoney
06-18-2012, 02:06 PM
Something like this?

snip

Wanted to try it out since I'm learning still

Like this;

procedure LodeStoneTel(Location : string);
begin
if LodestoneScreen then
begin
case Lowercase(Location) of
'draynor': MMouse(306, 207, 5, 5);
'fally': MMouse(275, 203, 5, 5);
'port sarim': MMouse(272, 245, 5, 5);
'edgeville': MMouse(291, 154, 5, 5);
end;
Wait(200 + random(300));
ClickMouse2(1);
Wait(200 + random(300));
end;
end;