How about something which can detect the type of click you do, for instance, if you have an autominer, and its supposed to click on a rock, but instead clicks near it "with yellow cross", the sript will think it has clicked the rock still, and then it would add it to a counter, for instance, how many mined or so.
I need this for my agility script which im making which counts the times it does an obsticle, but sometimes it misses the obsticle, but still counts as it has done it.
Not sure if someone has already done this before :confused:
Wizzup?
2006-06-22 08:42:54
From: Ares
How about something which can detect the type of click you do, for instance, if you have an autominer, and its supposed to click on a rock, but instead clicks near it "with yellow cross", the sript will think it has clicked the rock still, and then it would add it to a counter, for instance, how many mined or so.
I need this for my agility script which im making which counts the times it does an obsticle, but sometimes it misses the obsticle, but still counts as it has done it.
Not sure if someone has already done this before :confused:
I tried it, but most of the times you miss the arrow, then you are too late. :)
But, if you miss, you could make it quickly try and click again before continuing…
Wizzup?
2006-06-22 11:13:20
From: Ares
But, if you miss, you could make it quickly try and click again before continuing…
Hmm.. maybe you did not quite got me…
Anyway, Clicking again isn't such a good idea IMO, cause it might **** the script up.
But, give it a try.
Here I wrote simple procedure :) I believe this is what you wanted.
[php]
program MMClickAndCheck;
{.include SRL/SRL.scar}
function MMClickAndCheck(x, y, xR, yR : integer; left : boolean) : boolean;
begin
MMouse(x,y,xR,yR);
GetMousePos(x, y);
Mouse(x,y,0,0,left);
if (GetColor(x+5, y-5) = 255) then
begin
Writeln('Red cross detected');
Result := True;
end;
if (GetColor(x+5, y-5) = 65535) then
begin
Writeln('Yellow cross detected!');
Result := False;
end;
end;
begin
SetupSRL;
Wait(100);
ActivateClient;
Wait(100);
MMClickAndCheck(200,200,1,1,true);
end.
[/php]
Wizzup?
2006-06-22 13:59:05
Here : Did not test it, only wrote it :
[php]Function CheckClick(x,y:LongInt;Red:Boolean):Boolean;
Var aX,aY:LongInt;
Begin
If Red Then
Begin
If FindColor(aX,aY,255,X-5,Y-5,X+5,Y+5) Then
Begin
Result := True;
End;
End
Else
Begin
If FindColor(aX,aY,65535,X-5,Y-5,X+5,Y+5) Then
Begin
Result := False;
End;
End
End;[/php]
[php]Function CheckClick2(x,y:LongInt;Red:Boolean):String;
Var aX,aY:LongInt;
Begin
If Red Then
Begin
If FindColor(aX,aY,255,X-5,Y-5,X+5,Y+5) Then
Begin
Result := LowerCase('Red');
End
Else Result := LowerCase('Failed');
End
Else
Begin
If FindColor(aX,aY,65535,X-5,Y-5,X+5,Y+5) Then
Begin
Result := LowerCase('Yellow');
End
Else Result := LowerCase('Failed');
End
End;[/php]
CheckClick Returns Boolean if the selected Color is found.
CheckClick2 Returns a lowercased result when found, if it failed, it returns a lowercased 'Failed' String.
The Red Boolean :
True for Red, False for Yellow.
There.
Mine moves mouse and clicks and checks woot, could be implemented in srl tho?
Wizzup?
2006-06-22 14:31:55
From: c0de
Mine moves mouse and clicks and checks woot, could be implemented in srl tho?
I don't think adding a click is very usefull…… ;)
thnx guys, i'll try some out