apx900
2010-08-03 05:05:21
in light of my return, i decided to try and make an edgeville fisher & banker. Below is what i have so far. i'm yet to add a couple of things like anti ban and swapping fishing spot and taking breaks and player swapping. Let me know what you think of it so far:
program SimpleReflectionWalkerEx;
{$Define SMART}
{$i SRL/SRL.scar}
{$i SRL/SRL/skill/Fishing.scar}
{$i Reflection/reflection.simba}
const
{---SMART Setup Constants---}
WORLD = 61;
MEMBERS = False;
{---------------------------}
var
x,y : integer;
procedure DeclarePlayers;
begin
WriteLn('Starting procedure: DeclarePlayer');
NumberOfPlayers(1);
CurrentPlayer := 0;
with Players[0] do
begin
Name := ' ';
Pass := ' ';
Nick := ' ';
Pin := ' ';
Active := True;
end;
end;
function PathBack: TPointArray;
begin
SetLength(Result, 7);
Result[0] := Point(3099, 3436);
Result[1] := Point(3095, 3444);
Result[2] := Point(3089, 3459);
Result[3] := Point(3082, 3468);
Result[4] := Point(3083, 3480);
Result[5] := Point(3087, 3492);
Result[6] := Point(3093, 3493);
end;
function PathThere: TPointArray;
begin
SetLength(Result, 6);
Result[0] := Point(3085, 3488);
Result[1] := Point(3081, 3478);
Result[2] := Point(3084, 3467);
Result[3] := Point(3090, 3456);
Result[4] := Point(3094, 3443);
Result[5] := Point(3106, 3434);
end;
procedure WalkThePath;
var
I: Integer;
Path: TPointArray;
begin
WriteLn('Starting procedure: WalkThePath');
if invfull then
Path := PathBack else
Path := PathThere;
for i := 0 to Length(Path) - 1 do
WalkToTile(Path[i], i, 0); //I think that should work with randomness of i
Wait(500 + Random(150));
//GetPlayerPosition;
end;
Function DepositInBank: boolean;
var
i: integer;
begin
//OpenBankReflection('EB');
FindBank('EB');
for i := 0 to 20 do
begin
if(BankScreen)or(PinScreen)then
Break;
Wait(100 + random(50));
end;
if(PinScreen)then
InPin(Players[CurrentPlayer].Pin);
Wait(150 + random(50));
if(BankScreen)then
begin
Deposit(3, 28, true);
Wait(250 + random(100));
CloseBank;
Wait(250 + random(100));
end;
end;
Procedure Fish;
begin
repeat
if (CharacterAnimating = false) then
begin
FindFishSpot(x,y,'fly');
Writeln('Fishing spot found at: '+ inttostr(x)+ inttostr(y));
movemouse(x,y);
writeln('moved mouse to position: '+ inttostr(x)+ inttostr(y));
mouse(x,y,1,1,true);
wait(200)
wait(random(200));
end else
wait(random(1400));
until invfull;
end;
begin
SMART_Members := MEMBERS;
SMART_Server := WORLD;
SMART_Signed := True;
SMART_SuperDetail := False;
SetupSRL;
SetupReflectionEx(True);
DeclarePlayers;//Calls the DeclarePlayers procedure
LoginPlayer;// This will log your player in.
//WalkThePath;
//if invfull then
//DepositInBank else
fish;
//Logout; //This will log your player out!
end.