PDA

View Full Version : First Script!!!



hihi12340
06-18-2007, 12:48 PM
i know, i know, its not finished but i got stuck

here is the script

{HIHI12340 FIRST SCRIPT PowerChopper
AntiRandoms go to Jad}


program PowerChopper;
{.includeSLR/SLR.scar}

procedure AntiRandoms;
FindTalk;
FindNormalRandoms;
if (FindFight = true) then
begin
RunAwayDirection('N');
Wait(10000 + random(3000));
runback;
end;
end;

procedure Chop;
begin
SetupSRL;
repeat
if(FindColor(x,y,2373688,587397
now am i supposed to do this where i left off?


{HIHI12340 FIRST SCRIPT PowerChopper
AntiRandoms go to Jad}


program PowerChopper;
{.includeSLR/SLR.scar}

procedure AntiRandoms;
FindTalk;
FindNormalRandoms;
if (FindFight = true) then
begin
RunAwayDirection('N');
Wait(10000 + random(3000));
runback;
end;
end;

procedure Chop;
begin
SetupSRL;
repeat
if(FindColor(x,y,2373688,587397,0,0,true


if not help me with this so i know for uture scripts :spot:

ZephyrsFury
06-20-2007, 09:33 AM
ummm first of all you should put the procedure in the main loop.

you dont have to put SetupSRL in your procedure as you only have to do it once when you start the script.

with your chop procedure you could do you something like this:

procedure Chop;
begin
repeat
if (FindColorTolerance(x, y, 2373688, MSX1, MSY1, MSX2, MSY2, 10)) then
begin
x:=MSCX;
y:=MSCY;
FindColorSpiralTolerance(x, y, 2373688, MSX1, MSY1, MSX2, MSY2, 10);
Mouse(x, y, 1, 1, true);
Flag;
Wait(1000+random(500));
end;
until not (FindColorTolerance(x, y, 2373688, MSX1, MSY1, MSX2, MSY2, 10));
end;


this should hopefully find the tree colour with a tolerance in the main screen, click and wait until the tree falls downs.

then in your main loop put something like this:

begin
SetupSRL;
repeat
AntiRandoms;
Chop;
until(false);
end;


of course you'll need to put a drop procedure and expand on the chopping and .... dada... you have yourself an extremely basic and easily detectable power chopper ;)