SRL Archive - Archive

jimmy_mac - SRL Member Application


jimmy_mac

2009-12-10 08:05:59

How Long have You Played Runescape?
2 Year(s)


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?



What is your general programming knowledge?
I know a bit of php, actionscript, html thats about it.


Are you a member of any other communities?
No


Tell us about yourself…
From: jimmy_mac
My names jimmy,
i like goin out n socialising and in my spare time play on the computer or xbox. fairly laid back n chilled. Loving scriptin. :)



Please show us one (or multiple) of your scripts.
{==============================================================================]
[ DRAYNOR FISH 'N' BANK v1.4 ]
[==============================================================================]
[ ]
[ Written By: jimmy_mac ]
[ ]
[==============================================================================]
[ Instructions. ]
[==============================================================================]
[ ]
[ 1. Fill in Declare Players (lines 22 - 82). ]
[ 2. Have either 'net' or 'rod and bait' in inventory. ]
[ 3. Start in Draynor Bank or at Fishing Spot. ]
[ ]
[==============================================================================}

program DraynorFishNBank;
{.include SRL/SRL/Misc/SMART.scar}
{.include srl/srl.scar}
{.include srl/srl/skill/fishing.scar}

procedure DeclarePlayers;
begin
HowManyPlayers := 1; //Total Number of Players.
CurrentPlayer := 0; //Starting Player.
NumberOfPlayers(HowManyPlayers);

Players[0].Name :=''; //Username.
Players[0].Pass :=''; //Password.
Players[0].Nick :=''; //Nickname. (4 Letters of your username)
Players[0].Active := True; //Is the player active?
Players[0].Pin := ''; //Leave blank if you dont have one.
Players[0].Booleans[0] := True; //Clear the Debug?
Players[0].Integers[0] := 10; //Amount of Levels Gained, Change to zero if you want
//to stop once its banked a certain amount of 'loads'.
Players[0].Integers[1] := 0; //Amount of Loads you want Banked, Change to zero if
//you want to stop once gained a certain amount of 'levels'.
Players[0].Integers[2] := 13; //Maximum time (in seconds) before catching a fish.

{
Players[1].Name :=''; //Username.
Players[1].Pass :=''; //Password.
Players[1].Nick :=''; //Nickname. (4 Letters of your username)
Players[1].Active := True; //Is the player active?
Players[1].Pin := ''; //Leave blank if you dont have one.
Players[1].Booleans[0] := True; //Clear the Debug?
Players[1].Integers[0] := 5; //Amount of Levels Gained, Change to zero if you want
//to stop once its banked a certain amount of 'loads'.
Players[1].Integers[1] := 0; //Amount of Loads you want Banked, Change to zero if
//you want to stop once gained a certain amount of 'levels'.
Players[1].Integers[2] := 13; //Maximum time (in seconds) before catching a fish.


Players[2].Name :=''; //Username.
Players[2].Pass :=''; //Password.
Players[2].Nick :=''; //Nickname. (4 Letters of your username)
Players[2].Active := True; //Is the player active?
Players[2].Pin := ''; //Leave blank if you dont have one.
Players[2].Booleans[0] := True; //Clear the Debug?
Players[2].Integers[0] := 5; //Amount of Levels Gained, Change to zero if you want
//to stop once its banked a certain amount of 'loads'.
Players[2].Integers[1] := 0; //Amount of Loads you want Banked, Change to zero if
//you want to stop once gained a certain amount of 'levels'.
Players[2].Integers[2] := 13; //Maximum time (in seconds) before catching a fish.


Players[0].Name :=''; //Username.
Players[0].Pass :=''; //Password.
Players[3].Nick :=''; //Nickname. (4 Letters of your username)
Players[3].Active := True; //Is the player active?
Players[3].Pin := ''; //Leave blank if you dont have one.
Players[3].Booleans[0] := True; //Clear the Debug?
Players[3].Integers[0] := 5; //Amount of Levels Gained, Change to zero if you want
//to stop once its banked a certain amount of 'loads'.
Players[3].Integers[1] := 0; //Amount of Loads you want Banked, Change to zero if
//you want to stop once gained a certain amount of 'levels'.
Players[3].Integers[2] := 13; //Maximum time (in seconds) before catching a fish.

}
end;
{******************************************************************************}
{* YOU DON'T NEED TO EDIT BELOW HERE *}
{******************************************************************************}

const WriteToDebug = False; //See debug info. (For Dev)

var
Net, Rod, Shrimp, Anchovie, Sardine, Herring, Bait: Integer;
FindFishAttempts, FishingMax, PlainWater, myFile : Integer;
StillFishing : Boolean;
Method, MethodChoose, Completed: String;
CatchColor: Array of Integer;

function CompassInt:Integer;
begin
result := round(rs_GetCompassAngleDegrees);
end;

procedure Debug(text:String);
begin
if WriteToDebug then writeln(text);
end;

procedure MakePlayerInactive;
begin
if PlayersActive <= 1 then
begin
Writeln('Last player left, logging out.');
Players[CurrentPlayer].Active := False;
Logout;
end else NextPlayer(False);
end;

function RadialWalkTolWait(TheColor, Tol: Integer; StartRadial, EndRadial: Integer; Radius: Integer; Xmod, Ymod: Integer; waitTime:integer; flagDist:Integer): Boolean;
var
tpa : TPointArray;
i : Integer;
begin
Result := False;
StartRadial := StartRadial + (360 - CompassInt);
EndRadial := EndRadial + (360 - CompassInt);
if RadialWalkEx(tpa, MMCX, MMCY, TheColor, Tol, StartRadial, EndRadial, Radius) then
for i := 0 to High(tpa) do
if MFNF(tpa[i].x, tpa[i].y, Xmod, Ymod) then
begin
wait(waitTime*1000);
FFlag(flagDist);
Result := True;
Break;
end;
end;

Procedure LoadDTMs;
begin
Shrimp := DTMFromString('78DA63CC67626078CD800236D6A7307001694' +
'620FE0F048CD940357719D00013986484F218AB80FC8704D46463' +
'DA85A12616C87F4484391F09A84904F2DFE0570300041E0EFE');
Anchovie := DTMFromString('78DA63CC67626078CD8002CACB6B18B880342' +
'310FF0702C66CA09ABB0C6880094C3242798C5540FE43026AB231' +
'EDC250130BE43F22C29C8F04D42402F96FF0AB0100DDD70ED4');
Sardine := DTMFromString('78DA637462606058C2800212D62432B003694' +
'620FE0F048CEE40C62C0634C0042619A13C464F20318F801A3F20' +
'319F801A3B20B182801A1B20B194801A6720B18C801A90DF97E35' +
'70300FC570CC3');
Herring := DTMFromString('78DA63B4676260E0616440061B56AE60E007D' +
'220D1FF40C0E80A54C38AAA868181094CC244193D807C4E026A7C' +
'807C36026ACC8830C704C81720A0C619C8E727A0C616C817C2AF0' +
'600B6A6089F');
Net := DTMFromString('78DA639CCEC4C0F084010518A9CB30B003694' +
'620FE0F048CF3816A6E33A0012630C908E5312E01F2EF1350B310' +
'C87F4B404D2F90FF92809A1E20FF0101355380FC9BF8D50000A43' +
'10EF6');
Rod := DTMFromString('78DA637460626078CE8002221C7818D881342' +
'310FF0702465FA09AAB0C6880094C3242798C4E40FE5D026AAC81' +
'FCA704D49801F9AF08A8B107F23FE1570300A89F0BA3');
Bait := DTMFromString('78DA63CC60626078CE8002D6D54930B003694' +
'620FE0F048C594035B719D00013986484F2181380FC3704D41401' +
'F96F09A829C0740F869A6A20FF197E3500A5FA0D61');
end;

Procedure FreeDTMs;
begin
FreeDTM(Shrimp);
FreeDTM(Anchovie);
FreeDTM(Sardine);
FreeDTM(Herring);
FreeDTM(Net);
FreeDTM(Rod);
FreeDTM(Bait);
end;

Procedure Bitmaps;
begin
PlainWater := BitmapFromString(24, 23, 'beNqbNL9r0igaRaN' +
'oFI2iUUQvBAAzoLtm');
end;

Procedure Antiban; //Credits to Ultra for a couple of these. :)
var x, y: Integer;
begin
case random(120)+1 of
1: MMouse(Random(500), Random(500), Random(500), Random(500));
2: SleepAndMoveMouse(random(5000));
3: IdleTime(Random(5000), 2, 5.2);
4: PickUpMouse;
5: RandomRClick;
6: if MouseSpeed < 15 then
IncEx(MouseSpeed, Random(5))
else
DecEx(MouseSpeed, Random(5));
7: begin
GetMousePos(x, y);
MMouse(x, y, 100, 100);
end;
8: BoredHuman;
end;
end;

Function Walk(where: String):Boolean;
begin
if not loggedin then exit;
case where of
'water': if RadialWalkTolWait(FindWaterColor, 5, 200, 215, 75, -5, 5, 4, 30) then Result := True else Result:=False;
'bank': if RadialWalkTolWait(3355960, 18, 10, 50, 67, 1, 1, 0, 5) then Result := True else Result:=False;
end;
end;

Procedure ProgressReport;
var
MultiplyBy : Integer;
LevelText : String;
begin
if Players[CurrentPlayer].Integers[3] > 0 then
begin
myFile := RewriteFile('C:\Windows\Temp\DFNB_temp.txt',false);
if Method = 'net' then MultiplyBy := 27 else MultiplyBy := 26;
WriteFileString(myFile, '....................DRAYNOR FISH N BANK....................'+chr(13));
WriteFileString(myFile, PadR(':', 58) + ':'+chr(13));
WriteFileString(myFile, PadR(': Player: ' + Players[CurrentPlayer].Name, 58) + ':'+chr(13));
WriteFileString(myFile, PadR(': Total Loads Done: ' + IntToStr(Players[CurrentPlayer].Integers[3]) + '. That''s ' + IntToStr(Players[CurrentPlayer].Integers[3]*MultiplyBy) + ' Fish!', 58) + ':'+chr(13));
WriteFileString(myFile, PadR(': Unless you have extra items in your inv. ;)', 58) + ':'+chr(13));
if Players[CurrentPlayer].Integers[4] = 1 then LevelText:='level';
if Players[CurrentPlayer].Integers[4] = 0 then LevelText:='levels';
if Players[CurrentPlayer].Integers[4] > 1 then LevelText:='levels';
WriteFileString(myFile, PadR(': You have gained ' + IntToStr(Players[CurrentPlayer].Integers[4]) + ' ' + LevelText + ' on this player.', 58) + ':'+chr(13));
WriteFileString(myFile, PadR(':' + Completed, 58) + ':'+chr(13));
WriteFileString(myFile, PadR(':', 58) + ':'+chr(13));
WriteFileString(myFile, '...........................................................'+chr(13));
WriteFileString(myFile, ': By jimmy_mac :'+chr(13));
WriteFileString(myFile, '...........................................................'+chr(13)+chr(13));
end;
end;

Procedure LogToDebug;
var
text : string;
begin
CloseFile(myFile);
myFile := OpenFile('C:\Windows\Temp\DFNB_temp.txt',false);
ReadFileString(myFile, text, fileSize(myFile));
writeln(text);
CloseFile(myFile);
end;

procedure CatchColors;
var
DTMx, DTMy, i, b : Integer;
DTMArray: TVariantArray;
begin
LoadDTMs;
i := 0;
SetArrayLength(CatchColor, i+1);
SetArrayLength(DTMArray, 4);
DTMArray := [Shrimp, Anchovie, Sardine, Herring];
for b := 0 to High(DTMArray) do
if FindDTM(DTMArray[b], DTMx, DTMy, MIX1, MIY1, MIX2, MIY2) then
begin
SetArrayLength(CatchColor, i+1);
CatchColor[i] := GetColor(DTMx, DTMy);
i:= i+1;
end;
FreeDTMs;
end;

Function FindEquipment:Boolean;
var
X, Y : Integer;
begin
LoadDTMs;
if FindDTM(Net, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
Method := 'net';
MethodChoose := 'et';
Result := True;
end else
if FindDTM(Rod, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
if FindDTM(Bait, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
Method := 'rod';
MethodChoose := 'ait Fis';
Result := True;
end else Debug('Found rod, but no bait. :(');
end else
begin
Debug('Equipment Not Found!');
Logout;
MakePlayerInactive;
Result := False;
end;
FreeDTMs;
end;

Function MiniMap2MainScreen(x, y : Integer) : TPoint;
begin
if InRange(x, 600, 652) and InRange(y, 68, 102) then
begin
result.x := round((x - 599) * 9.846153);
result.y := round((y - 67) * 9.823529);
end;
end;

Function FindTheFishSpot: Boolean;
var
x, y, FSx, FSy, Margin : Integer;
FS_TPoint : TPoint;
begin
Margin := 0;
Repeat
Margin := Margin + 50;
if FindSymbol(FSx, FSy, 'fish') then FS_TPoint := MiniMap2MainScreen(FSx, FSy) else
begin
Debug('Couldn''t find the fishing symbol.');
Result := False;
ProgressReport;
MakePlayerInactive;
Exit;
end;
if FindColorSpiralTolerance(x, y, 11840937, FS_TPoint.x - Margin, FS_TPoint.y - Margin, FS_TPoint.x + Margin, FS_TPoint.y + Margin, 12) then
begin
MMouse(x, y, 2, 2);
wait(100 + random(300));
case random(4)+1 of //I prefer like this because this is how I would do it if I was playing.
1..3: mouse(x, y, 1, 1, true);
4: begin
Mouse(x, y, 1, 1, false);
wait(300 + random(300));
ChooseOption(MethodChoose);
end;
end;
FindFishAttempts := 0;
Result:=True;
wait(1000 + random(500));
exit;
end;
until(Margin >= 150);
Inc(FindFishAttempts);
Result:=False;
end;

Procedure ClearVars;
var
i : Integer;
begin
for i := 0 to HowManyPlayers - 1 do
begin
Players[i].Integers[3] := 0;
Players[i].Integers[4] := 0;
if Players[i].Integers[0] = 0 then Players[i].Integers[0] := 100000000; //Random High Number.
if Players[i].Integers[1] = 0 then Players[i].Integers[1] := 100000000; //Random High Number.
end;
end;

Procedure Setup;
begin
SetupSRL;
wait(500);
DeclarePlayers;
if (not (loggedIn)) then LoginPlayer;
SymbolAccuracy := 0.4;
ClearVars;
end;

procedure WalkingToTheFish;
var
MMx, MMy : Integer;
begin
if not loggedin then exit;
if InvFull then exit;
FindNormalRandoms;
Setrun(true);
if FindSymbol(MMx, MMy, 'fish') then
begin
Status('Found Fish Symbol. Walking to It.');
Mouse(MMx, MMy, 5, 5, true);
wait(2500+random(1000));
FFlag(1);
end else
if Walk('water') then
begin
Status('Found Fishing Spot. Walking to It.');
if FindSymbol(MMx, MMy, 'fish') then Mouse(MMx, MMy, 5, 5, true);
end else
begin
Debug('Couldn''t walk to Fishing Spot. Exiting');
logout;
ProgressReport;
MakePlayerInactive;
end;
end;

Function InactiveWater:Boolean;
var
a, i, x, y : Integer;
begin
Bitmaps;
for i := 0 to 3 do
begin
if FindBitmapToleranceIn(PlainWater, x, y, 205, 173, 230, 198, 6) then
begin
inc(a);
wait(150);
end else wait(150);
end;
FreeBitmap(PlainWater);
if a >= 4 then
begin
Debug('Found Inactive water.');
Result := True;
end else
begin
Debug('Found Active water.');
Result := False;
end;
end;

procedure Fishing;
var
MMx, MMy, FishingStart, LastInvCount : Integer;
begin
FindFishAttempts := 0;
FishingMax := Players[CurrentPlayer].Integers[2]*1000;
StillFishing := False;
Status('Fishing');
Repeat
if InRange(compassInt, 5, 355) then makeCompass(355 + random(10));
if not loggedin then exit;
SetAngle(True);
if LevelUp then
begin
Inc(Players[CurrentPlayer].Integers[4]);
if Players[CurrentPlayer].Integers[4] >= Players[CurrentPlayer].Integers[0] then
begin
Completed := 'Gained set amount of levels for this player.';
Debug(Completed);
Logout;
ProgressReport;
MakePlayerInactive;
exit;
end;
end;
FindNormalRandoms;
if FindWhirlPoolMS then
begin
debug('Found Whirlpool');
HandleWhirlPool;
end;
GameTab(tab_Inv);
Debug('Running Antiban');
Antiban;
if not loggedin then exit;
if FindFishAttempts >= 5 then
begin
if not loggedin then exit;
Debug('Couldn''t find a spot to fish :(');
Logout;
MakePlayerInactive;
exit;
end;
if not FindEquipment then
begin
if not loggedin then exit;
Debug('Couldn''t Find Equipment in Inventory :(');
Logout;
ProgressReport;
MakePlayerInactive;
exit;
end;
if InvFull then Exit;
if not StillFishing then
begin
if InvFull then Exit;
if FindTheFishSpot then
begin
if not loggedin then exit;
Debug('Found a spot to fish.');
StillFishing := True;
MarkTime(FishingStart);
LastInvCount := InvCount;
if InvFull then Exit;
end else
begin
if not loggedin then exit;
if FindSymbol(MMx, MMy, 'fish') then Mouse(MMx, MMy, 5,5, true);
fflag(1);
Debug('Couldn''t find a spot to fish. Walking to fish symbol to try again.');
LastInvCount := InvCount;
wait(1500 + random(500));
FindFishAttempts := FindFishAttempts + 1;
MarkTime(FishingStart);
end;
end;
if InactiveWater then
begin
if not loggedin then exit;
if InvFull then Exit;
StillFishing := False;
LastInvCount := InvCount;
end;
if InvCount > LastInvCount then
begin
if not loggedin then exit;
if InvFull then Exit;
Debug('Caught a fish.');
LastInvCount := InvCount;
MarkTime(FishingStart);
StillFishing := True;
end;
if (TimeFromMark(FishingStart)>=FishingMax) then
begin
if not loggedin then exit;
if InvFull then Exit;
Debug('Havn''t caught a fish in ' + IntToStr(FishingMax)+ ' seconds');
StillFishing := False;
LastInvCount := InvCount;
end;
until(not LoggedIn or InvFull);
end;

procedure WalkingToTheBank;
var
MMx, MMy : Integer;
begin
if not loggedin then exit;
FindNormalRandoms;
Setrun(true);
if FindSymbol(MMx, MMy, 'bank') then
begin
Status('Found Bank Symbol. Walking to It.');
Debug('Found Bank Symbol. Walking to It.');
Mouse(MMx, MMy, 5, 5, true);
FFlag(8);
wait(200 + random(300));
end else
if Walk('bank') then Status('Found Bank Symbol. Walking to It.') else
begin
Debug('Couldn''t walk to Bank. Exiting');
logout;
ProgressReport;
MakePlayerInactive;
end;
end;

Procedure Banking;
var
ColorsFound, i, b, x, y, BankX, BankY : Integer;
Bank : TPoint;
begin
if not loggedin then exit;
FindNormalRandoms;
Status('Banking');
b := 0;
if random(5) = 0 then Antiban;
SetAngle(True);
repeat
if not OpenBankFast('db') then
if not OpenBank('db', False, False) then
if not OpenBankQuiet('db') then
if not OpenBankNPC then
if not OpenBankGlass('db', False, False) then
begin
Debug('Couldn''t open bank, changing location, retrying.');
if FindColorTolerance(BankX, BankY, 3355960, 602, 68, 652, 99, 18) then
begin
Bank := MiniMap2MainScreen(BankX, BankY);
Mouse(Bank.x, Bank.y, 5, 5, true);
FFlag(5);
end;
end;
inc(b);
wait(200+random(150));
until((b >= 5) or BankScreen or PinScreen);
if PinScreen then
begin
Debug('Found Pin Screen Inputting PIN.');
InPin(Players[CurrentPlayer].Pin);
wait(400+random(300));
end;
if BankScreen then
begin
Debug('Found Bank Screen.');
CatchColors;
ColorsFound := GetArrayLength(CatchColor);
if ColorsFound = 0 then
begin
Debug('Array has no colors');
Logout;
ProgressReport;
MakePlayerInactive;
Exit;
end;
if not loggedin then exit;
if random(2) = 0 then swap(CatchColor[0],CatchColor[1]); //So it doesnt always click on the shrimps first.
for i:=0 to ColorsFound-1 do
If findcolortolerance(x, y, CatchColor[i], MIX1, MIY1, MIX2, MIY2, 5) then
begin
Debug('Depositing Fish');
Mouse(x, y, 4, 4, false);
wait(50+random(100));
ChooseOption('osit-All');
wait(500+random(400));
Players[CurrentPlayer].Integers[3] := Players[CurrentPlayer].Integers[3] + 1;
if (Players[CurrentPlayer].Integers[3] >= Players[CurrentPlayer].Integers[1]) then
begin
Completed := 'Banked the set amount of loads for this player.';
Debug(Completed);
Logout;
ProgressReport;
MakePlayerInactive;
end;
end;
case random(3)+1 of
1: CloseBank;
end;
end else
begin
if not loggedin then exit;
Debug('Couldn''t open bank screen');
Logout;
ProgressReport;
MakePlayerInactive;
end;
end;


begin
Setup;
Repeat
WalkingToTheFish;
Fishing;
WalkingToTheBank;
Banking;
until(AllPlayersInactive);
LogToDebug;
end.

Baked0420

2009-12-10 08:13:21

You left your password in the script, I've changed it for you, I'll send a PM with the new password. Then I'll look over the script and tell you what I think in an edit.

EDIT:

-In your antiban, I like the if(mouseSpeed > 15) one, pretty creative.

-In:


function CompassInt:Integer;
begin
CompassExt := rs_GetCompassAngleDegrees;
result := round(compassExt);
end;

you can shorten it to:



function CompassInt:Integer;
begin ;
result := round(rs_GetCompassAngleDegrees);
end;

- You don't need to use case Path of in Walk because the only option is 1, you don't even need an if/else, you can just assume it's going to be 1 since it's the only choice. Also, you have:


if where = 'water' then
begin
//statements
end;
if where = 'bank' then
begin
//statements
end;

you can do


if where = 'water' then
begin
//statements
end else
begin
//statements
end;

since the only other option has to be bank.

So you could take out the parameter path, and you could change it from an if then, if then, to an if/else to shorten coding.

And the way you did it, you didn't need a begin/end after your two if/thens since it's only one line in the if/then, the line that says case path of. (technically there's two lines, cause you have the case path of and 1: if Radial… but the case path of had it's own begin/end (except you don't write the begin obviously lol) for the 1: if Radial… so it's like one line after the if where= 'bank') then)

- You need to work on your standards a bit, in the procedure WalkingToTheFish you have case of end all on one line, it's easier to read when you have case of on one line, 1: on the next, and end; lined up with the word case.

- I don't get why you call SetTargetDC(SMARTGetDC); first in the script, smart loads in SetUpSrl; I would've called it after that, but you don't even need to, just calling SetUpSrl and including Smart is all you need to do, but the script still works, no errors so I guess it's fine lol.

- Not sure, but I think your progress report can be wrong, it takes the loads and multiplies it by 27 to tell you how many fish you caught, but you have a DTM for bait, so if you have a fishing equipment and bait it should be * 26, but that's not much of a big deal anyway, it won't affect how efficient the script runs.

The script isn't the best app I've seen, but it's not the worse either. I guess I'll vote yes, since it's pretty decent. I don't see any big flaws after looking over it once.

And don't take anything I said harshly, it was all meant to be constructive criticism.

WT-Fakawi

2009-12-10 08:43:25

I have removed the passes from your script.Take care next time! Luckily you can trust Baked. :)

EDIT: Good enough for me…. but my standards are rather poor :)

jimmy_mac

2009-12-10 08:56:00

thanks guys :)
I don't know if your saying that its poorly made or not.
If you are. Can you let me know which parts, or if its just in general?

Kyle Undefined

2009-12-10 09:09:58

Hey WT!

Anyway, jimmy, not a bad script at all. You just need to work on your standards for the most part. Take your Antiban procedure for example, it's a good procedure but needs to be written a little better. Like this

Procedure Antiban;
var // This isn't required to do it like this, it just looks better, but that's just me
x, y: Integer;
begin // Always two indents after a Begin
case random(250)+1 of // Same thing with a Case statement
0: MMouse(Random(500), Random(500), Random(500), Random(500));
1: SleepAndMoveMouse(random(5000));
2: IdleTime(Random(5000), 2, 5.2);
3: PickUpMouse;
4: RandomRClick;
5: // Indenting it like this during a case statement makes it easier to read
if(MouseSpeed < 15)then
IncEx(MouseSpeed, Random(5))
else
DecEx(MouseSpeed, Random(5));
6:
begin
MMouse(Random(500), Random(500), Random(500), Random(500));
Wait(800 + Random(1000));
if(IsUpText('xamine'))then // It's not required but containing the if...then condition in parenthasis is a good practice
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
Wait(200 + Random(100));
ChooseOption('xamine');
end;
end;
end;
end;

It's just things like the above that I can see that needs to be improved on. Good job :)

~Camo

cycrosism

2009-12-10 09:30:05

Looks good enough to me. Voted yes

jimmy_mac

2009-12-10 09:33:13

thanks for all the tips :) . I don't want to take credit for something I didn't come up with. Most of the antiban is from ultras 'ultramate fisher'. Sorry for not writing credits on it I was going to but the forgot all about it. So I guess I wasn't that creative after all :P. Thanks again guys.. I'll go over the script tomorrow and fix according to your advice. :)

Main

2009-12-10 09:49:02

yes

Baked0420

2009-12-10 09:50:37

Is the antiban the only thing you took from other people's scripts? Or do you have other copied stuff also?

Sir R. M8gic1an

2009-12-10 11:38:15

Had a quick look, and I see lots of potential. Good job.

~RM

Bionicle

2009-12-10 16:20:44

Cons

1) you need to work on your standards a bit, here is your Banking procedure
Procedure Banking;
var ColorsFound, i, x, y:Integer;
begin
if not loggedin then exit;
Writeln('Banking :)');
SetAngle(True);
if not OpenBankFast('db') then
begin
walk('bank',1);
fflag(1);
OpenBankFast('db');
end;
if PinScreen then InPin(Players[CurrentPlayer].Pin);
if BankScreen then
begin
CatchColors;
ColorsFound := GetArrayLength(CatchColor);
if ColorsFound = 0 then begin writeln('Array has no colors'); Logout; NextPlayer(False); exit; end;
for i:=0 to ColorsFound-1 do
If findcolortolerance(x, y, CatchColor[i], MIX1, MIY1, MIX2, MIY2, 5) then
begin
Mouse(x, y, 4, 4, false);
ChooseOption('osit-All');
Players[CurrentPlayer].Integers[0] := Players[CurrentPlayer].Integers[0] + 1;
if (Players[CurrentPlayer].Integers[0] >= LoadsToDo) then begin Writeln('Finished set amount of Loads for this player.'); Logout; NextPlayer(False); end;
end;
case random(3)+1 of
1: CloseBank;
end;
end else begin Logout; NextPlayer(False); Writeln('Couldn''t open bank screen'); end;
end;
That is what you have. Here is what it would look using better standards:
Procedure Banking;

var
ColorsFound, i, x, y: Integer;

begin
if not loggedin then exit;
begin
Writeln('Banking :)');
SetAngle(True);
end;
if not OpenBankFast('db') then
begin
walk('bank',1);
fflag(1);
OpenBankFast('db');
end;
if PinScreen then InPin(Players[CurrentPlayer].Pin);
if BankScreen then
begin
CatchColors;
ColorsFound := GetArrayLength(CatchColor);
if ColorsFound = 0 then
begin
writeln('Array has no colors');
Logout;
NextPlayer(False);
exit;
end;
for i:=0 to ColorsFound-1 do
If findcolortolerance(x, y, CatchColor[i], MIX1, MIY1, MIX2, MIY2, 5) then
begin
Mouse(x, y, 4, 4, false);
ChooseOption('osit-All');
Players[CurrentPlayer].Integers[0] := Players[CurrentPlayer].Integers[0] + 1;
if (Players[CurrentPlayer].Integers[0] >= LoadsToDo) then
begin
Writeln('Finished set amount of Loads for this player.');
Logout;
NextPlayer(False);
end;
end;
case random(3)+1 of
1: CloseBank;
end;
end else
begin
Logout;
NextPlayer(False);
Writeln('Couldn''t open bank screen');
end;
end;
Look over that, and try to improve please :).

2)
       if method = 'net' then
begin
case random(3)+1 of
1,2: mouse(FSx, FSy, 5, 5, true);
3: begin
Mouse(FSx, FSy, 5, 5, false);
ChooseOption(MethodChoose);
end;
end;
why not:
       if method = 'net' then
begin
case random(2)+1 of
1: mouse(FSx, FSy, 5, 5, true);
2: begin
Mouse(FSx, FSy, 5, 5, false);
ChooseOption(MethodChoose);
end;
end;
instead? What's the point?

3) Your const could be put in your declare players, for simplicity sake:
what you have:
const
LoadsToDo = 10; //Amount of loads you want banked.
SecondsPerFish = 15; //Maximum time (in seconds) before catching a fish.
//Make sure this is pretty accurate. Or else the script
//may not function optimally.
ClearTheDebug = True; //Do you want the debug cleared?

procedure DeclarePlayers;
begin
HowManyPlayers := 1; //Total Number of Autoers.
CurrentPlayer := 0; //Starting Player.
NumberOfPlayers(HowManyPlayers);

Players[0].Name :='';//Username.
Players[0].Pass :='';//Password.
Players[0].Nick :='';//Nickname. (4 Letters of your username)
Players[0].Active := True;
Players[0].Pin := ''; //Leave blank if you dont have one.
{
Players[1].Name :='';//Username.
Players[1].Pass :='';//Password.
Players[1].Nick :='';//Nickname. (4 Letters of your username)
Players[1].Active := True;
Players[1].Pin := ''; //Leave blank if you dont have one.

Players[2].Name :='';//Username.
Players[2].Pass :='';//Password.
Players[2].Nick :='';//Nickname. (4 Letters of your username)
Players[2].Active := True;
Players[2].Pin := ''; //Leave blank if you dont have one.

Players[3].Name :='';//Username.
Players[3].Pass :='';//Password.
Players[3].Nick :='';//Nickname. (4 Letters of your username)
Players[3].Active := True;
Players[3].Pin := '';//Leave blank if you dont have one.
}
end;
what it could be:
procedure DeclarePlayers;
begin
HowManyPlayers := 1; //Total Number of Autoers.
CurrentPlayer := 0; //Starting Player.
NumberOfPlayers(HowManyPlayers);

Players[0].Name :='';//Username.
Players[0].Pass :='';//Password.
Players[0].Nick :='';//Nickname. (4 Letters of your username)
Players[0].Active := True;
Players[0].Pin := ''; //Leave blank if you dont have one.
Integers[0] := 10; //Amount of loads you want banked.
Integers[1] := 15; //Maximum time (in seconds) before catching a fish.
//Make sure this is pretty accurate. Or else the script
//may not function optimally.
Booleans[0] := True; //Do you want the debug cleared?
{
Players[1].Name :='';//Username.
Players[1].Pass :='';//Password.
Players[1].Nick :='';//Nickname. (4 Letters of your username)
Players[1].Active := True;
Players[1].Pin := ''; //Leave blank if you dont have one.
Integers[0] := 10; //Amount of loads you want banked.
Integers[1] := 15; //Maximum time (in seconds) before catching a fish.
//Make sure this is pretty accurate. Or else the script
//may not function optimally.
Booleans[0] := True; //Do you want the debug cleared?

Players[2].Name :='';//Username.
Players[2].Pass :='';//Password.
Players[2].Nick :='';//Nickname. (4 Letters of your username)
Players[2].Active := True;
Players[2].Pin := ''; //Leave blank if you dont have one.
Integers[0] := 10; //Amount of loads you want banked.
Integers[1] := 15; //Maximum time (in seconds) before catching a fish.
//Make sure this is pretty accurate. Or else the script
//may not function optimally.
Booleans[0] := True; //Do you want the debug cleared?

Players[3].Name :='';//Username.
Players[3].Pass :='';//Password.
Players[3].Nick :='';//Nickname. (4 Letters of your username)
Players[3].Active := True;
Players[3].Pin := '';//Leave blank if you dont have one.
Integers[0] := 10; //Amount of loads you want banked.
Integers[1] := 15; //Maximum time (in seconds) before catching a fish.
//Make sure this is pretty accurate. Or else the script
//may not function optimally.
Booleans[0] := True; //Do you want the debug cleared?
}
end;

And then later in the script, instead of using the constant, you would use Players[CurrentPlayer].Integers[0]/Players[CurrentPlayer].Integers[1]/Players[CurrentPlayer].Booleans[0].

Don't take this personally, i can't find anything huge in your script, so I'm picking out the little things :p.

Pros

1) Banking!
2) Advanced antiban!
3) Walking!
4) DTMs!
5) Advanced arrays!
6) Cases!
7) Bitmaps!
8) Multiplayer!
9)
Successfully compiled (11562 ms)
:p

And the verdict is…

program VoteOpinion;

Const
BioniclesVote = True;

function Vote: boolean;
begin
Result := BioniclesVote
if Result = True then
begin
WriteLn('Congratulations!');
WriteLn('My vote is yes!');
end else
WriteLn('Sorry, my vote is no :(');
end;

begin
Vote;
end.

Successfully compiled (82 ms)
Congratulations!
My vote is yes!
Successfully executed

OBVIOUSLY the pros outweigh the cons, so congratulations! You're lucky, if this script wasn't so well made, this would have been ages longer :p, pre-welcome to the SRL community!

Awkwardsaw

2009-12-10 17:03:55

i vote teh yes. :)

mostly for the reasons stated above, also the things that need to be fixed has also been stated above.

good job :)

although using consts really dont matter. if its for script setup, i always use consts, but you can also use the variables in declare players, although i use those for proggies. :)

jimmy_mac

2009-12-10 17:09:05

From: Baked0420
Is the antiban the only thing you took from other people's scripts? Or do you have other copied stuff also?

Yeh it was only the antiban, I just copied it over and edited a bit.

From: Rasta Magician
Had a quick look, and I see lots of potential. Good job.

~RM

Thanks mate :)

Also Thanks Bionicle for all your tips/help. Appreciate it.
Ill fix up the script, should I put it up in this thread when I'm done?

Wizzup?

2009-12-10 17:15:09

Yes!

Dervish

2009-12-10 17:35:04

Yes.

Gu3st...

2009-12-10 17:36:07

Yes, you show a lot of potential in this script and it seems like you know the basics n_n
I hope you get in

TRiLeZ

2009-12-10 18:05:48

Here comes TRiLeZ! :D

I'll be examining every procedure/function…

Antiban:

case random(250)+1 of
0: MMouse(Random(500), Random(500), Random(500), Random(500));
Because of the +1, 0 will never be used.


6: begin
MMouse(Random(500), Random(500), Random(500), Random(500));
Wait(800 + Random(1000));
if IsUpText('xamine') then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
Wait(200 + Random(100));
ChooseOption('xamine');
end;
end;
The procedure RandomRClick randomly right clicks the screen and examines it if it can. Use that function instead.

CompassInt:

CompassExt := rs_GetCompassAngleDegrees;
result := round(compassExt);
Can be shortened to:

Result := Round(CompassExt);

FindLevelUp:
You should use the function LevelUp, it will click the click to continue text and result true when you level up.

Walk:

{*******************************************************************************
Procedure Walk(where: String; Path: Integer);
By: ME!
Description: Attempts to walk a chosen location and path.
*******************************************************************************}
What's with that? All of your other function aren't like this? Why put that in? Did you steal this function and take the credits for yourself?


if where = 'water' then
begin
case Path of
//Paths To Water//
1: if RadialWalkTolWait(FindWaterColor, 5, 200, 215, 75, -5, 5, 4, 40) then Writeln('Couldnt find Fish Symbol, Walking To Water Using Path 1.');
end;
end;
if where = 'bank' then
begin
case Path of
//Paths To Bank//
1: if RadialWalkTolWait(4275518, 5, 21, 47, 62, 1, 1, 0, 5) then Writeln('Couldnt find Bank Symbol, Walking To Bank Using Path 1.');
end;
end;
You could use a case for the variable where.

CatchColors:


if FindDTM(Shrimp, DTMx, DTMy, MIX1, MIY1, MIX2, MIY2) then
begin
SetArrayLength(CatchColor, i+1);
CatchColor[i] := GetColor(DTMx, DTMy);
i:= i+1;
end;
if FindDTM(Anchovie, DTMx, DTMy, MIX1, MIY1, MIX2, MIY2) then
begin
SetArrayLength(CatchColor, i+1);
CatchColor[i] := GetColor(DTMx, DTMy);
i:= i+1;
end;
if FindDTM(Sardine, DTMx, DTMy, MIX1, MIY1, MIX2, MIY2) then
begin
SetArrayLength(CatchColor, i+1);
CatchColor[i] := GetColor(DTMx, DTMy);
i:= i+1;
end;
if FindDTM(Herring, DTMx, DTMy, MIX1, MIY1, MIX2, MIY2) then
begin
SetArrayLength(CatchColor, i+1);
CatchColor[i] := GetColor(DTMx, DTMy);
i:= i+1;
end;
Ugly.
You should use a loop

ex:

DTMArray := [Shrimp, Anchovie, Sardine, Herring];
for B := 0 to High(DTMArray) do
if FindDTM(DTMArray[b], DTMx, DTMy, MIX1, MIY1, MIX2, MIY2) then
begin
SetArrayLength(CatchColor, i+1);
CatchColor[i] := GetColor(DTMx, DTMy);
i:= i+1;
end;
Super short eh?

Fishing:

FishingMax := (SecondsPerFish*1000);
How about use a player variable instead of one constant variable? Some of the chars may be way higher fishing levels than other chars that the user wants to use…


Writeln('Fishing :)');
How about using Status instead of Writeln to not spam the debug? :p


if FindFishAttempts >= 5 then begin Writeln('Couldn''t find a spot to fish.');Logout; NextPlayer(False); exit; end;
if not FindEquipment then begin Writeln('Couldn''t Find Equipment in Inventory :('); Logout; NextPlayer(False); exit; end;
Ewwwww, please fix your standards.

Banking:


if PinScreen then InPin(Players[CurrentPlayer].Pin);
if BankScreen then
Add a wait inbetween just incase the BankScreen takes a while to load up.


if ColorsFound = 0 then begin writeln('Array has no colors'); Logout; NextPlayer(False); exit; end;

if (Players[CurrentPlayer].Integers[0] >= LoadsToDo) then begin Writeln('Finished set amount of Loads for this player.'); Logout; NextPlayer(False); end;

end else begin Logout; NextPlayer(False); Writeln('Couldn''t open bank screen'); end;
Ewww, please fix your standards.


SetTargetDC(SMARTGetDC);
This isn't needed anymore…

Overall:
Multiplayer
DTMs
TPAs
RadialWalking
Bitmaps

Its a pretty nice script. Remember to fix your script up and your standards.

Sorry, but I'm going to have to vote yes. :( lolz, keep it up =D

jimmy_mac

2009-12-10 19:34:26

@TRiLeZ.
Thanks for all the help. I've fixed the script up. It seems to be a bit cleaner and better looking now :)

{==============================================================================]
[ DRAYNOR FISH 'N' BANK v1.0 ]
[==============================================================================]
[ ]
[ Written By: jimmy_mac ]
[ ]
[==============================================================================]
[ Instructions. ]
[==============================================================================]
[ ]
[ 1. Fill in Declare Players (lines 22 - 72) ]
[ 2. Have either 'net' or 'rod and bait' in inventory. ]
[ 3. Start in Draynor Bank or at Fishing Spot ]
[ ]
[==============================================================================}

program DraynorFishNBank;
{.include SRL/SRL/Misc/SMART.scar}
{.include srl/srl.scar}
{.include srl/srl/skill/fishing.scar}

procedure DeclarePlayers;
begin
HowManyPlayers := 1; //Total Number of Autoers.
CurrentPlayer := 0; //Starting Player.
NumberOfPlayers(HowManyPlayers);

Players[0].Name :='bighead jim'; //Username.
Players[0].Pass :='barnyard'; //Password.
Players[0].Nick :='ighe'; //Nickname. (4 Letters of your username)
Players[0].Active := True; //Is the player active?
Players[0].Pin := ''; //Leave blank if you dont have one.
Players[0].Booleans[0] := True; //Clear the Debug?
Players[0].Integers[0] := 10; //Amount of Loads you want banked.
Players[0].Integers[1] := 10; //Maximum time (in seconds) before catching a fish.
//Make sure this is pretty accurate. Or else the script
//may not function optimally.
{
Players[1].Name :=''; //Username.
Players[1].Pass :=''; //Password.
Players[1].Nick :=''; //Nickname. (4 Letters of your username)
Players[1].Active := True; //Is the player active?
Players[1].Pin := ''; //Leave blank if you dont have one.
Players[1].Booleans[0] := True; //Clear the Debug?
Players[1].Integers[0] := 10; //Amount of Loads you want banked.
Players[1].Integers[1] := 15; //Maximum time (in seconds) before catching a fish.
//Make sure this is pretty accurate. Or else the script
//may not function optimally.

Players[2].Name :=''; //Username.
Players[2].Pass :=''; //Password.
Players[2].Nick :=''; //Nickname. (4 Letters of your username)
Players[2].Active := True; //Is the player active?
Players[2].Pin := ''; //Leave blank if you dont have one.
Players[2].Booleans[0] := True; //Clear the Debug?
Players[2].Integers[0] := 10; //Amount of Loads you want banked.
Players[2].Integers[1] := 15; //Maximum time (in seconds) before catching a fish.
//Make sure this is pretty accurate. Or else the script
//may not function optimally.

Players[3].Name :=''; //Username.
Players[3].Pass :=''; //Password.
Players[3].Nick :=''; //Nickname. (4 Letters of your username)
Players[3].Active := True; //Is the player active?
Players[3].Pin := ''; //Leave blank if you dont have one.
Players[3].Booleans[0] := True; //Clear the Debug?
Players[3].Integers[0] := 10; //Amount of Loads you want banked.
Players[3].Integers[1] := 15; //Maximum time (in seconds) before catching a fish.
//Make sure this is pretty accurate. Or else the script
//may not function optimally.
}
end;
{******************************************************************************}
{* YOU DON'T NEED TO EDIT BELOW HERE *}
{******************************************************************************}

var
Net, Rod, Shrimp, Anchovie, Sardine, Herring, Bait: Integer;
FSx, FSy, FindFishAttempts, FishingMax: Integer;
StillFishing: Boolean;
Method, MethodChoose: String;
CatchColor: Array of Integer;

function CompassInt:Integer;
begin
result := round(rs_GetCompassAngleDegrees);
end;

function RadialWalkTolWait(TheColor, Tol: Integer; StartRadial, EndRadial: Integer; Radius: Integer; Xmod, Ymod: Integer; waitTime:integer; flagDist:Integer): Boolean;
var
tpa : TPointArray;
i : Integer;
begin
Result := False;
StartRadial := StartRadial + (360 - CompassInt);
EndRadial := EndRadial + (360 - CompassInt);
if RadialWalkEx(tpa, MMCX, MMCY, TheColor, Tol, StartRadial, EndRadial, Radius) then
for i := 0 to High(tpa) do
if MFNF(tpa[i].x, tpa[i].y, Xmod, Ymod) then
begin
wait(waitTime*1000);
FFlag(flagDist);
Result := True;
Break;
end;
end;

Procedure LoadDTMs;
begin
Shrimp := DTMFromString('78DA63CC67626078CD800236D6A7307001694' +
'620FE0F048CD940357719D00013986484F218AB80FC8704D46463' +
'DA85A12616C87F4484391F09A84904F2DFE0570300041E0EFE');
Anchovie := DTMFromString('78DA63CC67626078CD8002CACB6B18B880342' +
'310FF0702C66CA09ABB0C6880094C3242798C5540FE43026AB231' +
'EDC250130BE43F22C29C8F04D42402F96FF0AB0100DDD70ED4');
Sardine := DTMFromString('78DA637462606058C2800212D62432B003694' +
'620FE0F048CEE40C62C0634C0042619A13C464F20318F801A3F20' +
'319F801A3B20B182801A1B20B194801A6720B18C801A90DF97E35' +
'70300FC570CC3');
Herring := DTMFromString('78DA63B4676260E0616440061B56AE60E007D' +
'220D1FF40C0E80A54C38AAA868181094CC244193D807C4E026A7C' +
'807C36026ACC8830C704C81720A0C619C8E727A0C616C817C2AF0' +
'600B6A6089F');
Net := DTMFromString('78DA639CCEC4C0F084010518A9CB30B003694' +
'620FE0F048CF3816A6E33A0012630C908E5312E01F2EF1350B310' +
'C87F4B404D2F90FF92809A1E20FF0101355380FC9BF8D50000A43' +
'10EF6');
Rod := DTMFromString('78DA637460626078CE8002221C7818D881342' +
'310FF0702465FA09AAB0C6880094C3242798C4E40FE5D026AAC81' +
'FCA704D49801F9AF08A8B107F23FE1570300A89F0BA3');
Bait := DTMFromString('78DA63CC60626078CE8002D6D54930B003694' +
'620FE0F048C594035B719D00013986484F2181380FC3704D41401' +
'F96F09A829C0740F869A6A20FF197E3500A5FA0D61');
end;

Procedure FreeDTMs;
begin
FreeDTM(Shrimp);
FreeDTM(Anchovie);
FreeDTM(Sardine);
FreeDTM(Herring);
FreeDTM(Net);
FreeDTM(Rod);
FreeDTM(Bait);
end;

Procedure Antiban; //Credits to Ultra for a couple of these. :)
var x, y: Integer;
begin
case random(35)+1 of
1: MMouse(Random(500), Random(500), Random(500), Random(500));
2: SleepAndMoveMouse(random(5000));
3: IdleTime(Random(5000), 2, 5.2);
4: PickUpMouse;
5: RandomRClick;
6: if MouseSpeed < 15 then
IncEx(MouseSpeed, Random(5))
else
DecEx(MouseSpeed, Random(5));
7: makeCompass(CompassInt + random(CompassInt/2) - CompassInt/4); //Random 180 from given position.
8: begin
GetMousePos(x, y);
MMouse(x, y, 100, 100);
end;
end;
end;

procedure Walk(where: String);
begin
if not loggedin then exit;
case where of
'water': RadialWalkTolWait(FindWaterColor, 5, 200, 215, 75, -5, 5, 4, 30);
'bank': RadialWalkTolWait(4275518, 5, 21, 47, 62, 1, 1, 0, 5);
end;
end;

procedure CatchColors;
var
DTMx, DTMy, i, b : Integer;
DTMArray: TVariantArray;
begin
LoadDTMs;
i := 0;
SetArrayLength(CatchColor, i+1);
SetArrayLength(DTMArray, 4);
DTMArray := [Shrimp, Anchovie, Sardine, Herring];
for b := 0 to High(DTMArray) do
if FindDTM(DTMArray[b], DTMx, DTMy, MIX1, MIY1, MIX2, MIY2) then
begin
SetArrayLength(CatchColor, i+1);
CatchColor[i] := GetColor(DTMx, DTMy);
i:= i+1;
end;
FreeDTMs;
end;

Function FindEquipment:Boolean;
var
X, Y : Integer;
begin
LoadDTMs;
if FindDTM(Net, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
Method := 'net';
MethodChoose := 'et Fis';
Result := True;
end else
if FindDTM(Rod, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
if FindDTM(Bait, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
Method := 'rod';
MethodChoose := 'ait Fis';
Result := True;
end else Writeln('Found rod, but no bait. :(');
end else
begin
Writeln('Equipment Not Found!');
Logout;
NextPlayer(False);
Result := False;
end;
FreeDTMs;
end;

function FindTheFishSpot: Boolean;
begin
if FindFishSpot(FSx,FSy,'net') then
begin
result:=True;
FindFishAttempts := 0;
if method = 'net' then
begin
case random(4)+1 of //I prefer like this because this is how I would do it if I was playing.
1-3: mouse(FSx, FSy, 5, 5, true);
4: begin
Mouse(FSx, FSy, 5, 5, false);
ChooseOption(MethodChoose);
end;
end;
end else
begin
Mouse(FSx, FSy, 5, 5, false);
ChooseOption(MethodChoose);
end;
end else Result := False;
end;

Procedure SetLoads;
var
i : Integer;
begin
for i:=0 to HowManyPlayers - 1 do
Players[i].Integers[2] := 0;
end;

Procedure Setup;
begin
SetupSRL;
wait(500);
DeclarePlayers;
if (not (loggedIn)) then LoginPlayer;
SymbolAccuracy := 0.5;
SetLoads;
end;

procedure WalkingToTheFish;
var
MMx, MMy : Integer;
begin
if not loggedin then exit;
if InvFull then exit;
Setrun(true);
if not FindSymbol(MMx, MMy, 'fish') then
begin
Walk('water');
Status('Walking to the Ocean.');
FindSymbol(MMx, MMy, 'fish');
Mouse(MMx, MMy, 5, 5, true);
end else
begin
Status('Found Fish Symbol. Walking to It.');
Mouse(MMx, MMy, 5, 5, true);
wait(3500+random(1000));
FFlag(1);
FindNormalRandoms;
end;
end;

procedure Fishing;
var
MMx, MMy, FishingStart, LastInvCount : Integer;
begin
FindFishAttempts := 0;
FishingMax := Players[CurrentPlayer].Integers[1]*1000;
StillFishing := False;
Status('Fishing.');
Repeat
if not loggedin then exit;
SetAngle(True);
LevelUp;
FindNormalRandoms;
GameTab(tab_Inv);
Antiban;
if FindFishAttempts >= 5 then
begin
Writeln('Couldn''t find a spot to fish :(');
Logout;
NextPlayer(False);
exit;
end;
if not FindEquipment then
begin
Writeln('Couldn''t Find Equipment in Inventory :(');
Logout;
NextPlayer(False);
exit;
end;
if InvFull then Exit;
if not StillFishing then
begin
if FindTheFishSpot then
begin
StillFishing := True;
FishingStart := 0;
MarkTime(FishingStart);
LastInvCount := InvCount;
if InvFull then Exit;
end else
begin
if FindSymbol(MMx, MMy, 'fish') then Mouse(MMx, MMy, 5,5, true);
fflag(1);
LastInvCount := InvCount;
wait(1500 + random(500));
FindFishAttempts := FindFishAttempts + 1;
MarkTime(FishingStart);
end;
end;
if InvCount > LastInvCount then
begin
LastInvCount := InvCount;
MarkTime(FishingStart);
StillFishing := True;
end;
if (TimeFromMark(FishingStart)>=FishingMax) then
begin
StillFishing := False;
LastInvCount := InvCount;
end;
until(not LoggedIn or InvFull);
end;

procedure WalkingToTheBank;
var
MMx, MMy : Integer;
begin
if not loggedin then exit;
Setrun(true);
if not FindSymbol(MMx, MMy, 'bank') then
begin
Walk('bank');
Status('Walking to the Bank.');
end else
begin
Status('Found Bank Symbol. Walking to It.');
Mouse(MMx, MMy, 5, 5, true);
FFlag(5);
FindNormalRandoms;
wait(random(500));
end;
end;

Procedure Banking;
var
ColorsFound, i, x, y, BankX, BankY : Integer;
begin
if not loggedin then exit;
FindNormalRandoms;
Status('Banking.');
if random(5) = 0 then Antiban;
SetAngle(True);
OpenBankFast('db');
if not OpenBankFast('db') then
begin
if FindSymbol(BankX, BankY, 'bank') then
begin
Mouse(BankX, BankY, 6, 6, true);
fflag(1);
if not OpenBankFast('db') then OpenBankQuiet('db');
wait(500+random(500));
end else
begin
Logout;
NextPlayer(False);
Exit;
end;
end;
if PinScreen then
begin
InPin(Players[CurrentPlayer].Pin);
wait(400+random(300));
end;
if BankScreen then
begin
CatchColors;
ColorsFound := GetArrayLength(CatchColor);
if ColorsFound = 0 then
begin
writeln('Array has no colors');
Logout;
NextPlayer(False);
Exit;
end;

for i:=0 to ColorsFound-1 do
If findcolortolerance(x, y, CatchColor[i], MIX1, MIY1, MIX2, MIY2, 5) then
begin
Mouse(x, y, 4, 4, false);
wait(50+random(100));
ChooseOption('osit-All');
Players[CurrentPlayer].Integers[2] := Players[CurrentPlayer].Integers[2] + 1;
if (Players[CurrentPlayer].Integers[2] >= Players[CurrentPlayer].Integers[0]) then
begin
Writeln('Finished set amount of Loads for this player.');
Logout;
NextPlayer(False);
end;
end;
case random(3)+1 of
1: CloseBank;
end;
end else
begin
Writeln('Couldn''t open bank screen');
Logout;
NextPlayer(False);
end;
end;

Procedure ProgressReport;
var
MultiplyBy : Integer;
begin
if Method = 'net' then MultiplyBy := 27 else MultiplyBy := 26;
if Players[CurrentPlayer].Booleans[0] = True then ClearDebug;
WriteLn('--------------DRAYNOR FISH ''N'' BANK-------------');
WriteLn(PadR('- Total Time Running: ' + TimeRunning, 47) + '-');
WriteLn(PadR('- Total Loads Done: ' + IntToStr(Players[CurrentPlayer].Integers[2]) + '. That''s ' + IntToStr(Players[CurrentPlayer].Integers[2]*MultiplyBy) + ' Fish!', 47) + '-');
WriteLn(PadR('- Unless you have extra items in your inv. ;)', 47) + '-');
WriteLn('------------------------------------------------');
WriteLn('- By jimmy_mac -');
WriteLn('------------------------------------------------');
end;

begin
Setup;
Repeat
WalkingToTheFish;
Fishing;
WalkingToTheBank;
Banking;
ProgressReport;
until(AllPlayersInactive);
Logout;
end.

Also does anyone know why I've been put as a 'registered user'? Cant access jr mems anymore.

Bionicle

2009-12-10 19:41:30

From: jimmy_mac
Also does anyone know why I've been put as a 'registered user'? Cant access jr mems anymore.


Changed your e-mail?

Bebe

2009-12-10 19:55:47

Yes from me :)

jimmy_mac

2009-12-10 20:22:51

From: bionicle1800
Changed your e-mail?

That could be it. why would that happen?

Bionicle

2009-12-10 20:40:39

From: jimmy_mac
That could be it. why would that happen?


Not to sure why it happens, but when you change your email you get a grey name and go back to registered user again.

Bebe

2009-12-10 20:43:26

From: bionicle1800
Not to sure why it happens, but when you change your email you get a grey name and go back to registered user again.

Possible security so if somebody steals somebodies account and change the info to try and 'Hijack' the account it reverts them to hide hidden content only available to that user group? idk :P

Bionicle

2009-12-10 20:46:03

From: Bebe
Possible security so if somebody steals somebodies account and change the info to try and 'Hijack' the account it reverts them to hide hidden content only available to that user group? idk :P


Guess that makes sense :p

jimmy_mac

2009-12-10 21:05:52

ahh k fair enough.. so how do i change back?

Bebe

2009-12-10 21:07:22

From: jimmy_mac
ahh k fair enough.. so how do i change back?

Inform an administrator would be my guess

Main

2009-12-10 21:18:52

Try to improve your standards in the future, they could really make a script reader happy (like when you are applying to members, but I guess you don't really need it any more) :garfield:

Bionicle

2009-12-10 21:20:07

From: Main_Ftw
Try to improve your standards in the future, they could really make a script reader happy (like when you are applying to members, but I guess you don't really need it any more) :garfield:


Standards are always good! :D Believe me, when you get it down, it'll become habit, just natural.

jimmy_mac

2009-12-10 21:22:34

From: bionicle1800
Standards are always good! :D Believe me, when you get it down, it'll become habit, just natural.


Did you see the one i reposted? I think that all the standards are fixed :)

Bionicle

2009-12-10 21:25:46

From: jimmy_mac
Did you see the one i reposted? I think that all the standards are fixed :)


Well yea, its great :) i was just putting that out there lol.

benjaa

2009-12-10 22:57:06

i see a nice script, in parts forgetting some failsafes, but pretty good.

one concern… not even a JM yet..?? it only takes like a week

jimmy_mac

2009-12-10 22:59:13

From: benjaa
i see a nice script, in parts forgetting some failsafes, but pretty good.

one concern… not even a JM yet..?? it only takes like a week


nah i changed my email so it reset me or something.. i hav like 42 posts so that should automatically be JM yeh?

benjaa

2009-12-10 23:04:40

oh ok, sounds fair enough

Home

2009-12-11 02:21:35

Yes, i see some good potential there, mabey some failsafes there and there, otherwise i like it :)


~Home

Awkwardsaw

2009-12-11 08:19:25

From: benjaa
i see a nice script, in parts forgetting some failsafes, but pretty good.

one concern… not even a JM yet..?? it only takes like a week


also, according to his join date, he was here before you. :)

benjaa

2009-12-11 20:55:15

…why does he only have 45 posts then..? its strange that he's been here for more than 2 and a half years with only 45 posts…

just seems odd to me, thats all

jimmy_mac

2009-12-12 05:03:38

If u check when I've been on. I havnt logged in in ovr a year n a half n I've decided to become active and join the community.

Scaper

2009-12-12 10:08:00

yes

jimmy_mac

2009-12-14 19:01:01

From: Home
Yes, i see some good potential there, mabey some failsafes there and there, otherwise i like it :)


~Home

Hey mate, can you please tell me where I could add failsafes, as I'm trying to make this script flawless :) and it would also be great to know for future scripts aswell.

Awkwardsaw

2009-12-14 19:06:04

it seems like your getting into members.. :)

grats

jimmy_mac

2009-12-14 19:37:53

From: Awkwardsaw
it seems like your getting into members.. :)

grats

Thanks man :D
How long does the process take from applying to becoming a member?
Cant wait should b sweet :)

The scripts quite a bit better now since i submitted, i used to use FindFishSpot but that doesnt seem to be working properly atm. also have added other features. Seems to be running pretty smooth :) heres a proggy:
[PHP]
……………….DRAYNOR FISH N BANK………………..
: :
: Total Time Running: 1 Hours, 53 Minutes and 58 Seconds :
: Total Loads Done: 66. That's 1782 Fish! :
: Unless you have extra items in your inv. ;) :
: You have gained 3 levels! :
: :
………………………………………………….
: By jimmy_mac :
………………………………………………….
[/PHP]

Awkwardsaw

2009-12-14 21:12:17

its default 2 weeks, but i think admin shortens it if its a blow away, like this ;p

Bionicle

2009-12-14 21:16:27

Well i just gota say, welcome to the community! Unless something major happens and like 17 people vote no…but i doubt that'll happen :p

noidea

2009-12-14 23:14:35

I voted yes a few days ago, but was too lazy to post :3

Kyle Undefined

2009-12-15 03:18:55

I know it's early, but…Congrats man, welcome :D

~Camo

Sabzi

2009-12-15 10:13:30

It's a yes from me. I love that you tweaked it a lot, that shows a great will to work hard/make things better.

jimmy_mac

2009-12-15 10:24:39

thanks guys :)

tico2

2009-12-15 10:31:38

From: noidea
I voted yes a few days ago, but was too lazy to post :3


This :p Welcome in anyways :D

Gu3st...

2009-12-15 11:14:33

Add failsafes anywhere in your script where the script can fail, meaning in object finding, walking and so on..

if FindObj() then
begin
//If found then go here
end else
begin
//If not found then go here.
end;
you probably already knew of this but I just wanted to make it clear and simple

Ultra

2009-12-15 15:49:59

Yes from me, keep on learning and you will get even better!

Quickmarch

2009-12-15 15:59:53

Haven't voted in awhile, but it's a yes of course!

Baked0420

2009-12-17 06:35:44

Newbiezkid's app was closed after a day, this one has been open a week and it's 25 - 4, shouldn't he be member by now? :p

Sir R. M8gic1an

2009-12-17 07:47:26

From: Baked0420
Newbiezkid's app was closed after a day, this one has been open a week and it's 25 - 4, shouldn't he be member by now? :p


Really depends on how long it takes us to notice ;)

Welcome to Jah People :)

~RM

cycrosism

2009-12-18 04:26:42

Forgot to close?

WT-Fakawi

2009-12-18 05:32:55

not really.