
Originally Posted by
tm2k
Hi guys,
great site. I found this site randomly. I am not very good when it comes to programming so I face a serious challenge here why I like to plough thorugh this :-))
I found this old SCAR script, can someone explain to me what it does exactly?!?
Code:
program New;
var
x,y,i,r,timer1,timer2,xw,xh : integer;
chakre : Array [1..79] of Integer;
begin
chakre[1] := 10987175; // Red
chakre[2] := 12961221; // Orange
chakre[3] := 10603178; //black
chakre[4] := 10603178; //Green
chakre[5] := 15790830; //Orange
chakre[6] := 15856375; // Purple
chakre[7] := 16499899; // blue 2
chakre[8] := 15790830; // LightBLue
chakre[9] := 11974326; // Red2
chakre[10] := 16381681; // Light BLue 2
timer1 := getsystemtime;
GetClientDimensions(xw,xh);
repeat
inc(i);
wait(5);
if i = 5 then
i:= 1;
//search left
if(FindColorTolerance(x,y,16777215,5,5,147,xh-40,15)) then
begin
Inc(r);
ClickMouse(x,y,True);
WriteLn('BAM');
wait(1000);
end;
//search right
if(FindColorTolerance(x,y,16777215,155,5,xw-5,xh-40,15)) then
begin
Inc(r);
ClickMouse(x,y,True);
WriteLn('BAM');
wait(1000);
end;
until(false);
WriteLn('Done');
end.
For most of you this are basics, but I don't know how to get started .... so thats my 2nd attempt getting up to speed! Thanks guys!
Simba Code:
program New; //Program name
var //Global variables
x,y,i,r,timer1,timer2,xw,xh : integer;
chakre : Array [1..79] of Integer;
begin
chakre[1] := 10987175; // Red
chakre[2] := 12961221; // Orange
chakre[3] := 10603178; //black
chakre[4] := 10603178; //Green
chakre[5] := 15790830; //Orange
chakre[6] := 15856375; // Purple
chakre[7] := 16499899; // blue 2
chakre[8] := 15790830; // LightBLue
chakre[9] := 11974326; // Red2
chakre[10] := 16381681; // Light BLue 2
timer1 := getsystemtime; //Sets timer1 to system time.
GetClientDimensions(xw,xh); //Gets overall cleitn dimensions (x width, x height)
repeat
inc(i); //Increases i
wait(5); //Waits 5ms
if i = 5 then
i:= 1;
//search left
if(FindColorTolerance(x,y,16777215,5,5,147,xh-40,15)) then //If it finds these variables within FindColorTolerance
begin //It will click it and
Inc(r); //Writeln - BAM
ClickMouse(x,y,True);
WriteLn('BAM');
wait(1000); //Waits for 1000ms (1 second)
end;
//search right
if(FindColorTolerance(x,y,16777215,155,5,xw-5,xh-40,15)) then //Same as above
begin
Inc(r);
ClickMouse(x,y,True);
WriteLn('BAM');
wait(1000);
end;
until(false);
WriteLn('Done'); //Writes Done.
end.
If you need any more clarification, please let me know.