SRL Archive - OSR Help

Mouse barely moving


Footy

2012-06-23 09:13:33

So I am almost finished my first script, a camelot teleporter, but when it moves the mouse, it moves very slow, pixel by pixel in the direction of the target. is there something wrong with my code? Thanks
program CamTele;
{$i srl/srl.simba}

//Made for RS downloadable

var
Tele, x, y: integer;


Procedure Start;
begin
mouse(748, 188, 15, 26, 1)
end;

Procedure Teleport;


begin
tele := DTMFromString('mWAAAAHicY2FgYGAGYlYGCGCC0ixQNkjc3SKMYe3eh3CMDhjRMAgAAFk6B9Q=');
SetupSRL
repeat
if FindDTM(tele, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
if isuptext('camelot') then
begin
MMouse(x, y, 15, 15);
Mouse(x, y, 0, 0, 1);
wait(randomrange(2000, 2500));
end;
end;
until(false);
end;

Procedure Randoms;
begin
if findnormalrandoms or findnoninventoryrandoms then
begin
logout;
terminatescript;
end;
end;

begin
Start
Repeat
Teleport;
Randoms;
until(false);
end.

Google

2012-06-23 09:17:42

You need call SetupSrl; in the beginning of you loop.


begin
SetupSRl;
Start;
Repeat
Teleport;
Randoms;
until(false);
end.

Footy

2012-06-23 09:26:35

alright, i fixed that now, but now it clicks on the inventory button instead of the teleport button…

{$i srl/srl.simba}

//Made for RS downloadable

var
Tele, x, y: integer;



Procedure Teleport;


begin
tele := DTMFromString('mWAAAAHicY2FgYGAGYlYGCGCC0ixQNkjc3SKMYe3eh3CMDhjRMAgAAFk6B9Q=');
SetupSRL
if FindDTM(tele, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
MMouse(x, y, 15, 15);
end;
end;


Procedure Randoms;
begin
if findnormalrandoms or findnoninventoryrandoms then
begin
logout;
terminatescript;
end;
end;

begin
SetupSRL
Repeat
Teleport;
Randoms;
until(false);
end.

weequ

2012-06-23 09:35:54

I guess it's findnormalrandoms that is clicking the inventory tab in your script.

Also it's probably not finding the dtm you're looking for.

make it like this so it will tell if the dtm is not found:

if FindDTM(tele, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
MMouse(x, y, 15, 15);
end else WriteLn('DTM not found!!!');

Ps you can change tabs with the gametab function eg GameTab(TAB_MAGIC);

Footy

2012-06-23 09:45:34

the DTM is the camelot teleport spell, when i test it in the DTM editor, thats all it returns. I tried this, and my script went out of control. How do you stop an out of control script? i had to log out to make it stop. :/ Also, is there a function to find a spell? that would be easier then this…

EtherFreak

2012-06-23 13:46:17

From: Foooty
alright, i fixed that now, but now it clicks on the inventory button instead of the teleport button…

I have this issue sometimes if the client is not not set up right. You might try booting in safe mode. to do this, when you start your client, hold down the "s" key.

As for the mouse speed, if you think it is going to fast or slow, you can change it with
mousespeed:=10; //I use 10, smaller=slower larger=faster

Crit

2012-06-29 09:47:47

It is probably smart to use S.M.A.R.T. As you can still use you own mouse to stop the script. You also do not need to call SetupSrl twice. Only once in your main loop:
begin
SetupSRL
Repeat
Teleport;
Randoms;
until(false);
end.
Then try redoing your coordinates, implement the idea from weequ. And come back to this after.

Metagen

2012-06-30 20:16:23



{$i SRL/SRL/skill/magic.simba}

//...

cast('camelot teleport', false);


Footy

2012-06-30 20:18:26

^ LOL that would have helped back when i was making this script. Im done this now though, and working on my fletching and agility scripts. Thanks anyways guys!