SRL Archive - OSR Help

Can't figure out how to use If statement (color script)


tsabras

2016-03-31 07:40:59

So I wanted to try a full color herb cleaner, but instead of DTM it would follow a random manually created pattern. Here was the first pattern I tried but no matter how i word it, it keeps getting errors with the "if" statement. Any help or tips would be appreciated!


begin
Counter := 1;
FailSafe := 0;
a := 580;
b := 230;
writeln('Cleaning Herbs')

repeat
Writeln('Counter = ' + IntToStr(Counter));
if (counter = 2, 3, 4, 10, 11, 12, 18, 19, 20, 26, 27, 28) then
a := a + 40;
if (counter = 6, 7, 8, 14, 15, 16, 22, 23, 24) then
a := a - 40;
if (counter = 5, 9, 13, 17, 21, 25) then
b := b + 35;
end;

x := a;
y := b;

writeln('Cleaning Herbs')
MMouse(x, y, Random(30), Random(30));
GetMousePos(x, y);
wait(random(270)+random(70)+random(70)+random(70));
HoldMouse(x, y, mouse_Left);
wait(random(150)+random(75)+random(50));
ReleaseMouse(x, y, mouse_Left);
wait(random(150));

Counter := Counter + 1;
Until(Counter = 29);

end.

Turpinator

2016-03-31 08:09:55

https://villavu.com/forum/showthread.php?t=58935

Feel free to read up on how the basics work…