PDA

View Full Version : [Fishing] Prospective Karamja/Draynor Fisher Banker



Bad Boy JH
01-20-2010, 07:44 AM
Now, I want to make a script that fishes at Karamja (either Lobs, Swords or Tuna) and Comes back to Draynor and Banks...now it should be easy to get it to fish the...fish and bank the fish, but the issue comes in walking...

I would love someone to help me with this script, to calaborate with, and to help get a good set of walking functions to help get this done.

Obviously you will get credit, for whatever you do...

Script needs to:
Walk from Bank to Ship, (HARD)
AND/OR
walk from cabbage patch to ship (Medium-Hard)

go to karamja using the ship (Proabably easy)

Walk to peir (Medium-Hard)

Walk back to ship (Medium-Hard)
go back to port sarim (probably easy)
walk from ship to bank (HARD)
AND/OR
walk from cabbage patch to bank (Medium-Hard)

Bank Fish, and withdraw extra cash (Easy)

Count how many of the fish banked were tuna, and how many were swords if not fishing lobsters

If no one offers, I doubt I will be able to do it alone, so it probably won't get done sadly...

marpis
01-20-2010, 07:52 AM
If you're doing it in color, you will be surprised to see how difficult the fishing part will be :rolleyes: Assuming you will write an "IsFishing: boolean" function, ofcourse.
and the walking from draynor is very easy. Walk west from the bank and click to the otherside of the fence! :) It will automatically walk all the way down to the docks. From there it's like 3 steps and you're at the Karamja dock.

Bad Boy JH
01-20-2010, 09:23 AM
Hmm...yes an IsFishing function may have issues, due to the amount of players at the peir...so obviously we need to get something done about that...

jimmy_mac
01-20-2010, 09:54 AM
ill help. msn me: j_mackay@bigpond.net.au

Raskolnikov
01-20-2010, 02:20 PM
I actually was making one with FootballJds. If you want the code its right here. This was a while ago, but all the functions might work with different colors, etc.

Good Luck!

Bad Boy JH
01-20-2010, 03:25 PM
I would love to use the walktoboat function, and of course you will get credit... unless i get off my lazy rear end and make a radialwalk function...


The hard part i recon will be the isfishing...which would detect if the player is fishing...so then i could do...

while isfishing do;
Somethings;

Blumblebee
01-20-2010, 03:30 PM
if you want a basic skeleton for a isfishing function. It's quite simple, it merely makes a Tbox around a specific tPoint (I usually do a spiral color for the spot a second time after it starts to get a good estimate for making the box) then watches the colors in the box, if there is not enough points with a certain color (the lobster cage for example) then it breaks the loop.

your also going to need to change debug() to writeLn(), and because of the high volume of players you should make the tPoint constant infront of your player.

Function deturmineBox(TPA: tPointArray): tBox;
var
fishInfo: tFishInfo;
aTPA: t2DPointArray;
begin
if length(TPA) <= 0 then Exit;
with fishInfo do
begin
//aTPA := SplitTPAex(TPA, 5, 5);
//sortATPAfrom(aTPA, point(MScx, MScy));
tp := MiddleTPA(TPA);
area.x1 := tp.x-30;
area.y1 := tp.y-20;
area.x2 := tp.x+35;
area.y2 := tp.y+20;
if area.x1 <> 0 then // simple check incase of non-consistent results
result := area;
end;
end;

Function colorInBox(const color: integer; box: tBox): boolean;
var
TPA: tPointArray;
begin
FindColorsTolerance(TPA, color, box.x1, box.y1, box.x2, box.y2, 15);
result := Length(TPA) > 3;
wait(randomRange(550, 850));
if random(10) = 1 then debug('Rod Length = '+intToStr(length(TPA)));
end;

Procedure setPixelBox(const color: integer; TPA: tPointArray);
var
box: tBox;
timer: LongInt;
tempC: ShortInt;
begin
if Length(TPA) <= 0 then Exit;
box := deturmineBox(TPA);
if box.x1 = 0 then
Exit;
tempC := invCount();
timer := getSystemTime;
while colorInBox(color, box) do
begin
if invFull() then Exit;
if tempC <> invCount() then
begin
debug('inventory count changed, timer reset.');
timer := getSystemTime;
tempC := invCount();
end;
if getSystemTime-timer > randomRange(23000, 32000) then
begin
debug('timer expired. Exit function');
exit;
end;
end;
end;

Bad Boy JH
01-20-2010, 04:17 PM
There are several ways to check it...to me the most obvious...and what I would assume the most obvious...is a check similar to the one in animation.scar "ismoving" in which we check how much movement there is..

unfortunatly.... this has the minor issue of the surrounding people...

The other option is we time how long between catches...but set it to low, and autoing on lower level accounts becomes difficult because they fish very slowly...and the script would assume they are no longer fishing...set it to HIGH and we get whiney higher levels, complaining of inneficency...