From: Aaronator
I cant wait, im practically jumping out of my chair right now! :)
Hahah. Do you two know eachother irl? Or is there some kind of bond happening already? XD
I dont really have any woodcut accounts, but if you would like, I can go through the script and make some comments on it. I know some people don't like having a critique of their script though, so I will ask first.
E: NOOOOOOOO I just wrote such a long amount of tips, then accidentally pressed something on the keyboard that closed the window. Ctrl or something :\ Fuck. I'll try it again. Something shorter though.
Here goes.
Just commenting on the TPA part, since everything else I saw was just little things about standards and stuff.
Where you have:
FindColorsTolerance(TPA, 8039586, MSX1,MSY1,MSX2,MSY2,5);
There is no failsafe. If you call TPAtoATPA and the TPA has no colours stored in it (Ie, the colour wasn't found) it will give you a runtime error. Solved simply by:
FindColorsTolerance(TPA, 8039586, MSX1,MSY1,MSX2,MSY2,5);
If Length(TPA) = 0 Then
Begin
FindColorsTolerance(TPA, {Another Colour here}, MSX1, MSY1, MSX2, MSY2, {Tol})
If Length(TPA) = 0 Then
Begin
Writeln('Failed');
TerminateScript;
End;
End;
Which adds a couple checks for the colour, and can look for another colour.
SetColorSpeed2Modifiers(1.26, 1.02);
Where did you get those numbers? They probably don't help anything unless I'm missing something somewhere… Leaving it at a default would probably be your best bet unless it really does help?
For I:=0 to High(High1) do
Instead of calling "High" over and over again, just call it once before the For loop, it will be much quicker. Such as this:
A := High(High1);
For I := 0 to A do
A for loop will call High over and over, and naturally that will take more time than having a solid number.
mouse(tp.x,tp.y,0,0,true);
AntiRandoms;
Will check for the randoms right after it clicks. Which could miss any randoms due to lag or if they just take a second to appear. Add a small wait (500 ms or so) and it will hopefully not miss them because of that.
Now, on to some other random thoughts.
function Invycount:integer;
var i:integer;
begin
for i := 1 to 28 do
begin
if ExistsItem(i) then
inc(result);
end;
end;
I'm pretty sure that you could just change that to this:
function Invycount:integer;
var i:integer;
begin
for i := 1 to 28 do
if ExistsItem(i) then
inc(result);
end;
Just to take out some unneeded lines.
Theres a lot of random empty lines after… WaitCut. XD
A few random things:
Capitalize letters more. Like WaitCut instead of waitcut. Because it just looks neater ;)
Join the dark side and captalize the bold letters too!
All in all though, I love your use of failsafes, especially in your walking. I agree with promising newcomer as well.