Log in

View Full Version : No fishing scripts will run for me...



ammo2006
03-26-2007, 05:45 AM
Well, im kinda new at this. Iv been doing scar for maby a month now. Trying to learn how to make my own :) but u know how it goes, takes alot of time to get experiance...
Iv been doing mostly mining and Wcing scripts, but was gonna try some fishing ones, but they wont run. They all say...

Line 1369: [Error] (19857:5): Unknown identifier 'I' in script C:\Program Files\SCAR 2.03\Scripts\[The script im using] Failed when compiling

Im not shure what happening, iv cheaked to make shure i had all the files in srl i needed, and I did. Anyone know whats happening?


P.S. If wizzup? or Charm read this post....
THX wizzup? for Varrock East Miner it kicks ass (Over 7k iron mined Ftw?).
Charms NICE willow raper.

neG
03-26-2007, 11:10 AM
Hey man,
It will be ALOT easier for us to debug the script if you post the whole thing here.

But the unknown identifier thing sounds like the I is not declared as a global variable.

so yea, the whole script will make it easier for us to help you :)

ammo2006
03-26-2007, 05:06 PM
Well its basicly every script i try but heres one...



{================================================= ==========================]
[ Dankness Village Fisher ]
[ ]
[ NAME : Draynor Village Fisher ]
[ WRITER : Dankness ]
[ DESCRIPTION : Fishes and Banks in Draynor Village and Lumbridge ]
[ AUTOCOLOR : Yes ]
[ VERSION : 2.55 ]
[ SRL VERSION : 2.2 Revision 606 ]
[ ]
[================================================== =========================]
[ Instructions. ]
[================================================== =========================]
[ 1. USE Scunerape with Low Detail, Very Bright. ]
[ 2. Set your Screen to 32 bit TRUE color. ]
[ 3. Set Variables as Needed on Lines 49-53 ]
[ 4. Run Script and SetUp Players in Player Manager ]
[ 5. Have Extra Fishing Equipment on First Page of Bank Booth ]
[ 6. Have Feathers if Fly Fishing on First Page of Bank Booth ]
[================================================== =========================]
[ Major Credits to the Following People : ]
[ --> Thanks to WT-Fakawi for His Walking Procedures, DTMs and All the ]
[ Advise he's Given me :) ]
[ --> Thanks to Masquerader for his Sweet Player Management Forms ]
[ --> Thanks to Stupid3000 for SSI2 and his great Scripts ]
[ --> Credit to MoparisBest,Odie5553,HatlessCow and many others that I ]
[ Learned to script from there scripts ]
[================================================== =========================}

program DraynorNetFisher;

{.include SRL\SRL.Scar}
{.include SRL\SRL\Skill\Fishing.Scar}
{.include SRL\SRL\Misc\DraynorColorFinder.Scar}
{.include SRL\SRL\Misc\PlayerForm.Scar}

//----------------------------------------------------------------------------//

var FishSpotDTM, ShrimpDTM, SalmonDTM, TroutDTM, AnchovieDTM,
NetDTM, FeatherDTM, DB1, DB2, DB3, FishingWaitTime,
FishColor, TotalShrimp, TotalAnchovies, TotalSalmons,
TotalTrouts, Trips, TripsToDo, CalibrateTimer : Integer;
UseGUI, UseAntiBan : Boolean;
FishingText : string;

//----------------------------------------------------------------------------//
// Set Variables Here
//----------------------------------------------------------------------------//
procedure SetUpVars;
begin
BenMouse := True; //** Use Benlands Spline Mouse
MouseSpeed := 25; //** Set MouseSpeed
TripsToDo := 3; //** Amount of Trips to Do + Random 4 Trips before Switching Chars
RandomPlayer := True; //** Set to True to Pick a Random Player each Player Switch
UseAntiBan := True; //** Will Chat, Rotate Screen, Check Exp and other humanlike behavors
UseGUI := True; //** Must Use GUI Atleast Once to Setup Chars Data File, Afterwards it will Load Players from File
ReinCarnate := False; //** Set to True to Attempt Walkback on Death, Works 100% of the Time
end;

//----------------------------------------------------------------------------//
// Set Colors Here if Having Problems With AutoColor Picker
//----------------------------------------------------------------------------//

procedure SetColorsHere;
begin
BankColor := 0; //** Bank Color on MiniMap ** Leave at Zero to Autoset
FishColor := 0; //** Color of the Fish Logo on Minimap ** Leave at Zero to autoset
RockColor := 0; //** Color of the Rock on Minimap ** Leave at Zero to autoset
WaterColor := 0; //** Color of the Water on Minimap ** Leave at Zero to autoset
RoadColor := 0; //** Color of the Road on Minimap ** Leave at Zero to autoset
end;

//----------------------------------------------------------------------------//
// DTMs and General Variables
//----------------------------------------------------------------------------//
procedure SetFishingStyle;
begin
case LowerCase ( Players[CurrentPlayer].Skill ) of
'net' : begin
FishingText := 'Net';
FishingWaitTime := 3500;
NetDTM := FishingItemDTM[1];
end;
'lure' : begin
FishingText := 'Lure';
FishingWaitTime := 7000;
NetDTM := FishingItemDTM[3];
end;
end;
end;

procedure LoadDTMs;
begin
DB1 := DTMFromString('78DA636C67626008664001FFFFFF67F80FA 41' +
'921ECFF8CB54035DEA86AFEFC61621081AA0101C63A4C73B0 AA09' +
'C7AF06000153117B');
DB2 := DTMFromString('78DA63EC60626008624001FFFFFF67F80FA 41' +
'921ECFF8C3540353EA86AFEFC61621081AA0101C63AA09A10 22D4' +
'44E057030001B5117D');
DB3 := DTMFromString('78DA63EC60626008624001FFFFFF67F80FA 41' +
'921ECFF8CF540359EA86AFEFC61621081AA0101C63AA09A40 026A' +
'6A816A42F1AB010000781176');
FishSpotDTM := DTMFromstring('78DA63FCC4C0C070910105CC38F086410E4 83' +
'342F98C1F31D5E4B52C4255F399083520BB2E10A1E6127E35 00EE' +
'831204');
AnchovieDTM := DTMFromString('78DA632C64626078CA800232329A1944803 42' +
'394CF580E547317554D71F10454354540356F51D5F4F46E42 5593' +
'0154F398805D5540358F18D000238A1A00484D0D11');
ShrimpDTM := DTMFromString('78DA632C606260E062644006299E160C224 01' +
'A26CA980154C389AA665E671DAA9A6AA01A665435CB26B4A0 AA29' +
'04AA114455737EFF361435003AE608D8');
SalmonDTM := DTMFromString('78DA639CCDC4C0F08C0105CC4E0E671001D 28' +
'C503EE30CA09A57A86A0ED7E6A3AA590854F31455CDFEAA1C 5435' +
'73806A1EA1AA4977B242510300BD7E0BF4');
TroutDTM := DTMFromString('78DA632C626260E0616440067B366D62100 1D' +
'23051C61CA01A7E543547F7ED4355530E54C381AA66DDA245 A86A' +
'4076B1A3AAA92C2C4051030009CD0A03');
FeatherDTM := DTMFromString('78DA632C65626078CC800276AC5BCB2002A 41' +
'9A17CC642A09A67A86A0EEFDE85AAA61CA8E61EAA1A060D06 4C73' +
'9E1350530654F304BF7B0074B60DDD');

end;

const Ver = 'v2.55';
const VerDate = '05.29.06';

//----------------------------------------------------------------------------//
// Title Screen
//----------------------------------------------------------------------------//

procedure Intro;
var a:string; i:integer;
begin
WriteLn ( '________' );
WriteLn ( '\______ \____________ ___.__. ____ ___________' );
WriteLn ( ' | | \_ __ \__ \< | |/ \ / _ \_ __ \' );
WriteLn ( ' | ` \ | \// __ \\___ | | ( <_> ) | \/' );
WriteLn ( '/_______ /__| (____ / ____|___| /\____/|__|' );
WriteLn ( ' \/ \/\/ \/' );
WriteLn ( ' _______ __ __' );
WriteLn ( ' \ \ _____/ |__/ |_ ___________' );
WriteLn ( ' / | \_/ __ \ __\ __\/ __ \_ __ \' );
WriteLn ( '/ | \ ___/| | | | \ ___/| | \/' );
WriteLn ( '\____|__ /\___ >__| |__| \___ >__|' );
WriteLn ( ' \/ \/ \/' );
WriteLn (' --> Version 2.55 --> by Dankness <-- '+VerDate);
A := '/';
for I := 1 to 48 do A := A + '=';
A := A + '\';
writeln(a);
a:='|';
for I := 1 to 10 do A := A + ' ';
A := A + 'Please Vist The SRL Forum at';
for I := 1 to 10 do A := A + ' ';
A := A + '|';
writeln(a);
WriteLn ('| http://www.villavu.com/forums/ |');
a:='\';
for I := 1 to 48 do A := A + '=';
A := A + '/';
Writeln ( A );
Wait( 500 + Random (500));
end;

//----------------------------------------------------------------------------//
// Auto Color Detection Procedures
//----------------------------------------------------------------------------//

procedure CouldNotFindColors;
begin
WriteLn ('ERROR, script could not find colors, please run the script again'
+' or set your own colors.');
TerminateScript;
end;

procedure SetColorsIfNeeded;
var C : Integer;
begin
PerfectNorth;
if ( ReinCarnate ) then
begin
repeat
C:=C+1;
wait(100);
FindDraynorRoadColor(588,39,617,71);
until (C>100) or (RoadColor<>0);

C:=0;
repeat
C:=C+1;
wait(100);
FindDraynorWaterColor;
until (C>100) or (WaterColor<>0);

C:=0;
repeat
C:=C+1;
wait(100);
FindDraynorRockColor;
until (C>100) or (RockColor<>0);
writeln('Road Color MM : '+inttostr(RoadColor));
writeln('Water Color MM : '+inttostr(WaterColor));
writeln('Rock Color MM : '+inttostr(RockColor));
if (( RoadColor = 0 ) or ( WaterColor = 0 ) or ( RockColor = 0)) then
begin
ReinCarnate := False;
WriteLn ('Could Not Find Colors for WalkBack Please Stand at Lowest Bank Slot and Align MiniMap to North and Restart Script/Change Worlds');
WriteLn (' Script will Work Without Walkback Function.');
end;
end;
if ( BankColor = 0 )then begin
Status ( 'Finding bank color please Wait...');
while ( BankColor = 0 ) do
begin
C := C + 1;
if ( BankColor = 0 )then BankColor := GetSymbolColor ( x, y, 'bank');
if ( C > 20 ) then CouldNotFindColors;
Wait ( Random ( 50 ) + 500);
end;
end;
WriteLn ( 'Bank Color MM : ' + IntToStr ( BankColor));
end;

procedure SetFishColorIfNeeded;
var C : Integer;
begin
if ( FishColor = 0 )then begin
Status('Finding Fish Logo color please Wait...');
while ( FishColor = 0 )do
begin
C := C + 1;
if( FishColor = 0 )then FishColor := GetSymbolColor ( x, y, 'fish');
if ( C > 20 ) then CouldNotFindColors;
Wait( Random ( 50 ) + 500 );
end;
WriteLn ('Fish Color MM : '+ IntToStr ( Fishcolor ));
end;
end;

//----------------------------------------------------------------------------//
//** Location Functions
//----------------------------------------------------------------------------//

function WeAreAtBank : Boolean;
begin
if ( FindSymbol ( x, y, 'bank' )) or ( FindMMColor ( x, y, BankColor )) then
begin
Players[CurrentPlayer].Loc := 'Draynor Bank';
Result := True;
end;
end;

function WeAreAtFish : Boolean;
begin
if ( FindSymbol ( x, y, 'fish' )) or ( FindMMColor ( x, y, FishColor )) then
begin
Players[CurrentPlayer].Loc := 'At-Fish';
Result := True;
end;
end;

function WeAreInLumbridgeCastle: Boolean;
var WX, WY:integer;
begin
if ( (FindSymbol(x, y, 'water')) and (not FindColor(WX, WY, WaterColor, MMX1, MMY1, MMX2, MMY2)) ) then
begin
Players[CurrentPlayer].Loc := 'Lumbridge';
Result := True;
end;
end;

function WeAreAtFurnace : Boolean;
begin
if ( FindSymbol ( x, y, 'furnace') ) then Result := True;
end;

//----------------------------------------------------------------------------//

procedure FindRegularRandoms;
begin
FindNormalRandoms;
end;

//----------------------------------------------------------------------------//
// Walkback From Lumbridge procedures Based On WT-Fawkis Procedures
//----------------------------------------------------------------------------//
procedure WalkLumbridgeFishtoDraynor;
var RX, RY : Integer;
begin
Face ('N');
SetRun ( False );

if ( not ( LoggedIn )) then Exit;

if ( WeAreAtFish ) then begin

if ( FindMMColor ( X, Y, FishColor )) then Mouse( X, Y , 4, 4, True );
Flag;
// if ( FindMMColor ( X, Y, FishColor )) then Mouse( X, Y - 30, 4, 4, True );
If ( FindColorTolerance ( X, Y, 1191750, MMX1, MMY1, MMX2, MMY2, 60 )) then
MouseFindFlag ( X, Y, 2, 1);
Wait ( 5000 + Random ( 2000 ));
Flag;

MarkTime ( Mark );
repeat
Wait ( 100 );
FindRegularRandoms;
if(TimeFromMark(Mark) > 60000) then begin Logout; Exit; end;
if ( not ( LoggedIn )) then Exit;
until ( WeAreAtFurnace );

if ( WeAreAtFurnace ) then Mouse ( X, Y - 20, 3, 3, True );
FFlag ( 10 );
end;

MarkTime(Mark);
Repeat
if not(Loggedin) then Exit;
if(TimeFromMark(Mark) > 60000) then begin Logout; Exit; end;
RadialRoadWalk(RoadColor, 260, 380, 40, 1, -1);
FindRegularRandoms;
Until FindColor(RX, RY, RockColor, MMX1+10, MMY1+10, MMX2-10, MMY2-10);
MarkTime(Mark);
SetRun(True);
RadialRoadWalk(RoadColor,200,300,60,-1,1);
RadialRoadWalk(RoadColor,200,300,60,-1,1);
Repeat
if not(Loggedin) then Exit;
if(TimeFromMark(Mark)>600000) then begin Logout; Exit; end;
RadialRoadWalk(RoadColor,200,350,40,1,-1);
FindRegularRandoms;
Until FindColor(RX,RY,RockColor,MMX1+30,MMY1+30,MMX2-30,MMY2-30);

SetRun(False);
RadialRoadWalk(RoadColor,200,350,60,1,-1);

MarkTime(Mark);
Repeat
if not(Loggedin) then break;
if(TimeFromMark(Mark)>600000) then begin Logout; Exit; end;
FindRegularRandoms;
RadialRoadWalk(RoadColor,120,320,40,-1,1);
Until FindColor ( x, y, BankColor, MMX1, MMY1, MMX2, MMY2 );
Mouse (X, Y, 3, 3, True);
if (not(loggedin)) then exit;
end;

//----------------------------------------------------------------------------//

procedure WalkLumbridgetoDraynor;
var RC : Integer;
begin

Face ('N');
MarkTime ( Mark );

repeat
if not(Loggedin) then break;
if(TimeFromMark(Mark)>600000) then begin Logout; Exit; end;
FindRegularRandoms;
Until WeAreInLumbridgeCastle;

if ( WeAreInLumbridgeCastle ) then
begin
PerfectNorth;
LinearRoadWalk(RoadColor, 90, 80, -1, 0);
Flag;
RadialRoadWalk(RoadColor, 370, 220, 72, 0, 1);
for RC := 1 to 2 do
RadialRoadWalk(RoadColor, 370, 220, 60, 0, 1);
end;

end;

//----------------------------------------------------------------------------//

Procedure WalkDraynorToLumbridge;
var RX,RY:integer;
Begin
Players[CurrentPlayer].Loc:='DraynorToLum';

MarkTime(Mark);
Repeat
if not(Loggedin) then break;
if(TimeFromMark(Mark)>600000) then begin Logout; Exit; end;
RadialRoadWalk(RoadColor,430,320,40,-1,-1);
FindRegularRandoms;
Until FindColor(RX,RY,RockColor,MMX1+30,MMY1+30,MMX2-30,MMY2-30);
FFlag(10);

MarkTime(Mark);
repeat
if not(Loggedin) then break;
if(TimeFromMark(Mark)>600000) then begin Logout; Exit; end;
FindRegularRandoms;
if FindColor(x,y,WaterColor,680,65,701,71) then Break;
RadialRoadWalk(RoadColor,170,30,50,-1,-1);
FindRegularRandoms;
until FindColor(x,y,WaterColor,640,10,722,61);

MarkTime(Mark);
repeat
if not(Loggedin) then break;
if(TimeFromMark(Mark)>600000) then begin Logout; Exit; end;
FindRegularRandoms;
RadialRoadWalk(RoadColor,80,240,40,0,-1);
until FindSymbol(rx,ry,'furnace');

FFlag(10);
RadialRoadWalk(RoadColor,160,200,35,0,-1);

repeat
FindRegularRandoms;
Wait(100);
if not(Loggedin) then break;
if(TimeFromMark(Mark)>600000) then begin Logout; Exit; end;
Until(FindSymbol(rx,ry,'furnace'));
Mouse( RX, RY - 20, 3, 3, True);
Flag;
MouseFindFlag ( 710, 88, 1, 1 );
Flag;
SetFishColorIfNeeded;
If ( WeAreAtFish ) then Mouse ( X, Y, 3, 3, True );
FFlag ( 10 );
if ( FindColor ( X, Y, FishColor, MMX1, MMCY + 20, MMX2, MMY2 )) then Mouse ( X, Y, 3, 3, True );
FFlag ( 10 );
end;

//----------------------------------------------------------------------------//
// Walking Procedures for Draynor Net Fishing
//----------------------------------------------------------------------------//

procedure WalkDraynortoBank;
begin
Face ('N');
Status ( 'Walking to Bank' );
if ( not ( LoggedIn )) then Exit;
Mouse( 665, 43, 5, 2, True);
Flag;
Players[CurrentPlayer].Loc :='Walk-Bank';
if ( FindMMColor ( X, Y, BankColor )) then
Mouse ( X, Y, 3, 3, True );
Flag;
end;

procedure WalkDraynorBankToFish;
var RR : Integer;
begin
Face ('N');
Status ( 'Walking to Fish' );
RR := Random ( 11 );
if ( RR = 3 ) or ( RR = 5 ) or ( RR = 8 ) then
SetRun ( True );
if ( not ( LoggedIn )) then Exit;
Players[CurrentPlayer].Loc :='Walk-Fish';
Face ( 'N' );
Mouse( 649, 123, 5, 5, True);
FFlag ( 10 );
SetFishColorIfNeeded;
MarkTime ( Mark );
Repeat
if not ( Loggedin ) then Exit;
if(TimeFromMark(Mark)>240000) then begin Logout; Exit; end;
Wait ( 100 + Random ( 100 ));
Until ( FindMMColor ( x, y, FishColor ));
Mouse( x, y, 4, 4, True);
FFlag ( 10 );
Players[CurrentPlayer].Loc :='At-Fish';
end;

//----------------------------------------------------------------------------//
// FindRandoms Procedure
//----------------------------------------------------------------------------//

procedure PlayDead;
begin
if (GetColor(30, 418) = 0) and (GetColor(72, 429) = 0) then
begin
Deaths:=Deaths+1;
if Reincarnate then
WalkLumbridgetoDraynor
else
begin
Players[CurrentPlayer].Loc := 'Died';
Players[CurrentPlayer].Active := False;
Logout;
end;
end;
end;

procedure Callibrate;
begin
if ( TimeFromMark ( CalibrateTimer ) >= 900000 + Random ( 45000 ) ) then
begin
BoredHuman;
PerfectNorth;
MarkTime ( CalibrateTimer );
end;
end;

procedure FindRandoms;
begin
if ( not ( LoggedIn )) then Exit;
FindRegularRandoms;
PlayDead;
FindScapeRune;
GambleNewBox;
FindTrade;
Callibrate;
HoverEvery ( 10 + Random ( 10 ), 'fishing');
if (UseAntiBan) then begin
// LogOutEvery( 2 + Random ( 2 ), 5 + Random ( 5));
// RandomChatEvery ( 10 + Random ( 5));
RotateEvery ( 20 + random( 10 ));
LeaveScreenEvery ( 5 + random ( 5 ));
end;
if(KillScriptTime>0)then KillScript ( KillScriptTime );
if ( FindFight ) then begin
SetRun ( True );
RunAwayDirection ( 'E' );
Wait ( 5000 + Random ( 3000 ));
if ( not ( FindMMColor ( x,y, FishColor ))) then RunBack;
if ( FindMMColor ( x, y, FishColor )) then Mouse ( x, y, 5, 5, True );
FFlag ( 10 );
end;
if ( NoGameTab or InBlack or FindNewBox ) then LogOut;
DwarfItem;
end;

//----------------------------------------------------------------------------//
// Walking Procedures
//----------------------------------------------------------------------------//

procedure WalkToBank;
begin
case ( LowerCase ( Players[CurrentPlayer].Skill )) of
'net' : WalkDraynortoBank;
'lure' : WalkLumbridgeFishtoDraynor;
end;
end;

procedure WalkToFish;
begin
case ( LowerCase ( Players[CurrentPlayer].Skill )) of
'net' : WalkDraynorBankToFish;
'lure' : WalkDraynorToLumbridge;
end;
end;

//----------------------------------------------------------------------------//
// Fishing Procedures
//----------------------------------------------------------------------------//
function CheckFeathers : Boolean;
begin
if ( LowerCase ( Players[CurrentPlayer].Skill ) = 'lure' ) and
( not ( FindInvDTM ( X, Y, FeatherDTM ))) then Result := True;
end;

function DoneFishing : Boolean;
begin
if ( InventoryFull ) then Result := True;
if ( not ( LoggedIn )) then Result := True;
if ( not (FindFishingEquipment )) then Result := True;
CheckFeathers;
end;

function FindFish : Boolean;
begin
if ( LoggedIn ) then Begin
Result:= False;
If ( FindMsDTM ( X, Y, FishSpotDTM )) then
MMouse ( x, y, 5, 5);
Result := Option2( FishingText );
Mouse ( X, Y, 5, 5, True );
end;
end;

procedure FindFishingSpot;
begin
if ( LoggedIn ) then Begin
if ( DoneFishing ) then Exit;
MarkTime ( Mark );
repeat
Status('Waiting Until Fishing Spot Appears');
Wait ( 300 + Random ( 300 ));
FindRandoms;
if ( DoneFishing ) then Exit;
if ( TimeFromMark ( Mark ) > 600000 ) then Logout;
until ( FindFish ) or ( DoneFishing );
end;
end;

//----------------------------------------------------------------------------//
// Banking Procedures
//----------------------------------------------------------------------------//
procedure WalkToBanker;
begin
if ( FindMMDtm ( X, Y, DB1 )) or ( FindMMDtm ( X, Y, DB2)) or ( FindMMDtm ( X, Y, DB3 )) then
Mouse ( x, y, 0, 0, True);
FFlag ( 10 );
end;

procedure WithdrawNet;
begin
if ( BankScreen ) and ( not ( FindInvDTM ( X, Y, NetDTM ))) then
begin
if ( FindMsDTM ( X, Y, NetDTM )) then Mouse ( x, y, 5, 5, True );
Wait ( 500 + Random ( 500 ));
CloseWindow;
end;
end;

procedure DepositFish;
var TempCounter,TempCount,ShrimpCount,AnchovyCount,Tro utCount,SalmonCount : Integer;
begin
if ( FindInvDTM ( X, Y, ShrimpDTM ) ) then begin
TempCount := InventoryCount;
Mouse (x, y, 5, 5, False);
Wait ( 250 + Random ( 100));
ChooseOption ( x, y, 'Store All' );
Wait ( 1000 + Random ( 400 ));
TempCounter := InventoryCount;
Shrimpcount := TempCount - TempCounter;
TotalShrimp := TotalShrimp + ShrimpCount;
Players[CurrentPlayer].Level[6] := Players[CurrentPlayer].Level[6] + ShrimpCount;
Status('Caught ' + IntToStr ( TotalShrimp ) + ' Shrimp[s] so far.');
end;
if ( FindInvDTM ( X, Y, AnchovieDTM ) ) then begin
TempCount := InventoryCount;
Mouse ( x, y, 5, 5, False );
Wait ( 250 + Random ( 100));
ChooseOption ( x, y, 'Store All' );
Wait ( 1000 + Random ( 400 ));
TempCounter := InventoryCount;
AnchovyCount := TempCount - TempCounter;
TotalAnchovies := TotalAnchovies + AnchovyCount;
Players[CurrentPlayer].Level[12] := Players[CurrentPlayer].Level[12] + AnchovyCount;
Status ('Caught ' + IntToStr ( TotalAnchovies ) + ' Anchovy[s] so far.');
end;
if ( FindInvDTM ( X, Y, SalmonDTM ) ) then begin
TempCount := InventoryCount;
Mouse (x, y, 5, 5, False);
ChooseOption ( x, y, 'Store All' );
TempCounter := InventoryCount;
Salmoncount := TempCount - TempCounter;
TotalSalmons := TotalSalmons + SalmonCount;
Players[CurrentPlayer].Level[2] := Players[CurrentPlayer].Level[2] + SalmonCount;
Status('Caught ' + IntToStr ( Players[CurrentPlayer].Level[2] ) + ' Salmon[s] so far.');
end;
if ( FindInvDTM ( X, Y, TroutDTM ) ) then begin
TempCount := InventoryCount;
Mouse ( x, y, 5, 5, False );
ChooseOption ( x, y, 'Store All' );
TempCounter := InventoryCount;
TroutCount := TempCount - TempCounter;
TotalTrouts := TotalTrouts + TroutCount;
Players[CurrentPlayer].Level[3] := Players[CurrentPlayer].Level[3] + TroutCount;
Status ('Caught ' + IntToStr ( Players[CurrentPlayer].Level[3] ) + ' Trout[s] so far.');
end;
end;

procedure WithdrawFeathers;
begin
if ( Players[CurrentPlayer].Skill = 'lure' ) then begin
if ( FindMsDTM ( X, Y, FeatherDTM ) ) then begin
Mouse ( x, y, 5, 5, False );
ChooseOption ( x, y, 'Withdraw X' );
repeat
Wait ( 100 );
if (not ( BankScreen )) then Exit;
until ( not ( GetColor ( 145, 434 ) = 0 ) );
Wait ( 150 + Random ( 100) );
TypeSend ( '27' + Chr ( 13 ) );
end;
end;
end;

//----------------------------------------------------------------------------//

Function SimpleBank:Boolean; // Stolen from Fawki's Lumby Miner
var sx,sy,dx,dy,Mark2,Tries:integer;
begin
SX:=MSCX-20; SY:=MSCY;
repeat
sx:=Sx-3;
sy:=sy-10+Random(10);
MMouse(sx, sy, 0, 0);
if IsUpTextMulti('e Bank','Booth','ooth') then
begin
GetMousePos(Dx, Dy);
Mouse(Dx, Dy, 0, 0, False);
if ChooseOption(Dx, Dy, 'uickly') then
begin
MarkTime(Mark2);
repeat
Wait(10);
if TimeFromMark(Mark2) > 20000 then
begin
writeln('couldnt find the bank. Exiting');
Exit;
end;
until BankScreen;
end;
Result := True;
Exit;
end;
wait(1);
Tries:=Tries+1;
until(tries >6)
end;

//----------------------------------------------------------------------------//

procedure Bank;
begin
WalkToBanker;
Flag;
MarkTime(Mark);
{ repeat
if not ( Loggedin ) then Exit;
if(TimeFromMark(Mark)>60000) then begin Logout; Exit; end;
OpenBank;
until (BankScreen);
}
if not SimpleBank then OpenBankQuiet ('db');

Flag;
Wait ( 500 + Random ( 500 ));
if ( BankScreen ) then begin
Players[CurrentPlayer].Loc :='At-Bank';
Status('Depositing Fishes');
DepositFish;
Deposit( 2, 28, 2);
if ( not ( FindInvDTM ( X, Y, NetDTM ))) then
begin
Deposit( 1, 28, 2);
WithdrawNet;
end;
Wait ( 1000 + Random ( 500 ));
WithdrawFeathers;
Players[CurrentPlayer].Banked := Players[CurrentPlayer].Banked + 1;
Banks := Banks + 1;
Trips := Trips + 1;
CloseWindow;
Gametab ( 2 );
Players[CurrentPlayer].Level[17] := GetSkillLevel ( 'fishing' );
if not ( FindFishingEquipmentColor ) then
begin
Writeln(Players[CurrentPlayer].Name + ' is Out of Nets');
Players[CurrentPlayer].Loc :='No-Nets';
Logout;
Exit;
end;
end else begin
Writeln(Players[CurrentPlayer].Name + ' is Lost to Bank Booth');
Players[CurrentPlayer].Loc :='Lost';
logout;
exit;
end;
end;

//----------------------------------------------------------------------------//
// Progress Reports
//----------------------------------------------------------------------------//

procedure PlayerStats;
var Active: string;
var I : Integer;
begin
WriteLn ('<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~>');
WriteLn (' Name : '+ Players[CurrentPlayer].Name);
WriteLn (' Number : '+ IntToStr (CurrentPlayer));
WriteLn (' Fishing Level : '+ IntToStr (Players[CurrentPlayer].Level[17]));
if (Players[CurrentPlayer].Level[17] > Players[CurrentPlayer].Level[1]) then
WriteLn (' Levels Gained : '+ IntToStr (Players[CurrentPlayer].Level[17] - Players[CurrentPlayer].Level[1]) );
if (Players[CurrentPlayer].Worked > 0 ) then
WriteLn (' Worked for : '+ IntToStr (Players[CurrentPlayer].Worked)+' minutes.');
WriteLn (' Banked : '+ IntToStr (Players[CurrentPlayer].Banked) + ' times.');
WriteLn (' Location : '+ Players[CurrentPlayer].loc);
if ( Players[CurrentPlayer].Level[6] > 0 ) then
WriteLn (' Shrimp Fished : '+ IntToStr ( Players[CurrentPlayer].Level[6] ));
if ( Players[CurrentPlayer].Level[12] > 0 ) then
WriteLn (' Anchovys Fished : '+ IntToStr ( Players[CurrentPlayer].Level[12] ));

if ( Players[CurrentPlayer].Level[2] > 0 ) then
WriteLn (' Salmon Fished : '+ IntToStr ( Players[CurrentPlayer].Level[2] ));

if ( Players[CurrentPlayer].Level[3] > 0 ) then
WriteLn (' Trout Fished : '+ IntToStr ( Players[CurrentPlayer].Level[3] ));
I := ( ( Players[CurrentPlayer].Level[12] * 40 ) + ( Players[CurrentPlayer].Level[6] * 10 ));
I := I + (( Players[CurrentPlayer].Level[3] * 50 ) + ( Players[CurrentPlayer].Level[2] * 70 ));
if ( I > 0 ) then
WriteLn (' Exp Gained : '+ IntToStr ( I ));

WriteLn ('<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~>');
for i := 0 to HowManyPlayers-1 do
begin
if Players[I].Active=True then Active := 'True' else Active := 'False';

WriteLn ( ( IntToStr ( I )) + ' : '+ Players[I].Name + ' = ' + Active + '. - Lvl : ' + IntToStr ( Players[I].Level[17])+
'. - B :'+IntToStr (Players[i].Banked)+' Times.'+
' - : '+IntToStr (Players[i].Worked)+' mins.'+' - Loc: '+Players[i].loc);
end;
WriteLn ('<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~>');
end;

procedure ProgressReport;
var TotalRandoms : Integer;
begin
WriteLn ('/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~\');
Writeln ('| Draynor Netter '+ Ver +' Progress Report --> by Dankness |');
Writeln ('<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~>');
WriteLn (' Worked for '+ TimeRunning);
WriteLn (' Banked '+IntToStr ( Banks ) + ' Total Loads[s].');
if ( TotalShrimp > 0 ) then
WriteLn (' Fished ' + InttoStr ( TotalShrimp ) + ' Total Shrimp[s] so far.');
if ( TotalAnchovies > 0 ) then
WriteLn (' Fished ' + InttoStr ( TotalAnchovies ) + ' Total Anchovie[s] so far.');
if ( TotalSalmons > 0 ) then
WriteLn (' Fished ' + InttoStr ( TotalSalmons ) + ' Total Salmon[s] so far.');
if ( TotalTrouts > 0 ) then
WriteLn (' Fished ' + InttoStr ( TotalTrouts ) + ' Total Trout[s] so far.');
TotalRandoms := ( TotalShrimp * 10 ) + ( TotalAnchovies * 40 ) + ( TotalTrouts * 50 ) + ( TotalSalmons * 70 );
WriteLn (' Gained Aprox. ' + Inttostr(TotalRandoms)+' Total XP so far.');
TotalRandoms := ( Fights + Talks + Lamps + Frogs + Certers + Whirlpools + Logs + Demons + NewBoxes + Trades );
if ( TotalRandoms > 0 ) then SRLRandomsReport;
PlayerStats;
end;

//----------------------------------------------------------------------------//
procedure CheckStuff;
var FishingItemText : String;
begin

Face ( 'N');
SetFishingStyle;
Gametab( 2 );

if Players[CurrentPlayer].Level[1] = 0 then Players[CurrentPlayer].Level[1]:=GetSkillLevel ('fishing');
Players[CurrentPlayer].Level[17] := GetSkillLevel ('fishing');

if ( Players[CurrentPlayer].Skill = 'lure' ) and ( Players[CurrentPlayer].Level[17] < 20 ) then
begin
WriteLn ( Players[CurrentPlayer].Name + ' Needs Atleast 20 Fishing to Fly Fish');
Logout;
Exit;
end;

Status ( 'Checking for Fishing Equipment');
GameTab ( 4 );

if ( FindInvDTM ( X, Y, NetDTM )) then
FindFishingEquipmentColor
else
Begin
if not SimpleBank then OpenBankQuiet ('db');
Wait ( 1500 + Random ( 500 ));
FixBank;
WithDrawNet;
if ( Players[CurrentPlayer].Skill = 'lure' ) then FishingItemText := 'Fly Fishing Rod';
if ( Players[CurrentPlayer].Skill = 'net' ) then FishingItemText := 'Small Fishing Net';
if ( FindInvDTM ( X, Y, NetDTM )) then
if (FindFishingEquipmentColor) then Exit;
Players[CurrentPlayer].Loc := 'Bank - No '+FishingItemText;
WriteLn ('Cant fish without a '+FishingItemText);
Logout;
Exit;
end;

if ( Players[CurrentPlayer].Skill = 'lure' ) and
( not ( FindInvDTM ( X, Y, FeatherDTM ))) then
begin
if not SimpleBank then OpenBankQuiet ('db');
Wait ( 1500 + Random ( 500 ));
FixBank;
WithDrawFeathers;
Wait ( 500 + Random ( 1000 ));
if ( FindInvDTM ( X, Y, FeatherDTM )) then Exit;
Players[CurrentPlayer].Loc := 'Bank - No Feathers';
WriteLn ('Cant fish without a Feathers');
Logout;
Exit;

end;
end;

//----------------------------------------------------------------------------//
// Main Loop
//----------------------------------------------------------------------------//
procedure SetUp;
begin
SetUpSRL;
LoadSRLFishingBitMaps;
SetUpVars;
FishingItemDTM[1] := DTMFromString('78DA63F466626078C680021C0C341844803 42' +
'394CF180654F398010D30A2AA7107AAB94B408D0350CD0B54 1509' +
'014EA86AFC806A5EA3AA0970B0405103002E1A08BC');
Intro;
LoadDtms;
FileName := 'Fishing';
if ( UseGUI) then
SetupPlayers
else
LoadUS;
NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars); // Screenname for FIRST Player in case of already loggedin.
SetColorsHere;
MarkTime ( CalibrateTimer );
end;


begin
SetUp;
LoginPlayer;
SetColorsIfNeeded;
repeat
CheckStuff;

if ( LoggedIn ) then
if WeAreAtBank then WalkToFish;

FindRandoms;

repeat
if ( DoneFishing ) then Break;
FindFishingSpot;
MarkTime ( Mark );
if ( DoneFishing ) then Break;

repeat
FindRandoms;
if ( DoneFishing ) then Break;
Status( 'Fishing' );
if ( DoneFishing ) then Break;
Wait ( 500 + Random ( 1000 ));
HandleWhirlPool;
until ( TimeFromMark ( Mark ) > FishingWaitTime + Random ( FishingWaitTime / 2 ));

if ( not( LoggedIn )) then Break;
Wait ( 500 + Random ( 500 ));

until ( DoneFishing );

if ( LoggedIn ) then
if WeAreAtFish then WalktoBank;

if ( LoggedIn ) then
Bank;

ProgressReport;
if ( Trips >= TripsToDo + Random ( 3 ) + 1) then begin
Status ( Players[CurrentPlayer].Name + ' has Completed '+IntToStr ( Trips ) + ' Trips Now Switching Players.');
repeat
Wait ( 1000 );
FindRandoms;
until ( not ( LoggedIn ));
Trips := 0;
NextPlayer ( true );
repeat
Wait ( 2000 );
until ( LoggedIn );
end;

if ( not ( LoggedIn )) then NextPlayer ( False );
until ( False);

end.


{-----> Version History <------
--> v1.25 --> ???????? --> First Public Release
--> v1.50 --> 03.29.06 --> Major Rewrite of 90% of Procedures
Added Check for Net After Bank
Fixed Bug with Not Banking after FullInventory
Added Skill Level Counters to Progress Report
Added Masquraders PlayerForm
Added Total Shrimp,Anchovy Counter and Exp Gained to Report
--> v2.00 --> 04.02.06 --> Added Lure Fishing in Lumbridge and Many Many Things
Should be 95% Bug Free Now
--> v2.10 --> 04.15.06 --> Fixed some of the Bugs with Lumbridge Walking
--> v2.25 --> 04.25.06 --> Now Compatble with SRL 1.1
Fixed Some Bugs Fawki Found.
--> v2.50 --> 05.21.06 --> Updated for Compatablity with SRL 2.1
Lumbridge Lurer will probably not work with new RS Color Update
--> v2.51 --> 05.22.06 --> Fixed Problem with Net DTM Not Functioning
Fixed Problem with not Finding fishing Spot
Fixed Problem with BoredHuman running to often
--> v2.55 --> 05.29.06 --> Updated for Compatablity with SRL 2.2
Fixed Banking Bug with Fawki's Updated SimpleBank and OpenBankQuiet
Updated Lumbridge Luring Pathing with Fawki's RadialRoadWalk should fix the Lumbridge Pathing Problems?
}
Dankness' script ^^

Tryed setting colors myself, the identifier I didnt show up but now its...

Line 290: [Error] (18778:1): Unknown identifier 'Face' in script
in the procedure "Walklumbridgefishtodraynor" but the prob is im not gonna be fishing in lumby, just shrimp...:P

Ramage
03-27-2007, 04:14 AM
If I recall... you should add another include : {.include SRL\SRL\extended\xMapWalk}
So the procedure 'Face' will work.

ammo2006
03-27-2007, 05:10 AM
Well, it worked. But now when it loggs in, for username it types username and for password, i thinks its typing password.
I thought a form or w\e was suppost to come up to put char names in.