SRL Archive - Archive

munk - SRL Member Application Form


munk

2007-10-02 21:39:56

<!– BEGIN TEMPLATE: formanswers –>
munk - SRL Member Application Form
munk

What is the meaning to life?


Where you Referred to SRL? If yes, by whom?
no


Programming Knowledge
you name it, i know it.

Other Communitys
ffmpeg, headweight.net

How Long have You Played Runescape
about 5-6 years

Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.

I do alot of programming. As much as i want to get away from the game of runescape, I love SRL too much. Writing SRL at 4 a.m. is the only thing that keeps me sane through my hectic weeks.

——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted

Fakawi suggested i apply with my feather script, but I think i've done much better work than that. So I attached my favorite SCAR script ive written along with the feathers script just for good measure :)

program forefeathers;
{.include srl/srl.scar}

var
x,y,k,r,s,ck,pu:integer;

const
dbug=false;
directionToRun='E';

procedure declarePlayers;
var
i:integer;
begin
HowManyPlayers := 5;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := ''; //username
Players[0].Pass := ''; //password
Players[0].Nick := ''; //3-4 letters from your username
Players[0].Active := True;

Players[1].Name := ''; //username
Players[1].Pass := ''; //password
Players[1].Nick := ''; //3-4 letters from your username
Players[1].Active := True;

Players[2].Name := ''; //username
Players[2].Pass := ''; //password
Players[2].Nick := ''; //3-4 letters from your username
Players[2].Active := True;

Players[3].Name := ''; //username
Players[3].Pass := ''; //password
Players[3].Nick := ''; //3-4 letters from your username
Players[3].Active := True;

Players[4].Name := ''; //username
Players[4].Pass := ''; //password
Players[4].Nick := ''; //3-4 letters from your username
Players[4].Active := True;

end;

function countfeathers:integer;
var
feathers:integer;
count:string;
begin
result:=0;
feathers:=DTMFromString('78DA639464606010614001DBD7AC61E002D28' +
'C40FC1F081845810C5E0634C08844026921202148400D485E8C08' +
'73A409A8E107124A04D480FC2443408D3CA6DF31D448000949FC6' +
'A00153F07BB');
gametab(4);
if finddtm(feathers,x,y,mix1,miy1,mix2,miy2) then
begin
count:=GetTextAtEx(x-16, y-17, 0, statchars, False, False, 0, 1, 65535, 10, false, tr_AlphaNumericChars);
count:=trim(TrimOthers(count));
if not(count='') then
begin
if dbug then writeln(count+' feathers');
result:=strtoint(count);
end;
end;
freedtm(feathers);
end;

procedure login;
begin
if (not(loggedin)) then loginplayer;
wait(200);
findnormalrandoms;
marktime(s);
highestangle;
makecompass('n');
end;

procedure report;
var
i,f,chickens:integer;
begin
for i:=0 to howmanyplayers-1 do
begin
writeln(inttostr(i)+': '+players[i].nick+' | '+left(booltostr(players[i].active),1)+' | '+inttostr(players[i].integers[0])+' feathers | '+inttostr(players[i].integers[1])+' chickens');
f:=f+players[i].integers[0];
chickens:=chickens+players[i].integers[1];
end;
writeln('/////////////////////////////////////////////');
writeln('forefeathers');
writeln('ran for '+TimeRunning);
writeln('killed '+inttostr(chickens)+' chickens');
writeln('Picked up '+inttostr(f)+' feathers');
writeln('/////////////////////////////////////////////');
end;

function FindFastRandoms: Boolean; //By WT-Fakawi.
var
i: Integer;
begin
for i := 1 to 8 do
begin
case I of
1: if FindDead then
Result := True;
2: if FindMod then
Result := True;
3: if FindMime then
Result := True;
4: if FindMaze then
Result := True;
5: if FindQuiz then
Result := True;
6: if FindDemon then
Result := True;
7: begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;
7: begin
if InBlack then
begin
Result := True;
Players[CurrentPlayer].loc := 'InBlack';
Logout;
Exit;
end;
end;
8: RC;
end;
wait(1);
end;
end;

procedure run;
begin
if (not(loggedin)) then exit;
if timefrommark(r)>500000 then
begin
setrun(true);
marktime(r);
end;
end;

function attackChicken:boolean;
var
i,hx,hy:integer;
colors:array[0..3] of integer;
begin
if (not(loggedin)) then exit;
run;
colors[0]:=5227996;
colors[1]:=923765;
colors[2]:=4962766;
colors[3]:=5269622;
for i:=0 to 3 do
begin
if findobj(x,y,'icken',colors[i],5) then
begin
if not(findcolorspiral(hx,hy,65280,x-5,y-25,x+5,y)) and not(findcolorspiral(hx,hy,255,x-5,y-25,x+5,y)) then
begin
mouse(x,y,0,0,false);
wait(50+random(50));
if chooseoption('tack') then
begin
findnormalrandoms;
inc(players[currentplayer].integers[1]);
ck:=0;
flag;
ftwait(6);
result:=true;
exit;
end;
end;
end;
end;
inc(ck);
writeln('ck = '+inttostr(ck));
wait(50);
end;

procedure nolog;
begin
if (not(loggedin)) then exit;
if timefrommark(k)>10000 then
begin
case random(3) of
0: mmouse(random(500),random(300),0,0);
1: gametab(random(14));
2: begin
mouse(random(msx2),random(msy2),0,0,false);
getmousepos(x,y);
mmouse(x+100+random(100),y-50-random(50),0,0);
end;
end;
gametab(4);
marktime(k);
end;
end;

procedure runAwayHP;
begin
if (not(loggedin)) then exit;
runawaydirection(directiontorun);
players[currentplayer].integers[0]:=countfeathers-players[currentplayer].integers[2];
wait(10000);
logout;
nextplayer(false);
marktime(s);
login;
end;

function pickupFeathers:boolean;
var
i,n,feather:integer;
begin
if (not(loggedin)) then exit;
feather:= DTMFromString('78DA63E46562605067644001EA0C0C5C400A2' +
'4FA1F0818416AD450D56C5BBD0AAE0604C06A3450D59C3C781045' +
'0D00F3EE0943');
for i:=0 to 3 do
begin
if Finddtm(feather,x,y,msx1,msy1,msx2,msy2) then
begin
if dbug then writeln('feather dtm found');
mouse(x,y,2,2,false);
wait(50+random(50));
if chooseoption('eather') then
begin
flag;
result:=true;
break;
end;
end;
end;
freedtm(feather);
end;

procedure fighting;
var
t:integer;
begin
marktime(t);
while(findColorSpiral(x,y,65280,220,130,280,190))do
begin
if hppercent<50 then runawayHP;
ftwait(4);
pickupfeathers;
ftwait(2);
nolog;
findfastrandoms;
if timefrommark(t)>45000 then exit;
end;
end;

begin
setupsrl;
declareplayers;
activateclient;
wait(500);
marktime(s);
repeat
if (not(loggedin)) then login;
if not(players[currentplayer].booleans[0]) then
begin
players[currentplayer].integers[2]:=countfeathers;
players[currentplayer].booleans[0]:=true;
end;
if attackchicken then fighting;
for pu:=0 to 4 do if not(pickupfeathers) then break;
if ck>40 then
begin
if dbug then writeln('couldnt find any chickens');
logout;
nextplayer(false);
ck:=0;
login;
marktime(s);
end;
if timefrommark(s)>900000 then
begin
players[currentplayer].integers[0]:=countfeathers-players[currentplayer].integers[2];
report;
nextplayer(true);
ck:=0;
marktime(s);
login;
end;
findnormalrandoms;
findfastrandoms;
until(false);
end.

{
<><<><<>< <>< <><<><<>< <>< <>< <>< <><
<><<><<>< <>< <><<><<>< <>< <>< <>< <><
<>< <>< <>< <>< <>< <>< <><
<><<>< <>< <><<><<>< <><<><<>< <>< <><
<><<>< <>< <><<><<>< <><<><<>< <><
<>< <>< <>< <>< <>< <><
<>< <>< <><<><<>< <>< <>< <><
<>< <>< <><<><<>< <>< <>< <>< 0.3.1
}
//
// fishes, cooks, banks.
//
// 1. Use SCAR 3.11 with SRL 4(beta).
// 2. Setup players(line 48).
// 3. if player's.skill = 'net' then
// position player in al kharid bank.
// 4. if player's.skill = 'flyrod' then
// position player in edgeville bank.
// 5. if player's.skill = 'cage' or 'harpoon' then
// position player in draynor bank.
// 6. Press Play.
//
// enjoy
//
// -munk
program fishy;
{.include srl/srl.scar}
{.include srl/srl/skill/fishing.scar}

var
x,y,r,h,k,ffr,fnr,loads,burntcolor,ohp,equipcolor,olddockcolor,
flyrod,feathers,lobpot,harpooon,net,
trout,salmon,tuna,lobster,swordfish,shrimps,anchovies,
troutc,salmonc,tunac,lobsterc,swordfishc,shrimpsc,anchoviesc,
bankers,dbankers,alkbankers,alkbankers2,kebabDTM,
stoveDTM:integer;
stove:TPoint;

const
dbug = true;
loadsTilSwitch = 5;

procedure dropburned; Forward;
procedure cookfood; Forward;

//><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>
// Players
//><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>

procedure declarePlayers;
var
i:integer;
begin
HowManyPlayers := 4;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := ''; //username
Players[0].Pass := ''; //password
Players[0].Nick := ''; //3-4 letters from your username
Players[0].pin := 0; //pin # (if any)
Players[0].skill:= 'net'; //'harpoon', 'cage', 'flyrod','net'
Players[0].loc := 'bank';
Players[0].Active := True;
Players[0].booleans[0] := True; //cook the fish

Players[0].Name := ''; //username
Players[0].Pass := ''; //password
Players[0].Nick := ''; //3-4 letters from your username
Players[0].pin := 0; //pin # (if any)
Players[0].skill:= 'flyrod'; //'harpoon', 'cage', 'flyrod','net'
Players[0].loc := 'bank';
Players[0].Active := True;
Players[0].booleans[0] := True; //cook the fish

Players[0].Name := ''; //username
Players[0].Pass := ''; //password
Players[0].Nick := ''; //3-4 letters from your username
Players[0].pin := 0; //pin # (if any)
Players[0].skill:= 'harpoon'; //'harpoon', 'cage', 'flyrod','net'
Players[0].loc := 'bank';
Players[0].Active := True;
Players[0].booleans[0] := True; //cook the fish

Players[0].Name := ''; //username
Players[0].Pass := ''; //password
Players[0].Nick := ''; //3-4 letters from your username
Players[0].pin := 0; //pin # (if any)
Players[0].skill:= 'cage'; //'harpoon', 'cage', 'flyrod','net'
Players[0].loc := 'bank';
Players[0].Active := True;
Players[0].booleans[0] := True; //cook the fish

end;

//><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>
// DTMs
//><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>

procedure loadImages;
begin
flyrod:=DTMFromString('78DA631465606010664001D9819C0C5C409A1' +
'188FF0301A31890C1CD8006189148200DD2204D400D2F909023A0' +
'46900835207B4409A8910712FC04D428030916026A6480043B013' +
'5A0F091C0AF0600727C0687');
feathers:=DTMFromString('78DA639464606010614001DBD7AC61E002D28' +
'C40FC1F081845810C5E0634C08844026921202148400D485E8C08' +
'73A409A8E107124A04D480FC2443408D3CA6DF31D448000949FC6' +
'A00153F07BB');
trout:=DTMFromString('78DA63146460601061400107B66F63E002D28' +
'C40FC1F0818D9800C490634C0884402691E20214D408D28901023' +
'A046114870136197207E3500F9BE0724');
troutc:=DTMFromString('78DA63E467606010614001AD79590C5C409A1' +
'188FF030123279021C4800618914820CD0A24C409A86107123204' +
'D480DC2345408D0461F700004E2E0645');
salmon:=DTMFromString('78DA631462606010614001FB2AB318B880342' +
'310FF0702467E20839F010D302291409A0D48881350C30A24A408' +
'A8E100123204D4F013610EC84F1204D4C810F617006C4106E3');
salmonc:=DTMFromString('78DA63E46760601063400197DCA518B880342' +
'310FF070246104784010D302291409A1548C810500332478E801A' +
'903D5204D448030921FC6A0039160632');
bankers:=DTMFromString('78DA63E4666060E06340017FFE30816946289' +
'F11A4868B801A6120C14D400DC80C31FC6A004B0A085D');
tuna:=DTMFromString('78DA63146460601060400133FB7A195881342' +
'310FF07024616204382010D302291409A1348F01150230224C409' +
'A891C7740FBA1A00A0710672');
tunac:=DTMFromString('78DA6314626060906040015D45790C5C409A1' +
'188FF0301233F90A1C0800618914820CD06246409A89104129204' +
'D4C8010921026A048084007E350076880680');
lobster:=DTMFromString('78DA631465606010614001654E320CAC409A1' +
'188FF030123379021C4800618914820CD06246408A8110312CA04' +
'D44861BA075D0D0023AE05B3');
lobsterc := DTMFromString('78DA6314626060106640016FEAE518B880342' +
'310FF0702463620439C010D302291409A0F48F01350230D240409' +
'A89102120AF8D5000090FB0663');
swordfish:=DTMFromString('78DA6314636060E063400127E65D606005D28' +
'C40FC1F0818D9810C190634C0884402691E20214C408D3C90E027' +
'A046164888E3570300FBE1070E');
swordfishc:=DTMFromString('78DA631466606010614001EBB276317000694' +
'620FE0F048C9C408622031A60442281B434901026A04609484810' +
'A14610BF1A00CED506D1');
dbankers:=DTMFromString('78DA63E4636060E06740017FFE30816946289' +
'F11A44698801A90196C04D4B0020921FC6A004E8C085B');
lobpot:=DTMFromString('78DA63146360601065400171F61C0C5C409A1' +
'188FF030123079021C2800618914820CD0D24E409A8910012CA04' +
'D428010961FC6A000F23059B');
harpooon:=DTMFromString('78DA631466606010634001FE361C0C5C409A1' +
'188FF0301232F90A1C4800618914820CD0D24E409A8910612BC04' +
'D4C8010916FC6A0005970574');
alkbankers:=DTMFromString('78DA63E4656060506140016FDF32307000694' +
'620FE0F048C2035D2B8D58000588D38116A848950C3875F0D00D5' +
'EC0E29');
alkbankers2:=DTMFromString('78DA63E4636260D8C68002FEFC6162E002D28' +
'C40FC1F0818416A76E15603028CFC40359B8850B31EBF1A00F343' +
'0F28');
shrimps:=DTMFromString('78DA631460606000612430212390811548330' +
'2F17F2060140432F818D000231209A4416A8409A8610312FC04D4' +
'88010949541519514170F780D508010971DCE6B08068905B6408A' +
'801C98BE257030094DC07B6');
shrimpsc:=DTMFromString('78DA6314626060006124D0E4CAC7C005A4198' +
'1F83F103082E44518D000231209A485818404013520336409A851' +
'011202F8D500002B9005C4');
anchovies:=DTMFromString('78DA63E4626060106240011111050CAC409A1' +
'188FF0301231F9021C08006189148200D324784801A6620214840' +
'8D28A67B30D480CC904155111494017733588D309090C06D0E582' +
'D37909025A04692B039003F07079F');
anchoviesc:=DTMFromString('78DA6314666060006124E0EA99CEC005A4198' +
'1F83F10300A0219B20C6880118904D28A404290801A094CBBD0D5' +
'0000711205B8');
net:=DTMFromString('78DA63146660601060400176466A0C5C409A1' +
'188FF0301232790C1CF8006189148200DD22042400DC82E09026A' +
'E488304791B07B00BC910594');
kebabDTM:=DTMFromString('78DA630C636460086640014FD594187880345' +
'086E13F103082D404E15603028CA1F8CD81ABF14555C3C8C8C8C0' +
'85AC2604C88A26A0C60FD32E0C35314056086E35AC400C00D5470' +
'C91');
stoveDTM:=DTMFromString('78DA63DCC1C0C070940105BC78FD8C4112483' +
'302F17F206004A939845B0D08306EC66F0E58CD5A20710C55CD7B' +
'2046560300AC751365');

end;

procedure freeImages;
begin
freeDTM(flyrod);
freeDTM(feathers);
freeDTM(trout);
freeDTM(troutc);
freeDTM(salmon);
freeDTM(salmonc);
end;

function checkClient:boolean;
var
cx,cy:integer;
begin
GetClientDimensions(cx,cy);
if cx=766 then
if cy=504 then result:=true;
end;

procedure login;
begin
status('Logging In...');
loginplayer;
repeat
wait(1500);
until(loggedin);
findnormalrandoms;
wait(500);
end;

procedure nolog;
begin
if timefrommark(k)>10000 then
begin
case random(3) of
0: mmouse(random(500),random(300),0,0);
1: gametab(random(14));
2: begin
mouse(random(msx2),random(msy2),0,0,false);
getmousepos(x,y);
mmouse(x+100+random(100),y-50-random(50),0,0);
end;
end;
gametab(4);
marktime(k);
end;
end;

procedure reportilatrix;
var
i:integer;
fishstats:Array[0..14] of Integer;
begin
if not(dbug) then cleardebug;
writeln('[Player Report]');
for i:=0 to howmanyplayers-1 do
begin
case lowercase(players[i].skill) of
'cage': writeln(' '+inttostr(i)+' '+players[i].nick+' = '+left(booltostr(players[i].active),1)+' / banked '+inttostr(players[i].banked)+' / '+inttostr(players[i].integers[4])+' Lobster / '+players[i].loc);
'harpoon': writeln(' '+inttostr(i)+' '+players[i].nick+' = '+left(booltostr(players[i].active),1)+' / banked '+inttostr(players[i].banked)+' / '+inttostr(players[i].integers[3])+' Tuna, '+inttostr(players[i].integers[5])+' Swordfish / '+players[i].loc);
'flyrod': writeln(' '+inttostr(i)+' '+players[i].nick+' = '+left(booltostr(players[i].active),1)+' / banked '+inttostr(players[i].banked)+' / '+inttostr(players[i].integers[0])+' Trout, '+inttostr(players[i].integers[1])+' Salmon / '+players[i].loc);
'net': writeln(' '+inttostr(i)+' '+players[i].nick+' = '+left(booltostr(players[i].active),1)+' / banked '+inttostr(players[i].banked)+' / '+inttostr(players[i].integers[11])+' Shrimp, '+inttostr(players[i].integers[12])+' Anchovies / '+players[i].loc);
end;
fishstats[0]:=fishstats[0]+players[i].integers[0];
fishstats[1]:=fishstats[1]+players[i].integers[1];
fishstats[2]:=fishstats[2]+players[i].integers[2];
fishstats[3]:=fishstats[3]+players[i].integers[3];
fishstats[4]:=fishstats[4]+players[i].integers[4];
fishstats[5]:=fishstats[5]+players[i].integers[5];
fishstats[6]:=fishstats[6]+players[i].integers[6];
fishstats[7]:=fishstats[7]+players[i].integers[7];
fishstats[8]:=fishstats[8]+players[i].integers[8];
fishstats[9]:=fishstats[9]+players[i].integers[9];
fishstats[10]:=fishstats[10]+players[i].integers[10];
fishstats[11]:=fishstats[11]+players[i].integers[11];
fishstats[12]:=fishstats[12]+players[i].integers[12];
fishstats[13]:=fishstats[13]+players[i].integers[13];
fishstats[14]:=fishstats[14]+players[i].integers[14];
end;
writeln('[End]');
writeln(' ');
writeln('><> 0.2.8');
writeln(TimeRunning);
if fishstats[11]>0 then writeln('Fished '+inttostr(fishstats[11])+' Shrimps');
if fishstats[12]>0 then writeln('Fished '+inttostr(fishstats[12])+' Anchovies');
if fishstats[1]>0 then writeln('Fished '+inttostr(fishstats[1])+' Trout');
if fishstats[2]>0 then writeln('Fished '+inttostr(fishstats[2])+' Salmon');
if fishstats[3]>0 then writeln('Fished '+inttostr(fishstats[3])+' Tuna');
if fishstats[4]>0 then writeln('Fished '+inttostr(fishstats[4])+' Lobster');
if fishstats[5]>0 then writeln('Fished '+inttostr(fishstats[5])+' Swordfish');
if fishstats[13]>0 then writeln('Cooked '+inttostr(fishstats[13])+' Shrimps');
if fishstats[14]>0 then writeln('Cooked '+inttostr(fishstats[14])+' Anchovies');
if fishstats[6]>0 then writeln('Cooked '+inttostr(fishstats[6])+' Trout');
if fishstats[7]>0 then writeln('Cooked '+inttostr(fishstats[7])+' Salmon');
if fishstats[8]>0 then writeln('Cooked '+inttostr(fishstats[8])+' Tuna');
if fishstats[9]>0 then writeln('Cooked '+inttostr(fishstats[9])+' Lobster');
if fishstats[10]>0 then writeln('Cooked '+inttostr(fishstats[10])+' Swordfish');
writeln('Burned '+inttostr(fishstats[0])+' fish');
writeln('<>< munk');
writeln(' ');
end;

function findObjIn(var rx,ry:integer;thetext:string;thecolor,sx,sy,ex,ey,tol:integer):boolean;
var
fx,fy,n,lx,ly:integer;
points:array of tpoint;
begin
if sx<msx1 then sx:=msx1 else if sx>msx2 then sx:=msx2-20;
if sy<msy1 then sy:=msy1 else if sy>msy2 then sy:=msy2-20;
if ex>msx2 then ex:=msx2 else if ex<msx1 then ex:=msx1+20;
if ey>msy2 then ey:=msy2 else if ey<msy1 then ey:=msy1+20;
findcolorsspiraltolerance(fx,fy,points,thecolor,sx,sy,ex,ey,tol);
for n:=0 to getArrayLength(points)-1 do
begin
if (not(abs(points[n].x-lx)<10) and not(abs(points[n].y-ly)<10)) then
begin
mmouse(points[n].x,points[n].y,0,0);
if isUpText(thetext) then
begin
rx:=points[n].x;
ry:=points[n].y;
result:=true;
exit;
end;
lx:=points[n].x;
ly:=points[n].y;
end;
// wait(random(1000));
end;
result:=false;
end;

function msClick(rx,ry:integer): boolean;
var
i:integer;
begin
if (rx<msx1) or (rx>msx2) or (ry<msy1) or (ry>msy2) then exit;
mouse(rx,ry,0,0,true);
for i:=0 to 50 do
begin
if (findcolorspiral(x,y,255,rx-15,ry-15,rx+15,ry+15)) then
begin
result:=true;
exit;
end;
if (findcolorspiral(x,y,65535,rx-15,ry-15,rx+15,ry+15)) then
begin
result:=false;
exit;
end;
wait(20);
end;
end;

function clickcolorblock(color,x1,y1,x2,y2:integer):boolean;
var
i,len:integer;
p:Array of Tpoint;
begin
result:=false;
findcolorsspiraltolerance(mmcx,mmcy,p,color,x1,y1,x2,y2,0);
len:=getarraylength(p)-1;
for i:=0 to len do
begin
if countcolor(color,p[i].x-2,p[i].y-2,p[i].x+2,p[i].y+2)>22 then
begin
mouse(p[i].x,p[i].y,1,1,true);
result:=true;
exit;
end;
end;
end;

function FindFastRandoms: Boolean; //By WT-Fakawi.
var
i: Integer;
begin
for i := 1 to 8 do
begin
case I of
1: if FindDead then
Result := True;
2: if FindMod then
Result := True;
3: if FindMime then
Result := True;
4: if FindMaze then
Result := True;
5: if FindQuiz then
Result := True;
6: if FindDemon then
Result := True;
7: begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;
7: begin
if InBlack then
begin
Result := True;
Players[CurrentPlayer].loc := 'InBlack';
Logout;
Exit;
end;
end;
8: RC;
end;
wait(1);
end;
end;

procedure randomness;
begin
status('FindTalk...');
findtalk;
if timefrommark(ffr)>8000 then
begin
status('FindFastRandoms...');
findfastrandoms;
marktime(ffr)
end;
if timefrommark(fnr)>4000 then
begin
status('FindNormalRandoms...');
findnormalrandoms;
marktime(fnr)
end;
end;

function pickupEquipment:boolean;
var
i:integer;
str:string;
begin
status('Finding Fish Equipment...');
result:=false;
str:=right(trim(players[currentplayer].skill),length(trim(players[currentplayer].skill))-1);
for i:=0 to 10 do
begin
if findobj(x,y,str,equipcolor,i) then
begin
mouse(x,y,0,0,false);
if chooseoption(str) then
begin
status('Fish Equipment Found!');
result:=true;
exit;
end;
end;
wait(1000+random(500));
end;
end;

procedure countfish(which:string);
var
i,t,tc,s,sc,tu,tuc,l,lc,sw,swc,sh,shc,a,ac:integer;
slot:tbox;
begin
gametab(4);
for i:=1 to 28 do
begin
slot:=invbox(i);
if findDTM(trout,x,y,slot.x1,slot.y1,slot.x2,slot.y2) then inc(t);
if findDTM(salmon,x,y,slot.x1,slot.y1,slot.x2,slot.y2) then inc(s);
if findDTM(troutc,x,y,slot.x1,slot.y1,slot.x2,slot.y2) then inc(tc);
if findDTM(salmonc,x,y,slot.x1,slot.y1,slot.x2,slot.y2) then inc(sc);
if findDTM(tuna,x,y,slot.x1,slot.y1,slot.x2,slot.y2) then inc(tu);
if findDTM(tunac,x,y,slot.x1,slot.y1,slot.x2,slot.y2) then inc(tuc);
if findDTM(lobster,x,y,slot.x1,slot.y1,slot.x2,slot.y2) then inc(l);
if findDTM(lobsterc,x,y,slot.x1,slot.y1,slot.x2,slot.y2) then inc(lc);
if findDTM(swordfish,x,y,slot.x1,slot.y1,slot.x2,slot.y2) then inc(sw);
if findDTM(swordfishc,x,y,slot.x1,slot.y1,slot.x2,slot.y2) then inc(swc);
if findDTM(shrimps,x,y,slot.x1,slot.y1,slot.x2,slot.y2) then inc(sh);
if findDTM(shrimpsc,x,y,slot.x1,slot.y1,slot.x2,slot.y2) then inc(shc);
if findDTM(anchovies,x,y,slot.x1,slot.y1,slot.x2,slot.y2) then inc(a);
if findDTM(anchoviesc,x,y,slot.x1,slot.y1,slot.x2,slot.y2) then inc(ac);
end;
if lowercase(which)='raw' then
begin
if not(t=0)then
begin
players[currentplayer].integers[1]:=players[currentplayer].integers[1]+t;
if dbug then writeln(inttostr(t)+' Trout');
end;
if not(s=0)then
begin
players[currentplayer].integers[2]:=players[currentplayer].integers[2]+s;
if dbug then writeln(inttostr(s)+' Salmon');
end;
if not(tu=0)then
begin
players[currentplayer].integers[3]:=players[currentplayer].integers[3]+tu;
if dbug then writeln(inttostr(tu)+' Tuna');
end;
if not(l=0)then
begin
players[currentplayer].integers[4]:=players[currentplayer].integers[4]+l;
if dbug then writeln(inttostr(l)+' Lobster');
end;
if not(sw=0)then
begin
players[currentplayer].integers[5]:=players[currentplayer].integers[5]+sw;
if dbug then writeln(inttostr(sw)+' Swordfish');
end;
if not(sh=0)then
begin
players[currentplayer].integers[11]:=players[currentplayer].integers[11]+sh;
if dbug then writeln(inttostr(sh)+' Shrimp');
end;
if not(a=0)then
begin
players[currentplayer].integers[12]:=players[currentplayer].integers[12]+a;
if dbug then writeln(inttostr(a)+' Anchovie');
end;
end;
if lowercase(which)='cooked' then
begin
if not(tc=0)then
begin
players[currentplayer].integers[6]:=players[currentplayer].integers[6]+tc;
if dbug then writeln(inttostr(tc)+' Cooked Trout');
end;
if not(sc=0)then
begin
players[currentplayer].integers[7]:=players[currentplayer].integers[7]+sc;
if dbug then writeln(inttostr(sc)+' Cooked Salmon');
end;
if not(tuc=0)then
begin
players[currentplayer].integers[8]:=players[currentplayer].integers[8]+tu;
if dbug then writeln(inttostr(tuc)+' Cooked Tuna');
end;
if not(lc=0)then
begin
players[currentplayer].integers[9]:=players[currentplayer].integers[9]+lc;
if dbug then writeln(inttostr(lc)+' Cooked Lobster');
end;
if not(swc=0)then
begin
players[currentplayer].integers[10]:=players[currentplayer].integers[10]+swc;
if dbug then writeln(inttostr(swc)+' Cooked Swordfish');
end;
if not(shc=0)then
begin
players[currentplayer].integers[13]:=players[currentplayer].integers[13]+shc;
if dbug then writeln(inttostr(shc)+' Cooked Shrimp');
end;
if not(ac=0)then
begin
players[currentplayer].integers[14]:=players[currentplayer].integers[14]+ac;
if dbug then writeln(inttostr(ac)+' Cooked Anchovies');
end;
end;
end;

function countmoney:integer;
var
i:integer;
slot:Tbox;
count:string;
begin
for i:=1 to 28 do
begin
slot:=invbox(i);
if findcolorspiraltolerance(x,y,4772603,slot.x1,slot.y1,slot.x2,slot.y2,5) then
begin
mmouseitem(i);
wait(500+random(500));
if isuptext('oins') then
begin
count:=GetTextAtEx(slot.x1+1, slot.y1+4, 0, statchars, False, False, 0, 0, 65535, 10, false, tr_AlphaNumericChars);
{if (pos('k',lowercase(count))<>0) or (pos('m',lowercase(count))<>0) then
begin
result:=9999;
if dbug then writeln('more than enough money');
exit;
end;}
count:=trim(count);
if dbug then writeln(count+'gp');
result:=strtoint(count);
exit;
end;
end;
if i=28 then
begin
result:=0;
if dbug then writeln('no money!');
end;
end;
end;

function fishSymbol:boolean;
var
i:integer;
begin
result:=false;
for i:=0 to 5 do
begin
if (findsymbolin(x,y,'fish',mmx1,mmy1,mmx2,mmcy-15)) then
begin
status('Found the Fish Symbol');
players[currentplayer].loc:='fish';
mouse(x,y,5,5,true);
result:=true;
flag;
exit;
end;
if (findsymbolin(x,y,'fish',mmx1,mmcy+15,mmx2,mmy2)) then
begin
status('Found the Fish Symbol');
players[currentplayer].loc:='fish';
mouse(x,y,5,5,true);
result:=true;
flag;
exit;
end;
end;
end;

function answer(ans:string):boolean;
begin
if FindText(x,y,ans,npcchars,20,355,510,475) then
begin
mouse(250,y,2,15,true);
wait(500);
result:=true;
end;
end;

function hpfight:boolean;
begin
status('Checking Hp...');
result:=false;
if ohp=0 then ohp:=95;
if ((hppercent<ohp) or (hppercent<50)) then result:=true;
ohp:=hppercent;
wait(500+random(500));
end;

procedure run;
begin
if timefrommark(r)>300000 then
begin
status('Setting run...');
setrun(true);
marktime(r);
end;
end;

procedure hover;
begin
if timefrommark(h)>240000 then
begin
gametab(2);
status('Hovering Cooking');
mmouse(705,315,20,10);
wait(1000+random(2000));
marktime(h);
end;
end;

procedure superFlag;
var
mk,i: integer;
begin
if not(flagpresent) then
begin
for i:=0 to 50 do
begin
if (flagpresent) then break;
wait(200);
end;
end
marktime(mk);
while(flagpresent)do
begin
case random(10) of
{ 0: begin
if (players[currentplayer].loc='walking to bank') then
begin
if DTMrotated(bankers,x,y,mmx1,mmy1,mmx2,mmy2) then
begin
players[currentplayer].loc:='outside the bank';
status('Found the Bank');
mouse(x-20-random(5),y+random(15),0,0,true);
flag;
exit;
end;
end;
if (players[currentplayer].loc='walking to fish') then
begin
if fishsymbol then exit;
end;
if (players[currentplayer].loc='walking to stove') then
begin
if findsymbol(x,y,'cook') then
begin
if dbug then writeln('stove symbol found');
mouse(x,y,7,7,true);
flag;
exit;
end;
end;
end; }
1: if not(flagpresent) then exit;
2: findNormalRandoms;
3: if not(flagpresent) then exit;
4: findFastRandoms;
5: if not(flagpresent) then exit;
6: run;
7: if not(flagpresent) then exit;
8: hover;
9: if not(flagpresent) then exit;
end;
wait(250);
if (timefrommark(mk)>15000) then exit;
end;
end;

function mid(box:TBox):TPoint;
var
mx,my:integer;
begin
mx:=box.x1+((box.x2-box.x1)/2);
my:=box.y1+((box.y2-box.y1)/2);
result.x:=mx;
result.y:=my;
end;

function FindBurntColor: Integer;
var
i,n,z,col:integer;
h,s,l:extended;
slot:TPoint;
slotBox:TBox;
var
P:array of Tpoint;
begin
for i:=1 to 28 do
begin
slotBox:=invbox(i);
if not(finddtm(flyrod,x,y,slotbox.x1,slotbox.y1,slotbox.x2,slotbox.y2)) then
if not(finddtm(feathers,x,y,slotbox.x1,slotbox.y1,slotbox.x2,slotbox.y2)) then
if not(finddtm(lobpot,x,y,slotbox.x1,slotbox.y1,slotbox.x2,slotbox.y2)) then
if not(finddtm(harpooon,x,y,slotbox.x1,slotbox.y1,slotbox.x2,slotbox.y2)) then
if not(finddtm(net,x,y,slotbox.x1,slotbox.y1,slotbox.x2,slotbox.y2)) then
begin
slot:=mid(slotBox);
FindColorsSpiralTolerance(x,y,P,6250599,slot.x-10,slot.y,slot.x,slot.y+10,12);
z:=GetArrayLength(P);
for n:= 0 to z-1 do
begin
col := GetColor(P[n].x,P[n].y);
// if dbug then writeln('trying '+inttostr(col));
ColorToHSL(col,h,s,l);
if (H < 4) and (H > -2) then
if (S < 4) and (S > 1) then
if (L < 43) and (L > 26) then
begin
Result := col;
burntColor := col;
if dbug=true then WriteLn('burntColor = ' + IntToStr(col));
Exit;
end;
end;
end;
end;
if dbug then WriteLn('burnt not found');
Result := 0;
end;

function findStove(var rx,ry:integer):boolean;
var
i,c,n:integer;
points:array of TPoint;
begin
if findcolorspiraltolerance(x,y,1122199,stove.x-15,stove.y-15,stove.x+15,stove.y+15,15) then
begin
rx:=x;
ry:=y;
result:=true;
exit;
end;
for n:=0 to 3 do
begin
findcolorsspiraltolerance(rx,ry,points,1122199,msx1,msy1,msx2,msy2,10);
// if getarraylength(points)<1 then findcolorsspiraltolerance(rx,ry,points,1187475,msx1,msy1,msx2,msy2,20);
for i:=0 to getArrayLength(points)-1 do
begin
{if findcolorspiraltolerance(x,y,1122199,points[i].x+1,points[i].y,points[i].x+1,points[i].y,15) then inc(c);
if findcolorspiraltolerance(x,y,1122199,points[i].x+2,points[i].y,points[i].x+2,points[i].y,15) then inc(c);
if findcolorspiraltolerance(x,y,1122199,points[i].x+1,points[i].y+2,points[i].x+1,points[i].y+2,15) then inc(c);
if findcolorspiraltolerance(x,y,1122199,points[i].x+2,points[i].y+2,points[i].x+2,points[i].y+2,15) then inc(c);
if findcolorspiraltolerance(x,y,1122199,points[i].x+1,points[i].y-2,points[i].x+1,points[i].y-2,15) then inc(c);
if findcolorspiraltolerance(x,y,1122199,points[i].x+2,points[i].y-2,points[i].x+2,points[i].y-2,15) then inc(c);
if findcolorspiraltolerance(x,y,1122199,points[i].x-1,points[i].y,points[i].x-1,points[i].y,15) then inc(c);
if findcolorspiraltolerance(x,y,1122199,points[i].x-2,points[i].y,points[i].x-2,points[i].y,15) then inc(c);
if findcolorspiraltolerance(x,y,1122199,points[i].x-1,points[i].y+2,points[i].x-1,points[i].y+2,15) then inc(c);
if findcolorspiraltolerance(x,y,1122199,points[i].x-2,points[i].y+2,points[i].x-2,points[i].y+2,15) then inc(c);
if findcolorspiraltolerance(x,y,1122199,points[i].x-1,points[i].y-2,points[i].x-1,points[i].y-2,15) then inc(c);
if findcolorspiraltolerance(x,y,1122199,points[i].x-2,points[i].y-2,points[i].x-2,points[i].y-2,15) then inc(c);}
c:=countcolortolerance(1122199,points[i].x-3,points[i].y-3,points[i].x+3,points[i].y+3,15);
if c>5 then
begin
rx:=points[i].x;
ry:=points[i].y;
if dbug then writeln('Found the Stove');
status('Stove Found...');
result:=true;
exit;
end;
end;
if lowercase(players[currentplayer].skill)='flyrod' then
begin
SendArrowSilentWait(3,500+random(200));
wait(500+random(500));
makecompass('N');
end;
if (lowercase(players[currentplayer].skill)='cage')or(lowercase(players[currentplayer].skill)='harpoon') then
begin
if DTMrotated(stoveDTM,x,y,mmx1,mmy1,mmx2,mmy2) then
begin
if dbug then writeln('found stove DTM');
mouse(x-5,y-5,3,3,true);
flag;
end else
begin
if findsymbol(x,y,'cook') then
begin
mouse(x-5,y-5,2,2,true);
flag;
end;
end;
end;
end;
result:=false;
if dbug then writeln('Stove not found');
end;

function openDoor:boolean;
var
i,dx,dy:integer;
begin
result:=false;
if findstove(x,y) then
begin
for i:=1 to 10 do
begin
if findObjIn(dx,dy,'oor',1990008,x+30,y-60,x+100,y,2*i) then
begin
if isUpText('pen') then
begin
if dbug then writeln('opening door');
status('Opening Door...');
if msclick(dx,dy) then
begin
superflag;
result:=true;
exit;
end;
end;
if isUpText('lose') then
begin
if dbug then writeln('door is open');
status('Door Is Open');
exit;
end;
end;
end;
end;
end;

//><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>
// Edgeville procedures
//><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>

procedure walkToBankFromStove;
var
i:integer;
begin
if (not(loggedIn)) then exit;
if dbug then writeln('walking to bank');
if not(lowercase(players[currentplayer].loc)='walking to bank from stove') then exit;
status('Walking To Bank...');
opendoor;
if findsymbol(x,y,'bank') then
begin
mouse(x,y+15+random(5),5,0,true);
players[currentplayer].loc:='bank';
dropburned;
wait(3000);
superflag;
exit;
end;
mouse(680,70,5,5,true);
dropburned;
wait(2000);
superflag;
for i:=0 to 20 do
begin
if findsymbol(x,y,'bank') then
begin
players[currentplayer].loc:='bank';
status('Found the Bank Symbol');
mouse(x,y+10+random(5),5,0,true);
superflag;
exit;
end;
if DTMrotated(bankers,x,y,mmx1,mmy1,mmx2,mmy2) then
begin
players[currentplayer].loc:='in front of bank';
status('Found the Bank');
mouse(x-20-random(5),y+random(15),0,0,true);
flag;
exit;
end;
wait(500);
end;
if dbug then writeln('couldnt find bank');
logout;
nextplayer(false);
loads:=0;
exit;
end;

procedure walkToStove;
var
i:integer;
begin
if (not(loggedIn)) then exit;
if not(lowercase(players[currentplayer].loc)='walking to stove') then exit;
status('Walking To Stove...');
if findsymbol(x,y,'cook') then
begin
if dbug then writeln('stove symbol found');
mouse(x,y,7,7,true);
players[currentplayer].loc:='stove';
wait(2000);
superflag;
end else
begin
mouse(600,75,5,5,true);
superflag;
for i:=0 to 30 do
begin
if findsymbol(x,y,'cook') then
begin
mouse(x,y,7,7,true);
players[currentplayer].loc:='stove';
wait(2000);
superflag;
break;
end;
if i=30 then
begin
walktobankfromstove;
logout;
nextplayer(true);
exit;
end;
wait(500);
end;
end;
wait(100+random(1000));
opendoor;
players[currentplayer].loc:='stove';
end;

procedure bank;
var
i:integer;
slot:TBox;
slotcoords:TPoint;
begin
if (not(loggedIn)) then exit;
if not(lowercase(players[currentplayer].loc)='bank') and not(lowercase(players[currentplayer].loc)='walking to fish') then exit;
highestangle;
makecompass('N');
findnormalrandoms;
gametab(4);
dropburned;
if (findDTM(flyrod,x,y,mix1,miy1,mix2,miy2)) then
if (findDTM(feathers,x,y,mix1,miy1,mix2,miy2)) then
if not(findDTM(troutc,x,y,mix1,miy1,mix2,miy2)) then
if not(findDTM(salmonc,x,y,mix1,miy1,mix2,miy2)) then
if not(findDTM(trout,x,y,mix1,miy1,mix2,miy2)) then
if not(findDTM(salmon,x,y,mix1,miy1,mix2,miy2)) then
begin
players[currentplayer].loc:='walking to fish';
exit;
end;
setchat('hide',1);
setchat('friends',4);
if DTMrotated(bankers,x,y,mmx1,mmy1,mmx2,mmy2) then
begin
mouse(x-5-random(5),y+random(10),0,0,true);
flag;
end;
status('Banking...');
players[currentplayer].loc:='bank';
for i:=0 to 5 do
begin
flag;
if ((bankscreen) or (pinscreen)) then break;
wait(random(1000));
OpenBankQuiet('eb');
if i=5 then
begin
logout;
nextplayer(false);
loads:=0
exit;
end;
end;
wait(1000+random(1000));
flag;
if pinscreen then inpin(inttostr(Players[currentplayer].pin));
if bankscreen then
begin
if findDTM(trout,x,y,mix1,miy1+3,mix2,miy2) then
begin
mouse(x,y,3,3,false);
wait(100+random(500));
chooseoption('All');
wait(500+random(500));
end;
if findDTM(salmon,x,y,mix1,miy1,mix2,miy2) then
begin
mouse(x,y,3,3,false);
wait(100+random(500));
chooseoption('All');
wait(500+random(500));
end;
if findDTM(troutc,x,y,mix1,miy1,mix2,miy2) then
begin
mouse(x,y,3,3,false);
wait(100+random(500));
chooseoption('All');
wait(500+random(500));
end;
if findDTM(salmonc,x,y,mix1,miy1,mix2,miy2) then
begin
mouse(x,y,3,3,false);
wait(100+random(500));
chooseoption('All');
wait(500+random(500));
end;
if not(findDTM(flyrod,x,y,mix1,miy1,mix2,miy2)) then
begin
if findDTM(flyrod,x,y,msx1,msy1,msx2,msy2) then
begin
mouse(x,y,3,3,true);
end else
begin
closebank;
logout;
nextplayer(false);
loads:=0;
writeln('dudes got no rod');
exit;
end;
wait(500+random(500));
end;
if not(findDTM(feathers,x,y,mix1,miy1,mix2,miy2)) then
begin
if findDTM(feathers,x,y,msx1,msy1,msx2,msy2) then
begin
mouse(x,y,3,3,false);
chooseoption('All');
end else
begin
writeln('no feathers, brah');
closebank;
logout;
nextplayer(false);
loads:=0;
exit;
end;
wait(500+random(500));
end;
for i:=1 to 28 do
begin
if existsitem(i) then
begin
slot:=invbox(i);
if not(findDTM(flyrod,x,y,slot.x1,slot.y1,slot.x2,slot.y2)) then
if not(findDTM(feathers,x,y,slot.x1,slot.y1,slot.x2,slot.y2)) then
begin
slotcoords:=mid(slot);
mouse(slotcoords.x,slotcoords.y,3,3,false);
wait(100+random(100));
chooseoption('All');
wait(200+random(300));
end;
end;
end;
closebank;
inc(players[currentplayer].banked);
inc(loads);
reportilatrix;
players[currentplayer].loc:='walking to fish';
end;
end;


procedure walktofish;
var
i,n:integer;
begin
if (not(loggedIn)) then exit;
if not(lowercase(players[currentplayer].loc)='walking to fish') then exit;
status('Walking To Fishing Spot...');
if findcolorspiral(x,y,findwatercolor,mmcx,mmcy,mmx2,mmy2) then
begin
mouse(x-5-random(10),y-5-random(10),0,0,true);
superflag;
end;
for i:=0 to 20 do
begin
if not(waterwalk(90,180,50,3,-25,5,2,2)) then findwatercolor;
if fishsymbol then exit;
if findsymbol(x,y,'transportation') then
begin
waterwalk(350,440,55,3,-20,5,2,2);
for n:=0 to 20 do
begin
if fishsymbol then exit;
wait(500);
end;
logout;
nextplayer(false);
loads:=0;
exit;
end;
end;
end;

procedure walktobank;
var
i:integer;
begin
if (not(loggedIn)) then exit;
if not(lowercase(players[currentplayer].loc)='fishing spot') then exit;
status('Walking To Bank...');
for i:=0 to 20 do
begin
waterwalk(350,440,55,3,-15,5,2,2);
if DTMrotated(bankers,x,y,mmx1,mmy1,mmx2,mmy2) then
begin
players[currentplayer].loc:='outside the bank';
status('Found the Bank');
mouse(x-25-random(5),y+random(15),0,0,true);
flag;
exit;
end;
{ if (findsymbol(x,y,'bank')) then
begin
status('Found the Bank Symbol');
mouse(x,y+10+random(10),5,0,true);
flag;
exit;
end; }
end;
end;

//><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>
// Karamja Procedures
//><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>

function dockColor:integer;
var
i,len,c:integer;
h,s,l:extended;
p:Array of Tpoint;
begin
if not(loggedin) then exit;
{if countcolor(olddockcolor,mmx1,mmy1,mmx1,mmy2)>80 then
begin
result:=olddockcolor;
exit;
end;
if countcolor(9786,mmx1,mmy1,mmx1,mmy2)>80 then
begin
result:=9786;
exit;
end;}
flag;
findcolorsspiraltolerance(mmcx,mmcy,p,1718611,mmx1,mmcy,mmx2,mmy2,50);
len:=getarraylength(p)-1;
for i:=0 to len do
begin
c:=getcolor(p[i].x,p[i].y);
ColorToHSL(c,h,s,l);
if (H < 15) and (H > 4) then
if (S < 101) and (S > 34) then
if (L < 31) and (L > 8) then
if countcolor(c,p[i].x-5,p[i].y-5,p[i].x+5,p[i].y+5)>100 then
begin
if dbug then writeln('dock = '+inttostr(c));
result:=c;
olddockcolor:=c;
exit;
end;
end;
writeln('dock not found');
result:=0;
end;

function karamjaRoadColor:integer;
var
i,len,c:integer;
h,s,l:extended;
p:Array of Tpoint;
begin
findcolorsspiraltolerance(mmcx,mmcy,p,1208982,mmx1,mmy1,mmx2,mmy2,40);
len:=getarraylength(p)-1;
for i:=0 to len do
begin
c:=getcolor(p[i].x,p[i].y);
ColorToHSL(c,h,s,l);
if (H < 17) and (H > 9) then
if (S < 95) and (S > 76) then
if (L < 38) and (L > 22) then
{for ix:=0 to 9 do
begin
for iy:=1 to 9 do
begin
if getcolor(p[i].x-ix,p[i].y-iy)=c then inc(count);
end;
end;}
if countcolor(c,p[i].x-5,p[i].y-5,p[i].x+5,p[i].y+5)>80 then
begin
if dbug then writeln('karamja road = '+inttostr(c));
result:=c;
exit;
end;
end;
writeln('karamja road not found');
result:=0;
end;

function findcustoms:boolean;
var
i,sail:integer;
colors:array[0..3] of integer;
begin
colors[0]:=7290685;
colors[1]:=6042676;
colors[2]:=2429972;
colors[3]:=5122859;
for i:=0 to 3 do
begin
if findobj(x,y,'ustoms',colors[i],2) then
begin
mouse(x,y,0,0,false);
if dbug then writeln('customs color used = '+inttostr(colors[i]));
if chooseoption('Fare')then
begin
flag;
wait(1000+random(500));
if clicktocontinue then
begin
wait(1000+random(500));
if answer('ourney') then
begin
wait(1000+random(500));
if clicktocontinue then
begin
wait(1000+random(500));
if clicktocontinue then
begin
wait(1000+random(500));
if answer('earch') then
begin
wait(1000+random(500));
if clicktocontinue then
begin
wait(1000+random(500));
if clicktocontinue then
begin
wait(1000+random(500));
if answer('Ok') then
begin
wait(1000+random(500));
if clicktocontinue then
begin
wait(2000);
end;
end;
end;
end;
end;
end;
end;
end;
end;
marktime(sail);
repeat
wait(250);
if timefrommark(sail)>30000 then
begin
result:=false;
exit;
end;
until(clicktocontinue);
if findobj(x,y,'angplank',3561845,3) then
begin
mouse(x,y,2,2,false);
if chooseoption('angplank') then
begin
flag;
for i:=0 to 10 do
begin
if not(findwatercolor=0) then break;
wait(1000);
end;
result:=true;
players[currentplayer].loc:='port sarim';
exit;
end;
end;
end;
end;
end;
result:=false;
end;

function findSeaman:boolean;
var
i,sail:integer;
begin
for i:=0 to 3 do
begin
if FindObjCustom(x,y,['eaman','aptain'],[5847594,10177096,11753044],2) then
begin
mouse(x,y,0,0,false);
if chooseoption('fare')then
begin
flag;
wait(1000+random(500));
if clicktocontinue then
begin
wait(1000+random(500));
if answer('Yes') then
begin
wait(1000+random(500));
if clicktocontinue then
begin
wait(2000);
end;
end;
end;
marktime(sail);
repeat
wait(250);
if timefrommark(sail)>30000 then
begin
result:=false;
exit;
end;
until(clicktocontinue);
if findobj(x,y,'angplank',3561845,3) then
begin
mouse(x,y,2,2,false);
if chooseoption('angplank') then
begin
flag;
wait(1000);
result:=true;
players[currentplayer].loc:='karamja';
exit;
end;
end;
end;
end;
end;
result:=false;
end;

procedure draynorbank;
var
i:integer;
cage:boolean;
slot:TBox;
begin
if not(lowercase(players[currentplayer].loc)='bank') then exit;
makecompass('n');
highestangle;
if lowercase(players[currentplayer].skill)='cage' then cage:=true else cage:=false;
if cage then
if finddtm(lobpot,x,y,mix1,miy1,mix2,miy2) then
if invcount=2 then
if countmoney>=60 then
begin
players[currentplayer].loc:='walking to ship';
exit;
end;
if not(cage) then
if finddtm(harpooon,x,y,mix1,miy1,mix2,miy2) then
if invcount=2 then
if countmoney>=60 then
begin
players[currentplayer].loc:='walking to ship';
exit;
end;
status('Banking...');
if DTMrotated(dbankers,x,y,mmx1,mmy1,mmx2,mmy2) then
begin
mouse(x+5+random(5),y+random(5),0,0,true);
flag;
end;
for i:=0 to 5 do
begin
flag;
if ((bankscreen) or (pinscreen)) then break;
wait(random(1000));
OpenBankQuiet('eb');
flag;
if i=5 then
begin
logout;
nextplayer(false);
loads:=0
exit;
end;
wait(1000);
end;
fixbank;
wait(1000+random(500));
for i:=1 to 28 do
begin
if existsitem(i) then
begin
slot:=invbox(i);
if cage then
begin
if not(finddtm(lobpot,x,y,slot.x1,slot.y1,slot.x2,slot.y2)) then
begin
Deposit(i,i,2);
wait(100+random(500));
end;
end else
begin
if not(finddtm(harpooon,x,y,slot.x1,slot.y1,slot.x2,slot.y2)) then
begin
Deposit(i,i,2);
wait(100+random(500));
end;
end;
end;
end;
if cage then
begin
if not(finddtm(lobpot,x,y,mix1,miy1,mix2,miy2)) then
begin
if finddtm(lobpot,x,y,msx1,msy1,msx2,msy2) then
begin
mouse(x,y,4,4,true);
end;
end;
end else
begin
if not(finddtm(harpooon,x,y,mix1,miy1,mix2,miy2)) then
begin
if finddtm(harpooon,x,y,msx1,msy1,msx2,msy2) then
begin
mouse(x,y,4,4,true);
end;
end;
end;
for i:=0 to 5 do
begin
if findcolorspiraltolerance(x,y,1952504,msx1,msy1,msx2,msy2,i) then
begin
{mmouse(x,y,0,0);
wait(500+random(500));
if isuptextmulti('oins','oin','ins') then
begin}
mouse(x,y,0,0,false);
wait(500+random(500));
if chooseoption('X') then
begin
wait(1000+random(500));
typesend('60');
wait(100+random(500));
break;
end;
// end;
end;
end;
closebank;
inc(players[currentplayer].banked);
inc(loads);
reportilatrix;
players[currentplayer].loc:='walking to ship';
end;

procedure walktokaramja;
var
i:integer;
begin
if not(lowercase(players[currentplayer].loc)='walking to ship') then exit;
findroadcolor;
//if findcolorspiral(x,y,roadcolor,590,40,600,60) then
if radialwalk(roadcolor,300,320,55,2,2) then
begin
//mouse(x,y,3,3,true);
flag;
for i:=0 to 60 do
begin
if (findsymbolin(x,y,'quest',mmx1,mmy1+50,mmx2,mmy2)) then
begin
mouse(x,y-40,5,5,true);
wait(2500);
flag;
break;
end else
begin
radialwalk(roadcolor,340,350,30,0,0);
flag;
wait(1000);
end;
if i=10 then
begin
logout;
nextplayer(false);
exit;
end;
end;
if radialwalk(roadcolor,280,340,70,0,0) then
begin
wait(2000);
flag;
for i:=0 to 10 do
begin
if not(radialwalk(roadcolor,180-i,300-(i*10),70,0,0)) then
begin
if dbug then writeln('radialwalk failed');
findroadcolor;
wait(1000);
end;
if not(dockcolor=0) then break;
if findsymbol(x,y,'cook') then
begin
mouse(x+15,y,5,5,true);
flag;
break;
end;
if i=10 then
begin
logout;
nextplayer(false);
exit;
end;
end;
if clickcolorblock(dockcolor,mmx1,mmcy,mmx2,mmy2) then
begin
fflag(2);
for i:=0 to 20 do
begin
if radialwalk(dockcolor,185,275,65,0,0) then
begin
if findseaman then exit;
end;
if radialwalk(dockcolor,185,275,40,0,0) then
begin
if findseaman then exit;
end;
if findsymbolin(x,y,'transportation',mmx1,mmy1,mmcx+25,mmcy) then
begin
mouse(x-10,y,5,5,true);
wait(1500);
flag;
if findseaman then exit;
end;
end;
end;
end;
end;
logout;
nextplayer(false);
end;

function findfishers(var rx,ry:integer):boolean;
var
i,len:integer;
p:Array of Tpoint;
begin
findcolorsspiraltolerance(mmcx,mmcy,p,16711422,mmx1,mmy1,mmx2,mmy2,0);
len:=getarraylength(p)-1;
for i:=0 to len do
begin
if countcolor(16711422,p[i].x-12,p[i].y-12,p[i].x+12,p[i].y+12)>40 then
begin
rx:=p[i].x;
ry:=p[i].y;
result:=true;
exit;
end;
end;
result:=false;
end;

procedure shipToFish;
var
i:integer;
begin
if not(lowercase(players[currentplayer].loc)='karamja') then exit;
repeat
wait(500);
until(not(findwatercolor=0));
wait(1500);
if radialwalk(karamjaroadcolor,300,250,65,0,0) then
if radialwalk(karamjaroadcolor,320,250,65,0,0) then
if waterwalk(340,450,70,1,-40,30,0,0) then
if waterwalk(380,420,60,0,-10,10,0,0) then
begin
for i:=0 to 20 do
begin
if findfishers(x,y) then
begin
mouse(x,y,3,3,true);
if dbug then writeln('found fishers');
players[currentplayer].loc:='fish';
flag;
exit;
end;
if clickcolorblock(olddockcolor,mmcx-20,mmy1,mmcx+20,mmy2) then
begin
if dbug then writeln('found dock');
flag;
players[currentplayer].loc:='fish';
flag;
exit;
end;
if findsymbol(x,y,'fish') then
begin
mouse(x,y,3,3,true);
if dbug then writeln('found fish symbol');
players[currentplayer].loc:='fish';
flag;
exit;
end;
wait(1000);
end;
end;
players[currentplayer].loc:='fish';
end;

procedure fishtoship;
var
i:integer;
begin
if not(lowercase(players[currentplayer].loc)='fishing spot') then exit;
findwatercolor;
if waterwalk(180,100,30,0,-10,20,0,0) then
if waterwalk(180,100,30,0,-30,40,0,0) then
if radialwalk(karamjaroadcolor,180,200,70,0,0) then
begin
for i:=0 to 5 do
begin
if findsymbolin(x,y,'transportation',mmx1,mmcy-15,mmx2,mmcy+15) then
begin
mouse(x,y,5,5,true);
flag;
end else
begin
if clickcolorblock(olddockcolor,mmx1,mmcy-15,mmx2,mmcy+15) then
begin
flag;
end else radialwalk(karamjaroadcolor,70,120,50,0,0);
end;
if findcustoms then exit;
end;
end;
logout;
nextplayer(false);
end;

procedure shiptobank;
var
i:integer;
begin
if not(lowercase(players[currentplayer].loc)='port sarim') then exit;
radialwalk(dockcolor,340,380,60,1,1);
cookfood;
for i:=0 to 10 do
begin
radialwalk(dockcolor,340,460,60,1,1);
if findsymbolin(x,y,'quest',mmcx-20,mmcy-20,mmx2,mmy2) then
begin
mouse(x-10,y+5,5,5,true);
fflag(3);
if findsymbol(x,y,'quest') then
begin
mouse(x+20,y-20,3,3,true);
wait(7000);
fflag(3);
if findsymbol(x,y,'quest') then
begin
mouse(x+30,y-40,5,5,true);
wait(8000);
flag;
// break;
end;
end;
end;
if findsymbol(x,y,'farming spot') then
begin
mouse(x+10,y-10,5,5,true);
fflag(0);
break;
end;
end;
findroadcolor;
if not(radialwalk(roadcolor,380,350,60,0,0)) then
begin
mouse(mmcx,mmcy-45,5,5,true);
flag;
radialwalk(roadcolor,400,350,60,0,0);
end;
if not(radialwalk(roadcolor,100,90,30,1,1)) then
begin
mouse(mmcx+40,mmcy+25,5,5,true);
flag;
// radialwalk(roadcolor,100,80,30,1,1);
end;
if findsymbol(x,y,'dungeon') then
begin
mouse(x-30,y+30,3,3,true);
wait(5000);
flag;
if not(radialwalk(roadcolor,160,190,60,1,1)) then
begin
mouse(mmcx,mmcy+45,5,5,true);
flag;
radialwalk(roadcolor,160,190,60,1,1);
end;
end;
for i:=0 to 20 do
begin
flag;
if DTMrotated(dbankers,x,y,mmx1,mmy1,mmx2,mmy2) then
begin
if dbug then writeln('bankers found');
mouse(x+5,y-5,3,3,true);
flag;
players[currentplayer].loc:='bank';
exit;
end else
if findsymbol(x,y,'bank') then
begin
if dbug then writeln('bank symbol found');
mouse(x,y,5,5,true);
flag;
players[currentplayer].loc:='bank';
exit;
end else wait(1000);
if (i=10) or (i=15) then radialwalk(findroadcolor,130,160,40,0,0);
end;
logout;
nextplayer(false);
end;

function opendoubledoor(d:integer):boolean;
var
i,dx,dy,opens,door:integer;
cd:tbox;
stove:Tpoint;
begin
result:=false;
door:=d;
for i:=1 to 10 do
begin
if findstove(stove.x,stove.y) then
begin
case door of
1: begin
cd.x1:=stove.x-350;
cd.y1:=stove.y-100;
cd.x2:=stove.x-250;
cd.y2:=stove.y;
end;
2: begin
cd.x1:=stove.x-250;
cd.y1:=stove.y-80;
cd.x2:=stove.x-100;
cd.y2:=stove.y+120;
end;
end;
if findObjIn(dx,dy,'oor',1857394,cd.x1,cd.y1,cd.x2,cd.y2,10) then
begin
if isUpTextmulti('pen','Open','Ope') then
begin
if dbug then writeln('opening door');
status('Opening Door...');
if msclick(dx,dy) then
begin
fflag(1);
inc(opens);
if door=1 then door:=2 else if door=2 then door:=1;
end;
end;
if isUpTextmulti('lose','ose','Clo') then
begin
if dbug then writeln('door is open');
status('Door Is Open');
inc(opens);
if door=1 then door:=2 else if door=2 then door:=1;
end;
end;
if opens>=2 then
begin
result:=true;
exit;
end;
if i=5 then
if d=door then
if door=1 then door:=2 else if door=2 then door:=1;
wait(200);
end;
end;
end;

procedure docktostove;
var
i:integer;
begin
if findsymbol(x,y,'cook') then
begin
mouse(x-10,y-2,3,3,true);
wait(5000);
flag;
end else
begin
mouse(mmcx-30,mmcy-10,5,5,true);
flag;
for i:=0 to 25 do
begin
if findsymbol(x,y,'cook') then
begin
mouse(x-10,y-2,3,3,true);
flag;
exit;
end;
if i=25 then exit;
wait(1000);
end;
end;
if DTMrotated(stoveDTM,x,y,mmx1,mmy1,mmx2,mmy2) then
begin
if dbug then writeln('found stove DTM');
mouse(x-5,y-5,3,3,true);
flag;
end;
end;

procedure stovetodock;
var
i:integer;
begin
// radialwalk(dockcolor,120,90,60,2,2);
for i:=0 to 10 do
begin
if clickcolorblock(dockcolor,mmcx,mmcy,mmx2,mmy2) then
begin
dropburned;
wait(3000);
flag;
exit;
end;
end;
end;

//><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>
// Al Kahriaialalahahad Procedures
//><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>

procedure alkbank;
var
i:integer;
slot:Tbox;
begin
if not(lowercase(players[currentplayer].loc)='bank') then exit;
status('Banking...');
makecompass('n');
highestangle;
if finddtm(net,x,y,mix1,miy1,mix2,miy2) then
if invcount=1 then
begin
players[currentplayer].loc:='bank to fish';
exit;
end;
if DTMrotated(alkbankers,x,y,mmx1,mmy1,mmx2,mmy2) then
begin
mouse(x+6,y-10,3,3,true);
flag;
end else
begin
if DTMrotated(alkbankers2,x,y,mmx1,mmy1,mmx2,mmy2) then
begin
mouse(x+6,y-5,3,3,true);
flag;
end;
end;
for i:=0 to 5 do
begin
flag;
if ((bankscreen) or (pinscreen)) then break;
wait(random(1000));
OpenBankQuiet('akb');
flag;
if i=5 then
begin
logout;
nextplayer(false);
loads:=0
exit;
end;
end;
fixbank;
wait(1000+random(500));
for i:=1 to 28 do
begin
if existsitem(i) then
begin
slot:=invbox(i);
if not(finddtm(net,x,y,slot.x1,slot.y1,slot.x2,slot.y2)) then
begin
Deposit(i,i,2);
wait(500+random(500));
end;
end;
end;
if not(finddtm(net,x,y,mix1,miy1,mix2,miy2)) then
begin
if (finddtm(net,x,y,msx1,msy1,msx2,msy2)) then
begin
mouse(x,y,3,3,true);
wait(500);
end else
begin
closebank;
if dbug then writeln('no nets');
logout;
nextplayer(false);
exit;
end;
end;
closebank;
inc(players[currentplayer].banked);
inc(loads);
reportilatrix;
players[currentplayer].loc:='bank to fish';
end;

procedure banktofish;
begin
if not(lowercase(players[currentplayer].loc)='bank to fish') then exit;
status('Walking To Fish...');
if findsymbol(x,y,'fish') then
begin
mouse(x,y,5,5,true);
if dbug then writeln('found fish symbol');
wait(5000);
flag;
players[currentplayer].loc:='fish';
exit;
end else
begin
mouse(mmcx,mmcy+45,5,5,true);
flag;
if findsymbol(x,y,'fish') then
begin
mouse(x,y,5,5,true);
if dbug then writeln('found fish symbol');
wait(5000);
flag;
players[currentplayer].loc:='fish';
exit;
end
end;
if dbug then writeln('walk to fish failed');
logout;
nextplayer(false);
end;

procedure fishtobank;
var
i:integer;
begin
if not(lowercase(players[currentplayer].loc)='fishing spot') then exit;
if findsymbol(x,y,'bank') then
begin
mouse(x+20,y+30,4,4,true);
flag;
end else
begin
mouse(mmcx,mmcy-50,3,3,true);
flag;
end;
for i:=0 to 20 do
begin
if DTMrotated(alkbankers,x,y,mmx1,mmy1,mmx2,mmy2) then
begin
mouse(x+20,y-10,3,3,true);
if dbug then writeln('found bankDTM1');
flag;
players[currentplayer].loc:='bank';
exit;
end;
if DTMrotated(alkbankers2,x,y,mmx1,mmy1,mmx2,mmy2) then
begin
mouse(x+20,y-3,3,3,true);
if dbug then writeln('found bankDTM2');
flag;
players[currentplayer].loc:='bank';
exit;
end;
if i=10 then
begin
mouse(mmcx-10,mmcy-50,3,3,true);
flag;
end;
wait(1000);
end;
if dbug then writeln('fish to bank failed');
logout;
nextplayer(false);
end;

function openkebabdoor:boolean;
var
i,dx,dy:integer;
begin
result:=false;
if findstove(x,y) then
begin
for i:=1 to 10 do
begin
if findObjIn(dx,dy,'oor',1990008,x+120,y-50,x+300,y+100,i) then
begin
if isUpText('pen') then
begin
if dbug then writeln('opening door');
status('Opening Door...');
if msclick(dx,dy) then
begin
superflag;
result:=true;
exit;
end;
end;
if isUpText('lose') then
begin
if dbug then writeln('door is open');
status('Door Is Open');
result:=true;
exit;
end;
end;
end;
end;
end;

procedure banktostove;
var
i:integer;
begin
if not(lowercase(players[currentplayer].loc)='bank') then exit;
status('Walking To Stove...');
if findsymbol(x,y,'cook') then
begin
if dbug then writeln('found cook symbol');
mouse(x+10,y,3,3,true);
wait(6000);
flag;
end else
begin
if findDTM(kebabDTM,x,y,mmx1,mmy1,mmx2,mmy2) then
begin
if dbug then writeln('found kebab shop');
mouse(x,y,3,3,true);
wait(6000);
flag;
end else
begin
mouse(mmcx+20,mmcy-45,5,5,true);
flag;
for i:=0 to 30 do
begin
if findsymbol(x,y,'cook') then
begin
if dbug then writeln('found cook symbol');
mouse(x+10,y,3,3,true);
flag;
break;
end;
if findDTM(kebabDTM,x,y,mmx1,mmy1,mmx2,mmy2) then
begin
if dbug then writeln('found kebab shop');
mouse(x,y,3,3,true);
flag;
break;
end;
{ if i=10 then
begin
mouse(mmcx,mmcy-40,3,3,true);
flag;
end; }
wait(1000);
end;
end;
end;
for i:=0 to 5 do
begin
if openkebabdoor then
begin
players[currentplayer].loc:='stove';
exit;
end;
end;
if dbug then writeln('walk to stove failed');
logout;
nextplayer(false);
end;

procedure stovetobank;
var
i:integer;
begin
// if not(lowercase(players[currentplayer].loc)='stove') then exit;
status('Walking To bank...');
openkebabdoor;
if findsymbol(x,y,'bank') then
begin
mouse(x+10,y-20,3,3,true);
flag;
end else
begin
mouse(mmcx-10,mmcy+50,4,4,true);
flag;
end;
for i:=0 to 20 do
begin
if DTMrotated(alkbankers,x,y,mmx1,mmy1,mmx2,mmy2) then
begin
mouse(x+10,y-10,3,3,true);
if dbug then writeln('found bankDTM1');
flag;
players[currentplayer].loc:='bank';
exit;
end;
if DTMrotated(alkbankers2,x,y,mmx1,mmy1,mmx2,mmy2) then
begin
mouse(x+5,y-3,3,3,true);
if dbug then writeln('found bankDTM2');
flag;
players[currentplayer].loc:='bank';
exit;
end;
wait(500);
end;
if dbug then writeln('Walk to bank failed');
logout;
nextplayer(false);
end;

//><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>
// Cooking Procedures
//><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>

procedure waittocook(var dtm:integer);
var
i,t,ls:integer;
slot:TBox;
begin
for i:=28 downto 1 do
begin
slot:=invbox(i);
if findDTM(dtm,x,y,slot.x1,slot.y1,slot.x2,slot.y2) then
begin
ls:=i;
if dbug then writeln('last slot = '+inttostr(i));
break;
end;
end;
marktime(t);
marktime(k);
slot:=invbox(ls);
while(findDTM(dtm,x,y,slot.x1,slot.y1,slot.x2,slot.y2))do
begin
status('Cooking...');
FTwait(4);
nolog;
if clicktocontinue then exit;
end;
FTwait(2);
end;

procedure cook(var dtm:integer;col:integer);
var
ctime,i,hp,fx,fy:integer;
op:string;
begin
if (not(loggedIn)) then exit;
if ((lowercase(players[currentplayer].skill)='cage')) or (lowercase(players[currentplayer].skill)='harpoon') then op:='ange';
if (lowercase(players[currentplayer].skill)='flyrod') then op:='tove';
flag;
gametab(4);
marktime(ctime);
marktime(hp);
if dbug then writeln('cooking...');
for i:=0 to 20 do
begin
if (not(findDTM(dtm,fx,fy,mix1,miy1,mix2,miy2))) then break;
if findstove(stove.x,stove.y) then
begin
mouse(fx,fy,4,4,true);
FTwait(1);
mouse(stove.x,stove.y,1,1,false);
if chooseoption(op) then
begin
randomness;
flag;
randomness;
for i:=0 to 5 do
begin
FTwait(4);
if (findcolorspiraltolerance(x,y,col,240,400,270,420,10)) then
begin
mouse(x,y,3,3,false);
if chooseoption('All') then
begin
randomness;
waittocook(dtm);
end;
end;
end;
if FindBlackChatMessage('each') then
begin
case lowercase(players[currentplayer].skill) of
'cage','harpoon': begin
if DTMrotated(stoveDTM,x,y,mmx1,mmy1,mmx2,mmy2) then
begin
if dbug then writeln('found stove DTM');
mouse(x-5,y-5,3,3,true);
flag;
wait(100);
opendoubledoor(1);
end;
end;
'flyrod': opendoor;
'net': openkebabdoor;
end;
end;
end;
end;
end;
end;

procedure cookFood;
begin
gametab(4);
if dbug then writeln('begin of cooking cycle');
if (Players[currentplayer].booleans[0]) then
begin
if lowercase(players[currentplayer].skill)='flyrod' then
if ((findDTM(trout,x,y,mix1,miy1,mix2,miy2))
or (findDTM(salmon,x,y,mix1,miy1,mix2,miy2))) then
begin
players[currentplayer].loc:='walking to stove';
walkToStove;
cook(trout,11908542);
cook(salmon,6780344);
if (not(loggedin)) then exit;
countfish('cooked');
players[currentplayer].loc:='walking to bank from stove';
walkToBankFromStove;
end;
if lowercase(players[currentplayer].skill)='cage' then
if (findDTM(lobster,x,y,mix1,miy1,mix2,miy2)) then
begin
docktostove;
opendoubledoor(1);
cook(lobster,1852022);
if (not(loggedin)) then exit;
countfish('cooked');
opendoubledoor(2);
stovetodock;
end;
if lowercase(players[currentplayer].skill)='harpoon' then
if ((findDTM(tuna,x,y,mix1,miy1,mix2,miy2))
or (findDTM(swordfish,x,y,mix1,miy1,mix2,miy2))) then
begin
docktostove;
opendoubledoor(1);
cook(tuna,11119285);
cook(swordfish,12287922);
if (not(loggedin)) then exit;
countfish('cooked');
while(opendoubledoor(2)=false)do
begin
wait(1500);
end;
stovetodock;
end;
if lowercase(players[currentplayer].skill)='net' then
if ((findDTM(shrimps,x,y,mix1,miy1,mix2,miy2))
or (findDTM(anchovies,x,y,mix1,miy1,mix2,miy2))) then
begin
banktostove;
if (not(lowercase(players[currentplayer].loc)='stove')) then exit;
cook(shrimps,8823765);
cook(anchovies,7362648);
if (not(loggedin)) then exit;
countfish('cooked');
stovetobank;
end;
dropburned;
end;
end;

procedure dropBurned;
var
i:integer;
slot:TPoint;
slotBox:TBox;

begin
if findburntcolor=0 then exit;
for i:=1 to 28 do
begin
status('Dropping Burned...');
slotBox:=invBox(i);
if not(finddtm(flyrod,x,y,slotbox.x1,slotbox.y1,slotbox.x2,slotbox.y2)) then
if not(finddtm(feathers,x,y,slotbox.x1,slotbox.y1,slotbox.x2,slotbox.y2)) then
if not(finddtm(lobpot,x,y,slotbox.x1,slotbox.y1,slotbox.x2,slotbox.y2)) then
if not(finddtm(harpooon,x,y,slotbox.x1,slotbox.y1,slotbox.x2,slotbox.y2)) then
if not(finddtm(net,x,y,slotbox.x1,slotbox.y1,slotbox.x2,slotbox.y2)) then
begin
slot:=mid(slotBox);
if findcolorspiral(x,y,burntcolor,slot.x-10,slot.y,slot.x,slot.y+10) then
begin
mmouse(x,y,3,3);
wait(500+random(200));
if isUpTextMulti('urn','urnt','Burnt') then
begin
getmousepos(x,y);
mouse(x,y,0,0,false);
chooseOption('rop');
inc(Players[currentplayer].integers[0]);
wait(100+random(400));
end{ else exit};
end;
end;
end;
end;

//><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>
// Fishing Procedures
//><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>

function nextEmptySlot:integer;
var
i:integer;
begin
for i:=1 to 28 do
begin
if not(existsItem(i)) then
begin
result:=i;
exit;
end;
end;
result:=0;
end;

function whirlpool:boolean;
var
i:integer;
begin
if finddtm(WhirlpoolDTM,x,y,msx1,msy1,msx2,msy2) then
begin
mouse(mmcx,mmcy,5,5,true);
status('Found Whirlpool');
if dbug then writeln('Found Whirlpool');
flag;
result:=true;
for i:=0 to 60 do
begin
if fishsymbol then exit;
if (not(finddtm(WhirlpoolDTM,x,y,msx1,msy1,msx2,msy2))) then exit;
wait(1000);
end;
end;
end;

function clickfishingspot:boolean;
var
i:integer;
optext,ut:string;
begin
case lowercase(players[currentplayer].skill) of
'flyrod': begin
optext:='ure';
ut:='ure';
end;
'cage','harpoon': begin
optext:=copy(lowercase(players[currentplayer].skill),2,length(players[currentplayer].skill)-1);
ut:='age';
end;
'net': begin
optext:='et';
ut:='ishing';
end;
end;
for i:=0 to 5 do
begin
if FindObj(x,y,ut,15518125,20) then
begin
mouse(x,y,0,0,false);
status('Fishing Spot...');
if chooseoption(optext) then
begin
if dbug then writeln('Found Fishing Spot');
result:=true;
flag;
exit;
end;
end;
end;
end;

procedure waitandcheck;
var
next,t,l,w,hp:integer;
begin
next:=nextEmptySlot;
if next=0 then exit;
marktime(t);
marktime(l);
marktime(w);
marktime(hp);
while(not(invfull))do
begin
randomness;
if timefrommark(w)>7000 then
begin
whirlpool;
status('Checking for Whirlpool');
marktime(w);
end;
if existsItem(next) then
begin
next:=nextEmptySlot;
marktime(t);
end;
if (lowercase(players[currentplayer].skill)='flyrod') then
if (not(findDTM(feathers,x,y,mix1,miy1,mix2,miy2))) then exit;
wait(500);
randomness;
if clicktocontinue then exit;
wait(200);
randomness;
if timefrommark(t)>15000 then exit;
if invfull then exit;
randomness;
if timefrommark(hp)>15000 then
begin
if hpfight then
begin
setrun(true);
case lowercase(players[currentplayer].skill) of
'harpoon','cage': begin
fishtoship;
players[currentplayer].loc:='karamja';
end;
'net': fishtobank;
'flyrod': walktobank;
end;
logout;
nextplayer(true);
exit;
end;
marktime(hp);
end;
wait(1000);
if (timefrommark(l)>10000) then
begin
status('Idle too long...');
case random(4) of
0: begin
if dbug then writeln('hovering fishing');
hoverskill('fishing',false);
end;
1: begin
mmouse(random(600),random(400),0,0);
if dbug then writeln('moving mouse');
end;
2: begin
if dbug then writeln('random right click');
mouse(20+random(500),20+random(200),0,0,false);
wait(random(600));
getmousepos(x,y);
mmouse(x+random(150),y-50-random(100),0,0);
end;
3: begin
if dbug then writeln('random gametab');
gametab(random(14));
wait(500);
gametab(4);
end;
end;
marktime(l);
end;
wait(600);
randomness;
wait(800);
randomness;
wait(500);
end;
end;

procedure fish(var equipDTM:integer);
var
f:integer;
begin
if not(lowercase(players[currentplayer].loc)='fish') then exit;
marktime(f);
gametab(4);
repeat
if lowercase(players[currentplayer].skill)='flyrod' then
begin
if (not(findDTM(feathers,x,y,mix1,miy1,mix2,miy2))) then
begin
players[currentplayer].loc:='walking to bank';
break;
end;
end;
if (findDTM(equipDTM,x,y,mix1,miy1,mix2,miy2)) then
begin
equipcolor:=getcolor(x,y);
if dbug then writeln('equipment color '+inttostr(equipcolor));
end else
begin
status('Equipment Missing...');
if not(pickupequipment) then break;
end;
wait(300+random(200));
if clickfishingspot then waitandcheck else if (not(fishsymbol)) then nolog;
until((invfull)or(timefrommark(f)>900000));
countfish('raw');
players[currentplayer].loc:='fishing spot';
status('Done fishing...');
end;

//><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>
// Main loop
//><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>><>

begin
setupsrl;
declareplayers;
loadimages;
if not(checkclient) then
begin
writeln('Client Window is not an RS window');
writeln('Terminating Script');
terminatescript;
end;
activateclient;
wait(500);
repeat
if (not(loggedin)) then login;
if (lowercase(players[currentplayer].skill)='flyrod') then
begin
cookfood;
bank;
walktofish;
fish(flyrod);
walktobank;
cookfood;
bank;
end;
if ((lowercase(players[currentplayer].skill)='cage') or (lowercase(players[currentplayer].skill)='harpoon')) then
begin
draynorbank;
walktokaramja;
shiptofish;
if (lowercase(players[currentplayer].skill)='cage') then fish(lobpot);
if (lowercase(players[currentplayer].skill)='harpoon') then fish(harpooon);
fishtoship;
shiptobank;
end;
if (lowercase(players[currentplayer].skill)='net') then
begin
cookfood;
alkbank;
banktofish;
fish(net);
fishtobank;
cookfood;
alkbank
end;
if loads>=loadstilswitch then
begin
status('Loads Reached, New Player...');
logout;
nextplayer(true);
loads:=0;
exit;
end;
until(false);
freeimages;
end.

——————————————————
<!– END TEMPLATE: formanswers –>

IronTeapot

2007-10-02 22:02:53

Woah…

RAM

2007-10-02 22:05:00

I always say…It's hard to say No, when someone applies with a script that they took the time to post and get feedback on…Good Job,

~RAM

Tim0suprem0

2007-10-02 23:01:55

Yes

I loved Spidas for nubs :p
Back before I was member it's all I used to train my nubs fresh off tutorial island.

Oh yeah and I guess you use multiplayer and can script kinda well and stuff ;)

And standards. Thank god you have them.


EDIT: Umm this app isn't a poll?

Santa_Clause

2007-10-02 23:37:25

SRL Bug.

procedure cookFood;
begin
gametab(4);
if dbug then writeln('begin of cooking cycle');
if (Players[currentplayer].booleans[0]) then
begin
if lowercase(players[currentplayer].skill)='flyrod' then
if ((findDTM(trout,x,y,mix1,miy1,mix2,miy2))
or (findDTM(salmon,x,y,mix1,miy1,mix2,miy2))) then
begin
players[currentplayer].loc:='walking to stove';
walkToStove;
cook(trout,11908542);
cook(salmon,6780344);
if (not(loggedin)) then exit;
countfish('cooked');
players[currentplayer].loc:='walking to bank from stove';
walkToBankFromStove;
end;
if lowercase(players[currentplayer].skill)='cage' then
if (findDTM(lobster,x,y,mix1,miy1,mix2,miy2)) then
begin
docktostove;
opendoubledoor(1);
cook(lobster,1852022);
if (not(loggedin)) then exit;
countfish('cooked');
opendoubledoor(2);
stovetodock;
end;
if lowercase(players[currentplayer].skill)='harpoon' then
if ((findDTM(tuna,x,y,mix1,miy1,mix2,miy2))
or (findDTM(swordfish,x,y,mix1,miy1,mix2,miy2))) then
begin
docktostove;
opendoubledoor(1);
cook(tuna,11119285);
cook(swordfish,12287922);
if (not(loggedin)) then exit;
countfish('cooked');
while(opendoubledoor(2)=false)do
begin
wait(1500);
end;
stovetodock;
end;
if lowercase(players[currentplayer].skill)='net' then
if ((findDTM(shrimps,x,y,mix1,miy1,mix2,miy2))
or (findDTM(anchovies,x,y,mix1,miy1,mix2,miy2))) then
begin
banktostove;
if (not(lowercase(players[currentplayer].loc)='stove')) then exit;
cook(shrimps,8823765);
cook(anchovies,7362648);
if (not(loggedin)) then exit;
countfish('cooked');
stovetobank;
end;
dropburned;
end;
end;

Please, use a case here.

Negaal

2007-10-03 07:31:48

Eh-munk you had member status? anyways these are awesome, i didnt saw any mistake, problably best karamja fisher atm. I registered when you released your spidas for nubs, I used every version of that until it reached to trainomatic-5000…awsome form, i don't know what to say its one hundred percent YES, no doubt…

[offtopic]Everyone who should vote for him should see his trainomatic 5000 aswell, supernice from and handling[/offtopic]

MasterKill

2007-10-03 07:34:38

yes.

E: where is the poll gone?

Negaal

2007-10-03 07:38:01

From: MasterKill
yes.

E: where is the poll gone?




same here… wrote my post pressed sumbit and wanted to vote…eeer where is the post button lol:P

gerauchert

2007-10-03 08:07:42

its a yes from me as well :D if there was a poll lol

GoF

2007-10-03 08:28:25

I still remember that spider script :p

anywayss.. yesh

n3ss3s

2007-10-03 09:23:42

Definite yes from me!

Umm what is this "Spidas for nubs"?

Hugolord

2007-10-03 09:38:07

yes from me! :D

very nice use of SR, I like your scripts

neG

2007-10-03 10:08:24

That fisher is goood.
I vote yes, well I would if I could..

Now… back to working out how to open doors with a tune can lid…

WT-Fakawi

2007-10-03 13:50:56

Without much further ado, Welcome!