SRL Archive - Help and Support

help


canofpeople

2006-04-12 21:19:05


program Woodcutter;
{.include SRL\SRL.scar}
var prevlogs:integer;
reglog:integer;

procedure loadbitmaps;
begin
reglog := BitmapFromString(20, 5, 'z78DAB591390EC4200C00BF8' +
'46F287180FF3F29D19A028422A5D9660A64CDD8C2B19090A79204' +
'6BCF43C058107A5635EA9955A8BDF2CBCC42EB0A541F7F21F5A33' +
'BEB59F4A917754ED3BFF2736BEBBA74AACADCB09DDD7F14836A3C' +
'70A80B12C4D536C431D925197A70EB9E06E08A2D369FB6C5A95D8' +
'4C8408C78FA832617E5B87A7B5F8A9BED64F8DF2AAB3F183FFB63' +
'0625F21B36858381');
end;

function DoneChopping:Boolean;
begin
Result:=False
If(CountItemBmpTol(reglog,4)=prevlogs+1)Then
begin
Result:=True
end;
end;

function FindTree:Boolean;
begin
Result:=False
SleepAndMoveMouse (1000+Random(4000))
x:=251
y:=166
If(FindColorSpiralTolerance(x,y,5216392,5,5,515,337,5))or
(FindColorSpiralTolerance(x,y,4292728,5,5,515,337,5))or
(FindColorSpiralTolerance(x,y,3309680,5,5,515,337,5))Then
begin
MMouse (x,y,0,0)
If(Option2('Chop down'))Then
begin
Result:=True
end;
end;
end;

procedure ChopTree;
begin
prevlogs:=CountItemBmpTol(reglog,4)
MMouse(x,y,0,0)
If(Option2('Chop down'))Then
repeat
begin
Mouse(x,y,0,0,true)
SleepAndMoveMouse(100+Random(300))
SleepAndMoveMouse(1000)
until(donechopping)
end;
end;

procedure Setup;
begin
SetupSRL;
ActivateClient;
end;

{==========================Main Loop==================================}

begin
Setup;
repeat;
if(FindTree)then
begin
ChopTree;
end;
until(false)
end.

--------------------------------------------------------------------------------

WhiteShadow

2006-04-12 21:29:54

program Woodcutter;
{.include SRL\SRL.scar}

var
PrevLogs : Integer;
RegLog : Integer;

procedure LoadBitmaps;
begin
RegLog := BitmapFromString(20, 5, 'z78DAB591390EC4200C00BF8' +
'46F287180FF3F29D19A028422A5D9660A64CDD8C2B19090A7 9204' +
'6BCF43C058107A5635EA9955A8BDF2CBCC42EB0A541F7F21F 5A33' +
'BEB59F4A917754ED3BFF2736BEBBA74AACADCB09DDD7F1483 6A3C' +
'70A80B12C4D536C431D925197A70EB9E06E08A2D369FB6C5A 95D8' +
'4C8408C78FA832617E5B87A7B5F8A9BED64F8DF2AAB3F183F FB63' +
'0625F21B36858381');
end;

function DoneChopping : Boolean;
begin
Result:=False
if(CountItemBmpTol(RegLog, 4)=prevlogs + 1)then
begin
Result:=True
end;
end;

function FindTree : Boolean;
begin
Result:=False
SleepAndMoveMouse (1000+Random(4000))
x:= 251
y:= 166
if(FindColorSpiralTolerance(x, y, 5216392, 5, 5, 515, 337, 5))or
(FindColorSpiralTolerance(x, y, 4292728, 5, 5, 515, 337, 5))or
(FindColorSpiralTolerance(x,y,3309680,5,5,515,337, 5))then
begin
MMouse (x,y,0,0)
if(Option2('Chop down'))then
begin
Result:=True
end;
end;
end;

procedure ChopTree;
begin
PrevLogs:= CountItemBmpTol(reglog,4)
MMouse(x, y, 0, 0)
if(Option2('Chop down'))then
begin
repeat
Mouse(x, y, 0, 0, true)
SleepAndMoveMouse(100+Random(300))
SleepAndMoveMouse(1000)
until(donechopping)
end;
end;


procedure Setup;
begin
SetupSRL;
ActivateClient;
end;

{==========================Main Loop==================================}

begin
Setup;
repeat;
if(FindTree)then
begin
ChopTree;
end;
until(false)
end.

I made it standerized. Hmm, well it compiles, seems good so far. Maybe you should post what you actually need help in? Lmao

timmyboy

2006-04-12 21:32:32

Can you at least tell us what you need help with?:p

Jagex_Fagex

2006-04-12 23:12:08

well i had a few errors when compiling, fixed em up

program Woodcutter;
{.include SRL\SRL.scar}
var prevlogs:integer;
reglog:integer;

procedure loadbitmaps;
begin
reglog := BitmapFromString(20, 5, 'z78DAB591390EC4200C00BF8' +
'46F287180FF3F29D19A028422A5D9660A64CDD8C2B19090A7 9204' +
'6BCF43C058107A5635EA9955A8BDF2CBCC42EB0A541F7F21F 5A33' +
'BEB59F4A917754ED3BFF2736BEBBA74AACADCB09DDD7F1483 6A3C' +
'70A80B12C4D536C431D925197A70EB9E06E08A2D369FB6C5A 95D8' +
'4C8408C78FA832617E5B87A7B5F8A9BED64F8DF2AAB3F183F FB63' +
'0625F21B36858381');
end;

function DoneChopping:Boolean;
begin
Result:=False
If(CountItemBmpTol(reglog,4)=prevlogs+1)Then
begin
Result:=True
end;
end;

function FindTree:Boolean;
begin
Result:=False
SleepAndMoveMouse (1000+Random(4000))
x:=251
y:=166
If(FindColorSpiralTolerance(x,y,5216392,5,5,515,337,5))or
(FindColorSpiralTolerance(x,y,4292728,5,5,515,337, 5))or
(FindColorSpiralTolerance(x,y,3309680,5,5,515,337, 5))Then
begin
MMouse (x,y,0,0)
If(Option2('Chop down'))Then
begin
Result:=True
end;
end;
end;

procedure ChopTree;
begin
prevlogs:=CountItemBmpTol(reglog,4)
MMouse(x,y,0,0)
If(Option2('Chop down'))Then
begin
repeat
Mouse(x,y,0,0,true)
SleepAndMoveMouse(100+Random(300))
SleepAndMoveMouse(1000)
until(donechopping)
end;
end;

procedure Setup;
begin
SetupSRL;
ActivateClient;
end;

{==========================Main Loop==================================}

begin
Setup;
repeat;
if(FindTree)then
begin
ChopTree;
end;
until(false)
end.

phantombmx

2006-04-13 05:18:53

lol the chop tree proc.. you have this
procedure ChopTree;
begin
PrevLogs:= CountItemBmpTol(reglog,4)
MMouse(x, y, 0, 0)
if(Option2('Chop down'))then
begin
repeat
Mouse(x, y, 0, 0, true)
SleepAndMoveMouse(100+Random(300))
SleepAndMoveMouse(1000)
until(donechopping)
end;
end;

change it to this
procedure ChopTree;
begin
PrevLogs:= CountItemBmpTol(reglog,4)
MMouse(x, y, 0, 0)
if(Option2('Chop down'))then
begin
Mouse(x, y, 0, 0, true)
repeat
SleepAndMoveMouse(100+Random(300))
until(DoneChopping)
end;
end;
you had it to where it would click the tree repeatedly until you were done chopping.. it will now chop then just wait repeatedly until done chopping.. you also had sleepandmovemouse twice.. which is pointless unless you are doing that for some reason..

Krazy_Meerkat

2006-04-13 06:28:22

I hate reading scripts without any effort to use standards. Thanks guys for fixing them up.
Hmm… *Rep's random guy that helped*