SRL Archive - Help

Screen Rotation


sm321

2012-07-10 05:25:54

Hello :) I am making a script and would like to add screen rotation but not in RuneScape. How would I add this so that after x amount of time it chose either up, down left or right? Thankyou.

Mark

2012-07-10 06:35:51

On phone atm so I will edit this again on pc later.

You can use


Procedure RotateCam;
Begin
If (TimeFromMark(timer) > 15 * 1000 * 60)then // will rotate camera every 15 minutes.
Begin
keydown(vk_left);// change this to the direction you want to rotate.
Wait(200+RandomRange(50,100));// this is how long to hold the button down for change this to make it rotate more or less higher the wait more you rotate
KeyUp(vk_left);
MarkTime(timer);//resets the timer
End;
End;

Make sure you call set a global variable for timer
and also call MarkTime(timer); at the beginning of your script and add RotateCam; in your main loop.

sm321

2012-07-10 06:48:43

From: CRU1Z1N
On phone atm so I will edit this again on pc later.

You can use

keydown(vk_left);// change this to the direction you want to rotate.
Wait(200+RandomRange(50,100));// this is how long to hold the button down for change this to make it rotate more or less higher the wait more you rotate
KeyUp(vk_left);


Thankyou for the reply :) Where about would I add this into my script if it's only a short script? I have a main procedure so I'm guessing somewhere in there?

Mark

2012-07-10 06:54:16

Look again I edited last post can be improved but gives you the idea don't call MarkTime(timer); in your main loop call it just before your enter the loop.

sm321

2012-07-10 07:55:50

From: CRU1Z1N
Look again I edited last post can be improved but gives you the idea don't call MarkTime(timer); in your main loop call it just before your enter the loop.


I have edited it a bit to my needs:

program new;

{$I SRL/SRL.Simba}

Procedure Clicking;
Begin
SetupSrl;
Mouse(438, 105, 10, 10, mouse_right);
Mouse(430, 193, 2, 2, mouse_left);
Wait(RandomRange(540, 500));
End;
Procedure RotateCam;
Begin
If (TimeFromMark(timer) > 2 * 1000 * 60)then
Begin
keydown(vk_left);
Wait(200+RandomRange(50,100));
KeyUp(vk_left);
MarkTime(timer);
End;
End;
begin
repeat
Clicking;
until(false);
end.



And that's all I know how to do. Could someone show me how to declare them please?

Mark

2012-07-10 08:03:35

here you go compare this with yours ive declared the viariable i mention and added you a main loop procedure.

program new;

{$I SRL/SRL.Simba}

var
timer:integer;

Procedure Clicking;
Begin
Mouse(438, 105, 10, 10, mouse_right);
Mouse(430, 193, 2, 2, mouse_left);
Wait(RandomRange(540, 500));
End;

Procedure RotateCam;
Begin
If (TimeFromMark(timer) > 2 * 1000 * 60)then
Begin
keydown(vk_left);
Wait(200+RandomRange(50,100));
KeyUp(vk_left);
MarkTime(timer);
End;
End;

procedure main;
begin
MarkTime(timer);
repeat
Clicking;
RotateCam;
until(false);
end;

begin
SetupSrl;
main;
end.

sm321

2012-07-10 08:07:40

From: CRU1Z1N
here you go compare this with yours ive declared the viariable i mention and added you a main loop procedure.

program new;

{$I SRL/SRL.Simba}

var
timer:integer;

Procedure Clicking;
Begin
Mouse(438, 105, 10, 10, mouse_right);
Mouse(430, 193, 2, 2, mouse_left);
Wait(RandomRange(540, 500));
End;

Procedure RotateCam;
Begin
If (TimeFromMark(timer) > 2 * 1000 * 60)then
Begin
keydown(vk_left);
Wait(200+RandomRange(50,100));
KeyUp(vk_left);
MarkTime(timer);
End;
End;

procedure main;
begin
MarkTime(timer);
repeat
Clicking;
RotateCam;
until(false);
end;

begin
SetupSrl;
main;
end.


Thankyou! :)