i need ti to click that tree not the others im out of ideas iv tried everything i can think ofplease help me
i need ti to click that tree not the others im out of ideas iv tried everything i can think ofplease help me
Try that mate
SCAR Code:If (FindColorSpiralTolerance(x,y, Treecolor, msx1,msy1,msx2,msy2, 5)) then
Begin
MMouse(x, y, 3, 3);
if(IsUpTextMulti('hop', 'own', 'ree'))then
begin
Wait(100 + Random(100));
Mouse(x,y,3,3, false);
Wait(50 + Random(35));
ChooseOption(x, y, 'Chop');
Wait(50 + Random(100));
end;
end;
thats what i had originally i need it to click that normal tree only once thanks for your help anyways and only once
What Me_ntal has should work put it in a procedure and make a loop. Have it run the procedure wait till the tree reappears, repeat clicking procedure.
SUMMER BREAK be back when I want to
just remember to declare clickcount as a const and set it as 0
This will click the tree once
SCAR Code:If(clickcount := 0) then
begin
If (FindColorSpiralTolerance(x,y, Treecolor, msx1,msy1,msx2,msy2, 5)) then
Begin
MMouse(x, y, 3, 3);
if(IsUpTextMulti('hop', 'own', 'ree'))then
begin
Wait(100 + Random(100));
Mouse(x,y,3,3, True);
clickcount := 1
end;
end;
end;
this will make it loop to click for an invent
SCAR Code:repeat
If (FindColorSpiralTolerance(x,y, Treecolor, msx1,msy1,msx2,msy2, 5)) then
Begin
MMouse(x, y, 3, 3);
if(IsUpTextMulti('hop', 'own', 'ree'))then
begin
Wait(100 + Random(100));
Mouse(x,y,3,3, false);
Wait(50 + Random(35));
ChooseOption(x, y, 'Chop');
Wait(50 + Random(100));
end;
end;
until(InvFull)
I think you better can use a FindObject. As mentals function *can* keep looking at exactly the same spot every time.
i know all that but it clicks the willows as well and i only need the one log not a whole inv full i had and idea but then got banned from dda comp for 2 dayssupposed to be doing my home work right now lol i was thinking of just setting the coords in a general box round the tree then makeing the compass north and have hi8ghest angle then on what ever comp it is ittl just clikc that tree i will try that out next time im allowed on the comp
IsUpText('ree');
and I'd recommend looping findcolortoleranceskipboxarray. When you find a basic treecolor, move the mouse over it. If the uptext is 'ree', click it. If not, add that coordinate and all coordinates 30 pixes around it to the box array to be skipped.
continue the loop until either the tree has been found, or the mouse has been moved a certain amount of times
If you want to see an example, look at my powercutter (powerkut)
Interested in C# and Electrical Engineering? This might interest you.
thanks smartzkidz do you ahve a link to your script?
i looked throu but couldnt find it can you give me an example oh how to use it please?.
uses four colors to find the tree: tclr1, tclr2, tclr3, and tclrnew.
SCAR Code:function MultiBoxes(tolerance: integer; Boxes: TBoxArray): boolean;
begin
result := false;
if (FindColorSkipBoxArrayTolerance(tx, ty, tclr1, msx1, msy1, msx2, msy2, tolerance, Boxes)) then
begin
result := true;
end else
if (FindColorSkipBoxArrayTolerance(tx, ty, tclr2, msx1, msy1, msx2, msy2, tolerance, Boxes)) then
begin
result := true;
end else
if (FindColorSkipBoxArrayTolerance(tx, ty, tclr3, msx1, msy1, msx2, msy2, tolerance, Boxes)) then
begin
result := true;
end else
if (FindColorSkipBoxArrayTolerance(tx, ty, tclrnew, msx1, msy1, msx2, msy2, tolerance, Boxes)) then
begin
result := true;
end;
end;
procedure findtrees(w: integer);
var
found: boolean;
tolnce, tx, ty: integer;
AntiBoxes: TBoxArray;
begin
tolnce := 16; //Initial tolerance
repeat
if (not (MultiBoxes(tolnce, AntiBoxes))) then
begin
tolnce := tolnce + 2;
end else
begin
MMouse(tx, ty, 5, 5);
wait(random(500));
end;
if (IsUpTextMulti('op do', 'hop', 'down')) and (not (BadTree)) then
begin
found := true;
end else
begin
getmousepos(tx, ty);
setarraylength(antiboxes, getarraylength(antiboxes) + 1);
antiboxes[getarraylength(antiboxes) - 1].x1 := tx - 15;
antiboxes[getarraylength(antiboxes) - 1].y1 := ty - 15;
antiboxes[getarraylength(antiboxes) - 1].x2 := tx + 15;
antiboxes[getarraylength(antiboxes) - 1].y2 := ty + 15;
end;
until (found) or (tolnce > 50);
if (found) then
Mouse(tx,ty,5,5,true);
end;
Interested in C# and Electrical Engineering? This might interest you.
SCAR Code:program THINGY;
{.Include SRL/SRL.scar}
var
logDTM,c,TinderBox,MMtree,treeuperleft: integer;
ty,tx :integer;
const
FishingSpot = 15315080;
Treecolor1 = 2900024;
tclr1 = 2373688;
tclr2 = 2181184;
tclr3 = 1318936;
tclrnew = 1722432;
procedure LoadBMPS;
begin
MMTree := BitmapFromString(4, 5, 'z78DA7589410A0020080' +
'4BFB4AE4A7614C2FF3F29C84B105D8661866125D0642178BC29C5' +
'C0EA7E5F100ABE775A52B3BB438778F3D7371BEA19B0');
treeuperleft := BitmapFromString(25, 1, 'z78DA4DCC410E805' +
'00843C12BD11A8D7F29D8FB5F49144C60319BBE00D776EF7644C4' +
'8208D0C6E112FFB59BA081E56CDAB9BEFDD9CE9F4BC8B2740828B' +
'3F4AF4F1F82E32065');
end;
procedure LoadDTMS;
begin
logDTM := DTMFromString('78DA632C66626078CE8002CA632C181E02694' +
'620FE0F048C5540356F19D000231209A46B806AEE125053005473' +
'87809A74A09A8704D46410760F0036D50E09');
TinderBox := DTMFromString('78DA63F460626078CA8002362C59C2A0C3C8C' +
'000440CFF8180D117A8E603031A60442281740850CD4D026ABC88' +
'50630B54F388801A6BA09A5704D4D803D5BC23A02614A8E6397E3' +
'50017E80FB0');
end;
procedure LightFire;
begin
if(FindDTM(logDTM,x,y,Mix1, Miy1, Mix2, Miy2))then
wait(200+random(100));
MMouse(x,y,0,0);
wait(200+random(100));
Mouse(x,y,0,0,true);
FreeDTM(LogDTM);
if(FindDTM(TinderBox,x,y,Mix1, Miy1, Mix2, Miy2))then
wait(200+random(100));
MMouse(x,y,0,0);
wait(200+random(100));
Mouse(x,y,0,0,true);
FreeDTM(TinderBox);
end;
procedure FindFishSpot;
begin;
if (FindColortolerance(x, y, Fishingspot, msx1, msy1, msx2, msy2, 5)) then
MMouse(x, y, 0, 0);
if (IsUpText('Net')) or
(IsUpText('N et')) or
(IsUpText('Ne t')) then
Mouse(x, y, 0, 0, true);
FindNormalRandoms;
end;
procedure Walktotree;
begin
if(FindDeformed(x,y,MMTree,MMx1,MMy1,MMx2,MMy2))then
wait(200+random(100));
MMouse(x,y,0,0);
wait(200+random(100));
Mouse(x,y,0,0,true);
if(not(FindDeformed(x,y,MMTree,MMx1,MMy1,MMx2,MMy2)))then
writeln('you didnt find it');
end;
function MultiBoxes(tolerance: integer; Boxes: TBoxArray): boolean;
begin
result := false;
if (FindColorSkipBoxArrayTolerance(tx, ty, tclr1, msx1, msy1, msx2, msy2, tolerance, Boxes)) then
begin
result := true;
end else
if (FindColorSkipBoxArrayTolerance(tx, ty, tclr2, msx1, msy1, msx2, msy2, tolerance, Boxes)) then
begin
result := true;
end else
if (FindColorSkipBoxArrayTolerance(tx, ty, tclr3, msx1, msy1, msx2, msy2, tolerance, Boxes)) then
begin
result := true;
end else
if (FindColorSkipBoxArrayTolerance(tx, ty, tclrnew, msx1, msy1, msx2, msy2, tolerance, Boxes)) then
begin
result := true;
end;
end;
procedure findtrees(w: integer);
var
found: boolean;
tolnce, tx, ty: integer;
AntiBoxes: TBoxArray;
begin
tolnce := 16; //Initial tolerance
repeat
if (not (MultiBoxes(tolnce, AntiBoxes))) then
begin
tolnce := tolnce + 2;
end else
begin
MMouse(tx, ty, 5, 5);
wait(random(500));
end;
if (IsUpTextMulti('op do', 'hop', 'down'))then
begin
found := true;
end else
begin
getmousepos(tx, ty);
setarraylength(antiboxes, getarraylength(antiboxes) + 1);
antiboxes[getarraylength(antiboxes) - 1].x1 := tx - 15;
antiboxes[getarraylength(antiboxes) - 1].y1 := ty - 15;
antiboxes[getarraylength(antiboxes) - 1].x2 := tx + 15;
antiboxes[getarraylength(antiboxes) - 1].y2 := ty + 15;
end;
until (found) or (tolnce > 50);
begin
SetUpSrl;
Activateclient;
perfectnorth;
LoadBMPS;
walktotree;
wait(2500+random(500));
findtrees;
loadDTMS;
wait(3000+random(500));
lightfire;
end.
that is what i have so far in the script i get a strange error in the scrip in my main loop
Line 140: [Error] (17475:10): Invalid number of parameters in script
i know that its messy and stuff and dosent do everything but its my rough draft to get everything working properly
There are currently 1 users browsing this thread. (0 members and 1 guests)