Im wondering how I could find a color and check if the name is the same as it is put in the script.
Thanks
Im wondering how I could find a color and check if the name is the same as it is put in the script.
Thanks
You would use this:
SCAR Code:if FindObjCustom(x,y,['NPC Name'],[Colors],Tolerance) then
begin
//Content
end;
Try this
SCAR Code:{.include srl/srl.scar}
Program New;
const
color = 12345;
Name = 'name';
tolerance = 5;//
function Check: boolean;
begin
if FindColorTolerance(x,y,color,msx1,msy1,msx2,msy2,tolerance) then
begin
Mmouse(x,y,1,1);
if isuptext(name) then
result:=true;
end;
end;
begin
setupsrl;
if check then writeln('Found col + uptext');
end.
Look at the SRL Wiki: http://www.villavu.com/wiki/index.php/Finding_Colors
The next you have a question like this, use the search button, search for tutorials(There are tutorials for this, many) or use the SRL Wiki.
There are currently 1 users browsing this thread. (0 members and 1 guests)