SRL Archive - Help and Support

Need help with collector


Boreas

2006-11-15 16:01:51

I wrote a seaweed collector for shilo village (start in bank with at least 2 seaweed in first bank slot,username and pass setup is a way down) and it worked ok, but I made a few things better. When I made those changes I screwed other stuff help, and now I don't know what to do. Any ideas?

By the way it works by withdrawing 1 seaweed to calibrate color because the color in inventory is the same as on MS. It gets 3 seaweed from left to right, then click below the river to start going back, then when it sees the questcolor, it stops and gets another 3. It does this 9 times then when it starts going back it keeps going, and banks. If there's anything else you need to know please ask. Also please keep this members only, even keep the fact that seaweed collecting is autoable a secret, because there's no randoms and I want to keep it that way.

program new;
{.include srl\srl.scar}
var questcolor,tries1,bridge,a,i,tries,red,seaweedcolor:integer;
findyellowdone:boolean;


procedure waittilstill;
var
points: array [0..17] of tpoint;
color: array [0..17] of integer;
oldcolor: array [0..17] of integer;
gh,hg,same: integer;

begin
points[1].x:=600
points[1].y:=30
points[2].x:=630
points[2].y:=30
points[3].x:=660
points[3].y:=30
points[4].x:=690
points[4].y:=30
points[5].x:=600
points[5].y:=60
points[6].x:=630
points[6].y:=60
points[7].x:=660
points[7].y:=60
points[8].x:=690
points[8].y:=60
points[9].x:=600
points[9].y:=90
points[10].x:=630
points[10].y:=90
points[11].x:=660
points[11].y:=90
points[12].x:=690
points[12].y:=90
points[13].x:=600
points[13].y:=120
points[14].x:=630
points[14].y:=120
points[15].x:=660
points[15].y:=120
points[0].x:=690
points[0].y:=120
gh:=17;
repeat
wait(50);
gh:=gh+1;
hg:=(gh mod 16);
oldcolor[hg]:=color[hg];
color[hg]:=getcolor(points[hg].x,points[hg].y);
if (color[hg]=oldcolor[hg]) then same:=same+1;
if not(color[hg]=oldcolor[hg]) then same:=0;
until same>=10;

end;




type ybox = record
x1,y1,x2,y2,cx,cy:integer;
active:boolean;
end;


type tehpoint = record
x,y :integer;
active : boolean;
end;

type combo = record
point1,point2,x1,y1,x2,y2,dist:integer;
active:boolean;
end;


procedure findyellows (var fx, fy:integer; PointsToFind,width,basex,basey,endx,endy:integer);
var
box :array of ybox;
ypoint : array of tehpoint;
x,d,e,nob,fyx,fyy,currentpoint,lp,ldistance,row,prow,col,nor,noc:integer;

begin
noc:=(( (endx-basex) - (width mod (endx-basex)))/width)+1;
nor:=(( (endy-basey) - (width mod (endy-basey)))/width)+1;

nob:=nor*noc;
setarraylength(box, ((nob)+2));
repeat
x:=x+1;
if ((x+noc) mod noc)>0 then
col:=((x+noc) mod noc);
if ((x+noc) mod noc) =0then
col:=noc;
prow:=0;
repeat
prow:=prow+1;
until ( x<=(noc*prow));
row:=prow;
box[x].x1:=(basex+ ((col-1)*width) );
box[x].x2:=(basex+(col*width));
box[x].y1:=(basey+ ((row-1)*width) );
box[x].y2:=(basey+(row*width));
box[x].cx:=round((box[x].x2+box[x].x1)/2);
box[x].cy:=round((box[x].y2+box[x].y1)/2);
box[x].active:=true;

{
//draws the boxes on paint
movemouse(box[x].x1,box[x].y1);
holdmouse(box[x].x1,box[x].y1,true);
movemouse(box[x].x2,box[x].y2);
releasemouse(box[x].x2,box[x].y2,true);
}
until x>=nob;

currentpoint:=1;
d:=0;
setarraylength(ypoint, pointstofind+1);
repeat
d:=d+1;
if (box[d].active) then
begin
if findcolor(fyx,fyy,195836,box[d].x1,box[d].y1,box[d].x2,box[d].y2) then
begin
ypoint[currentpoint].x :=fyx;
ypoint[currentpoint].y :=fyy;
currentpoint:=currentpoint+1;
box[d].active:=false;
end;
end;
until (( currentpoint= pointstofind)or (d=nob));
e:=0;
ldistance:=1000;
findsymbol(x,y,'bank');
repeat
if (not (ypoint[e].x = 0) and not(ypoint[e].y=0)) then
begin
if Round(Sqrt(Sqr(ypoint[e].x - x) + Sqr(ypoint[e].y -y))) <ldistance then
begin
ldistance:=Round(Sqrt(Sqr(ypoint[e].x - x) + Sqr(ypoint[e].y -y)));
lp:=e;
end;
end;
e:=e+1;
until e=(getarraylength(ypoint)-1);
fx:=ypoint[lp].x;
fy:=ypoint[lp].y;
findyellowdone:=true;

/////////--------------------analysis end--------------------------
end;



Function angledir(angle,Side:String): Boolean;
Var
Fx, Fy, Dx, Dy : Integer;
ComMark: Integer;
Left_Right : Boolean;
Begin
MarkTime(ComMark);
Case LowerCase(Side) Of
'n' : Begin Fx := 566; Fy := 13; End;
'e' : Begin Fx := 560; Fy := 19; End;
's' : Begin Fx := 566; Fy := 27; End;
'w' : Begin Fx := 573; Fy := 20; End;
end;
If FindColor(Dx,Dy,723587,Fx,Fy,Fx,Fy) Then
begin
Result:=True;
case angle of
'h':
begin
if (Loggedin) then
begin
keydown(38);
sleep(1000 + random(100) + random(200));
keyup(38);
wait(1000 + random(100));
end;
end;
'l':
begin
if (Loggedin) then
begin
keydown(40);
sleep(1000 + random(100) + random(200));
keyup(40);
wait(1000 + random(100));
end;
end;
end;
Exit;
end
If Random(2) = 1 Then Left_Right := True
Else Left_Right := False;
If Left_Right Then
begin
case angle of
'h':keydown(38);
'l':keydown(40);
end;
KeyDown(VK_RIGHT)
end
Else
begin
case angle of
'h':keydown(38);
'l':keydown(40);
end;
KeyDown(VK_Left);
end;
Repeat
Wait((10)+ Random(10));
If(FindColor(Dx,Dy,723587,Fx,Fy,Fx,Fy))then
begin
Result := True;
break;
end;
Until(TimeFromMark(ComMark) > 7000);
If Left_Right Then
begin
case angle of
'h':keyup(38);
'l':keyup(40);
end;
KeyUp(VK_Right);
end
Else
begin
case angle of
'h':keyup(38);
'l':keyup(40);
end;
KeyUp(VK_Left);
end;
End;







begin
setupsrl;
mousespeed:=20;
HowManyPlayers := 2;
CurrentPlayer:=0;

NumberOfPlayers(HowManyPlayers);

Players[0].Name :='';
Players[0].Pass :='';


Players[1].Name :='';
Players[1].Pass :='';

activateclient;
if not(loggedin) then loginplayer;
red:= DTMFromString('78DA637CC6C4C0F0910105C0B88C501A004C4' +
'502CD');
bridge:= DTMFromString('78DA634C6762608867400179FE460C29409A1' +
'188FF0301630AA69AF7EF9FC0D580006312A69AEAFEEDA86AB289' +
'302787B03900B02513D9');
repeat

angledir('l','n');
repeat
findsymbol(x,y,'bank');
mouse(x,y,5,5,true);
repeat
findyellows(x,y,16,10,590,30,700,120);
mouse(x,y,3,3,true);
countflag(0);
tries1:=0;
repeat
mmouse(207+random(303-207), 132+random(199-132),0,0);
tries1:=tries1+1;
until( (isuptextmulti('Banker','ank','ker')) or (tries1>5));

until isuptextmulti('Banker','ank','ker');
getmousepos(x,y);
mouse(x,y,0,0,false);
mouse(x-5+random(10),y+40+random(5),0,0,true);
wait(2000);
until bankscreen;
//-----find banker dudes and open bank
fixbank;
Depositall;
withdraw(1,1,1);
angledir('h','n');
findsymbol(x,y,'bank');
mouse(((x-3)+random(2)),(y-(10+random(3))),0,0,true);
gametab(4);
waittilstill;
mouse(588+random(611-588),70+random(96-70),2,2,true);
countflag(0);
mouse(643,58,5,5,true);
countflag(0);
// repeat //
// wait(50); //
// until isfkeydown(12);//
findmmdtm(x,y,bridge);
mouse(x,y,3,3,true);
seaweedcolor:=getcolor(583,224);
countflag(0);
findsymbolcolorifneeded('quest', false,questcolor);

repeat

repeat

repeat if (not(((invcount+2) mod 3)=0)or( invcount=1)or (i=3)) then begin
repeat if (not(((invcount+2) mod 3)=0)or( invcount=1)or (i=3)) then begin
a:=getsystemtime;
repeat if (not(((invcount+2) mod 3)=0)or( invcount=1)or (i=3)) then begin
repeat
wait(100)
until (findmmdtm(x,y,red) or ((getsystemtime-a)>10000));
if not(findmmdtm(x,y,red)) then
begin
logout;
loginplayer; a:=getsystemtime;
findmmdtm(x,y,red)
end; end;
until (FindDTM(red, x, y, 620, 8, 723, 158));
mouse(x,y,3,3,true);
waittilstill;
wait(100);

gametab(4);
seaweedcolor:=getcolor(583,224);
wait(100); end;
until findcolor(x,y,seaweedcolor,142,107,374,296);
mouse(x,y,1,1,false); end;
until (chooseoption(x,y,'eed') or (((invcount+2) mod 3)=0));

//getmousepos(x,y);
//mouse(x,y,0,0,true);
wait(1000+random(2000));


i:=i+1;
until ((invcount+2) mod 3)=0;
i:=3;
{
tries:=0;
x:=0; y:=0;
repeat
FindSymbol(x,y,'furnace');
if ( ((x=0)and(y=0)) ) then
begin
SendArrowSilentWait(3, 200 + Random(50));

tries:=tries+1;
wait(10);
end;

if tries>15 then
begin
logout;
wait(1000+random(1000));
loginplayer;
repeat
wait(10);
until (loggedin);
tries:=0
end;



until (( not((x=0)or(y=0)) ) );

findsymbol(x,y,'furnace');

mouse(x,y,5,5,true); }
mouse(629,130,5,5,true);
repeat
wait(100);
until FindColor(x, y, questcolor, 540, 8, 723, 158);
if not(invcount=28) then begin wait(5000+3000);mouse(mmcx,mmcy,5,5,true);end;
until invcount=28;
countflag(0);
//findsymbol(x,y,'furnace');
//mouse(x,y,5,5,true);
makecompass('n');
countflag(0);
findsymbol(x,y,'furnace')
mouse(x,y+30,5,5,true);

repeat
wait(100);
until findsymbol(x,y,'bank');
mouse(x,y,5,5,true);
waittilstill;
until (isfkeydown(6));
end.

WT-Fakawi

2006-11-15 17:38:28

I think you need to make your script more surveyable. The mainloop is not really a pretty sight…
I had to study the first four nested repeat loops before I discovered they where actually a bankingloop! Function Bank:Boolean; ? maybe :)

On the other hand, I see a touch of genius in a lot of your work. waittillstill? Thats brilliant! Whats the performance of that function? I want that in SRL! angledir? Looks ok to me :)
What does findyellows do? Find the bankers?

Isnt there any walking involved? Cause the pathing is a mystery to…

Well, cant really help more except: reduce your level of abstraction in order to improve readability. Thats better for you too. Otherwise you wont be able to comprehend it yourself within a month time :)

Boreas

2006-11-15 18:24:31

Waittilstill cuz countflag(0); wasn't waiting quite long enough. Angledir cuz it took too long to change the angle and the compass one after the other, plus I as a human playing legit do both at once. Yea findyellows finds the yellow dot closest to the bank symbol. It was modified from another bankfinder I made for port phasmatys and draynor that found yellow dots, and put them together in combinations and narrowed down the combos that had the right distances between them to find the 3 or 4 people behind the counters while ignoring npcs outside. This one is simpler and just finds the closet to the bank. There is quite a bit of walking, no roads tho :(. I'll work on readability when I get home, it wasn't that bad in the beginning honest! Then I started adding failsafes loops and 'improving' things and it got ugly.

Bam Bam

2006-11-15 19:26:27

Boreas can I use your waittillstill that is just pure genius :)

dontpanic

2006-11-15 19:54:02

Well… what everyone else said… that waittilstill looks awsome!! It should be added to srl…

Boreas

2006-11-15 21:37:41

Sure go ahead, just give credit I guess. Maybe it will be in SRL when I become a dev:tongue: .

Anyone got any ideas for bank finding? There's no booth just too dudes (yellow dots by bank symbol) that have the uptext Talk-to Banker and options Talk-to banker, and Bank Banker(this is the one I want, like use quickly). Right now it's just random mouse in box near center (after getting close with the yellow dot and lowest angle) and uptext. Colors look too unreliable.

Also for walking, (if you don't have a member account with shilo village quest, try runehq or something) right now it's basically just coords with a little symbol. Not too good.

The worst part is (it was working well before I improved other stuff) getting the 3 spawns, then walking back to the brigde/quest area, and repeating til invul, then banking.

Also, since respawn time changes with number of people on world, sometimes the first one comes back before it gets the third one, so after getting the second one it goes back to the first one. So I made it only look for the red dot on the right side of the MM, to make sure it goes from left to right. But this makes its harder to walk back and get the first one. It has to make sure it walks back far enough so that the first one (if it's appeared yet) is on the right side.

Right now, I have the spawn finding in a loop for 3, then walking back, then that in a loop for 9, then banking, then another loop around that. I am wondering whether I should make 3 separate spawn finding things one after the other instead. What do you think?

What pisses me off the most is that it was working before, then I fix 1 problem and 5 more spring up. Eh, c'est la programming.

Anyone got any suggestions? I know it's hard to see what it does if you don't have a member account with access to shilo village.

(I should be able to get on my computer and make it more readable in a couple hours.)


BTW, you may wondering why the hell I made a seaweed spawn collector. I need to level up my crafting, and flax aint cutting it. So I'm making over 1k glass orbs. I bought about 100 molten glass the other day and wrote a glass blowing thing (I'll write withdrawmoltenglass and depositglassorb later), but if I continue doing that it'll cost me over 1mil, so I need to make it myself (I'll write stuff for that too lol). Also, no randoms for walking and picking up drops!



EDIT:
Cleaned it up a little.
{Seaweed Collector by Bores
Collects and banks seaweed, duh.
Start in shilo village bank, with 0-28 seaweed in you inventory, and at least
2 seaweed in first bank slot. fill out the username and pass below twice.}

program new;
{.include srl\srl.scar}
var questcolor,tries1,bridge,a,i,tries,red,seaweedcolor:integer;
findyellowdone:boolean;

procedure setupstuff;
begin
setupsrl;
mousespeed:=20;
HowManyPlayers := 2;

CurrentPlayer:=0;
NumberOfPlayers(HowManyPlayers);

Players[0].Name :='crgky127';
Players[0].Pass :='boogle';
Players[0].Nick :='rgk';

Players[1].Name :='crgky127';
Players[1].Pass :='boogle';
Players[1].Nick :='rgk';

activateclient;
if not(loggedin) then loginplayer;
red:= DTMFromString('78DA637CC6C4C0F0910105C0B88C501A004C4' +
'502CD');
bridge:= DTMFromString('78DA634C6762608867400179FE460C29409A1' +
'188FF0301630AA69AF7EF9FC0D580006312A69AEAFEEDA86AB289' +
'302787B03900B02513D9');

end;


{*******************************************************************************
procedure waittilstill;
by: Boreas
Description: Alternative to waiting for flag. Moving dots have a very small chance
of screwing it up, you may want to use something similiar that monitors points
around the outside of the MM where there are no dots.
*******************************************************************************}
procedure waittilstill;
var
points: array [0..17] of tpoint;
color: array [0..17] of integer;
oldcolor: array [0..17] of integer;
gh,hg,same: integer;
begin
points[1].x:=600
points[1].y:=30
points[2].x:=630
points[2].y:=30
points[3].x:=660
points[3].y:=30
points[4].x:=690
points[4].y:=30
points[5].x:=600
points[5].y:=60
points[6].x:=630
points[6].y:=60
points[7].x:=660
points[7].y:=60
points[8].x:=690
points[8].y:=60
points[9].x:=600
points[9].y:=90
points[10].x:=630
points[10].y:=90
points[11].x:=660
points[11].y:=90
points[12].x:=690
points[12].y:=90
points[13].x:=600
points[13].y:=120
points[14].x:=630
points[14].y:=120
points[15].x:=660
points[15].y:=120
points[0].x:=690
points[0].y:=120 //if youre wondering, i didnt type all those out by hand, i wrote a script :)
gh:=17;
repeat
wait(50);
gh:=gh+1;
hg:=(gh mod 16);
oldcolor[hg]:=color[hg];
color[hg]:=getcolor(points[hg].x,points[hg].y);
if (color[hg]=oldcolor[hg]) then same:=same+1;
if not(color[hg]=oldcolor[hg]) then same:=0;
until same>=10;
end;




type ybox = record
x1,y1,x2,y2,cx,cy:integer;
active:boolean;
end;

type tehpoint = record
x,y :integer;
active : boolean;
end;

type combo = record
point1,point2,x1,y1,x2,y2,dist:integer;
active:boolean;
end;

{*******************************************************************************
procedure findyellowsbank (var fx, fy:integer; PointsToFind,width,basex,basey,endx,endy:integer);
by: Boreas
Description: Finds yellow dot closest to bank symbol. Requires the types ybox,tehpoint, and combo.
Parameters: fx and fy are coords you want the dot to be returned to. PointsToFind is
the max number of dots to compare, lower is faster but less accurate, 16 is usually good.
width is how wide the boxes are, it finds 1 yellow dot per box, so 10 is good, theres
a commented section to show the width of the boxes on paint. The last four are the
box you want it to search in, you can use the minimap or even at bit smaller.
*******************************************************************************}

procedure findyellowsbank (var fx, fy:integer; PointsToFind,width,basex,basey,endx,endy:integer);
var
box :array of ybox;
ypoint : array of tehpoint;
x,d,e,nob,fyx,fyy,currentpoint,lp,ldistance,row,prow,col,nor,noc:integer;

begin
noc:=(( (endx-basex) - (width mod (endx-basex)))/width)+1;
nor:=(( (endy-basey) - (width mod (endy-basey)))/width)+1;

nob:=nor*noc;
setarraylength(box, ((nob)+2));
repeat
x:=x+1;
if ((x+noc) mod noc)>0 then
col:=((x+noc) mod noc);
if ((x+noc) mod noc) =0then
col:=noc;
prow:=0;
repeat
prow:=prow+1;
until ( x<=(noc*prow));
row:=prow;
box[x].x1:=(basex+ ((col-1)*width) );
box[x].x2:=(basex+(col*width));
box[x].y1:=(basey+ ((row-1)*width) );
box[x].y2:=(basey+(row*width));
box[x].cx:=round((box[x].x2+box[x].x1)/2);
box[x].cy:=round((box[x].y2+box[x].y1)/2);
box[x].active:=true;

{
//draws the boxes on paint
movemouse(box[x].x1,box[x].y1);
holdmouse(box[x].x1,box[x].y1,true);
movemouse(box[x].x2,box[x].y2);
releasemouse(box[x].x2,box[x].y2,true);
}
until x>=nob;

currentpoint:=1;
d:=0;
setarraylength(ypoint, pointstofind+1);
repeat
d:=d+1;
if (box[d].active) then
begin
if findcolor(fyx,fyy,195836,box[d].x1,box[d].y1,box[d].x2,box[d].y2) then
begin
ypoint[currentpoint].x :=fyx;
ypoint[currentpoint].y :=fyy;
currentpoint:=currentpoint+1;
box[d].active:=false;
end;
end;
until (( currentpoint= pointstofind)or (d=nob));
e:=0;
ldistance:=1000;
findsymbol(x,y,'bank');
repeat
if (not (ypoint[e].x = 0) and not(ypoint[e].y=0)) then
begin
if Round(Sqrt(Sqr(ypoint[e].x - x) + Sqr(ypoint[e].y -y))) <ldistance then
begin
ldistance:=Round(Sqrt(Sqr(ypoint[e].x - x) + Sqr(ypoint[e].y -y)));
lp:=e;
end;
end;
e:=e+1;
until e=(getarraylength(ypoint)-1);
fx:=ypoint[lp].x;
fy:=ypoint[lp].y;
findyellowdone:=true;

end;


{*******************************************************************************
Function angledir(angle,Side:String): Boolean;
by: Boreas, based on makecompass by Wizzup? and highestangle by StarBlaster100
Description: Changes highest/lowest angle and the compass direction at the same time.
Parameters: angle is 'h' for highest and 'l' for lowest
Side is 'n' 'e' 's' 'w' for the directions like in makecompass
*******************************************************************************}
Function angledir(angle,Side:String): Boolean;
Var
Fx, Fy, Dx, Dy : Integer;
ComMark: Integer;
Left_Right : Boolean;
Begin
MarkTime(ComMark);
Case LowerCase(Side) Of
'n' : Begin Fx := 566; Fy := 13; End;
'e' : Begin Fx := 560; Fy := 19; End;
's' : Begin Fx := 566; Fy := 27; End;
'w' : Begin Fx := 573; Fy := 20; End;
end;
If FindColor(Dx,Dy,723587,Fx,Fy,Fx,Fy) Then
begin
Result:=True;
case angle of
'h':
begin
if (Loggedin) then
begin
keydown(38);
sleep(1000 + random(100) + random(200));
keyup(38);
wait(1000 + random(100));
end;
end;
'l':
begin
if (Loggedin) then
begin
keydown(40);
sleep(1000 + random(100) + random(200));
keyup(40);
wait(1000 + random(100));
end;
end;
end;
Exit;
end
If Random(2) = 1 Then Left_Right := True
Else Left_Right := False;
If Left_Right Then
begin
case angle of
'h':keydown(38);
'l':keydown(40);
end;
KeyDown(VK_RIGHT)
end
Else
begin
case angle of
'h':keydown(38);
'l':keydown(40);
end;
KeyDown(VK_Left);
end;
Repeat
Wait((10)+ Random(10));
If(FindColor(Dx,Dy,723587,Fx,Fy,Fx,Fy))then
begin
Result := True;
break;
end;
Until(TimeFromMark(ComMark) > 7000);
If Left_Right Then
begin
case angle of
'h':keyup(38);
'l':keyup(40);
end;
KeyUp(VK_Right);
end
Else
begin
case angle of
'h':keyup(38);
'l':keyup(40);
end;
KeyUp(VK_Left);
end;
End;


procedure finddabank;
begin
angledir('l','n');
repeat
findsymbol(x,y,'bank');
mouse(x,y,5,5,true);
repeat
findyellowsbank(x,y,16,10,590,30,700,120);
mouse(x,y,3,3,true);
countflag(0);
tries1:=0;
repeat
mmouse(207+random(303-207), 132+random(199-132),0,0);
tries1:=tries1+1;
until( (isuptextmulti('Banker','ank','ker')) or (tries1>5));
until isuptextmulti('Banker','ank','ker');
getmousepos(x,y);
mouse(x,y,0,0,false);
mouse(x-5+random(10),y+40+random(5),0,0,true);
wait(2000);
until bankscreen;
end;

procedure bankstuff;
begin
finddabank;
fixbank;
Depositall;
withdraw(1,1,1);
angledir('h','n');
end;

procedure walktostartingplace;
begin

findsymbol(x,y,'bank');
mouse(((x-3)+random(2)),(y-(10+random(3))),0,0,true);
gametab(4);
waittilstill;
mouse(588+random(611-588),70+random(96-70),2,2,true);
countflag(0);
mouse(643,58,5,5,true);
countflag(0);
findmmdtm(x,y,bridge);
mouse(x,y,3,3,true);
seaweedcolor:=getcolor(583,224);
countflag(0);
findsymbolcolorifneeded('quest', false,questcolor);

end;


begin
setupstuff;

repeat
bankstuff;
walktostartingplace;


repeat
//=========================seaweed finding
repeat
repeat
if (not(((invcount+2) mod 3)=0)or( invcount=1)or (i=3)) then
begin
repeat
if (not(((invcount+2) mod 3)=0)or( invcount=1)or (i=3)) then
begin
a:=getsystemtime;
repeat
if (not(((invcount+2) mod 3)=0)or( invcount=1)or (i=3)) then
begin
repeat
wait(100)
until (findmmdtm(x,y,red) or ((getsystemtime-a)>10000));
if not(findmmdtm(x,y,red)) then
begin
logout;
loginplayer;
a:=getsystemtime;
findmmdtm(x,y,red)
{find red dot} end;
end;
until (FindDTM(red, x, y, 620, 8, 723, 158));
mouse(x,y,3,3,true);
waittilstill;
wait(100);
{calibrate sea} gametab(4);
{weed color} seaweedcolor:=getcolor(583,224);
wait(100);
end;
until findcolor(x,y,seaweedcolor,142,107,374,296);
mouse(x,y,1,1,false);
end;
until (chooseoption(x,y,'eed') or (((invcount+2) mod 3)=0)); {c;ick seaweed}
wait(1000+random(2000));
i:=i+1;
until ((invcount+2) mod 3)=0;
i:=3;
//============================seaweed finding end

//========================walking to start place/bank
mouse(629,130,5,5,true); //clicks below the water (hopefull)

repeat
wait(100);
until FindColor(x, y, questcolor, 540, 8, 723, 158); //wait until see quest color on right side

if not(invcount=28) then
begin
wait(5000+3000);
mouse(mmcx,mmcy,5,5,true); //if not full then wait and stop in tracks
end;
//==========================walking to start place/bank end
until invcount=28;

//=========================walk to bank

makecompass('n');
countflag(0);
findsymbol(x,y,'furnace') ///click below furnace
mouse(x,y+30,5,5,true);

repeat
wait(100);
until findsymbol(x,y,'bank');
mouse(x,y,5,5,true);
waittilstill; //go in bank
//======================walk to bank end;
until (isfkeydown(6));

end.

edit 2: just realized scar tags were fixed!