WhiteShadow
2006-04-03 18:07:09
FindColorSpiral/FindObj by WhiteShadow
Parameters of FindColorSpiral
its a function since it returns a true/false statement. True=Found Color False=Did Not
x, y =Coords
Color= Can be a Const or a Color you just plugged in
Xs, Ys are the coords of the top left corner of the box which will be formed around the color. Xe, Ye are the Bottom right corner's coords. They Form a box. A total of 2 Color pick releases for this. NOT 4.
Example
FindColorSpiral's are used in if()then statements.
So
BankSym would be declared as a Const Like
Common Uses
FindColorSpiral is commonly used for Mapwalking. Like Icons and Such.
Another Cool Thing About FindColorSpiral- Thx Pwnd. I forgot about this
if you did something like this
It will then spiral outwards from that coord. Which means it can find the closet thing at a even more specified area.
Example
Parameters of FindObj
x, y= Coords
ObjText= A string. E.g 'Take', 'Mine', 'Chop', 'Attack'
ObjColor= A Const Or a Picked Out Color
Tol= The Color's Tolerance
Example
TreeCol would be a Const
Uses
FindObj are used for things inside the Main Screen of Rs. Since it can detect the top left hand corners text to match the color, it is better then FindColorSpiral.
Whole Procedures(Test them around, Kids)
A Icon Clicker ,FindColorSpiral
^Fill in Const then that should work
Findobj E.g
Hopefully you guys got something out of this. Any further questions, plz ask.
K, thx
~WhiteShad0w
Parameters of FindColorSpiral
function FindColorSpiral(var x,y: Integer; color, xs, ys, xe, ye: Integer): Boolean;its a function since it returns a true/false statement. True=Found Color False=Did Not
x, y =Coords
Color= Can be a Const or a Color you just plugged in
xs-ys-------------------
| |
| |
| |
|-------------------xe-ye Xs, Ys are the coords of the top left corner of the box which will be formed around the color. Xe, Ye are the Bottom right corner's coords. They Form a box. A total of 2 Color pick releases for this. NOT 4.
Example
FindColorSpiral's are used in if()then statements.
So
if(FindColorSpiral(x, y, BankSym, 4, 5, 512, 334))then
begin
Writeln('Pmg, Color Found');BankSym would be declared as a Const Like
Const
BankSym =3243243423;//Color of Bank Symbol Common Uses
FindColorSpiral is commonly used for Mapwalking. Like Icons and Such.
Another Cool Thing About FindColorSpiral- Thx Pwnd. I forgot about this
if you did something like this
x:67
y:78It will then spiral outwards from that coord. Which means it can find the closet thing at a even more specified area.
Example
procedure PwndSaidIt;
begin
X:= 45//Starts Spiral at (45, 67);
Y:= 67
if(FindColorSpiral(x, y, Color, 4, 5, 512, 340))then
begin
Mouse(x, y, 1, 1, true);
end;
end;Parameters of FindObj
function FindObj(var cx, cy: Integer; objtext: string; objcolor,tol: Integer): Boolean; x, y= Coords
ObjText= A string. E.g 'Take', 'Mine', 'Chop', 'Attack'
ObjColor= A Const Or a Picked Out Color
Tol= The Color's Tolerance
Example
procedure Test;
begin
if(FindObj(x, y, 'Take', TreeCol, 5))then
begin
Writeln('Found Object');
end;
end;TreeCol would be a Const
Uses
FindObj are used for things inside the Main Screen of Rs. Since it can detect the top left hand corners text to match the color, it is better then FindColorSpiral.
Whole Procedures(Test them around, Kids)
A Icon Clicker ,FindColorSpiral
program IconClicker;//Program Name
{.include SRL/SRL.Scar}//Included SRL
Const
BankSym =0;//Searches for this color
procedure WalkBank;//Starts Procedure off
begin
if(FindColorSpiral(x, y, BankSym, 587, 22, 723, 150))then//the if()then statement
begin
Writeln('<----Found Bank Symbol---->');//If Found it writes in the debug this
Wait(200+random(200));
Mouse(x, y, 1, 1, true);//Clicks Bank SYmbol
Flag;//Waits Till red Flag is gone
end else//if it doesn't find color
begin
Writeln(' Did not Find Bank SymBol');
TerminateScript;
end;
end;
begin//MainLoop
WalkBank;
end.
^Fill in Const then that should work
Findobj E.g
program New;
{.include SRL/SRL.Scar}
Const
Rock1= 0;//
procedure MineOre;
begin
repeat
if(FindObj(x, y, 'Mine', Rock1, 5))then//This finds a Rock With 'Mine' text
begin
Mouse(x, y, 1, 1, true);
Wait(500+random(1000));
end else
begin
Writeln('Hmm, Not FOund, Lets see if itll respawn');
end;
until(InvFull)
end;
begin
MineOre
end.Hopefully you guys got something out of this. Any further questions, plz ask.
K, thx
~WhiteShad0w