SRL Archive - RS3 Outdated / Broken Scripts

Zephyr's Karamja Fisher w/ Reflection


ZephyrsFury

2008-08-03 08:05:31

Zephyr's Karamja Fisher
By ZephyrsFury


Recently with the release of SMART 3 1/3 we at SRL have access to a new, powerful way of autoing - using reflection. Reflection involves "spying" on the RS client and retrieving information on certain things that we can manipulate to allow us to do things that traditional colour clicking methods can not do.

This script is designed to automatically fish lobsters, swordfish and tuna for you in Karamja and bank it in Draynor. It takes advantage of Reflection to replace many things that would be considerably harder to do with traditional methods. It is fully Reflection-based with little colour finding and clicking.



Instructions:
  1. Make sure you meet the requirements below.
  2. Setup your players in the Bank/Fishing Spots/Karamja Dock/Port Sarim or anywhere else along the walking paths (The script will auto-detect you position).
  3. Have your required fishing equipment and at least 60 coins in your inv. Have extra pots or harpoons in your bank as well another couple of k of coins.
  4. Declare your players as usual.
  5. Start the script.

What you need:
  1. SCAR setup properly
  2. Latest SRL Revision
  3. Reflection includes (see instructions below on how to get it)

How To Get Reflection Includes:
  • Download TortoiseSVN
  • Make a new Folder in Includes > SRL > SRL (should have Core, Misc and Skill already) called Reflection.
  • Right click on the folder and click 'SVN Checkout';
  • In 'URL of Repository' put this: http://scarreflection.googlecode.com/svn/trunk/
  • Click Ok
  • Once its finished downloading the files, you should now have the latest rev of the Reflection includes.
  • Every now and again right click on the Reflection folder and click SVN Update to make sure you have the latest revision.

For those that get this error:

** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**

Thats because of a small bug in SRL. To fix it (it will be fixed in the next rev), go to Line 393 in amount.scar:


Result := ItemAmount(area, 'bmp,', coinbmp, [40]);

and change that to:


Result := ItemAmount(area, 'bmp', coinbmp, [50]);

I also had to add a larger tol to the bitmap cos the colours have changed.

Heres a small proggy:

[------------------------------------------------------------------------------------]
[ August 3rd, 2008, 01:12:11 AM ]
[------------------------------------------------------------------------------------]
[ >>> Zephyr`s Karamja Fisher Ver 1.0 <<< ]
[------------------------------------------------------------------------------------]
[ Total Time Running: 5 Hours, 2 Minutes and 52 Seconds ]
[ Total Loads Done: 29 ]
[ Total Fish Caught: 752 ]
[ o Lobsters: 752 ]
[ Fishing Rate: 149 Fish/Hr ]
[ Total Fishing Exp Gained: 67680 ]
[ Experience Gain Rate: 13408 Exp/Hr ]
[ Fishing Levels Gained: 2 ]
[------------------------------------------------------------------------------------]
[ | Nick | Act | Loc | Lvl | Loads | Fish | Time ]
[ o | str | T | Bank | 64 | 29 | 752 | 294 min ]
[------------------------------------------------------------------------------------]



Quick word before I finish… my plan of releasing this script is to show you guys an example of reflection used in a script and to hopefully teach you something about it. It is not my goal to have this script work flawlessly overnight or anything. I haven't spent much time on it and it has had limited testing. Remember: I can not take any blame or responsibility for any bans or any other punishments you receive from Jagex due to using this script.

Enjoy…

Zeph.

ZephyrsFury

2008-08-03 08:06:41

Proggies?

BobboHobbo

2008-08-03 08:11:36

W00t First post? Looking at code now

Wowow looks good. Gonna run on main now :).

EDIT*
Line 389: [Error] (17235:4): Unknown identifier 'R_SetAngle' in script C:\Documents and Settings\Ben\Desktop\KaramjaFisher 1.0.scar


I have Reflection Rev 35 :).

Hugolord

2008-08-03 08:43:50

w00t w00t nice, if only I had a fisher to test this ^^

still nice going

jose89

2008-08-03 09:04:31

I can not take any blame or responsibility for any bans or any other punishments you receive from Jagex due to using this script.


is it more prone to ban than other scripts not using reflection??

the scar noob

2008-08-03 09:40:34

From: BobboHobbo
W00t First post? Looking at code now

Wowow looks good. Gonna run on main now :).

EDIT*


I have Reflection Rev 35 :).


Same error, probably some dev stuff:p

EDIT: Edited some things so it works with SRL Rev #20 SCAR Divi 3.15
->
{------------------------------------------------------------------------------]
._________.
\____ \ __
/ / | | ____
/ / _____ ._______ | |____.___ ___.____\ /______
/ / / ___ \ ___ \ _ \ \/ / _ \/ ____/
./ /__\ ____/| ___/ | | |\ /| | \_/\____ \
\_________\______\| | |__| |__| \ / |__| /______/
|___| Ver 1.0 /__/ Karamja Fisher

By ZephyrsFury

[------------------------------------------------------------------------------]
[ >>>> DESCRIPTION <<<< ]
[------------------------------------------------------------------------------]
Will fish you Lobsters, Swordfish and Tuna in Karamja and bank in Draynor.
Uses Reflection - a new method of autoing that 'spies' on the RS client using
SMART to retrieve information that can be manipulated for our benefit.
[------------------------------------------------------------------------------]
[ >>>> CURRENT FEATURES <<<< ]
[------------------------------------------------------------------------------]
o Reflection - Uses Reflection.
o Antiban - Includes the most recent and effective antiban.
o Multi-player - Well whats the good of autoing with one char?
[------------------------------------------------------------------------------]
[ >>>> INSTRUCTIONS <<<< ]
[------------------------------------------------------------------------------]
1. Make sure you have the Reflection includes.
2. Start with the necessary fishing equipment plus coins in your inv.
3. Have extra fishing gear and coins in your bank.
4. Declare your players.
5. Place your players at the Bank/Port Sarim/Karamja Dock/Fishing Spots or
anywhere along the path. (Script will auto-detect your position).
6. Start the script!
[------------------------------------------------------------------------------]
[ >>>> ADDITIONAL CREDITS <<<< ]
[------------------------------------------------------------------------------]
o SRL Developers - For the best RS Cheating library and community.
o Jagex - Couldn't have done it without you or your game.
o Reflection Devs - Thanks for the Reflection includes.
[------------------------------------------------------------------------------]
[ I DO NOT AND WILL NOT TAKE RESPONSIBILITY FOR ANY ACTION TAKEN AGAINST YOUR ]
[ ACCOUNT(S) AS A RESULT OF USING MY SCRIPT. USE IT AT YOUR OWN RISK!!! ]
[ ]
[ PLEASE DON'T POST THIS SCRIPT ON ANY OTHER WEBSITES WITHOUT MY KNOWLEDGE ]
[ AND CONSENT. PM ZephyrsFury ON srl-forums.com. ]
[------------------------------------------------------------------------------}
program New;
{.include SRL/SRL/misc/SMART.scar}
{.include SRL/SRL.scar}
{.include SRL/SRL/Reflection/Reflection.scar}

const
SmartWorldNo = 1; //The world on which you want to auto.
Signed = True; //Signed Java Client?
SRLStatsID = ''; //SRL Stats ID
SRLStatsPass = ''; //SRL Stats Password

procedure DeclarePlayers;
begin

NumberOfPlayers(1);
CurrentPlayer := 0;

Players[0].Name := ''; //Player username
Players[0].Pass := ''; //Player password
Players[0].Nick := ''; //4 - 5 chars to minimise probs with the autoresponder
Players[0].Active := True; //Is the player active (do you want to auto on this acc)?
Players[0].Pin := ''; //Bank Pink, leave as '' for no bank pin... MUST BE A STRING!
Players[0].Integers[0] := 5; //Loads before switching. Less loads = less randoms
Players[0].Strings[0] := 'Cage'; //'Cage', 'Harpoon' or 'Highest''

end;

{------------------------------------------------------------------------------]
[ ]
[ DON'T HAVE TO TOUCH ANYTHING BELOW HERE ]
[ ]
[------------------------------------------------------------------------------}
//Integers[10] := PlayerFishCount;
//Integers[11] := TotalLoadCount;
//Integers[12] := PlayerMins

type
TFishEquip = record
Name, Text: string;
Level, DTM, FishDTM: Integer;
end;

var
x, y, Sx, Sy, I, T, C: Integer;
FishEquip: TFishEquip;
Paths: array of T2DPointArray;
AntiBanMark, RunTime, TabsCountTo, TabsCounter: Integer;
FishCount, TotalFishCount, TotalLoads, LevelsGained, CurLoads: Integer;
TotalLobCount, TotalTunaCount, TotalSwordCount: Integer;
LobDTM, TunaDTM, SwordDTM, CoinBitmap: Integer;
TP: TPoint;

const
TestMode = False;
TakeScreenshots = False;
VerNumber = '1.0';

procedure LoadPaths;
begin
SetLength(Paths, 2);

SetLength(Paths[0], 2); //Bank to Port Sarim
Paths[0][0] := [
Point(3092, 3245),
Point(3082, 3251),
Point(3072, 3260),
Point(3060, 3264),
Point(3047, 3263),
Point(3041, 3252),
Point(3032, 3243),
Point(3028, 3230),
Point(3029, 3217)
];
Paths[0][1] := [
Point(3092, 3245),
Point(3078, 3250),
Point(3072, 3262),
Point(3057, 3264),
Point(3054, 3251),
Point(3042, 3243),
Point(3029, 3236),
Point(3028, 3225),
Point(3029, 3217)
];

SetLength(Paths[1], 2); //Karamja Dock to Fishing spots
Paths[1][0] := [
Point(2956, 3146),
Point(2942, 3145),
Point(2929, 3152),
Point(2917, 3151),
Point(2914, 3164),
Point(2924, 3172),
Point(2924, 3180)
];
Paths[1][1] := [
Point(2956, 3146),
Point(2941, 3146),
Point(2928, 3151),
Point(2918, 3158),
Point(2921, 3169),
Point(2924, 3180)
];

end;

{------------------------------------------------------------------------------]
[ procedure LoadDTMs; ]
[ by: ZephyrsFury ]
[ Description: Loads the required DTMs. ]
{------------------------------------------------------------------------------}
procedure LoadDTMs;
begin
LobDTM := DTMFromString('78DA630C646660906664400665CEB20C3A402' +
'190E87F20607406AA5142550391859140DA1BA8468C809A50A01A' +
'61026AC2816A2409A88904AA5121A006E42F0D026A7C806A94F1A' +
'B01003C1408A6');
TunaDTM := DTMFromString('78DA63F467666070646440064B67CD64D0010' +
'A8144FF0301A313508D17AA1A882C8C04D29E40353E04D48401D5' +
'B81050E30D546343404D20116A62816A9CF0AB010081E40A30');
SwordDTM := DTMFromString('78DA6354676660106764400627E65D60D0010' +
'A8144FF0301A338508D06AA1A882C8C04D29A40355204D4E803D5' +
'281250630A54234D408D1C508D2401356A40357C04D4E801D508E' +
'3570300DFF208A3');
CoinBitmap := LoadCoinBMP;
end;

{------------------------------------------------------------------------------]
[ procedure TakeScreenie(s: string); ]
[ by: ZephyrsFury ]
[ Description: Takes a screenshot. ]
{------------------------------------------------------------------------------}
procedure TakeScreenie(s: string);
begin
if (not(TakeScreenShots)) then Exit;
try
SaveScreenShot(ScriptPath + s + ' = ' + TheDate(3) + ' = ' + TimeRunning + '.bmp');
WriteLn('Screenshot saved: ' + ScriptPath + s + ' = ' + TheDate(3) + ' = ' + TimeRunning + '.bmp');
except
WriteLn('Failed to save screenshot: ' + s);
end;
end;

{------------------------------------------------------------------------------]
[ procedure WriteDebug(Text: string); ]
[ by: ZephyrsFury ]
[ Description: Writes to the Debug box or status bar depending on TestMode. ]
{------------------------------------------------------------------------------}
procedure WriteDebug(Text: string);
begin
case TestMode of
True: Writeln(Players[CurrentPlayer].Loc + ' - ' + Text);
False: Status(Players[CurrentPlayer].Loc + ' - ' + Text);
end;
end;

{------------------------------------------------------------------------------]
[ function TimeToGo: Boolean; ]
[ by: ZephyrsFury ]
[ Description: Returns true when its time to go. ]
{------------------------------------------------------------------------------}
function TimeToGo: Boolean;
begin
Result := ((CurLoads mod Players[CurrentPlayer].Integers[0] = 0) and (CurLoads <> 0))
or (not(LoggedIn));
end;

{------------------------------------------------------------------------------]
[ pprocedure ProgressReport; ]
[ by: ZephyrsFury ]
[ Description: Displays the progress report. ]
{------------------------------------------------------------------------------}
procedure ProgressReport;
var
SNick, SLvl, SLoads, SFish, STime, SAct, SLoc: string;
DateTime, Temp2, Top, Temp1: string;
Spaces, PlayerMin, Exp: Integer;
begin

DateTime := '[' + TheDate(1) + ', ' + TheTime + ']';
Spaces := 86 - Length(DateTime);
Temp1 := DateTime;
for i := 0 to Ceil(Spaces / 2) - 1 do
Insert(' ', Temp1, 2);
Temp2 := Temp1;
for i := 0 to Floor(Spaces / 2) - 1 do
Insert(' ', Temp2, Length(Temp1));
Top := '[------------------------------------------------------------------------------------]';
WriteLn('');
WriteLn(Top);
WriteLn(Temp2);
WriteLn('[------------------------------------------------------------------------------------]');
WriteLn('[ >>> Zephyr`s Karamja Fisher Ver '+VerNumber+' <<< ]');
WriteLn('[------------------------------------------------------------------------------------]');
WriteLn(PadR('[ Total Time Running: ' + TimeRunning, 85) + ']');
WriteLn(PadR('[ Total Loads Done: ' + IntToStr(TotalLoads), 85) + ']');
WriteLn(PadR('[ Total Fish Caught: ' + IntToStr(TotalFishCount), 85) + ']');
if (TotalLobCount > 0) then
WriteLn(PadR('[ o Lobsters: ' + IntToStr(TotalLobCount), 85) + ']');
if (TotalSwordCount > 0) then
WriteLn(PadR('[ o Swordfish: ' + IntToStr(TotalSwordCount), 85) + ']');
if (TotalTunaCount > 0) then
WriteLn(PadR('[ o Tuna: ' + IntToStr(TotalTunaCount), 85) + ']');
WriteLn(PadR('[ Fishing Rate: ' + IntToStr(Round((TotalFishCount * 3600) / (GetTimeRunning / 1000))) + ' Fish/Hr', 85) + ']');
Exp := (TotalLobCount * 90) + (TotalSwordCount * 100) + (TotalTunaCount * 80);
WriteLn(PadR('[ Total Fishing Exp Gained: ' + IntToStr(Exp), 85) + ']');
WriteLn(PadR('[ Experience Gain Rate: ' + IntToStr(Round((Exp * 3600) / (GetTimeRunning / 1000))) + ' Exp/Hr', 85) + ']');
WriteLn(PadR('[ Fishing Levels Gained: ' + IntToStr(LevelsGained), 85) + ']');
WriteLn('[------------------------------------------------------------------------------------]');
WriteLn('[ | Nick | Act | Loc | Lvl | Loads | Fish | Time ]');
PlayerMin := Round(TimeFromMark(RunTime) / 1000 / 60);
Players[CurrentPlayer].Integers[12] := Players[CurrentPlayer].Integers[12] + PlayerMin;
MarkTime(RunTime);

for i := 0 to High(Players) do
begin
SNick := PadR(' ' + Players[i].Nick, 6);
SAct := PadR(' ' + BoolToStr(Players[i].Active)[1], 5);
SLoc := PadR(' ' + Players[i].Loc, 34);
SLvl := PadR(' ' + IntToStr(Players[i].Level[17]), 6);
SLoads := PadR(' ' + IntToStr(Players[i].Integers[11]), 7);
SFish := PadR(' ' + IntToStr(Players[i].Integers[10]), 6);
STime := ' ' + IntToStr(Players[i].Integers[12]) + ' min';

WriteLn(PadR('[ o |' + SNick + '|' + SAct + '|' + SLoc + '|' + SLvl +
'|' + SLoads + '|' + SFish + '|' + STime, 85) + ']');
end;
WriteLn('[------------------------------------------------------------------------------------]' );
WriteLn('');
SRLRandomsReport;
end;

{------------------------------------------------------------------------------]
[ procedure AntiBanProc; ]
[ by: ZephyrsFury ]
[ Description: Does antiban. ]
{------------------------------------------------------------------------------}
procedure AntiBanProc;
var
Dx, Dy, j, k, Chance: Integer;
TP: TPoint;
begin
if (not(LoggedIn)) then Exit;
if (TimeFromMark(AntiBanMark) < 30000 + Random(10000)) then Exit;
Chance := Random(40) + 1;
case (Chance) of
1: begin
WriteDebug('Antiban 1');
GetClientDimensions(x, y);
MMouse(Random(x), Random(y), 0, 0);
Wait(200 + random(100));
if (IsUpText('opti')) then
begin
GetMousePos(Dx, Dy);
Mouse(Dx, Dy, 0, 0, false);
Wait(200 + random(100));
ChooseOption('xamine');
end;
Wait(1000 + Random(500));
end;
2: begin
if (Random(5) = 1) then
begin
WriteDebug('Antiban 2');
HoverSkill('random', false);
GameTab(4);
end;
end;
3: begin
if (Random(5) = 1) then
begin
WriteDebug('Antiban 3');
HoverSkill('fishing', false);
GameTab(4);
end;
end;
4: begin
if (InvCount < 1) then Exit;
j := Random(28) + 1;
if (ExistsItem(j)) then
begin
WriteDebug('Antiban 4');
TP := ItemCoords(j);
Mouse(TP.x, TP.y, 0, 0, false);
Wait(200 + random(100));
ChooseOption('xamine');
Wait(1000);
Wait(1000 + Random(500));
end;
end;
5: begin
WriteDebug('Antiban 5');
PickUpMouse;
Wait(500 + Random(500));
end;
6: begin
WriteDebug('Antiban 6');
GetClientDimensions(Dx, Dy);
MMouse(Random(Dx) + 1, Random(Dy) + 1, 0, 0);
Wait(500 + random(500));
end;
7: begin
WriteDebug('Antiban 7');
GameTab(Random(14) + 1);
Wait(500 + Random(500));
GameTab(4);
end;
8: begin
WriteDebug('Antiban 8');
SleepAndMoveMouse(5000 + Random(1000));
end;
9: begin
if (Random(5) <> 0) then Exit;
if (GetColor(500, 361) <> 1975337) then Exit;
WriteDebug('Antiban 9');
k := Random(3) + 1;
for I := 0 to k do
begin
if (GetColor(500, 361) <> 1975337) then Break;
j := RandomRange(523, 2127);
MarkTime(T);
MouseBox(498, 348, 507, 357, 3);
GetMousePos(x, y);
HoldMouse(x, y, True);
while (TimeFromMark(T) < j) do
Wait(1);
ReleaseMouse(x, y, True);
if (Random(3) = 0) then
MouseBox(x - 50, y - 50, x + 50, y + 50, 3);
Wait(1000 + Random(1500));
end;
FixChat;
end;
10: begin
if (Players[CurrentPlayer].Loc <> 'Fish') then Exit;
WriteDebug('Antiban 10');
k := Random(6);
for I := 0 to k do
begin
case I of
0: MakeCompassR(IntToStr(Round(GetMinimapAngleDeg) - 90 + Random(181)));
{1: R_SetAngle(RandomRange(0, 50));}
2: MakeCompassR(IntToStr(Round(GetMinimapAngleDeg) - 30 + Random(61)));
{3: R_SetAngle(RandomRange(25, 75));}
4: MakeCompassR(IntToStr(Round(GetMinimapAngleDeg) - 45 + Random(91)));
{5: R_SetAngle(RandomRange(50, 100));}
end;
end;
if (Random(4) = 0) then {R_}SetAngle(True);
if (Random(4) = 1) then MakeCompassR('N');
end;
else Exit;
end;
MarkTime(AntiBanMark);
end;

{------------------------------------------------------------------------------]
[ function GetClosestTileInPath(Path: TPointArray): Integer; ]
[ by: ZephyrsFury ]
[ Description: Returns the array index of the Point in the TPA closest to us. ]
{------------------------------------------------------------------------------}
function GetClosestTileInPath(Path: TPointArray): Integer;
var
x, y, Last, II, Dist: Integer;
begin
GetMyPos(x, y);
Last := 1 shl 20;
for II := 0 to High(Path) do
begin
Dist := Distance(x, y, Path[II].x, Path[II].y);
if (Dist > Last) then Continue;
Last := Dist;
Result := II;
end;
end;

{------------------------------------------------------------------------------]
[ function WalkMyPath(Path: TPointArray; FirstToLast: Boolean): Boolean; ]
[ by: ZephyrsFury ]
[ Description: Walks a path using reflection. ]
{------------------------------------------------------------------------------}
function WalkMyPath(Path: TPointArray; FirstToLast: Boolean): Boolean;
var
Closest, Nxt, LastPt, Incr, Att: Integer;
begin
LastPt := High(Path) * Integer(FirstToLast);
Incr := Integer(FirstToLast) * 2 - 1;
Closest := GetClosestTileInPath(Path);
if (DistanceFrom(Path[Closest].x, Path[Closest].y) > 3) then
if (not(WalkToTileTol(Path[Closest].x, Path[Closest].y, 5))) then
begin
WriteLn('Too far from Path to start walking...');
Exit;
end else
begin
AntiBanProc;
{R_}FFlag(10);
FindNormalRandoms;
end;
Att := 0;
while (GetClosestTileInPath(Path) <> LastPt) do
begin
Nxt := GetClosestTileInPath(Path) + Incr;
WriteLn('Walking to Path Index: ' + IntToStr(Nxt) + ' (' + IntToStr(Path[Nxt].x) +', ' + IntToStr(Path[Nxt].y) + ').');
if (not(WalkToTileTol(Path[Nxt].x, Path[Nxt].y, 5))) then
begin
if (Att > 3) then Break;
Inc(Att);
while (CharacterMoving) do
Wait(100);
FindNormalRandoms;
end else Att := 0;
AntiBanProc;
{R_}FFlag(10);
FindNormalRandoms;
end;
Result := GetClosestTileInPath(Path) = LastPt;
end;

{------------------------------------------------------------------------------]
[ function GetPlayerLoc: string; ]
[ by: ZephyrsFury ]
[ Description: Returns the players location based on your position on the map.]
{------------------------------------------------------------------------------}
function GetPlayerLoc: string;
var
px, py, J, Closest, L: Integer;
cPath: TPointArray;
begin
Result := '';
GetMyPos(px, py);
L := 10;
if (PointInBox(Point(px, py), IntToBox(3092 - L, 3243 - L, 3092 + L, 3243 + L))) then
Result := 'Bank'
else
if (PointInBox(Point(px, py), IntToBox(3028 - L, 3220 - L, 3028 + L, 3220 + L))) then
Result := 'Sarim'
else
if (PointInBox(Point(px, py), IntToBox(2956 - L, 3146 - L, 2956 + L, 3146 + L))) then
Result := 'Karamja'
else
if (PointInBox(Point(px, py), IntToBox(2924 - L, 3180 - L, 2924 + L, 3180 + L))) then
Result := 'Fish'
else
begin
for I := 0 to High(Paths) do
for J := 0 to High(Paths[I]) do
begin
cPath := Paths[I][J];
Closest := GetClosestTileInPath(cPath);
if (TileOnMM(cPath[Closest].x, cPath[Closest].y)) then
begin
WalkToTile(cPath[Closest].x, cPath[Closest].y);
{R_}FFlag(0);
Result := 'On Path ' + IntToStr(I);
Exit;
end;
end;
end;
end;

{------------------------------------------------------------------------------]
[ function OpenTheBank: Boolean; ]
[ by: ZephyrsFury ]
[ Description: Opens the bank. ]
{------------------------------------------------------------------------------}
function OpenTheBank: Boolean;
begin
if (not(LoggedIn)) then Exit;
if (BankScreen) then
begin
Result := True;
Exit;
end;
WriteDebug('Opening Bank');
if (OpenBankReflection('db')) then
begin
Wait(500 + Random(1000));
Result := True;
Exit;
end else
if (OpenBank('db', False, False)) then
begin
Wait(500 + Random(1000));
Result := True;
Exit;
end;
end;

{------------------------------------------------------------------------------]
[ function FindFishingGear: Boolean; ]
[ by: ZephyrsFury ]
[ Description: Returns true if you have the required gear and money. ]
{------------------------------------------------------------------------------}
function FindFishingGear: Boolean;
var
Amt: Integer;
begin
GameTab(4);
case (GetPlayerLoc) of
'Karamja', 'Fish', 'On Path 1': Amt := 30;
else Amt := 60;
end;
Result := FindDTM(FishEquip.DTM, x, y, MIX1, MIY1, MIX2, MIY2) and (CoinAmount('inv') >= Amt);
end;

{------------------------------------------------------------------------------]
[ procedure ArrangeFishingGear; ]
[ by: ZephyrsFury ]
[ Description: Arranges the gear in inventory. ]
{------------------------------------------------------------------------------}
procedure ArrangeFishingGear;
begin
if (FindDTM(FishEquip.DTM, x, y, MIX1, MIY1, MIX2, MIY2)) then
begin
I := CoordsToItem(x, y);
if (I <> 1) then DragItem(i, 1);
end;
Wait(500 + Random(500));
if (FindBitmapToleranceIn(CoinBitmap, x, y, MIX1, MIY1, MIX2, MIY2, 50)) then
begin
I := CoordsToItem(x, y);
if (I <> 2) then DragItem(i, 2);
end;
Wait(500 + Random(500));
end;

{------------------------------------------------------------------------------]
[ function GetFishingGear: Boolean; ]
[ by: ZephyrsFury ]
[ Description: Finds the fishing gear and gets it from the bank if that fails.]
{------------------------------------------------------------------------------}
function GetFishingGear: Boolean;
var
T, WithdrawAmt: Integer;
begin
if (not(LoggedIn)) then Exit;
if (not(FindFishingGear)) then
begin
if (GetPlayerLoc <> 'Bank') then Exit;
if (not(BankScreen)) then OpenTheBank;
if (BankScreen) then
begin
if (not(FindDTM(FishEquip.DTM, x, y, MIX1, MIY1, MIX2, MIY2))) then
begin
WriteLn('Withdrawing ' + FishEquip.Name + '...');
SearchBank(Lowercase(FishEquip.Name));
Wait(500 + Random(500));
if (FindDTM(FishEquip.DTM, x, y, MSX1, MSY1, MSX2, MSY2)) then
begin
Mouse(x, y, 5, 5, True);
T := GetSystemTime;
while (not(FindDTM(FishEquip.DTM, x, y, MIX1, MIY1, MIX2, MIY2))) and (GetSystemTime - T < 3000) do
Wait(200);
WriteLn('Withdrew ' + FishEquip.Name + '.');
end;
end;
if (CoinAmount('inv') < 60) then
begin
WriteLn('Withdrawing Coins...');
SearchBank('coins');
Wait(500 + Random(500));
if (FindBitmapToleranceIn(CoinBitmap, x, y, 30, 87, 476, 286, 50)) then
begin
Mouse(x, y, 5, 5, False);
Wait(200 + Random(200));
ChooseOption('raw-X');
Wait(500 + Random(500));
WithdrawAmt := RandomRange(500, 1000);
TypeSend(IntToStr(WithdrawAmt));
WriteLn('Withdrew ' + IntToStr(WithdrawAmt) + ' coins.');
T := GetSystemTime;
while (CoinAmount('inv') < 60) and (GetSystemTime - T < 3000) do
Wait(200);
end;
Wait(500 + Random(500));
end;
end;
CloseBank;
Result := FindFishingGear;
end else Result := True;
ArrangeFishingGear;
end;

{------------------------------------------------------------------------------]
[ function LostFishingGear: Boolean; ]
[ by: ZephyrsFury ]
[ Description: Checks to see if you've lost your gear. ]
{------------------------------------------------------------------------------}
function LostFishingGear: Boolean;
begin
if (not(FindColor(x, y, 0, 7, 460, 69, 474))) then
Result := (not(FindFishingGear));
if (Result) then
ClickContinue(True, True);
end;

{------------------------------------------------------------------------------]
[ function FindWhirlPool(ax, ay: Integer): Boolean; ]
[ by: ZephyrsFury ]
[ Description: Finds Whirlpools on Tile (ax, ay). ]
{------------------------------------------------------------------------------}
function FindWhirlPool(ax, ay: Integer): Boolean;
var
WhirlPool: array of TNPC;
II: Integer;
begin
WhirlPool := SortNPCs(GetNPCs);
for II := 0 to High(WhirlPool) do
if (WhirlPool[II].TileX = ax) and (WhirlPool[II].TileY = ay) then
begin
Result := (WhirlPool[II].NPCType = 405);
if (Result) then Exit;
end;
end;

{------------------------------------------------------------------------------]
[ function Fishing: Boolean; ]
[ by: ZephyrsFury ]
[ Description: Returns true if you're currently fishing with a cage or harpoon]
{------------------------------------------------------------------------------}
function Fishing: Boolean;
begin
Result := (InRange(GetAnimation, 618, 619));
end;

{------------------------------------------------------------------------------]
[ function ClickFishingSpot(var ax, ay: Integer): Boolean; ]
[ by: ZephyrsFury ]
[ Description: Finds and clicks a Cage/Harpoon fishing spot. ]
{------------------------------------------------------------------------------}
function ClickFishingSpot(var ax, ay: Integer): Boolean;
var
fsNPC: array of TNPC;
Tx, Ty, II, T: Integer;
begin
FindNormalRandoms;
fsNPC := SortNPCs(GetNPCsByID(324));
if (Length(fsNPC) = 0) then
begin
WriteDebug('Could not find fishing spot!');
Exit;
end;
for II := 0 to High(fsNPC) do
begin
x := 0; y := 0;
if (TileOnMS(fsNPC[II].TileX, fsNPC[II].TileY, 0)) then
TileToMS(fsNPC[II].TileX, fsNPC[II].TileY, 0, x, y);
ax := fsNPC[II].TileX; ay := fsNPC[II].TileY;
if (FindWhirlPool(ax, ay)) then Continue;
if (x = 0) and (y = 0) then
begin
WriteDebug('Fishing spot not on MS.');
TileToMinimap(fsNPC[II].TileX, fsNPC[II].TileY, Tx, Ty);
Mouse(Tx, Ty, 5, 5, True);
{R_}FFlag(0);
MMouse(Tx, Ty, 0, 0);
Result := ClickFishingSpot(ax, ay);
Exit;
end;
WriteDebug('Found fishing spot at ' + IntToStr(x) + ', ' + IntToStr(y) + '.');
Mouse(x, y, 0, 0, False);
Wait(100 + Random(100));
if (ChooseOption(FishEquip.Text)) then
begin
T := GetSystemTime;
while (not(Fishing)) and (GetSystemTime - T < 3000) do
Wait(100);
if (Fishing) then Break;
end;
end;
Result := (Length(fsNPC) > 0) and (II <= High(fsNPC));
end;

{------------------------------------------------------------------------------]
[ procedure HandleTalk; ]
[ by: ZephyrsFury ]
[ Description: Handles talk with the Seaman and Customs officer. ]
{------------------------------------------------------------------------------}
procedure HandleTalk;
var
Messages: TStringArray;
II: Integer;
begin
Messages := ['Yes', 'journey', 'nothing', 'Ok.'];
while (not(FindColor(x, y, 0, 7, 460, 69, 474))) do
begin
ClickContinue(True, True);
for II := 0 to High(Messages) do
if (FindTextTPA(0, 0, MCX1, MCY1, MCX2, MCY2, Messages[II], NPCChars, ClickLeft)) then
Wait(500 + Random(500));
end;
end;

{------------------------------------------------------------------------------]
[ function TalkToNPC(Who: string): Boolean; ]
[ by: ZephyrsFury ]
[ Description: Talks to the 'Seaman' or the 'Customs officer'. ]
{------------------------------------------------------------------------------}
function TalkToNPC(Who: string): Boolean;
var
NPC: TNPC;
Tx, Ty: Integer;
begin
{R_}FFlag(0);
for c := 0 to 2 do
if (FindNPC(Who, NPC)) then
begin
x := 0; y := 0;
x := NPC.MSX;
y := NPC.MSY;
if (x = 0) and (y = 0) then
begin
WriteDebug(Who + ' is not on the main screen.');
TileToMinimap(NPC.TileX, NPC.TileY, Tx, Ty);
Mouse(Tx, Ty, 5, 5, True);
{R_}FFlag(0);
while (CharacterMoving) do
Wait(100);
Result := TalkToNPC(Who);
Exit;
end;
WriteDebug('Found ' + Who + ' at ' + IntToStr(x) + ', ' + IntToStr(y) + '.');
Mouse(x, y, 0, 0, False);
Wait(100 + Random(100));
if (ChooseOption('Pay')) then
begin
FFlag(0);
while (CharacterMoving) do
Wait(100);
Wait(1000 + Random(1000));
HandleTalk;
T := GetSystemTime;
while (CountColor(65536, MMX1, MMY1, MMX2, MMY2) < 10000) and (GetSystemTime - T < 5000) do
Wait(100);
Result := (CountColor(65536, MMX1, MMY1, MMX2, MMY2) > 10000);
if (Result) then Exit;
end;
end else WriteDebug('Could not find ' + Who + '!');
end;

{------------------------------------------------------------------------------]
[ function CrossGangPlank: Boolean; ]
[ by: ZephyrsFury ]
[ Description: Finds and clicks the gangplank on the boat to/from Karamja. ]
{------------------------------------------------------------------------------}
function CrossGangPlank: Boolean;
var
px, py, II: Integer;
begin
for II := 0 to 3 do
begin
GetMyPos(px, py);
case (GetPlayerLoc) of
'Sarim': TP := Point(px - 1, py);
'Karamja': TP := Point(px, py + 1);
end;
{R_}SetAngle(True);
TileToMS(TP.x, TP.y, 0, x, y);
MMouse(x, y, 0, 0);
Wait(100 + Random(50));
if (IsUpText('Cross')) then
begin
Mouse(x, y, 0, 0, True);
T := GetSystemTime;
while (CountColor(65536, MMX1, MMY1, MMX2, MMY2) >= 10000) and (GetSystemTime - T < 5000) do
Wait(100);
Result := (CountColor(65536, MMX1, MMY1, MMX2, MMY2) < 10000);
if (Result) then Exit;
end;
Wait(1000 + Random(500));
end;
end;

{------------------------------------------------------------------------------]
[ procedure CheckLevel; ]
[ by: ZephyrsFury ]
[ Description: Checks for level-ups. ]
{------------------------------------------------------------------------------}
procedure CheckLevel;
var
TempLevel, LvlDiff: Integer;
begin
if (not(LoggedIn)) then Exit;
TempLevel := GetLevel(10);
LvlDiff := (TempLevel - Players[CurrentPlayer].Level[17]);
if (LvlDiff > 0) then
begin
WriteLn('We gained a level!');
IncEx(ReportVars[4], LvlDiff);
IncEx(LevelsGained, LvlDiff);
Players[CurrentPlayer].Level[17] := TempLevel;
SRLRandomsReport;
ClickContinue(True, True);
end;
end;

{------------------------------------------------------------------------------]
[ procedure Location(PLoc: string); ]
[ by: ZephyrsFury ]
[ Description: Sets the players location to PLoc. ]
{------------------------------------------------------------------------------}
procedure Location(PLoc: string);
begin
Players[CurrentPlayer].Loc := PLoc;
WriteLn('Location: ' + PLoc);
end;

{------------------------------------------------------------------------------]
[ procedure WeAreLost(PlayerLoc: string); ]
[ by: ZephyrsFury ]
[ Description: Logs out, sets Player.Active to false and Loc to PlayerLoc. ]
{------------------------------------------------------------------------------}
procedure WeAreLost(PlayerLoc: string);
begin
TakeScreenie(PlayerLoc);
if (Players[CurrentPlayer].Rand <> '') then
begin
Location(Players[CurrentPlayer].Rand);
Players[CurrentPlayer].Active := False;
LogOut;
end else
begin
Location('Lost - ' + PlayerLoc);
Players[CurrentPlayer].Active := False;
LogOut;
end;
end;

{------------------------------------------------------------------------------]
[ procedure Intro; ]
[ by: ZephyrsFury ]
[ Description: Displays intro. ]
{------------------------------------------------------------------------------}
procedure Intro;
begin
WriteLn('');
WriteLn(' ._________. ');
Wait(100);
WriteLn(' \____ \ __ ');
Wait(100);
WriteLn(' / / | | ____ ');
Wait(100);
WriteLn(' / / _____ ._______ | |____.___ ___.____\ /______ ');
Wait(100);
WriteLn(' / / / ___ \ ___ \ _ \ \/ / _ \/ ____/ ');
Wait(100);
WriteLn(' ./ /__\ ____/| ___/ | | |\ /| | \_/\____ \ ');
Wait(100);
WriteLn(' \_________\______\| | |__| |__| \ / |__| /______/ ');
Wait(100);
WriteLn(' |___| Ver ' + VerNumber + ' /__/ Karamja Fisher ');
WriteLn('');

Status('Zephyr''s Karamja Fisher ' + VerNumber);
end;

{------------------------------------------------------------------------------]
[ procedure ScriptTerminate; ]
[ by: ZephyrsFury ]
[ Description: Called when the script terminates. ]
{------------------------------------------------------------------------------}
procedure ScriptTerminate;
begin
FreeDTM(LobDTM);
FreeDTM(SwordDTM);
FreeDTM(TunaDTM);
ProgressReport;
Writeln('Thanks for using Zephyr''s Karamja Fisher');
end;

{------------------------------------------------------------------------------]
[ procedure SetupScript; ]
[ by: ZephyrsFury ]
[ Description: Sets up the script. ]
{------------------------------------------------------------------------------}
procedure SetupScript;
begin
ClearDebug;
Intro;
SmartSetup('world'+IntToStr(SmartWorldNo), True, Signed, False);
SetTargetDC(SMARTGetDC);
SetupSRL;
SetupReflection;
ScriptID := '942';
SRLID := SRLStatsID;
SRLPassword := SRLStatsPass;
for I := 0 to High(Players) do
begin
Players[I].Loc := Capitalize(Players[I].Loc);
Players[I].Strings[0] := Capitalize(Players[I].Strings[0]);
end;
LoadDTMs;
LoadPaths;
DeclarePlayers;
LoginPlayer;
{SetAudioOff;}
end;

{------------------------------------------------------------------------------]
[ procedure SetupPlayer; ]
[ by: ZephyrsFury ]
[ Description: Sets up the players. ]
{------------------------------------------------------------------------------}
procedure SetupPlayer;
begin
CurLoads := 0;
MarkTime(AntiBanMark);
MarkTime(RunTime);
MakeCompassR('n');
{R_}SetAngle(True);
Players[CurrentPlayer].Level[17] := GetLevel(10);
Players[CurrentPlayer].Level[8] := GetLevel(3);
WriteLn('Fishing Level is ' + IntToStr(Players[CurrentPlayer].Level[17]));
if (Players[CurrentPlayer].Level[17] < FishEquip.Level) then
begin
WeAreLost('Too Low Fishing');
Exit;
end;
if (Players[CurrentPlayer].Strings[0] = 'Highest') then
begin
if (InRange(Players[CurrentPlayer].Level[17], 40, 49)) then
Players[CurrentPlayer].Strings[0] := 'Cage'
else
Players[CurrentPlayer].Strings[0] := 'Harpoon';
end;
case (Players[CurrentPlayer].Strings[0]) of
'Cage': with FishEquip do
begin
Name := 'Lobster Pot';
Text := 'Cage';
Level := 40;
DTM := DTMFromString('78DA63D46564608805622490E0C4C3A003140' +
'289FE0702462D202B10550D4416460269054C7330D4280159C904' +
'D4180159D904D4D8005971F8D500000A9A0833');
end;
'Harpoon': with FishEquip do
begin
Name := 'Harpoon';
Text := 'Harpoon';
Level := 35;
DTM := DTMFromString('78DA63D46364608801622490E0C1C3A003140' +
'289FE07024655202B07550D44164602694D202B81801A034CBB30' +
'D4E80359A104D4980259E104D418025961F8D50000596408C7');
end;
end;
SetAllChats('on', 'off', '', '', '');
FindNormalRandoms;
if (not(GetFishingGear)) then
begin
WeAreLost('No Fishing Gear');
Exit;
end;
if (GetPlayerLoc <> '') then
Location(GetPlayerLoc)
else
begin
WeAreLost('Loc detection failed');
WriteLn('Script Failed to detect your location.');
end;
end;

{------------------------------------------------------------------------------]
[ procedure PlayerLoop; ]
[ by: ZephyrsFury ]
[ Description: The player loop. ]
{------------------------------------------------------------------------------}
procedure PlayerLoop;
begin
repeat
if (Players[CurrentPlayer].Loc = 'Bank') then
begin
if (InvCount > 2) or (not(GetFishingGear)) then
begin
Location('At Bank');
PlayerLoop;
Exit;
end;
Location('Bank To Sarim');
end else

if (Players[CurrentPlayer].Loc = 'Bank To Sarim') then
begin
SetRun(True);
if (WalkMyPath(Paths[0][Random(Length(Paths[0]))], True)) then
Location('Sarim To Karamja')
else
begin
WeAreLost('Bank To Sarim Failed');
Exit;
end;
end else

if (Players[CurrentPlayer].Loc = 'Sarim To Karamja') then
begin
if (TalkToNPC('Seaman')) then
begin
T := GetSystemTime;
while (GetColor(496, 22) <> 100398) and (GetSystemTime - T < 10000) do
Wait(100);
T := GetSystemTime;
while (GetColor(496, 22) = 100938) and (GetSystemTime - T < 20000) do
Wait(1000);
if (Random(3) = 0) then ClickContinue(True, True);
if (not(CrossGangPlank)) then
begin
WeAreLost('Gang Plank Failed');
Exit;
end;
if (GetPlayerLoc = 'Karamja') then
Location('Karamja To Fish')
else
begin
WeAreLost('Ship Boarding Failed');
Exit;
end;
end else
begin
WeAreLost('No Sailor');
Exit;
end;
end else

if (Players[CurrentPlayer].Loc = 'Karamja To Fish') then
begin
SetRun(True);
if (WalkMyPath(Paths[1][Random(Length(Paths[1]))], True)) then
Location('Fish')
else
begin
WeAreLost('Karamja To Fish Failed');
Exit;
end;
end else

if (Players[CurrentPlayer].Loc = 'Fish') then
begin
SetRun(True);
while (LoggedIn) and (InvCount < 28) do
begin
if (ClickFishingSpot(Sx, Sy)) then
begin
MarkTime(TabsCounter);
TabsCountTo := 35000 + Random(5000);
while (Fishing) do
begin
if (not(LoggedIn)) then Break;
if (TimeFromMark(TabsCounter) >= TabsCountTo) and (TimeFromMark(AntiBanMark) >= 15000 + Random(5000)) then
begin
WriteDebug('Switching Tabs to avoid logging out...');
GameTab(Random(14) + 1);
Wait(1000 + Random(500));
GameTab(4);
TabsCountTo := 35000 + Random(5000);
MarkTime(TabsCounter);
MarkTime(AntiBanMark);
GetClientDimensions(x, y);
MMouse(Random(x), Random(y), 0, 0);
end;
AntiBanProc;
FindNormalRandoms;
if (FindFight) then
begin
WalkMyPath([Paths[1][1][5], Paths[1][1][4], Paths[1][1][3]], True);
Wait(5000 + Random(5000));
WalkMyPath([Paths[1][1][5], Paths[1][1][4], Paths[1][1][3]], False);
Inc(Fights);
Break;
end;
if (FindWhirlPool(Sx, Sy)) then
begin
WriteLn('WhirlPool Detected...');
Inc(WhirlPools);
Break;
end;
if (LostFishingGear) then
begin
WriteLn('You seem to have lost your Fishing Gear, going back to bank...');
Location('Fish To Karamja');
Exit;
end;
CheckLevel;
end;
Wait(500 + Random(3000));
end;
end;
if (InvFull) then
begin
WriteLn('Inventory Full, going back to Bank');
Location('Fish To Karamja');
end;
end else

if (Players[CurrentPlayer].Loc = 'Fish To Karamja') then
begin
SetRun(True);
if (WalkMyPath(Paths[1][Random(Length(Paths[1]))], False)) then
Location('Karamja To Sarim')
else
begin
WeAreLost('Fish To Karamja Failed');
Exit;
end;
end else

if (Players[CurrentPlayer].Loc = 'Karamja To Sarim') then
begin
if (TalkToNPC('Customs officer')) then
begin
T := GetSystemTime;
while (GetColor(496, 22) <> 100398) and (GetSystemTime - T < 5000) do
Wait(100);
T := GetSystemTime;
while (GetColor(496, 22) = 100398) and (GetSystemTime - T < 20000) do
Wait(1000);
if (Random(3) = 0) then ClickContinue(True, True);
if (not(CrossGangPlank)) then
begin
WeAreLost('Gang Plank Failed');
Exit;
end;
if (GetPlayerLoc = 'Sarim') then
Location('Sarim To Bank')
else
begin
WeAreLost('Ship Boarding Failed');
Exit;
end;
end else
begin
WeAreLost('No Customs officer');
Exit;
end;
end else

if (Players[CurrentPlayer].Loc = 'Sarim To Bank') then
begin
SetRun(True);
if (WalkMyPath(Paths[0][Random(Length(Paths[0]))], False)) then
Location('At Bank')
else
begin
WeAreLost('Sarim To Bank Failed');
Exit;
end;
end else

if (Players[CurrentPlayer].Loc = 'At Bank') then
begin
WriteDebug('Opening Bank..');
if (OpenTheBank) then
begin
WriteDebug('Depositing Fish...');
if (Players[CurrentPlayer].Strings[0] = 'Cage') then
begin
FishCount := CountItems(LobDTM, 'dtm', []);
IncEx(Players[CurrentPlayer].Integers[10], FishCount);
IncEx(TotalFishCount, FishCount);
IncEx(ReportVars[1], FishCount);
IncEx(TotalLobCount, FishCount);
end;
if (Players[CurrentPlayer].Strings[0] = 'Harpoon') then
begin
FishCount := CountItems(SwordDTM, 'dtm', []);
IncEx(Players[CurrentPlayer].Integers[10], FishCount);
IncEx(TotalFishCount, FishCount);
IncEx(ReportVars[2], FishCount);
IncEx(TotalSwordCount, FishCount);
FishCount := CountItems(TunaDTM, 'dtm', []);
IncEx(Players[CurrentPlayer].Integers[10], FishCount);
IncEx(TotalFishCount, FishCount);
IncEx(ReportVars[3], FishCount);
IncEx(TotalTunaCount, FishCount);
end;
Deposit(3, 28, True);

Inc(Players[CurrentPlayer].Integers[11]);
Inc(TotalLoads);
Inc(ReportVars[0]);
Inc(Banks);
Inc(CurLoads);

end else
begin
WeAreLost('Open Bank Failed');
Exit;
end;

if (not(GetFishingGear)) then
begin
WeAreLost('No Fishing Gear');
Exit;
end;

CloseBank;
Location('Bank');
ProgressReport;
end else

if (Players[CurrentPlayer].Loc = 'Karamja') then
begin
if (CountColor(65536, MMX1, MMY1, MMX2, MMY2) > 10000) then
if (not(CrossGangPlank)) then
begin
WeAreLost('Gang Plank Failed');
Exit;
end;
if (InvCount > 14) then Location('Karamja To Sarim')
else Location('Karamja To Fish');
end else

if (Players[CurrentPlayer].Loc = 'Sarim') then
begin
if (CountColor(65536, MMX1, MMY1, MMX2, MMY2) > 10000) then
if (not(CrossGangPlank)) then
begin
WeAreLost('Gang Plank Failed');
Exit;
end;
if (InvCount > 14) then Location('Sarim To Bank')
else Location('Sarim To Karamja');
end else

if (Pos('On Path', Players[CurrentPlayer].Loc) > 0) then
begin
case (Players[CurrentPlayer].Loc[9]) of
'0': Location('Sarim To Bank');
'1': Location('Karamja To Fish');
end;
end;

until(TimeToGo);
end;

begin
SetupScript;
repeat
SetupPlayer;
PlayerLoop;
if (AllPlayersInactive) then Break;
NextPlayer(Players[CurrentPlayer].Active);
until(False);
end.

Edit:
  • I love that you made your own type (TFishEquip), people should do that more, imo, it's easier to use by yourself if you understand it.
  • I love the way you load the paths
  • Fantastic Progress Report, fascinating!
  • function GetClosestTileInPath(Path: TPointArray): Integer;
  • Great idea! Now I see why you "converted" those tiles into tpoints:) In that function:
    Last := 1 shl 20;
    I know that that's bitshifting and that's actually "1048576", but I don't understand why you use it. Especially in combination with this:
    Dist := Distance(x, y, Path[II].x, Path[II].y);
    if (Dist > Last) then [B]Continue[/B];
    Is it ment to detect invalid tiles or so?
  • WalkMyPath
    Just totally awesome!:)
  • function GetPlayerLoc: string;
    nice idea of using the tiles to determine current player's loc!:)
  • function OpenTheBank: Boolean;
    You even open the bank with reflection:p
  • function GetFishingGear: Boolean;
  • Good back-up you've got over there (the bank searching);)
  • function FindWhirlPool(ax, ay: Integer): Boolean;
  • Result := (WhirlPool[II].NPCType = 405);
    Is that the ID of a whirlpool or so?
  • function Fishing: Boolean;
    Haha, animation, fabulous!:p;)
  • function ClickFishingSpot(var ax, ay: Integer): Boolean;
  • Brilliant coding! Also the
    if (FindWhirlPool(ax, ay)) then Continue;
    part in the loop to check if the found spot became a whirlpool. If it is it'll check for the next spot, very nice:D
  • function CrossGangPlank: Boolean;
    Again nice usage of reflection:)
  • <3 random path walking:)
  • <3 usage of player location

..and Zephyr did it again!! imo, this is the best karamja fisher/banker that's ever been made! (I hope it beats Nielsie's private one:p)

Thanks to your script, I realized how efficient reflection is, and I'll probably make a reflection script aswell:);)

Congratulations with this fantastic script!

Yource,

-Tsn.

Harry

2008-08-03 09:59:04

Wowow, nice job Zephyr! I love your new 180*180 avvy too :p

And R_* are new anti-ban and sutff like that - just rename to the current ones, or simply remove.

n3ss3s

2008-08-03 10:03:34

Great work! :)

I'll help you on your way to two greenies ;)


What the hell? The above was meant to be a joke but it gave you two buttons! :p

Gratz!!!

Hugolord

2008-08-03 11:20:07

erm.. I keep getting:

[Runtime Error] : Exception: Access violation at address 006D3B83 in module 'scar.exe'. Read of address 00000000 in line 660 in script

jose89

2008-08-03 11:47:23

I get the following errors while starting in draynor bank with harpoon-slot1 and coins in slot 2

** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
[Runtime Error] : Out Of Range in line 37 in script C:\Program Files\SCAR 3.15\includes\SRL\SRL\Reflection\Objects.Scar

Wizzup?

2008-08-03 12:00:29

Function ClosestTile(Path: TPointArray): Integer;

Var
I: Integer;
p: TPoint;

Begin
GetMyPos(p.X, p.Y);
Result := 0;
For I := 0 To High(Path) Do
If Distance(p.x, p.y, Path[I].X, Path[I].Y) < Distance(p.x, p.y, Path[Result].X, Path[Result].Y) Then
Result := I;
End;

Is faster, although I love the 1 shl 20. (It reminds me of my first TPointArray functions… :p )
Anyway, you took over my (and yakman's) walking idea nicely. Good job… :)

Boingpie

2008-08-03 12:21:24

i get this error

Fishing Level is 40
** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
Location: Lost - No Fishing Gear

i dont really know why because im not lost (im at the fishing spot in karajama) and i got fishing gear (lobster pot)

NightBlade

2008-08-03 13:31:18

Updated to latest revision…

** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
[Runtime Error] : Out Of Range in line 37 in script C:\Program Files\SCAR 3.15\includes\SRL\SRL\Reflection\Objects.Scar

sjlou

2008-08-03 13:46:35

cool im gonna download it and try to learn alot of reflection :D
while running it with one of my chars :D

unl

2008-08-03 14:07:48

im gonna try this on my skiller, hope it works good :D

ill post proggies later ;)

EDIT:

seem to get an error….. :(
Line 389: [Error] (17247:4): Unknown identifier 'R_SetAngle' in script C:\Documents and Settings\Unl\Bureaublad\KaramjaFisher 1[1].0.scar

sjlou

2008-08-03 15:21:14

From: NightBlade
Updated to latest revision…

** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
[Runtime Error] : Out Of Range in line 37 in script C:\Program Files\SCAR 3.15\includes\SRL\SRL\Reflection\Objects.Scar


i keep getting the same error :(

Boingpie

2008-08-03 15:32:41

From: unl
im gonna try this on my skiller, hope it works good :D

ill post proggies later ;)

EDIT:

seem to get an error….. :(
Line 389: [Error] (17247:4): Unknown identifier 'R_SetAngle' in script C:\Documents and Settings\Unl\Bureaublad\KaramjaFisher 1[1].0.scar


read the 6thpost, copy script and replace it, it wasnt updated for the newest revision i think

the scar noob

2008-08-03 16:11:28

I remade a reflection debugger (TheGuyWhoGotOn's one edited:p) and when I wanted to test it, I foudn in the debug:
[Runtime Error] : Exception: Access violation at address 0050DE49 in module 'scar.exe'. Write of address 00000000 in line 149 in script C:\Program Files\SCAR 3.15\includes\SRL\SRL\Reflection\Characters.Scar


I got this error because I used the files you need to run this script (files in seperated folder etc).

I tried it with the normal Reflection.scar and I didnt had the error, and everything works:)

=> There's something wrong with those files, check it;)


-Tsn.

P1nky

2008-08-03 16:20:12

OMGZOR! Erik u never told me about this Gj

dang already 20 hrs in srl stats wewps, Naum's did good too but this looks more relialble gj once again!

yourock12345

2008-08-03 17:43:19

umm i get the line 37 error in objects.scar also… wats up???


** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
[Runtime Error] : Out Of Range in line 37 in script C:\Program Files\SCAR 3.15\includes\SRL\SRL\Reflection\Objects.Scar

unl

2008-08-03 18:15:41

From: Boingpie
read the 6thpost, copy script and replace it, it wasnt updated for the newest revision i think


ehh ye i copy'd the script in post 6 but now im also getting the line 37 error..

** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
[Runtime Error] : Out Of Range in line 37 in script C:\Documents and Settings\Unl\Bureaublad\Scar\includes\SRL\SRL\Reflection\Objects.Scar

anyone know how to fix this yet?

the scar noob

2008-08-03 19:19:21

From: unl
ehh ye i copy'd the script in post 6 but now im also getting the line 37 error..

** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
[Runtime Error] : Out Of Range in line 37 in script C:\Documents and Settings\Unl\Bureaublad\Scar\includes\SRL\SRL\Reflection\Objects.Scar

anyone know how to fix this yet?


Do you get this error after the script ran for a while, or does it just not compile?

-Tsn.

mercvii

2008-08-03 20:12:36

From: the scar noob
Do you get this error after the script ran for a while, or does it just not compile?

-Tsn.



I got it also. I hit run, smart loads, logs in, and then the error occurs and hte script terminates. It successfully got my fishing level though. I tried having money in 1st inventory and pot in 2nd, and vice versa, and it occurred both ways.

jose89

2008-08-03 20:26:19

I got the error after it successfully compiled and log in for me then immediately got this.

** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
[Runtime Error] : Out Of Range in line 37 in script C:\Program Files\SCAR 3.15\includes\SRL\SRL\Reflection\Objects.Scar

Widget

2008-08-03 21:36:47

Gah, this is something I'll have to look into. The reason this is still in the members section is because it's still not ready for the public and is undergoing heavy development/changes. *sigh*.

NiCbaZ

2008-08-03 22:00:33

the error is that some one has edited ss23 function in OpenBankReflection and it gets a runtime error

Rsnerdx

2008-08-04 02:54:47

it sais i need reflection.scar

n3ss3s

2008-08-04 03:41:07

I hope it beats Nielsie's private one


This script is great… But Nielsie's private one… There is something pure evil in it… Rumors say that crabs actually come to his bank… and wifes nor children aren't an exception :(

ZephyrsFury

2008-08-04 04:18:38

Lol I didn't expect this script to be so popular. Uh I get I didn't check enough for errors and forgot that my version of SVN is different from the public one :(

For those that get this error:

** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**

Thats because of a small bug in SRL. To fix it (it will be fixed in the next rev), go to Line 393 in amount.scar:


Result := ItemAmount(area, 'bmp,', coinbmp, [40]);

and change that to:


Result := ItemAmount(area, 'bmp', coinbmp, [50]);

I also had to add a larger tol to the bitmap cos the colours have changed.

Also you should redownload the script cos I forgot that I've added stuff to the Reflection Svn without commiting it. :duh:

Thanks again. :)

Dangerous Garden Tools

2008-08-04 04:30:57

Line 1011: [Error] (17869:1): Unknown identifier 'SetAudioOff' in script C:\Documents and Settings\Administrator\Desktop\KaramjaFisher 1.0(2).scar

[Runtime Error] : Out Of Range in line 37 in script C:\Program Files\SCAR 3.15\includes\SRL\SRL\Reflection\Objects.Scar

** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
I edited this one like you said, still getting the error.

ZephyrsFury

2008-08-04 04:37:34

From: Dangerous Garden Tools
Line 1011: [Error] (17869:1): Unknown identifier 'SetAudioOff' in script C:\Documents and Settings\Administrator\Desktop\KaramjaFisher 1.0(2).scar

[Runtime Error] : Out Of Range in line 37 in script C:\Program Files\SCAR 3.15\includes\SRL\SRL\Reflection\Objects.Scar

** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
I edited this one like you said, still getting the error.


Gah me being noob again…

I'll reupload the script again and fix that SetAudioOff error. Not sure about the second error. And in the third error you haven't copied correctly or something cos its still 'bmp,' not 'bmp' (no comma). ;)

Dangerous Garden Tools

2008-08-04 05:02:30

Got it to work, really great, now how can i stop smart from lagging.

P.s- I have a ghetto computer :(

EvilChicken!

2008-08-04 06:09:28

From: Dangerous Garden Tools
Got it to work, really great, now how can i stop smart from lagging.

P.s- I have a ghetto computer :(


Disable graphics and minimize it. :)

Hugolord

2008-08-04 06:16:04

[————————————————————————————]
[ >>> Zephyr`s Karamja Fisher Ver 1.0 <<< ]
[————————————————————————————]
[ Total Time Running: 19 Minutes and 57 Seconds ]
[ Total Loads Done: 3 ]
[ Total Fish Caught: 78 ]
[ o Lobsters: 78 ]
[ Fishing Rate: 235 Fish/Hr ]
[ Total Fishing Exp Gained: 7020 ]
[ Experience Gain Rate: 21113 Exp/Hr ]
[ Fishing Levels Gained: 0 ]


Was just testing to see if it worked and it does.

Now, onto learning reflection..

unl

2008-08-04 07:16:49

thx man i got it running now.
runs really good and fast, only the fishing is slow cus im still 45 XD

il post proggy later when its stuck or something

edit:
well i tought it was going quite well but then it banked the first load, and i get another error..

[Runtime Error] : Out Of Range in line 37 in script C:\Documents and Settings\Unl\Bureaublad\Scar\includes\SRL\SRL\Reflection\Objects.Scar

sjlou

2008-08-04 12:20:53

[————————————————————————————]
[ Total Time Running: 1 Hours, 27 Minutes and 25 Seconds ]
[ Total Loads Done: 9 ]
[ Total Fish Caught: 234 ]
[ o Lobsters: 234 ]
[ Fishing Rate: 161 Fish/Hr ]
[ Total Fishing Exp Gained: 21060 ]
[ Experience Gain Rate: 14455 Exp/Hr ]
[ Fishing Levels Gained: 0 ]
[————————————————————————————]
[ | Nick | Act | Loc | Lvl | Loads | Fish | Time ]
[ o | hi| F | Lost - No Customs officer | 70 | 7 | 182 | 57 min ]
[ o | hi| F | Lost - Karamja To Fish Failed | 70 | 2 | 52 | 20 min ]
[————————————————————————————]

unl

2008-08-04 12:25:04

From: dushii
[————————————————————————————]
[ Total Time Running: 1 Hours, 27 Minutes and 25 Seconds ]
[ Total Loads Done: 9 ]
[ Total Fish Caught: 234 ]
[ o Lobsters: 234 ]
[ Fishing Rate: 161 Fish/Hr ]
[ Total Fishing Exp Gained: 21060 ]
[ Experience Gain Rate: 14455 Exp/Hr ]
[ Fishing Levels Gained: 0 ]
[————————————————————————————]
[ | Nick | Act | Loc | Lvl | Loads | Fish | Time ]
[ o | hi| F | Lost - No Customs officer | 70 | 7 | 182 | 57 min ]
[ o | hi| F | Lost - Karamja To Fish Failed | 70 | 2 | 52 | 20 min ]
[————————————————————————————]




how did you get it to work properly ? :eek:
i getting an error after it does 1 trip and trys to bank

Boingpie

2008-08-04 13:46:28

i got still error when i downloaded the newest script.
Failed when compiling
Line 394: [Error] (17252:4): Unknown identifier 'R_SetAngle' in script C:\Documents and Settings\****\My Documents\Runescape\KaramjaFisher 1.0.scar
Any help on this?

sjlou

2008-08-04 16:17:47

From: unl
how did you get it to work properly ? :eek:
i getting an error after it does 1 trip and trys to bank


i deleted my reflection map and made a new one and updated it to Revision 40:


and boingpie do the same as i did and it should work

Timer

2008-08-04 16:24:27

From: Boingpie
i got still error when i downloaded the newest script.
Failed when compiling
Line 394: [Error] (17252:4): Unknown identifier 'R_SetAngle' in script C:\Documents and Settings\****\My Documents\Runescape\KaramjaFisher 1.0.scar
Any help on this?


Please download latest reflection files… :p

jose89

2008-08-04 16:49:02

Sorry for being nooby but I can't find that line in amount.scar


function CountItemsBmp(area: string; bmp, tol: Integer): Integer;
var
coords: TPointArray;
begin
coords := ItemCoordsBmp(area, bmp, tol);
Result := GetArrayLength(coords);
end;

lines 390-396 in amount.scar I have rev 20

kingarabian

2008-08-04 23:56:43

[————————————————————————————]
[ August 4th, 2008, 05:25:45 PM ]
[————————————————————————————]
[ >>> Zephyr`s Karamja Fisher Ver 1.0 <<< ]
[————————————————————————————]
[ Total Time Running: 34 Minutes and 8 Seconds ]
[ Total Loads Done: 2 ]
[ Total Fish Caught: 52 ]
[ o Lobsters: 52 ]
[ Fishing Rate: 91 Fish/Hr ]
[ Total Fishing Exp Gained: 4680 ]
[ Experience Gain Rate: 8227 Exp/Hr

=/ hope i get a better run tonight.

Dangerous Garden Tools

2008-08-05 01:16:05

could you make it without smart? Ive done things to lower lag, but its just not enough lol

Method

2008-08-05 01:17:49

From: Dangerous Garden Tools
could you make it without smart? Ive done things to lower lag, but its just not enough lol


Reflection with SCAR only works with SMART currently. Without SMART the script couldn't function.

ZephyrsFury

2008-08-05 04:14:37

From: jose89
Sorry for being nooby but I can't find that line in amount.scar


function CountItemsBmp(area: string; bmp, tol: Integer): Integer;
var
coords: TPointArray;
begin
coords := ItemCoordsBmp(area, bmp, tol);
Result := GetArrayLength(coords);
end;

lines 390-396 in amount.scar I have rev 20


CountItemsBMP was removed in Rev 18 or something so you definately don't have rev 20 :p

HayHay89

2008-08-05 08:57:51

[------------------------------------------------------------------------------------]
[ >>> Zephyr`s Karamja Fisher Ver 1.0 <<< ]
[------------------------------------------------------------------------------------]
[ Total Time Running: 1 Hours, 31 Minutes and 31 Seconds ]
[ Total Loads Done: 11 ]
[ Total Fish Caught: 286 ]
[ o Lobsters: 286 ]
[ Fishing Rate: 188 Fish/Hr ]
[ Total Fishing Exp Gained: 25740 ]
[ Experience Gain Rate: 16876 Exp/Hr ]
[ Fishing Levels Gained: 0 ]
[------------------------------------------------------------------------------------]
[ | Nick | Act | Loc | Lvl | Loads | Fish | Time ]
[ o | F | Lost - No Customs officer | 70 | 11 | 286 | 89 min ]
[------------------------------------------------------------------------------------]

awesome script mate i luv reflection it got lost at customs officer
coming from a full inv going to port sarim

Location: Fish
Inventory Full, going back to Bank
Location: Fish To Karamja
Walking to Path Index: 5 (2924, 3172).
Walking to Path Index: 4 (2914, 3164).
Walking to Path Index: 3 (2917, 3151).
Walking to Path Index: 2 (2929, 3152).
Walking to Path Index: 1 (2942, 3145).
Walking to Path Index: 0 (2956, 3146).
Location: Karamja To Sarim
Location: Lost - No Customs officer


was facing the walking plank hope i helped this was just my main ill get my army onto it later

kingarabian

2008-08-05 11:35:30

Hooks are now fucked since rs updated?

Method

2008-08-05 13:27:39

From: kingarabian
Hooks are now fucked since rs updated?


If there was an update, then I assume they wouldn't work.

Dangerous Garden Tools

2008-08-05 17:40:21

From: Method
Reflection with SCAR only works with SMART currently. Without SMART the script couldn't function.



well is there any other way i can lower lag? i gets to the fishing spot and lags out. Ive read tuts to lower it, but it just hasnt helped enough.

Method

2008-08-05 18:24:56

From: Dangerous Garden Tools
well is there any other way i can lower lag? i gets to the fishing spot and lags out. Ive read tuts to lower it, but it just hasnt helped enough.


Try lowering the FPS bar in SMART (the one on the right side) and that may help to fix your lag. Otherwise, you'll probably just have to avoid using SMART altogether until your computer can handle it.

Dangerous Garden Tools

2008-08-06 01:54:34

logs in and just sits there >.>

NiCbaZ

2008-08-06 02:03:56

yeah hooks our outdated.

Method

2008-08-06 02:04:01

RuneScape updated (twice) today, so the hooks are outdated. You need to wait until they're updated to use any reflection script.

unl

2008-08-06 07:29:46

lmfao look at my fishing lvl :"D

SRL Compiled in 5797 msec
Welcome to Runescape.
*********
Creating the NickTPA.
Fishing Level is 65535

the scar noob

2008-08-06 10:31:05

From: unl
lmfao look at my fishing lvl :"D

SRL Compiled in 5797 msec
Welcome to Runescape.
*********
Creating the NickTPA.
Fishing Level is 65535


haha, lol! 65535 is the highest integer value at pascal/delphi:)

Don't use the script, hooks are outdated….!!

-Tsn.

ZephyrsFury

2008-08-07 04:30:36

From: the scar noob
haha, lol! 65535 is the highest integer value at pascal/delphi:)

Don't use the script, hooks are outdated….!!

-Tsn.


You sure its not just my script being so good that it gets you 65535 fishing without fishing anything? :p

tarajunky

2008-08-07 12:10:06

The hooks are up to date now in the Reflection svn.

The script works great. Too good, in my opinion. Watching it walk is almost painful, since it's so precise. It always seems to click the next spot just before your character would stop running, which is the most efficient way to do it, but seems bot-like to me. It also never clicks on the wrong kind of fishing spot. It always clicks the Cage/Harpoon one the first time, which no real player could do.

The only 'problem' was that it mistakenly thought it had stopped fishing a few times when the delay between lobs was long, which isn't a big deal.

Also, an autoresponder would be the icing on the cake. Good job!

kingarabian

2008-08-07 14:23:24

[————————————————————————————]
[ August 7th, 2008, 06:51:04 AM ]
[————————————————————————————]
[ >>> Zephyr`s Karamja Fisher Ver 1.0 <<< ]
[————————————————————————————]
[ Total Time Running: 1 Hours, 30 Minutes and 35 Seconds ]
[ Total Loads Done: 9 ]
[ Total Fish Caught: 234 ]
[ o Lobsters: 234 ]
[ Fishing Rate: 155 Fish/Hr ]
[ Total Fishing Exp Gained: 21060 ]
[ Experience Gain Rate: 13950 Exp/Hr ]
[ Fishing Levels Gained: 1 ]
[————————————————————————————]
[ | Nick | Act | Loc | Lvl | Loads | Fish | Time ]
[ o | azad| T | Bank | 58 | 9 | 234 | 90 min ]
[————————————————————————————]

NightBlade

2008-08-07 14:23:45

File access error
SRL Compiled in 2391 msec
Welcome to Runescape.

Creating the NickTPA.
Fishing Level is 59
** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
Withdrawing Coins...
Withdrew 832 coins.
** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
Location: Lost - No Fishing Gear
NextPlayer

Creating the NickTPA.
Fishing Level is 64
** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
Withdrawing Coins...
Withdrew 979 coins.
** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
Location: Lost - No Fishing Gear

[------------------------------------------------------------------------------------]
[ August 7th, 2008, 02:19:13 PM ]
[------------------------------------------------------------------------------------]
[ >>> Zephyr`s Karamja Fisher Ver 1.0 <<< ]
[------------------------------------------------------------------------------------]
[ Total Time Running: 1 Minutes and 14 Seconds ]
[ Total Loads Done: 0 ]
[ Total Fish Caught: 0 ]
[ Fishing Rate: 0 Fish/Hr ]
[ Total Fishing Exp Gained: 0 ]
[ Experience Gain Rate: 0 Exp/Hr ]
[ Fishing Levels Gained: 0 ]
[------------------------------------------------------------------------------------]
[ | Nick | Act | Loc | Lvl | Loads | Fish | Time ]
[ o | elbo | F | Lost - No Fishing Gear | 59 | 0 | 0 | 0 min ]
[ o | ezu | F | Lost - No Fishing Gear | 64 | 0 | 0 | 0 min ]
[------------------------------------------------------------------------------------]

Thanks for using Zephyr's Karamja Fisher
Successfully executed

Coins and lobster pot are in inventory

tarajunky

2008-08-07 15:00:53

From: NightBlade

** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**

Coins and lobster pot are in inventory


Looks like you're getting the "bmp," error. You need to read back through the thread to see how to fix it.

NightBlade

2008-08-07 15:03:20

ahhh shit my bad.. :(

sjlou

2008-08-08 01:39:03

almost every time my chars is Lost - No Customs officer
is cause it couldnt talk to the officer

1 he finds him
2 clicks on him
3 coulndt reach him
4 Location: Lost - No Customs officer

maybe add a failsafe there ?

Luski14

2008-08-08 01:39:25

Line 437: [Error] (16975:9): Unknown identifier 'WalkToTileTol' in script C:\Program Files\SCAR 3.15\Scripts\Karamja Fisher + Banker.scar


Error I get.
Scar 3.15b, SRL Rev #20, and most updated Reflection

:( Was looking forward to this.

kingarabian

2008-08-08 02:08:41

From: dushii
almost every time my chars is Lost - No Customs officer
is cause it couldnt talk to the officer

1 he finds him
2 clicks on him
3 coulndt reach him
4 Location: Lost - No Customs officer

maybe add a failsafe there ?


Yea for both officers, there needs to be a failsafe =/. Go for it Zeph.

sweetleaf

2008-08-08 03:03:51

From: kingarabian
Yea for both officers, there needs to be a failsafe =/. Go for it Zeph.


this is also my complaint lol :) but ya i left it on for about 2 hours earlier today, looks like it ran really good, this is a really awsome script lol! i leave for about 3 weeks and come back to some awsome advances in SCAR. reflection is awsome lol!

Rsnerdx

2008-08-08 03:21:37

I dont know wtf is up with this script seems to be good but for me

i run in draynor bank with a cage and all it does is this.

Welcome to Runescape.
(MY USERNAME)
Creating the NickTPA.
Fishing Level is 65535

help!!

Narcle

2008-08-08 03:39:33

Now we need a Catherby fisher for us member folks.[Reflection style] Faster fishing spot. :D

I'd make one, but I have enough projects atm.

kingarabian

2008-08-08 04:20:20

From: Rsnerdx
I dont know wtf is up with this script seems to be good but for me

i run in draynor bank with a cage and all it does is this.

Welcome to Runescape.
(MY USERNAME)
Creating the NickTPA.
Fishing Level is 65535

help!!


Update your reflection folder.

ZephyrsFury

2008-08-08 05:10:50

From: tarajunky
The hooks are up to date now in the Reflection svn.

The script works great. Too good, in my opinion. Watching it walk is almost painful, since it's so precise. It always seems to click the next spot just before your character would stop running, which is the most efficient way to do it, but seems bot-like to me. It also never clicks on the wrong kind of fishing spot. It always clicks the Cage/Harpoon one the first time, which no real player could do.

The only 'problem' was that it mistakenly thought it had stopped fishing a few times when the delay between lobs was long, which isn't a big deal.

Also, an autoresponder would be the icing on the cake. Good job!


Thanks tara.
Yea the walking is great, works well with R_FFlag which makes sure the char doesn't stop for a second or so.
The script always clicks on the Cage/Harpoon fishing spots cos the ID's for each type of fishing spot are different. I might change this when I have time. Also the script uses reflection to find the characters animation so unless the animation changes (he stops fishing) the script will continue to wait. Not sure why it thinks it stopped fishing when it hasn't unless the animations change randomly or something.
And with the autoresponder I don't think I'll be adding it in because as I said before this script isn't really supposed to be flawless with a lot of features. Its merely just a script for people to look at and learn from it. However now that reflection can detect other players it might be worthwhile making an autoresponder that uses reflection. :)

From: dushii
almost every time my chars is Lost - No Customs officer
is cause it couldnt talk to the officer

1 he finds him
2 clicks on him
3 coulndt reach him
4 Location: Lost - No Customs officer

maybe add a failsafe there ?


Yea I probably should add a failsafe. I'll see what I can do.

From: Luski14
Error I get.
Scar 3.15b, SRL Rev #20, and most updated Reflection

:( Was looking forward to this.


Reflection SVN was changed and that function was removed. I've uploaded a new version with the fix.

Thanks everyone for comments, suggestions, etc. :)

the scar noob

2008-08-08 05:51:28

From: ZephyrsFury
Thanks tara.
Yea the walking is great, works well with R_FFlag which makes sure the char doesn't stop for a second or so.
The script always clicks on the Cage/Harpoon fishing spots cos the ID's for each type of fishing spot are different. I might change this when I have time. Also the script uses reflection to find the characters animation so unless the animation changes (he stops fishing) the script will continue to wait. Not sure why it thinks it stopped fishing when it hasn't unless the animations change randomly or something.
And with the autoresponder I don't think I'll be adding it in because as I said before this script isn't really supposed to be flawless with a lot of features. Its merely just a script for people to look at and learn from it. However now that reflection can detect other players it might be worthwhile making an autoresponder that uses reflection. :)



Yea I probably should add a failsafe. I'll see what I can do.



Reflection SVN was changed and that function was removed. I've uploaded a new version with the fix.

Thanks everyone for comments, suggestions, etc. :)


You never said something about my comments:( I thought we were friends *sniff*:p

-Tsn.

ZephyrsFury

2008-08-08 06:39:15

Sorry who are you again??? :p

From: the scar noob

  • I love that you made your own type (TFishEquip), people should do that more, imo, it's easier to use by yourself if you understand it.
  • I love the way you load the paths
  • Fantastic Progress Report, fascinating!
  • function GetClosestTileInPath(Path: TPointArray): Integer;
  • Great idea! Now I see why you "converted" those tiles into tpoints:) In that function:
    Last := 1 shl 20;
    I know that that's bitshifting and that's actually "1048576", but I don't understand why you use it. Especially in combination with this:
    Dist := Distance(x, y, Path[II].x, Path[II].y);
    if (Dist > Last) then [B]Continue[/B];
    Is it ment to detect invalid tiles or so?
  • WalkMyPath
    Just totally awesome!:)
  • function GetPlayerLoc: string;
    nice idea of using the tiles to determine current player's loc!:)
  • function OpenTheBank: Boolean;
    You even open the bank with reflection:p
  • function GetFishingGear: Boolean;
  • Good back-up you've got over there (the bank searching);)
  • function FindWhirlPool(ax, ay: Integer): Boolean;
  • Result := (WhirlPool[II].NPCType = 405);
    Is that the ID of a whirlpool or so?
  • function Fishing: Boolean;
    Haha, animation, fabulous!:p;)
  • function ClickFishingSpot(var ax, ay: Integer): Boolean;
  • Brilliant coding! Also the
    if (FindWhirlPool(ax, ay)) then Continue;
    part in the loop to check if the found spot became a whirlpool. If it is it'll check for the next spot, very nice:D
  • function CrossGangPlank: Boolean;
    Again nice usage of reflection:)
  • <3 random path walking:)
  • <3 usage of player location

..and Zephyr did it again!! imo, this is the best karamja fisher/banker that's ever been made! (I hope it beats Nielsie's private one:p)

Thanks to your script, I realized how efficient reflection is, and I'll probably make a reflection script aswell:);)

Congratulations with this fantastic script!

Yource,

-Tsn.


You own… although a lot of the stuff you mentioned isn't that special. In fact I think the script is rather basic. Nielsie's should be a lot better than this :)

Thanks TSN. :D

BobboHobbo

2008-08-08 06:45:08

Yeah nielse should release his and have a battle of the Devolpers/Admin :)

Luski14

2008-08-08 11:08:50

From: ZephyrsFury

Reflection SVN was changed and that function was removed. I've uploaded a new version with the fix.

Thanks everyone for comments, suggestions, etc. :)


Thank you very much :)
BUT
SRL Compiled in 2746 msec
MY USERNAME
Logged In Player is not in Players array.
MY USERNAME
Logged In Player is not in Players array.

Just does that over and over again. I set up lines 54-71 correctly. Only using one player though, is there an issue with that?

sjlou

2008-08-08 11:20:10

From: Luski14
Thank you very much :)
BUT

Just does that over and over again. I set up lines 54-71 correctly. Only using one player though, is there an issue with that?


    T := GetSystemTime;
while (not(FindColor(Tx, Ty, 0, 8, 458, 45, 470))) and (GetSystemTime - T < 5000) do
Wait(100);
if (FindColor(Tx, Ty, 0, 8, 458, 45, 470)) then
if (not(FindTextTpa(0, 0, 7, 457, 137, 475, Players[CurrentPlayer].Nick, SmallChars, Nothing))) then //Double check if logged in player is what we think it is
begin
WriteLn('Logged In Player is not in Players array.');
LogOut;
Wait(1000 + Random(1000));
LoginPlayer;
Exit;
delete those in your login.scar
the search button is your best friend

Luski14

2008-08-08 13:54:33

From: dushii

delete those in your login.scar
the search button is your best friend


My apologies. Figured that it was part of the script issue, not Scar since I can use other scripts, so I searched just this forum to receive no results.

It is not my goal to have this script work flawlessly overnight or anything. I haven't spent much time on it and it has had limited testing.

I think it can…Once I got past all the errors it does run flawlessly. If all Reflection scripts work as well as this, we are in heaven. Least, for cheating we are. Now I will try and run it overnight and post proggies of as much as it does. If it is working when I wake up I'll stop it. If it works, I bow down.

Also: Does it prioritize? If I bring a harpoon, does it drop the tuna if it catches any to get a full load of just swordfish? If anyone has tested let me know, thanks! :)

noob-2

2008-08-08 16:04:38

Everytime it logs in i have a cage and coins and it always says ** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
Location: Lost - No Fishing Gear

tarajunky

2008-08-08 20:57:43

Look at the first post for the way to fix that 'bmp,' problem


[————————————————————————————]
[ August 8th, 2008, 11:35:26 AM ]
[————————————————————————————]
[ >>> Zephyr`s Karamja Fisher Ver 1.0 <<< ]
[————————————————————————————]
[ Total Time Running: 2 Hours, 46 Minutes and 31 Seconds ]
[ Total Loads Done: 22 ]
[ Total Fish Caught: 438 ]
[ o Lobsters: 438 ]
[ Fishing Rate: 158 Fish/Hr ]
[ Total Fishing Exp Gained: 39420 ]
[ Experience Gain Rate: 14204 Exp/Hr ]
[ Fishing Levels Gained: 1 ]
[————————————————————————————]
[ | Nick | Act | Loc | Lvl | Loads | Fish | Time ]
[ o | **** | F | Lost - Gang Plank Failed | 56 | 22 | 438 | 164 min ]
[————————————————————————————]

kingarabian

2008-08-08 21:20:16

[————————————————————————————]
[ August 8th, 2008, 03:17:39 PM ]
[————————————————————————————]
[ >>> Zephyr`s Karamja Fisher Ver 1.0 <<< ]
[————————————————————————————]
[ Total Time Running: 4 Hours, 5 Minutes and 9 Seconds ]
[ Total Loads Done: 22 ]
[ Total Fish Caught: 572 ]
[ o Lobsters: 572 ]
[ Fishing Rate: 140 Fish/Hr ]
[ Total Fishing Exp Gained: 51480 ]
[ Experience Gain Rate: 12600 Exp/Hr ]
[ Fishing Levels Gained: 1 ]
[————————————————————————————]
[ | Nick | Act | Loc | Lvl | Loads | Fish | Time ]
[ o | azad| F | Lost - No Customs officer | 60 | 22 | 572 222min ]
[————————————————————————————]

Best proggie so far I got =). Look at were it got lost ;).

sjlou

2008-08-08 21:45:37

one of my chars jus got stuck in a loop (tried to fish with no lob cage) for 1 hour+ :(

tarajunky

2008-08-09 00:10:53

One suggestion I have.

I logged into a character that was in a molly random, and after solving it the character was missing the lobster pot. When I tried to run the script, it detected it was still at the dock, saw that there was no pot, and logged out. Why not have it walk back to the bank and check there before automatically assuming there's some sort of error and logging out?

sk80rdie76

2008-08-09 00:11:55


Line 442: [Error] (17404:59): Invalid number of parameters in script

FEAR

2008-08-09 05:00:21

From: sk80rdie76

Line 442: [Error] (17404:59): Invalid number of parameters in script


I got the same error :(

ZephyrsFury

2008-08-09 05:06:32

From: sk80rdie76

Line 442: [Error] (17404:59): Invalid number of parameters in script


You need to get the latest revision of the reflection svn.

StrikerX

2008-08-09 05:23:38

Hey zeph!

I was wondering, i read somewhere that you dont need Player.Nick ''. Because SRL automagicly creats a TPA of the nick.

-Striker

ZephyrsFury

2008-08-09 05:37:26

From: strikerx25
Hey zeph!

I was wondering, i read somewhere that you dont need Player.Nick ''. Because SRL automagicly creats a TPA of the nick.

-Striker


No you still need to declare the players nick. A while ago you had to call a procedure called SetPlayerNicks or something everytime you log in so that it would create a bitmap of the text. But now LoginPlayer already does that and its not needed. If you don't declare the nick it uses the name instead but that can cause problems some times.

StrikerX

2008-08-09 05:53:15

From: ZephyrsFury
No you still need to declare the players nick. A while ago you had to call a procedure called SetPlayerNicks or something everytime you log in so that it would create a bitmap of the text. But now LoginPlayer already does that and its not needed. If you don't declare the nick it uses the name instead but that can cause problems some times.


Thanks for clearing that up. Btw the script cant find the fishing equipment :S

Luski14

2008-08-09 11:35:47

From: strikerx25
Thanks for clearing that up. Btw the script cant find the fishing equipment :S


Read first post.
Seriously…It's in the first damn post…





ALSO: Deleted a proggy…Lasted 7 hours but only did 14 loads. 51fish/hr
Started out at around 210/hr but drastically slowed down overnight and don't understand why. Will post next proggies

sk80rdie76

2008-08-09 12:09:20


Line 706: [Error] (17286:1): Unknown identifier 'TileToMinimap' in script

thats the error i get after i dled the new reflection

EDIT: you have to change tiletominimap to TiletoMM

proggy:
[————————————————————————————]
[ August 9th, 2008, 11:26:20 AM ]
[————————————————————————————]
[ >>> Zephyr`s Karamja Fisher Ver 1.1 <<< ]
[————————————————————————————]
[ Total Time Running: 57 Minutes and 46 Seconds ]
[ Total Loads Done: 5 ]
[ Total Fish Caught: 130 ]
[ o Lobsters: 130 ]
[ Fishing Rate: 135 Fish/Hr ]
[ Total Fishing Exp Gained: 11700 ]
[ Experience Gain Rate: 12152 Exp/Hr ]
[ Fishing Levels Gained: 0 ]
[————————————————————————————]
[ | Nick | Act | Loc | Lvl | Loads | Fish | Time ]
[ o | | T | Sarim To Bank | 74 | 5 | 130 | 57 min ]
[————————————————————————————]

stopped for some reason after taking boat back to port sarim.

tarajunky

2008-08-09 16:33:33

I put same player in twice. That seemed to help.


[————————————————————————————]
[ August 9th, 2008, 03:31:24 PM ]
[————————————————————————————]
[ >>> Zephyr`s Karamja Fisher Ver 1.0 <<< ]
[————————————————————————————]
[ Total Time Running: 4 Hours, 9 Minutes and 15 Seconds ]
[ Total Loads Done: 17 ]
[ Total Fish Caught: 440 ]
[ o Lobsters: 440 ]
[ Fishing Rate: 106 Fish/Hr ]
[ Total Fishing Exp Gained: 39600 ]
[ Experience Gain Rate: 9533 Exp/Hr ]
[ Fishing Levels Gained: 1 ]
[————————————————————————————]
[ | Nick | Act | Loc | Lvl | Loads | Fish | Time ]
[ o | **** | T | Fish | 59 | 13 | 338 | 224 min ]
[ o | **** | F | Lost - No Sailor | 58 | 4 | 102 | 24 min ]
[————————————————————————————]

Boingpie

2008-08-09 18:18:32

Nice script. Using right now, I will run this overnight and give proggie tomorrow morning or whenever i get up. :D It 11:18 and good night.

Rsnerdx

2008-08-09 19:23:14

Line 706: [Error] (17286:1): Unknown identifier 'TileToMinimap' in script C:\Program Files\SCAR 3.15\Scripts\KaramjaFisher 1.1.scar

HELP

sk80rdie76

2008-08-09 19:28:13

From: Rsnerdx
Line 706: [Error] (17286:1): Unknown identifier 'TileToMinimap' in script C:\Program Files\SCAR 3.15\Scripts\KaramjaFisher 1.1.scar

HELP


Change 'TiletoMinimap' to TileToMM.

another proggy:

[------------------------------------------------------------------------------------]
[ August 9th, 2008, 04:25:54 PM ]
[------------------------------------------------------------------------------------]
[ >>> Zephyr`s Karamja Fisher Ver 1.1 <<< ]
[------------------------------------------------------------------------------------]
[ Total Time Running: 56 Minutes and 12 Seconds ]
[ Total Loads Done: 6 ]
[ Total Fish Caught: 156 ]
[ o Lobsters: 156 ]
[ Fishing Rate: 167 Fish/Hr ]
[ Total Fishing Exp Gained: 14040 ]
[ Experience Gain Rate: 14989 Exp/Hr ]
[ Fishing Levels Gained: 0 ]
[------------------------------------------------------------------------------------]
[ | Nick | Act | Loc | Lvl | Loads | Fish | Time ]
[ o | | T | At Bank | 74 | 6 | 156 | 56 min ]
[------------------------------------------------------------------------------------]

NightBlade

2008-08-09 22:33:42

Line 401: [Error] (16981:4): Unknown identifier 'MakeCompassR' in script C:\Users\Administrator\Documents\KaramjaFisher 1.1.scar

sjlou

2008-08-10 02:37:42

you can put players twice or just edit the script a bit
[————————————————————————————]
[ August 10th, 2008, 07:33:54 AM ]
[————————————————————————————]
[ >>> Zephyr`s Karamja Fisher Ver 1.1 <<< ]
[————————————————————————————]
[ Total Time Running: 5 Hours, 12 Minutes and 7 Seconds ]
[ Total Loads Done: 35 ]
[ Total Fish Caught: 910 ]
[ o Lobsters: 910 ]
[ Fishing Rate: 175 Fish/Hr ]
[ Total Fishing Exp Gained: 81900 ]
[ Experience Gain Rate: 15744 Exp/Hr ]
[ Fishing Levels Gained: 2 ]
[————————————————————————————]
[ | Nick | Act | Loc | Lvl | Loads | Fish | Time ]
[ o | -.-| T | Bank | 73 | 12 | 312 | 97 min ]
[ o | -.-| F | Lost - No Sailor | 71 | 12 | 312 | 96 min ]
[ o | -.-| F | | 0 | 0 | 0 | 0 min ]
[ o | -.-| F | Lost - No Customs officer | 64 | 11 | 286 | 102 min ]
[————————————————————————————]

ZephyrsFury

2008-08-10 04:46:38

Yes if you declare the same players more than once it should be able to detect where it is and continue autoing.

For those that get errors:


Unknown identifier 'TileToMinimap' in script

Go to the line with the error and change TileToMinimap to TileToMM.

For this error:


Unknown identifier 'MakeCompassR' in script

Change the MakeCompassR to R_MakeCompass.

Boingpie

2008-08-10 04:48:00

Ok, sorry but i lost the proggie due to annoyance.
Basically i had 2 people, and the first got lost just as they do.
The 2nd however spend 8hours trying to get into the bank even though it knew it had i pin (i typed one in) and it somehow caught over 20000 fish and bank over 900 times. So i deleted the pin and i will start get another proggie for u

rs2joke

2008-08-10 04:54:53

Line 676: [Error] (17248:20): Unknown identifier 'GetAnimation' in script
?? (Latest reflection srl 20 scar 3.15b)

noob-2

2008-08-10 14:53:24

Line 676: [Error] (17248:20): Unknown identifier 'GetAnimation' in script

got this also

ZephyrsFury

2008-08-11 05:03:29

Upped a new version with fixes for Reflection updates. Nothing new in terms of features and functions.

I'll be busy for the next couple of months so this will probably be the last update for a while.

noob-2

2008-08-11 13:21:24

thanks for the update.

Rsnerdx

2008-08-11 13:40:38


Rsnerdx

2008-08-11 13:48:46

Creating the NickTPA.
Fishing Level is 70
Location: Bank
Location: Bank To Sarim
Walking to Path Index: 1 (3082, 3251).


[Runtime Error] : Invalid Opcode Parameter in line 32 in script C:\Program Files\SCAR 3.15\includes\SRL\SRL\Reflection\Walking.Scar

noob-2

2008-08-11 23:03:51

same error.

NightBlade

2008-08-13 00:04:14

It will sit at the fishing spot, saying its found fishing spots but the cursor remains in the top left and doesn't move…

jakeyboy29

2008-08-13 07:28:38

it takes coin out then seaches in bank and logs out.

jiggypwner

2008-08-13 18:55:14

Line 388: [Error] (16939:4): Unknown identifier 'MakeCompassR' in script C:\Program Files\SCAR 3.15\Scripts\My Scripts\Karj fisher.scar

with the newest revision of srl and reflection

jiggypwner

2008-08-13 19:56:07

** Warning in ItemCoordinates: Invalid ItemType: 'bmp,'**
i changed the thing in amount.scar but thins thing still comes up and then then the script withdrawls coins and logs out

saosin love

2008-08-14 15:59:43

SCript logs in and logs out im on the karmaja dock.:bart:

elamentx

2008-08-15 00:00:08

From: saosin love
SCript logs in and logs out im on the karmaja dock.:bart:
I get the same thing too

Luski14

2008-08-15 22:27:58

Yeah.
Same with me, can't find fishing equipment.

Obviously something has changed in the colors of Runescape and Reflection is not fully-developed to adapt to it and we are awaiting an update or way to fix it. Let's all just be patient :)

thebob142

2008-08-16 00:14:08

seems nice but i couldn't find amout.scar so i couldn't solve the error

Smarter Child

2008-08-20 21:18:53

everbody we can learn from this that reflections breaks a lot.
Make sure your contrast/color is set right other than that reflection might be the issue and people if your making a script don't put in reflection unless it is gonna be a flawless script

ZephyrsFury

2008-08-21 04:25:39

The scripts just outdated as reflection has changed since I last updated. This script is broken and won't work unless someone knows what to update and how to update it… until then the script won't work.