PDA

View Full Version : [Project RS06] FisherLobster Catherby & Seller V0.1



Dormik
02-08-2013, 08:44 PM
Hello,
PROJECT HAS BEEN STOPPED, NEW SHARK PROJECT
This will be my first script that I released. I hope it will work well, because it took me some time to create it.

What will be my future updates on this script?
You'll be able to select if you want to bank them or sell them, but this will be added later when I learn about walking.

What does it do?
It fishes lobsters & sells them when your inventory is full to the shop that's above the fishing place.

How do I get it to work?
You need to stand somewhere around here (*Picture) and you need to have a lobster pot in your inventory.

https://dl.dropbox.com/u/38026425/howtostand.png

Do I need to have something else to run it?
Yes, you need to have ProjectRS06 SRL Includes, this saved me alot time :) Thanks for creating!

This thread can be found here: http://villavu.com/forum/showthread.php?t=95916

How do I get this script?
You can copy & paste it to your simba program and click RUN. If you have any problems with this, please tell me.
program FishingLobstersV01;
{$i srl/srl.simba}
{$I P06Include/P06Include.Simba}

//The current version is: V0.1

//Hello, thank you for using my first script, it can be a litte buggy, but
//if you notice any bugs, then post the bug(s) in the thread.
//You need to have a lobster pot in your inventory otherwise it will stop.
//The thread can be found here; $link
//Dormik from Villavu.com made this script, please do not copy it without credits. You may improve it.

//** IMPORTANT INFORMATION TO MAKE IT WORK **//
//You need to have the ProjectRS 06 SRL Include, to download this follow this link;
//http://villavu.com/forum/showthread.php?t=95916

//** ANOTHER THING THAT'S IMPORTANT **//
//This script doesn't have a randoms solver, but they'll be added later.
//If you have trouble getting this script to work, then click on this picture;
//https://dl.dropbox.com/u/38026425/howtostand.png

var
X,Y,net,trade,pot,sell10,FishSpot,lobster,net2,wal k1, modicon1, modicon2, troll:integer;
full,shop:boolean;
procedure FindFishingSpot;
var
tmpCTS, l, r,X,Y:Integer;
ObjectTPA:TPointArray;
begin
if (full = true) then
begin
full := false;
wait(2500);
//if (findsymbol(x,y,'fishing spot')) then
//begin
//mouse(650,76,1,1,mouse_right);
wait(500);
//mouse(x,y,1,1,mouse_left);
//end;
MouseSpeed:=15;
tmpCTS := GetToleranceSpeed;
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(1.70, 3.72);
if FindColorsTolerance(ObjectTPA, 15587040, 8, 25, 518, 359, 8) then
begin;
SetColorToleranceSpeed(tmpCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);
L := High(ObjectTPA);
mmouse((ObjectTPA[r].x), (ObjectTPA[r].y), 2, 2);
wait(randomrange(100, 150));
clickmouse2(mouse_right);
wait(randomrange(500,1500));
if FindBitmapToleranceIn(Net, X, Y, 5, 4, 509, 336, 145) then
begin
mouse(x,y,1,1,mouse_left);
full := false;
end;
end;
if FindBitmapToleranceIn(Net2, X, Y, 5, 4, 509, 336, 145) then
begin
mouse(238,307,1,1,mouse_left);
full := true;
shop := false;
end;
end;
end;
procedure CheckInvFull;
var
cap, tries:integer;
begin
if (P06_InvFull = true) then
begin
//P06_DropAllExcept([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19, 20,21,22,23,24,25,26]);
//P06_DropAllExcept([0]);
full := true;
shop := true;
inc(cap);
inc(tries);
//mouse(638,50,1,1,mouse_left);
end;
end;
procedure CheckLogIn;
begin
if (P06_LoggedIn = false) then
begin
mouse(447, 272,1,1,mouse_left);
wait(randomrange(500,1000));
mouse(282,312,1,1,mouse_left);
end;
end;

procedure WalkToFish;
var
tmpCTS, l, r:Integer;
ObjectTPA:TPointArray;
begin
if (shop = true) then
begin
if FindDTM(Walk1,x,y,610,20,659,60) then
begin
wait(randomrange(500,1000));
mouse(x,y,1,1,mouse_left);
end;

tmpCTS := GetToleranceSpeed;
SetColorToleranceSpeed(2);
SetToleranceSpeed2Modifiers(0.03, 0.26);
if FindColorsTolerance(ObjectTPA, 8677391, 8, 25, 518, 359, 6) then
begin
SetColorToleranceSpeed(tmpCTS);
SetToleranceSpeed2Modifiers(0.02, 0.02);
L := High(ObjectTPA);
mmouse((ObjectTPA[r].x), (ObjectTPA[r].y), 2, 2);
wait(randomrange(100, 150));
clickmouse2(mouse_right);
if FindBitmapToleranceIn(trade, X, Y, 0, 0, 513, 337, 145) then
begin
mouse(x,y,1,1,mouse_left);
wait(randomrange(2000,2500));
end;
if FindDTM(lobster,X,Y,561,198, 743, 470) then
begin
mouse(x,y,1,1,mouse_right);
end;
if FindBitmapToleranceIn(sell10, X, Y, 555, 195, 750, 466, 145) then
begin
mouse(x,y,1,1,mouse_left);
end;
mouse(591,303,1,1,mouse_right);
if FindBitmapToleranceIn(sell10, X, Y, 555, 195, 750, 466, 145) then
begin
mouse(x,y,1,1,mouse_left);
end;
mouse(707,435,1,1,mouse_right);
if FindBitmapToleranceIn(sell10, X, Y, 555, 195, 750, 466, 145) then
begin
mouse(x,y,1,1,mouse_left);
end;
if findcolortolerance(x,y,16609039,614,61,690,168,10) then
begin
mouse(x,y,1,1,mouse_left);
shop := false;
end;
end;
end;
end;

procedure progress;
var
tries,cap:integer;
begin
Writeln('Current try(ies): '+ToStr(tries));
Writeln('Captures: '+ToStr(cap *27));
WriteLn('Script has run for : ' + TimeRunning + '');
end;
procedure CheckLobsterPot;
begin
begin
if NOT FindBitmapToleranceIn(Pot, X, Y, 535, 160, 750, 478, 145) then
writeln('Lobster pot not found, script will be stopped!');
terminatescript;
end;
end;
procedure MainLoop;
begin
full := true;
mouse(645,161,1,1,mouse_right);
P06_MakeCompassNorth;
repeat
CheckLogIn;
//CheckLobsterPot;
FindFishingSpot;
CheckInvFull;
WalkToFish;
wait(2500);
FindFishingSpot;
//progress;

until (false);
end;

begin
Net := BitmapFromString(29, 8, 'meJz7//8/AwODe0gsddF/HMb+RwJ' +
'kiGM1FiLLAAbIJhAvToxr4WqIZxPpWiKNggsihwamp0hlwwGa s+Eu' +
'xxoIxItDBJFtgSMGVIAmjhmAyIoB2HtmDQ==');
Net2 := BitmapFromString(63, 6, 'meJytkl0OgDAIg7mdF/DV+x8Dl5m' +
'QWgrxZ8SHBgv7BnN3M/MZQ2z7UX29Z7Sw9PdKNj2rwoe1DhEdMCmd' +
'JUM60WZkT9hkkmorT4YPHRuhySNPHmCmlQYBNs8jP1/w7mngG/3q2' +
'cjJ61uDX2ryID9CYnIVfLwEuZEPuoKn5a6C/w+M+gSV9/yY');

ModIcon1 := BitmapFromString(8, 5, 'meJxbtAgnYGRgACJkxvTp0yFcNBKP' +
'OC4AAA8vN5Q=');
ModIcon2 := BitmapFromString(8, 5, 'meJw7cOfAARyIAQyQGSAA5qKR+MRx' +
'AABEUEWV');
Troll := BitmapFromString(5, 18, 'meJzb/PffZnLR7D9/yUbVv0hAcb/' +
'+4EE+qMjy5288SOn7LzwIAD7P2uk=');
Walk1 := DTMFromString('mLgAAAHicY2JgYKhiYmAoAWJNIFsDiBnmbW BYH8nAwMUAwYxQzMAAAGgZA7I=');
trade := BitmapFromString(68, 9, 'meJztlEESgCAIRb1dF2jb/Y9BTY4' +
'OwfeDtmgTw8J+6PwXpIiUFtt+LKTckd9eruJWr9fvc8rGz/IJi6gw' +
'Vo3oX/FDAIvOtleLsJ4r0Eb/ffQjZOx6WO/7Uot8j7punTdXI8Wzm' +
'HtAnjHybHQye2TGYL+MbaJAFv/xk549eJ4l7Bc8YYFldk3u+ZCF9w' +
'4qVeQsoxnL63mWcMY4y5Unouk1ZQ==');
lobster := DTMFromString('mggAAAHicY2NgYDjBxMBwAYj3A/EeID4NxKeA+AlQ7hYQPwLiZ0D8Cog/AHGZkwzDrHBVhjBDETAbhFu8FBk4gXLYMCMODAEAdVUPcw==') ;
sell10 := BitmapFromString(37, 7, 'meJxzD4l1JwL9BwMGBgY0NhoCCqL' +
'JYmrEajKaFJHWYcrCuRDTcBkLdycVrcP0Iy5jKbQOYj4uo+AA 4k2q' +
'WIemF5MLF6TEOrTwRLYLM6mQFHf/MQCmFABvaZ1J');
Pot := DTMFromString('mlwAAAHicY2dgYPBmYmCwBeJQJgjbFYhtoP znQPm3QPwMiD8C8S0gfgLEd4E434uXIdKGA4xBbF05BjifEyiP CzPiwVAAABq8DOs=');

FishSpot := DTMFromString('mQwAAAHicY2ZgYGhlYmDoBuI2IA5ngOAoBh BgZFA+9J+BQeIUAxeQB8OMSBgIAOx4BZA=');
SetupP06Include;
mousespeed:= 15;
cleardebug;
mainloop;
FreeBitMap(net);
freebitmap(sell10);
FreeDTM(walk1);
FreeDTM(pot);
FreeDTM(FishSpot);
FreeDTM(lobster);
FreeBitMap(net2);
FreeBitMap(trade);
FreeBitMap(ModIcon1);
FreeBitMap(Troll);
FreeBitMap(ModIcon2);
end.

*Note
I didn't add a random solver, so be aware that you won't be killed because of a random event.

If you have any bugs, please post them so I can fix them.

Thanks for reading,
Dormik :spongebob:

Credits
Rjj95 learned me alot about colour finding.

Thread: http://villavu.com/forum/showthread.php?t=94909
Thanks to DannyRS for the ProjectRS06 SRL Includes

Thread: http://villavu.com/forum/showthread.php?t=95916

voltag00
02-13-2013, 03:30 AM
I will try this when the script is able to bypass randoms, and when you add banking! Looks nice.