Shawny6886
2010-04-28 22:30:49
K this is a beta, so I still have to add lumby and fally to it. Give me feedback please.
program TeleXP;
var i, t, MagicTab, TeleportFirst, Ver, xy, yx, current: integer;
const
MouseSpeed = 16;
TeleportLoc = 'Ver';
TimesToTeleport = 600;
procedure LoadDTM(DTMI: string);
begin
if(DTMI = 'MagicTab') then begin
MagicTab := DTMFromString('78DA63E465606010644001DDD93A609A11CA6' +
'7E40112A204D40800092E843C23540D0BB21A6120C18BDB1C2610' +
'CD856A0E36350031EA064B');
end;
if(DTMI = 'TeleportFirst') then begin
TeleportFirst := DTMFromString('78DA6364636060006124101EBE034C3342F98' +
'CDC44A801C973E356C3083387901A7620C143400DC82E2E843C23' +
'540D13921A00A55408DF');
end;
if(DTMI = 'Ver') then begin
Ver := DTMFromString('78DA63E4646060E06180032620FEFDFB37986' +
'604E2FF40C00852C3C78002406A18A06AC034485E80801A7E54BB' +
'B0AAE1226C0E008087133F');
Current := Ver;
end;
end;
procedure FreeAllDTM;
begin
FreeDTM(Ver);
end;
procedure OpenMagicTab;
var x, y, xx, yy: integer;
begin
LoadDTM('MagicTab');
if(FindDTM(MagicTab, x, y, 519, 166, 759, 207)) then begin
xx := x + random(4) - random(4); yy := y + random(4) - random(4);
MoveWindMouseEx(xx, yy, 5, 5, MouseSpeed);
Wait(100 + random(50));
ClickMouse(xx, yy, true);
Wait(100);
if(FindDTM(MagicTab, x, y, 519, 166, 759, 207)) then begin
WriteLn('Error Confirming Location of MagicTab');
TerminateScript;
end;
end;
FreeDTM(MagicTab);
end;
procedure SwitchMagicOrder;
var x, y, xx, yy: integer;
begin
LoadDTM('TeleportFirst');
if(FindDTM(TeleportFirst, x, y, 546, 421, 750, 472)) then begin
xx := x + random(4) - random(4); yy := y + random(4) - random(4);
MoveWindMouseEx(xx, yy, 5, 5, MouseSpeed);
Wait(100 + random(50));
ClickMouse(xx, yy, true);
Wait(100);
if(FindDTM(TeleportFirst, x, y, 546, 421, 750, 472)) then begin
WriteLn('Error Confirming Location of Teleport Order');
TerminateScript;
end;
end;
FreeDTM(TeleportFirst);
end;
procedure Teleport;
var x, y: integer;
begin
LoadDTM(TeleportLoc);
if(FindDTM(Current, x, y, 539, 182, 739, 428)) then begin
if(i > 6 + random(2)) then begin i := 0; xy := x + random(4) - random(4); yx := y + random(4) - random(4); end;
MoveWindMouseEx(xy, yx, 5, 5, MouseSpeed);
Wait(100 + random(50));
ClickMouse(xy, yx, true);
i := i + 1;
Wait(850);
if not(FindDTM(Current, x, y, 539, 182, 739, 428)) then begin
WriteLn('Either an Error has occured, or you are now out of runes.');
TerminateScript;
end;
end;
FreeAllDTM;
end;
procedure SetupScript;
begin
i := 10;
t := 0;
OpenMagicTab;
SwitchMagicOrder;
Repeat
Teleport;
t := t + 1;
Wait(2150 + random(250));
Until t = TimesToTeleport;
end;
begin
wait(3500);
SetupScript
end.