View Full Version : Screen Rotation
sm321
07-10-2012, 09:25 AM
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.
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
07-10-2012, 10:48 AM
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?
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
07-10-2012, 11:55 AM
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?
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
07-10-2012, 12:07 PM
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! :)
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.