SRL Archive - General Botting Help

Help improve/repeating w/ Simba.


U S M C

2013-12-31 00:14:01

Okay guys, this is my code for cooking. Very Basic, all I know how to do:
program MoveMouse;

var
X,Y:Integer;


begin
wait(1000);
MoveMouse(580, 255);
wait(250);
ClickMouse(580, 255, 2);
wait(250);
MoveMouse(425, 160);
wait(250);
ClickMouse(405, 145, 2);
wait(3000);
MoveMouse(580, 470);
wait(250);
ClickMouse(580, 470, 2);
wait(250);
MoveMouse(330, 160);
wait(250);
ClickMouse(335, 165, 2);
wait(19000);
MoveMouse(115, 200);
wait(250);
ClickMouse(115, 220, 1);
wait(5000);
MoveMouse(400, 320);
wait(250);
ClickMouse(400, 320, 1)
wait(250);
MoveMouse(450, 160);
wait(250);
ClickMouse(450, 160, 0);
wait(250);
MoveMouse(450, 230);
wait(250);
ClickMouse(450, 230, 1);
wait(250);
MoveMouse(490, 50);
wait(250);
ClickMouse(490, 50, 1);
end.
How do I get this to loop repeat? Where it never stops till I tell it to, or how can I set an amount of times it repeats?

Ian

2013-12-31 00:45:41


var
T:TTimeMarker;
begin
T.start;//Starts the timer
repeat
Movemouse(580, 255);
Wait(250);
ClickMouse(405, 145, 2);
until(T.getTime > 5000);//5000 = 5 seconds
end;
I'd also recommend checking out some of the beginner scripting tutorials in the tutorials section :)

U S M C

2013-12-31 01:14:01

Thanks a lot that will help me with my Anti-Random.. But would you know how to make it loop a certain amount of times?
I found this;
repeat
until(false);
Witch just repeats forever, but how do I make it repeat like 100 times then continues to log you out or something?

slacky

2013-12-31 01:22:02

From: U S M C
Thanks a lot that will help me with my Anti-Random.. But would you know how to make it loop a certain amount of times?
I found this;
repeat
until(false);
Witch just repeats forever, but how do I make it repeat like 100 times then continues to log you out or something?



var
i: Integer;
begin
for i:=0 to 99 do //100 iterations
begin
//do something
end;
end.

Do as BMWxi recommends, read some tutorials, they cover much of the needed basics to get you going!
> The indentation in the script you gave is horrible. Tutorials also gives you a sens of how it should be.
Just as a quick note regarding indentation:
You only use two spaces after each start of a new block.
> definition of a block being "a little" relative, but generally begin is the start of a new block, hence what comes after should be indented with current depth + two spaces. Whenever you encounter/write end; the current indentation level drops back with -two spaces.

Simple example of such indenting:

begin //inc indentation (+2 spaces)
WriteLn('hello world');
if 1 = 1 then
begin //inc
WriteLn('1 = 1');
Write('is 2 = 1? ');

if 2 = 1 then
begin //inc
WriteLn('2 = 1??? WTF??? THIS SHOULD NOT HAPPEN');
end else begin //dec + inc
WriteLn('No it''s not!');
end; //dec

{
Special case where "block" is "relative".
There is no "begin" or "end". This is bacause it's a single line statement
"then" counts as the "begin" and the ";" at the end of next line = "end"
}
Write('is 51 = 51? ');
if 51 = 51 then //inc (only next line)
WriteLn('Yes it is!');
//dec (we are out of the above statement)

WriteLn(#13#10+'That''s it for to day!');
end; //dec

WriteLn('Bye bye!');
end. //dec

Wu-Tang Clan

2013-12-31 13:41:59

From: U S M C
Thanks a lot that will help me with my Anti-Random.. But would you know how to make it loop a certain amount of times?
I found this;
repeat
until(false);
Witch just repeats forever, but how do I make it repeat like 100 times then continues to log you out or something?


you could do something like this:

procedure Cook;
var
cooked: Integer;
begin
repeat
// Stuff you coded here
Inc(cooked);
until (cooked = 100);
end;
At least, that's what I remember from SRL5, now it probably has some long, extended, useless code for the same purpose with more parameters than it needs…

U S M C

2013-12-31 14:04:35

Okay I am trying to find some guides that fit my Simba Version but none of them really do since i've got the most uptodate one and their posts are old.. That's why I ask for help here is because times change along with updates. Their guides do nothing but give me errors. But if you could maybe give me a good link to one that can help me with getting the bot to talk, and recognize color that would be great.

koryperson

2014-01-07 16:40:39

From: U S M C
Okay I am trying to find some guides that fit my Simba Version but none of them really do since i've got the most uptodate one and their posts are old.. That's why I ask for help here is because times change along with updates. Their guides do nothing but give me errors. But if you could maybe give me a good link to one that can help me with getting the bot to talk, and recognize color that would be great.


Downgrade to SRL-5, then tutorials will work fine.