samerdl
2013-06-16 10:50:39
Kinda of dozed off and tired, not sure how to make this work.
What i want to accomplish: Find bones, pick them up.
What hinders the project: the fact the room pretty much has objects with 100% similar colors.
What i need to do: Tell the script in a for do loop, to loop through my TPA or ATPA and only begin moving mouse when its on the TPA/ATPA that matches the requested size.
Whats the problem? it doesn't work, and am not doing it right.
This isn't a corrected function, as it doesn't do what i want it to do, but this is what i have right now:
The size is off for this and doesn't work really. The bones is minimum 40 maximum 160 from every angle on the screen.
I couldn't manage to make it work, so how do i get around making it only move mouse if its the object i really want? and not the skeletons in the background, which have much larger lengths as tpa's.
Already tried sorting from closest and all, currently it only searches for bones if there are red dots on the minimap and my inventory is not full.. But it seldom spazzes all over the screen too..
SO how do i set a length in size for a tpa and not just an array number?.
Sorry for posting this, i know if i try harder i'll probably figure it out, but to be honest am too tired.. Pretty sure at least one person already encountered this problem and solved it.
What i want to accomplish: Find bones, pick them up.
What hinders the project: the fact the room pretty much has objects with 100% similar colors.
What i need to do: Tell the script in a for do loop, to loop through my TPA or ATPA and only begin moving mouse when its on the TPA/ATPA that matches the requested size.
Whats the problem? it doesn't work, and am not doing it right.
This isn't a corrected function, as it doesn't do what i want it to do, but this is what i have right now:
function SeenBones: boolean;
var
TPA:tpointarray;
I,H,Col,TmpCts:integer;
ATPA: T2DPointArray;
begin
//setlength(Tpa,2);
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(BoneHue, BoneSat);
result := FindColorsTolerance(TPA, BonesColor, 185, 50, 400, 250,BoneTol);
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
// SetArrayLength(ATPA,1);
// ATPA := TPAtoATPAEx(TPA,20,20);
//TPAtoATPAWrap(TPA,10,ATPA);
TPAtoATPAExWrap(TPA,15,15,ATPA);
SortATPAFromSize(ATPA,10,true);
DebugATPA(atpa,'');
wait(1000);
H := High(ATPA);
For I := 0 To H Do
Begin
if ((length(ATPA[i]) < 160) and (length(ATPA[i]) > 40)) then
begin
writeln('yes');
result := true;
End;
end;
end;
The size is off for this and doesn't work really. The bones is minimum 40 maximum 160 from every angle on the screen.
I couldn't manage to make it work, so how do i get around making it only move mouse if its the object i really want? and not the skeletons in the background, which have much larger lengths as tpa's.
Already tried sorting from closest and all, currently it only searches for bones if there are red dots on the minimap and my inventory is not full.. But it seldom spazzes all over the screen too..
SO how do i set a length in size for a tpa and not just an array number?.
Sorry for posting this, i know if i try harder i'll probably figure it out, but to be honest am too tired.. Pretty sure at least one person already encountered this problem and solved it.