SRL Archive - First Scripts

Barbarian Power Fisher By nrb33


nrb33

2008-06-29 21:30:24

First script ive made :)
it works good for my needs, no anti-randoms, they seem to be bugged for me atm :\
program FishDropper;
{.include SRl/SRl.scar}
var x,y,TroutDropped,Salmondropped,Drop,Loads,salmon,trout,Cancel,xpgained,FishSpotDTM,InvLastSpot,loadsdropped,TotalDropped:integer;

const
loadsmax = 1000;

Procedure Report;
begin
writeln('TroutDropped' + inttostr(TroutDropped));
Writeln('Salmon Dropped ' +inttostr(salmonDropped));
Writeln('TotalFish Dropped ' + intToStr(totalDropped));
Writeln('Loads Dropped ' +IntToStr(Loads));
Writeln('Total Experience gained this load = ' +IntToStr(xpGained));
Writeln('Loads Done ' +IntToStr(LoadsDropped));
end;

//=============//Procedure Splitter\\=================\\

procedure DeclareDtms;
begin
InvLastSpot := DTMFromString('78DA63BCC3CCC0D0C4C4800CEC2C7418E4803' +
'42310FF0702C6BD4035D9A86A9CAD0DE16A4080F132504D2E0135' +
'C7806A1A51D5385AEAA1AA390E54534E40CD19A09A42DC6E06AB0' +
'1F9AB94803967816A3A51D5D89A6AA3AA3908545341C05F20F7E4' +
'E15703004EAE18A6');
FishSpotDTM := DTMFromstring('78DA63FCC4C0C070910105CC38F086410E483' +
'342F98C1F31D5E4B52C4255F399083520BB2E10A1E6127E3500EE' +
'831204');
Salmon := DTMFromString('78DA633CCECCC0B0909101197446F831C8016' +
'990E87F2060DC0F54B30255CDEEF22CB81A10603C0254B30455CD' +
'92CC58143500318A0CD5');
Trout := DTMFromString('78DA63B4616660B8C4C8800C6E5FBBC66004A' +
'441A2FF8180D101A8E62CAA9A433B77C0D58000A33B50CD495435' +
'7B366D42556387A9A6BAA808558D0550CD3954358777ED4251030' +
'088D914BD');
//Trout := DTMFromString('78DA637460666038C5C8800C66F6F53118016' +
// '990E87F2060F400AA3981AA66C7DAB5703520C0680D54730155CD' +
// 'A5336750D4000042290DFB');

Drop:= DTMFromString('78DA6394646660F8C9C8800CFEFFFF0FA661A' +
'28C2244AAF94F400D2F50CD2FDC6A9840340750CD77026A98F0BB' +
'07ACE63F13716A3EE3570300CE89223E');
cancel:= DTMFromString('78DA63EC6666600863624006FFFFFF679003D' +
'28C10F67FC636A01A7F543520005303026035BE04D4D4E3B70BAC' +
'A6950835E544A8C925424D1A504D380137A762AAC16A4E1401350' +
'544A801C545347E35002DF32A50');
end;


//=============//Procedure Splitter\\=================\\

Procedure DropTrout;
begin
if(finddtm(Trout,x,y,557,252,732,464))then
begin
mouse(x,y,5,5,false)
if(finddtm(Drop,x,y,473, 151,764,500))then
begin
mouse(x,y,2,2,true)
wait(100+random(100))
Troutdropped:=Troutdropped +1
totalDropped:=TotalDropped+1
xpgained:=xpgained+50
end;
end;
end;

//=============//Procedure Splitter\\=================\\

Procedure DropSalmon;
begin
if(finddtm(Salmon,x,y,549, 246,733, 463))then
begin
mouse(x,y,5,5,false)
if(finddtm(Drop,x,y,473, 151,764,500))then
begin
mouse(x,y,2,2,true)
Wait(100+random(10))
Salmondropped:=salmondropped +1
totalDropped:=TotalDropped+1
xpgained:=xpgained+50
end;
end;
end;

//=============//Procedure Splitter\\=================\\

Procedure FindSpot;
begin
If(findDtm(FishspotDtm,x,y,0,0,515, 338))then
begin
mouse(x,y,6,6,true)

wait(15000+random(5000))
end;
end;

Procedure AntiBan;
begin
writeln('[AntiBan] Performing Random AntiBan...');
Case Random(10) of
0: SetRun(True);
1: Gametab(1+random(12));
2,8,9: HoverSkill('Fishing', false);
3, 4, 5: Gametab(1+random(12));
6, 7,10: Wait(1000);
end;
gametab(4)
end;

function FindWhirlPool(var x, y: Integer): Boolean;
var
Points: TPointArray;
Rx, Ry: Integer;
begin
if not LoggedIn then Exit;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(Ry, Rx, Points, 12103079, x - 30, y - 30, x + 30, y + 30, 20);
if GetArrayLength(Points) > 90 then
begin
if (Rx > 0) or (Ry > 0) then
begin
MMouse(Rx, Ry, 0, 0);
Wait(1000);
Result := True;
ColorToleranceSpeed(1);
Exit;
end;
end;
Result := False;
ColorToleranceSpeed(1);
end;

{--------------------------------
MyHandleWhirlPool - called if a whirlpool is found.
---------------------------------}

procedure MyHandleWhirlPool;
begin
TakeScreen('Whirlpool');
Mouse(MMCX - 10, MMCY - 10, 5, 5, True);
WhirlPools := WhirlPools + 1;
ReportVars[3] := 1;
SendSRLReport;
end;

//===========\\ Main Script //===========\\
begin
SetupSRL;
Declaredtms;
ClearDebug;
repeat

Repeat
FindSpot;
Antiban;
until(not(findDtm(InvLastSpot,x,y,686, 431,728, 463)))
repeat

dropsalmon;
dropTrout;
Report;
until( Not(finddtm(Salmon,x,y,557,252,732,464)))and (Not(finddtm(trout,x,y,557,252,732,464)))
until(loadsDropped = loadsmax) // main loop\\
end.
//===========\\ End of Script //===========\\

currently fished me to 75 fishing :) please leave any suggestions , and or comments. Thanks.

Ashur2Good

2008-07-10 09:10:09

From: nrb33
First script ive made :)
it works good for my needs, no anti-randoms, they seem to be bugged for me atm :\
program FishDropper;
{.include SRl/SRl.scar}
var x,y,TroutDropped,Salmondropped,Drop,Loads,salmon,trout,Cancel,xpgained,FishSpotDTM,InvLastSpot,loadsdropped,TotalDropped:integer;

const
loadsmax = 1000;

Procedure Report;
begin
writeln('TroutDropped' + inttostr(TroutDropped));
Writeln('Salmon Dropped ' +inttostr(salmonDropped));
Writeln('TotalFish Dropped ' + intToStr(totalDropped));
Writeln('Loads Dropped ' +IntToStr(Loads));
Writeln('Total Experience gained this load = ' +IntToStr(xpGained));
Writeln('Loads Done ' +IntToStr(LoadsDropped));
end;

//=============//Procedure Splitter\\=================\\

procedure DeclareDtms;
begin
InvLastSpot := DTMFromString('78DA63BCC3CCC0D0C4C4800CEC2C7418E4803' +
'42310FF0702C6BD4035D9A86A9CAD0DE16A4080F132504D2E0135' +
'C7806A1A51D5385AEAA1AA390E54534E40CD19A09A42DC6E06AB0' +
'1F9AB94803967816A3A51D5D89A6AA3AA3908545341C05F20F7E4' +
'E15703004EAE18A6');
FishSpotDTM := DTMFromstring('78DA63FCC4C0C070910105CC38F086410E483' +
'342F98C1F31D5E4B52C4255F399083520BB2E10A1E6127E3500EE' +
'831204');
Salmon := DTMFromString('78DA633CCECCC0B0909101197446F831C8016' +
'990E87F2060DC0F54B30255CDEEF22CB81A10603C0254B30455CD' +
'92CC58143500318A0CD5');
Trout := DTMFromString('78DA63B4616660B8C4C8800C6E5FBBC66004A' +
'441A2FF8180D101A8E62CAA9A433B77C0D58000A33B50CD495435' +
'7B366D42556387A9A6BAA808558D0550CD3954358777ED4251030' +
'088D914BD');
//Trout := DTMFromString('78DA637460666038C5C8800C66F6F53118016' +
// '990E87F2060F400AA3981AA66C7DAB5703520C0680D54730155CD' +
// 'A5336750D4000042290DFB');

Drop:= DTMFromString('78DA6394646660F8C9C8800CFEFFFF0FA661A' +
'28C2244AAF94F400D2F50CD2FDC6A9840340750CD77026A98F0BB' +
'07ACE63F13716A3EE3570300CE89223E');
cancel:= DTMFromString('78DA63EC6666600863624006FFFFFF679003D' +
'28C10F67FC636A01A7F543520005303026035BE04D4D4E3B70BAC' +
'A6950835E544A8C925424D1A504D380137A762AAC16A4E1401350' +
'544A801C545347E35002DF32A50');
end;


//=============//Procedure Splitter\\=================\\

Procedure DropTrout;
begin
if(finddtm(Trout,x,y,557,252,732,464))then
begin
mouse(x,y,5,5,false)
if(finddtm(Drop,x,y,473, 151,764,500))then
begin
mouse(x,y,2,2,true)
wait(100+random(100))
Troutdropped:=Troutdropped +1
totalDropped:=TotalDropped+1
xpgained:=xpgained+50
end;
end;
end;

//=============//Procedure Splitter\\=================\\

Procedure DropSalmon;
begin
if(finddtm(Salmon,x,y,549, 246,733, 463))then
begin
mouse(x,y,5,5,false)
if(finddtm(Drop,x,y,473, 151,764,500))then
begin
mouse(x,y,2,2,true)
Wait(100+random(10))
Salmondropped:=salmondropped +1
totalDropped:=TotalDropped+1
xpgained:=xpgained+50
end;
end;
end;

//=============//Procedure Splitter\\=================\\

Procedure FindSpot;
begin
If(findDtm(FishspotDtm,x,y,0,0,515, 338))then
begin
mouse(x,y,6,6,true)

wait(15000+random(5000))
end;
end;

Procedure AntiBan;
begin
writeln('[AntiBan] Performing Random AntiBan...');
Case Random(10) of
0: SetRun(True);
1: Gametab(1+random(12));
2,8,9: HoverSkill('Fishing', false);
3, 4, 5: Gametab(1+random(12));
6, 7,10: Wait(1000);
end;
gametab(4)
end;

function FindWhirlPool(var x, y: Integer): Boolean;
var
Points: TPointArray;
Rx, Ry: Integer;
begin
if not LoggedIn then Exit;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(Ry, Rx, Points, 12103079, x - 30, y - 30, x + 30, y + 30, 20);
if GetArrayLength(Points) > 90 then
begin
if (Rx > 0) or (Ry > 0) then
begin
MMouse(Rx, Ry, 0, 0);
Wait(1000);
Result := True;
ColorToleranceSpeed(1);
Exit;
end;
end;
Result := False;
ColorToleranceSpeed(1);
end;

{--------------------------------
MyHandleWhirlPool - called if a whirlpool is found.
---------------------------------}

procedure MyHandleWhirlPool;
begin
TakeScreen('Whirlpool');
Mouse(MMCX - 10, MMCY - 10, 5, 5, True);
WhirlPools := WhirlPools + 1;
ReportVars[3] := 1;
SendSRLReport;
end;

//===========\\ Main Script //===========\\
begin
SetupSRL;
Declaredtms;
ClearDebug;
repeat

Repeat
FindSpot;
Antiban;
until(not(findDtm(InvLastSpot,x,y,686, 431,728, 463)))
repeat

dropsalmon;
dropTrout;
Report;
until( Not(finddtm(Salmon,x,y,557,252,732,464)))and (Not(finddtm(trout,x,y,557,252,732,464)))
until(loadsDropped = loadsmax) // main loop\\
end.
//===========\\ End of Script //===========\\

currently fished me to 75 fishing :) please leave any suggestions , and or comments. Thanks.


Looks promising :)

Why not take a look in the fishing directory of SRL? There may be a few handy procedures/functions that you might like to use.

Never know ;)

Also, you should add more fail safes. Like with your dropping procedure you should add:

Procedure DropTrout;
begin
if(finddtm(Trout,x,y,557,252,732,464))then
begin
mouse(x,y,5,5,false)
if(finddtm(Drop,x,y,473, 151,764,500))then
begin
mouse(x,y,2,2,true)
wait(100+random(100))
Troutdropped:=Troutdropped +1
totalDropped:=TotalDropped+1
xpgained:=xpgained+50
if(not(finddtm(Trout,x,y,557,252,732,464)))then
begin
Writeln('Could not find the trout');
// ADD Fail safe here
end;
end;
end;
end;

I think you're experienced enough to finish the rest on your own :)

If you think you need a little bit more help, you can always add me on msn at [email]u_no_i_rulz@hotmail.com[/email] OR you could join one of these new promosing study centers @ :

http://www.villavu.com/forum/showthread.php?t=32497


You look like a good scripter, keep up the good work :)

-Ashur

Claymore

2008-07-10 12:48:21

Ashur, ur link gave an error 404…

nice script btw. worked