SRL Archive - First Scripts

Shawn's AutoTeleporter


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.

i luffs yeww

2010-04-28 22:35:30

You shouldn't use this. :< Use SRL functions if you don't wanna get b&.

Shawny6886

2010-04-28 22:51:07

From: i luffs yeww
You shouldn't use this. :< Use SRL functions if you don't wanna get b&.
SRL has tab functions o.O

Shawny6886

2010-04-28 22:54:14

Oh wow SRL would have made this so easy!!!

YoHoJo

2010-04-29 02:12:17

Using things like MoveMouse/ClickMouse get you banned.
Use SRL's Mouse/MMouse instead, this script is potentially dangerous, but nice job at a first script attempt! :] <3! Keep learning!

Shawny6886

2010-04-29 14:31:03

From: YoHoJo
Using things like MoveMouse/ClickMouse get you banned.
Use SRL's Mouse/MMouse instead, this script is potentially dangerous, but nice job at a first script attempt! :] <3! Keep learning!


I never used MoveMouse I used MoveWindMouseEx

Frement

2010-04-29 14:37:50

From: Shawny6886
I never used MoveMouse I used MoveWindMouseEx


Doesnt matter, use Mouse() MMouse() etc.

Shawny6886

2010-04-29 22:57:47

From: Frement
Doesnt matter, use Mouse() MMouse() etc.

just looked in the SRL\Core\Mouse.scar

MMouse through a series of like 4 procedures uses MoveMove. Might as well use MoveMouseSmoothFromEx, it's the same as windmove which is what MMouse uses. Also like 50% of the SRL procedures arnt working for me :(

i luffs yeww

2010-04-29 23:32:01

^ Then you're not using the correct version, I assume. Did you follow Coh3n's guide? Probably not. You're probably using SCAR 3.22, too. >_>

And there is differences. :p Use Mouse.