PDA

View Full Version : DaemonheimTele



Er1k
01-15-2012, 01:21 AM
A simple snippet that I made to tele to Daemonheim

{************************************************* ******************************
function DaemonheimTele: Boolean;
By: nosaj421
Description: Returns true if Daemonheim Teleport is successfully executed. Will
check both inventory and equip tab for the Ring of Kinship
************************************************** *****************************}
function DaemonheimTele: Boolean;
var mx, my, RoK: integer;
begin
Result:=False;
if not LoggedIn then Exit;
RoK:= DTMFromString('mrAAAAHic42BgYLBhZmBwZobQpkBsCcROQG wBxLZAPJGJgWEKEHcDcT'+
'8QTwfiOUA8D4gXA/G3ABWgKUw4sQgDfsBIAMMAABY4CFg=');
FTab(tab_inv);
wait(randomRange(500,1000));
if FindDTM(RoK, mx, my, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(mx, my, 2, 2, mouse_right);
if WaitOption('port',1000) then
begin
writeln('Found and will tele');
Result:=True;
end
else writeln('We still failed to tele!');
end
else
begin
FTab(tab_equip);
wait(randomRange(500,1000));
if FindDTM(RoK, mx, my, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(mx, my, 2, 2, mouse_right);
if WaitOption('port',1000) then
begin
writeln('Found and will tele');
Result:=True;
end
else writeln('We still failed to tele!');
end
else srl_warn('DaemonheimTele', 'RoK is not found!' , warn_AllVersions);
end;
FreeDTM(RoK);
end;