the nerd
01-21-2007, 02:49 PM
I have just created these new function. I feel that these could be really handy if used properly. Plz note that I still feel there is room of improvement.
Note: Plz check back here regularly for the latest version. Version release dates will be listed below.
Version Update List.
21 January 2007
22 January 2007
23 January 2007 : Major update. Added Tolerance plus other stuff
EDIT: I have removed the function from here and instead started a new thread containing all of my functions and procedures. I will post link ASAP
mage of begu
01-22-2007, 10:39 AM
Yeah these are pretty usefull ty...anyways what should i put to BoxSize ???
something like 40 or 40*40 pls answer ASAP...ty for these great functions !
Buckleyindahouse
01-22-2007, 12:07 PM
So you made those functions?
the nerd
01-22-2007, 12:40 PM
So you made those functions?
Yes, I made these functions.
Yeah these are pretty usefull ty...anyways what should i put to BoxSize ???
something like 40 or 40*40 pls answer ASAP...ty for these great functions !
A number like 20 usually works well, the number is the the length of each side as it creates a square. SO if you enter 20, it creates a 20 * 20 square.
I have just updated them, so if you have copied them, you will need to copy them again
mage of begu
01-22-2007, 01:30 PM
Yes, I made these functions.
A number like 20 usually works well, the number is the the length of each side as it creates a square. SO if you enter 20, it creates a 20 * 20 square.
I have just updated them, so if you have copied them, you will need to copy them again
Ok thanks..i use them to my autominer
EDIT: and ofcourse i give you some CREDITS :D
mage of begu
01-24-2007, 08:14 PM
Ok so i edited it a bit...if you dont mind...i just changed it to find it in inventory and i thought that some1 else would need it too...so here it is anyway:
Updated a bit:
{************************************************* ******************************
Function FindObjColInBoxInInv(rx,ry:Integer;Text:String;Col or1,Color2,Color3,Tol,BoxSize:Integer):Boolean;
By: THE NERD ( Edited by: Mage Of Begu )
Description: Looks for the three colors and if within a box specified by BoxSize
moves mouse to check to find Object name. This function finds items at inventory.
Like FindObject except removes most strange mouse movments.
************************************************** *****************************}
Function FindObjColInBoxInInv(rx,ry:Integer;Text:String;Col or1,Color2,Color3,Tol,BoxSize:Integer):Boolean;
var
I, A ,D ,E:Integer;
ColorPosx : Array [1..3] Of Integer;
ColorPosy : Array [1..3] Of Integer;
begin
Result := False;
If (FindColorTolerance(x,y,Color1,MIX1, MIY1, MIX2, MIY2, Tol)) Or
(FindColorTolerance(x,y,Color2,MIX1, MIY1, MIX2, MIY2, Tol)) Or
(FindColorTolerance(x,y,Color3,MIX1, MIY1, MIX2, MIY2, Tol)) Then
begin
D := 10;
E := D;
Repeat
For I := 1 To 3 Do
begin
ColorPosx[i] := MICX;
ColorPosy[i] := MICY;
end;
If (A = 1) Then
begin
For I := 1 To 3 Do
begin
ColorPosx[i] := MICX;
ColorPosy[i] := ColorPosy[i] + D;
end;
end;
If (A = 2) Then
begin
For I := 1 To 3 Do
begin
ColorPosx[i] := ColorPosx[i] + (D div 2);
ColorPosy[i] := ColorPosy[i] + D;
end;
end;
If (A = 3) Then
begin
For I := 1 To 3 Do
begin
ColorPosx[i] := ColorPosx[i] + D;
ColorPosy[i] := ColorPosy[i] + D;
end;
end;
If (A = 4) Then
begin
For I := 1 To 3 Do
begin
ColorPosx[i] := ColorPosx[i] + D;
ColorPosy[i] := ColorPosy[i] + (D div 2);
end;
end;
If (A = 5) Then
begin
For I := 1 To 3 Do
begin
ColorPosx[i] := ColorPosx[i] + D;
ColorPosy[i] := ColorPosy[i] + (D div 4);
end;
end;
If (A = 6) Then
begin
For I := 1 To 3 Do
begin
ColorPosx[i] := ColorPosx[i] + D;
ColorPosy[i] := MICY;
end;
end;
If (A = 7) Then
begin
For I := 1 To 3 Do
begin
ColorPosx[i] := ColorPosx[i] + D;
ColorPosy[i] := ColorPosy[i] - (D div 4);
end;
end;
If (A = 8) Then
begin
For I := 1 To 3 Do
begin
ColorPosx[i] := ColorPosx[i] + D;
ColorPosy[i] := ColorPosy[i] - (D div 2);
end;
end;
If (A = 9) Then
begin
For I := 1 To 3 Do
begin
ColorPosx[i] := ColorPosx[i] + D;
ColorPosy[i] := ColorPosy[i] - D;
end;
end;
If (A = 10) Then
begin
For I := 1 To 3 Do
begin
ColorPosx[i] := ColorPosx[i] + (D div 2);
ColorPosy[i] := ColorPosy[i] - D;
end;
end;
If (A = 11) Then
begin
For I := 1 To 3 Do
begin
ColorPosx[i] := MICX;
ColorPosy[i] := ColorPosy[i] - D;
end;
end;
If (A = 12) Then
begin
For I := 1 To 3 Do
begin
ColorPosx[i] := ColorPosx[i] - (D div 2);
ColorPosy[i] := ColorPosy[i] - D;
end;
end;
If (A = 13) Then
begin
For I := 1 To 3 Do
begin
ColorPosx[i] := ColorPosx[i] - D;
ColorPosy[i] := ColorPosy[i] - D;
end;
end;
If (A = 14) Then
begin
For I := 1 To 3 Do
begin
ColorPosx[i] := ColorPosx[i] - D;
ColorPosy[i] := ColorPosy[i] - (D div 2);
end;
end;
If (A = 15) Then
begin
For I := 1 To 3 Do
begin
ColorPosx[i] := ColorPosx[i] - D;
ColorPosy[i] := ColorPosy[i] - (D div 4);
end;
end;
If (A = 16) Then
begin
For I := 1 To 3 Do
begin
ColorPosx[i] := ColorPosx[i] - D;
ColorPosy[i] := MICY;
end;
end;
If (A = 17) Then
begin
For I := 1 To 3 Do
begin
ColorPosx[i] := ColorPosx[i] - D;
ColorPosy[i] := ColorPosy[i] + (D div 4);
end;
end;
If (A = 18) Then
begin
For I := 1 To 3 Do
begin
ColorPosx[i] := ColorPosx[i] - D;
ColorPosy[i] := ColorPosy[i] + (D div 2);
end;
end;
If (A = 19) Then
begin
For I := 1 To 3 Do
begin
ColorPosx[i] := ColorPosx[i] - D;
ColorPosy[i] := ColorPosy[i] + D;
end;
end;
If (A = 20) Then
begin
For I := 1 To 3 Do
begin
ColorPosx[i] := ColorPosx[i] - (D div 2);
ColorPosy[i] := ColorPosy[i] + D;
end;
A := 0;
D := D + E;
end;
FindColorSpiralTolerance(ColorPosx[1],ColorPosy[1],Color1,MIX1, MSY1, MIX2, MIY2, Tol)
FindColorSpiralTolerance(ColorPosx[2],ColorPosy[2],Color2,MIX1, MSY1, MIX2, MIY2, Tol)
FindColorSpiralTolerance(ColorPosx[3],ColorPosy[3],Color3,MIX1, MSY1, MiX2, MIY2, Tol)
If ((ColorPosx[1] - ColorPosx[2] < BoxSize) Or (ColorPosx[1] - ColorPosx[2] > -BoxSize)) And ((ColorPosy[1] - ColorPosy[2] < BoxSize) Or (ColorPosy[1] - ColorPosy[2] > -BoxSize)) Then
begin
If ((ColorPosx[2] - ColorPosx[3] < BoxSize) Or (ColorPosx[2] - ColorPosx[3] > -BoxSize)) And ((ColorPosy[2] - ColorPosy[3] < BoxSize) Or (ColorPosy[2] - ColorPosy[3] > -BoxSize)) Then
begin
If ((ColorPosx[3] - ColorPosx[1] < BoxSize) Or (ColorPosx[3] - ColorPosx[1] > -BoxSize)) And ((ColorPosy[3] - ColorPosy[1] < BoxSize) Or (ColorPosy[3] - ColorPosy[1] > -BoxSize)) Then
begin
MMouse(ColorPosx[1],ColorPosy[1],3,3);
Wait(250);
If (IsUpText(Text)) Then
begin
Result := True;
GetMousePos(rx,ry);
end;
end;
end;
end;
A := A + 1;
B := B + 1;
Until (Result = True) Or (B > ((MICX * 20) / E) )
end;
end;
the nerd
01-25-2007, 07:35 AM
Right, thanks. Ill use addd 2 my other function and give you some credit
Bobarkinator
01-25-2007, 01:34 PM
Thanks man!! This will be helpful for many of my scripts
the nerd
01-26-2007, 10:50 AM
Can any one help me weed out some of the really annoying bugs PLZ. I you plz pm you and ill tell you the bugs, and give you the latest copy of my function.
Thanks
THE NERD
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.