PDA

View Full Version : Falconry by Fre



fre
03-01-2009, 02:08 PM
It would be awesome is some people could test this script, and tell me what i can improve.

Thx

This script only catch the Spotted kebbit, not the higher lvl kebbits.
Start at the south part in the falconry.
Drops everything except the 4 last items (item 25,26,27 and 28)

Worked for 4hours so far.

Floor66
03-01-2009, 04:25 PM
I see you are -for walking- not using "Flag" or "FFlag(distance)". These procedures will wait until the flag is gone from the Minimap, you just do a wait.
Also I don't get DropCrap; it just clicks on the MM some places?
Anyway, I fixed the standards here and there so it's more clear to read, and added Flag's where needed:

program falconry;
// BY Fre
{.include srl/srl/misc/smart.scar}
{.include srl/srl.scar}

var
x, y, kebbit: Integer;

procedure Declareplayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := 'nickname';
Players[0].Pass := 'pass';
Players[0].Nick := 'part of nick';
Players[0].Active := True;
end;

procedure AntiBan;
begin
FindNormalRandoms;
end;

procedure Drop24; //By Lorax (edited by Fre)
var
i: Integer;
begin
for i := 1 to 24 do
DropItem(i);
end;

procedure Catch;
begin
if not FindColorSpiralTolerance(x, y, 4679038, MSX1, MSY1, MSX2, MSY2, 5) then
begin
if FindSymbol(x, y, 'hunter training') then
begin
Mouse(x-20, y+20, 40, 10, True);
Flag;
end else
begin
Mouse(648, 66, 15, 15, True);
Flag;
end;
end;
if FindColorSpiralTolerance(x, y, 4679038, MSX1, MSY1, MSX2, MSY2, 5) then
begin
MMouse(x, y, 5, 5)
if IsUpText('atch Spotted') then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
Flag;
end;
Wait(100 + Random(20));
end;
end;

procedure GetFalcon;
begin
if not FindcolorSpiralTolerance(x, y, 1626879, MSX1, MSY1, MSX2, MSY2, 5) then
begin
if FindColorSpiralTolerance(x, y, 4632542, MSX1, MSY1, MSX2, MSY2, 2) then
begin
Mouse(x, y, 10, 10, True);
Flag;
end;
end;
if FindcolorSpiralTolerance(x, y, 1626879, MSX1, MSY1, MSX2, MSY2, 5) then
begin
Mouse(x-5, y+10, 15, 15,true);
Flag;
Wait(500 + Random(500));
end;
Wait(100 + Random(20));
end;

procedure DropCrap;
begin
Mouse(621, 25, 10, 10, True)
Flag;
AntiBan;
Mouse(621, 25, 10, 10, True)
Drop24;
Mouse(625, 131, 10, 10, True);
Flag;
Mouse(625, 131, 10, 10, True);
AntiBan;
Flag;
mouse(625, 131, 10, 10, True);
end;

procedure Proggy;
begin
WriteLn('I caught '+ IntToStr(kebbit) +' Spotted Kebbits!');
end;

begin
SetupSRL;
SmartSetupEx(69, True, True, false);
Wait(1000);
SetTargetDC(SmartGetDC);
DeclarePlayers;
LoginPlayer;
SetRun(true);
SetAngle(true);
repeat
Catch;
AntiBan;
Wait(Random(100));
GetFalcon;
AntiBan;
Wait(Random(100));
if (InvCount > 26) then
begin
DropCrap;
IncEx(kebbit, 12);
end;
ClearDebug;
Proggy;
until(False)
end.

fre
03-01-2009, 05:15 PM
I left out flag, and flagd procedures with a point...
It is more humanlike to wait some time (randomtime)
then wait till the flag has disappeared from the MM or you are at a certain distance from the flag on the MM.
That is why i did it.

THe procedure dropcrap;
walks to the north then drop all but 4 last inv slots.Then walks back. The reason that i goes north and drop the bones and furs there is because of the same color of the furs and the live spotted kebbits. If i would drop it at the place where i hunt the mouse with always go to the furs instead of the Spotted kebbits. If you have a solution for this i am glad to hear.

Please tell me if i am wrong i am here to learn.

weequ
03-01-2009, 06:35 PM
fre you could do FFag(random(20));

fre
03-01-2009, 10:56 PM
Update V1 better falcon pickup.

naryasha
05-08-2009, 07:53 AM
keep working on this script. make it number 1!

Marco40
05-13-2009, 01:51 AM
Very good, We need more hunter scripts, Hope you can make em like Red Chimpchompas en normal script.

Zlakata
05-13-2009, 03:14 AM
Watch out for Gravedigging <.< Naryasha.