Hi there, an excellent start to scripting!
Here are some suggestions for you, and things for you to note:
1) What everyone is trying to tell you about the begin and end tags.
PHP Code:
If This_Is_True Then
Begin
Writeln('Hello');
Writeln('This is true!');
end;
is very different to:
PHP Code:
If This_Is_True Then
Writeln('Hello');
Writeln('This is true!');
Although none of them will compile, I'll explain what they do. If you were to run the first one and the variable This_Is_True was true, then it will print out the words Hello and This is true. If you run the second one and the variable This_Is_True is true, it would also print out the words Hello and This is true.
It differs however, if the variable This_Is_True is not set to true. If you were to run the first one and the variable This_Is_True was false, it would print out nothing. If you are to run the second one and the variable This_Is_True is set to false, it will only print out "This is True"
This is all to do with the begin and end tags. Play around with them a bit and you'll see what i mean.
2) Your standards are excellent! The only thing you are doing wrong is increasing the indenting all the time after the If (Someting) then
If you are not going to use the begin and end tags then it should be:
PHP Code:
if (GetColor(226,214)=16777215) then
wait(100);
MoveMouseSmoothEx(226,214,1,3,20,1,1);
wait(100);
ClickMouse(226,214,true);
wait(100);
SendKeys(HighScoreName);
wait(100);
MoveMouseSmoothEx(275,273,1,3,20,1,1);
wait(100);
ClickMouse(275,273,true);
wait(100);
If you are going to use the begin and end tags, then it should be:
PHP Code:
if (GetColor(226,214)=16777215) then
begin
wait(100);
MoveMouseSmoothEx(226,214,1,3,20,1,1);
wait(100);
ClickMouse(226,214,true);
wait(100);
SendKeys(HighScoreName);
wait(100);
MoveMouseSmoothEx(275,273,1,3,20,1,1);
wait(100);
ClickMouse(275,273,true);
wait(100);
end;
3) You may want to think about breaking out of infinite loops however, such as the following:
PHP Code:
procedure FindHand;
begin
repeat
wait(1);
MoveMouse(230,252);
until (GetColor(230,252)=3757682);
end;
What happens if it never finds the color? It will be moving the mouse forever.
I would suggest something like:
PHP Code:
procedure FindHand;
Var
Count: Integer;
begin
repeat
wait(1);
MoveMouse(230,252);
Count := Count + 1;
until (GetColor(230,252)=3757682) or (Count >= 10)
end;
That way it will move the mouse there until it finds the color or "Count" is greater or equal to 10
Otherwise I can't find much more which is wrong with the script.
I added your poll for you.
Great job
Star