SRL Archive - Help

How Do I Repeat This Script...


ttm nick

2012-07-27 11:00:16

Hey, i have made myself my own splasher that just repeats the same thing over and over, onto the spell, then onto the monster

i want to know how to repeat it X amount of times

here is what i have
program Splasher;

procedure StartGame;
begin
MoveMouse (706, 278);
Wait (500)
ClickMouse (706, 278, 1);
Wait (500)
MoveMouse (204, 88);
Wait (500)
ClickMouse (204, 88, 1);
Wait (500)
MoveMouse (706, 278);
End;

begin
StartGame
end.

as you can see at the bototm, i made it start the script once, and i want to know how to repeat it however many times needed, please just give me what to put inbetween begin and end at the bottom :D

omgnomorenames

2012-07-27 11:07:48

will repeat until you press p
program Splasher;

procedure StartGame;
begin
MoveMouse (706, 278);
Wait (500)
ClickMouse (706, 278, 1);
Wait (500)
MoveMouse (204, 88);
Wait (500)
ClickMouse (204, 88, 1);
Wait (500)
MoveMouse (706, 278);
End;

begin
repeat
StartGame
until (IsKeyDown(80))
end.

If you want to run for a specific number of times rather than pressing p
program Splasher;
var
TimesToRun,TimesRun : Integer
procedure StartGame;
begin
MoveMouse (706, 278);
Wait (500)
ClickMouse (706, 278, 1);
Wait (500)
MoveMouse (204, 88);
Wait (500)
ClickMouse (204, 88, 1);
Wait (500)
MoveMouse (706, 278);
End;

begin
TimesToRun := 100;
TimesRun := 0
repeat
StartGame
TimesRun := TimesRun +1;
until (TimesRun >= TimesToRun)
end.

footballjds

2012-07-27 11:08:32

From: ttm nick
Hey, i have made myself my own splasher that just repeats the same thing over and over, onto the spell, then onto the monster

i want to know how to repeat it X amount of times

here is what i have
program Splasher;

procedure StartGame;
begin
MoveMouse (706, 278);
Wait (500)
ClickMouse (706, 278, 1);
Wait (500)
MoveMouse (204, 88);
Wait (500)
ClickMouse (204, 88, 1);
Wait (500)
MoveMouse (706, 278);
End;

begin
StartGame
end.

as you can see at the bototm, i made it start the script once, and i want to know how to repeat it however many times needed, please just give me what to put inbetween begin and end at the bottom :D


program Splasher;
procedure StartGame;
begin
MoveMouse (706, 278);
Wait (500)
ClickMouse (706, 278, 1);
Wait (500)
MoveMouse (204, 88);
Wait (500)
ClickMouse (204, 88, 1);
Wait (500)
MoveMouse (706, 278);
End;
var
i: integer;
begin
for i := 0 to 10 do StartGame;
end.

Footy

2012-07-27 11:12:25

Is this for runescape? if so, Dont use this, movemouse and clickmouse are very robotic movements, the mouse moves at the speed of light. Rather, use Mouse(x, y, ranx, rany, button) this moves the mouse to x and y with a small ammount of randomness, then clicks, left or right. for left, you would do mouse(x, y, 2, 2, mouse_left) same with right.

omgnomorenames

2012-07-27 11:13:38

Shit totally forgot about for loops, lmao

ttm nick

2012-07-27 11:13:48

ty!

ttm nick

2012-07-27 11:14:49

From: Footy
Is this for runescape? if so, Dont use this, movemouse and clickmouse are very robotic movements, the mouse moves at the speed of light. Rather, use Mouse(x, y, ranx, rany, button) this moves the mouse to x and y with a small ammount of randomness, then clicks, left or right. for left, you would do mouse(x, y, 2, 2, mouse_left) same with right.


and no, it is for a private server
sorry for double post :/