Log in

View Full Version : What do you think?



apx900
08-03-2010, 09:05 AM
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.

Frement
08-03-2010, 09:11 AM
Well, first glance, you could have inverted the PathThere to get PathBack.

WhiteShadow
08-03-2010, 09:14 AM
There could be some more failsafes in procedure Fish.

Heavenguard
08-03-2010, 09:36 AM
great script going on dude! Although I love your reflection paths and all, it would also be nice if you had color walking paths as well. Nice job done so far though :D

apx900
08-03-2010, 12:14 PM
@WhiteShadow: ya, i was thinking something along the lines of isuptext? any other you wanna recommend?

@Heavenguard: hmn.. i'll have a look into that, if i do manage to do it maybe combine them both and use either randomly?

apx900
08-03-2010, 11:28 PM
ok just started adding to the procedure fish:

Procedure Fish;
Begin
Repeat
If (CharacterAnimating = false) Then
Begin
Case Random(2) Of
0: 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));
If IsUpText('Lure') Then
mouse(x,y,1,1,true) else
wait(200);
wait(random(200));
End;
1: Begin
If FindFishSpot(x,y,'Fly') Then
Begin
WriteLn('Fishing Spot Found At: '+ inttostr(x)+ ' ' + inttostr(y));
MoveMouse(x,y);
WriteLn('Moving Mouse To Posetion: '+ inttostr(x)+ ' ' + inttostr(y));
If IsUpText('Lure') Then
Mouse(x,y,0,0,True) Else
Break;
End else
Begin
WriteLn('Fishing Spot Found At: '+ inttostr(x)+ ' ' + inttostr(y));
MoveMouse(x,y);
WriteLn('Moving Mouse To Posetion: '+ inttostr(x)+ ' ' + inttostr(y));
If IsUpText('Lure') Then
Begin
Mouse(x,y,0,0,false);
ChooseOption('text')
End Else
Break;
End;
End;
Until (InvCount = 28);
End;


for some reason i'm getting [Error] (246:3): Syntax error at line 245.
Which is "Until (InvCount = 28);"
I even tried "Until InvFull;" still getting the same message.
Any Ideas?

i luffs yeww
08-04-2010, 12:19 PM
Procedure Fish;
Begin
Repeat
If (CharacterAnimating = false) Then
Begin
Case Random(2) Of
0: 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));
If IsUpText('Lure') Then
mouse(x,y,1,1,true) else
wait(200);
wait(random(200));
End;
1: Begin
If FindFishSpot(x,y,'Fly') Then
Begin
WriteLn('Fishing Spot Found At: '+ inttostr(x)+ ' ' + inttostr(y));
MoveMouse(x,y);
WriteLn('Moving Mouse To Posetion: '+ inttostr(x)+ ' ' + inttostr(y));
If IsUpText('Lure') Then
Mouse(x,y,0,0,True) Else
Break;
End else
Begin
WriteLn('Fishing Spot Found At: '+ inttostr(x)+ ' ' + inttostr(y));
MoveMouse(x,y);
WriteLn('Moving Mouse To Posetion: '+ inttostr(x)+ ' ' + inttostr(y));
If IsUpText('Lure') Then
Begin
Mouse(x,y,0,0,false);
ChooseOption('text')
End Else
Break;
End;
End;
End;//here
Until InvFull;
End;


You were simply missing an end; (for the case).

Heavenguard
08-04-2010, 12:22 PM
@Heavenguard: hmn.. i'll have a look into that, if i do manage to do it maybe combine them both and use either randomly?

That sounds really good, you could also set it to do multiple color and reflection paths. This way if reflection is out of date the walking would be solid still.

apx900
08-04-2010, 09:01 PM
right its still not compiling


program SimpleReflectionWalkerEx;
{$Define SMART}
{$i SRL/SRL.scar}
{$i SRL/SRL/skill/Fishing.scar}
{$i Reflection/reflection.simba}


const
LoadsToDo = 10;
SleepAfter = 30; // +15 Random
SleepFor = 1; // +10 Random
{---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;


Procedure IntroText;
begin
ClearDebug;
WriteLn('#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#');
Wait(150);
WriteLn(' ');
Wait(150);
WriteLn('#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#');
Wait(140);
WriteLn(' _____ _ _ _ _ ');
Wait(140);
WriteLn(' | ___| | | (_) | | ');
Wait(140);
WriteLn(' | |__ __| | __ _ _____ ___| | | ___ ');
Wait(140);
WriteLn(' | __| / _` |/ _` |/ _ \ \ / / | | |/ _ \');
Wait(140);
WriteLn(' | |___| (_| | (_| | __/\ V /| | | | __/');
Wait(140);
WriteLn(' \____/ \__,_|\__, |\___| \_/ |_|_|_|\___|');
Wait(140);
WriteLn(' __/ | ');
Wait(140);
WriteLn(' |___/ ');
WriteLn('#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#');
Wait(150);
WriteLn(' ');
Wait(150);
WriteLn('#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#');
Wait(150);
WriteLn(' _____ _ ');
Wait(150);
WriteLn('| __ |___ ___| |_ ___ ___ ');
Wait(150);
WriteLn('| __ -| . | | _| -_| _| ');
Wait(150);
WriteLn('|_____|__,|_|_|_,_|___|_| ');
Wait(150);
WriteLn('#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#');
Wait(150);
end;


procedure ApxCustomAntiban;
begin
if(not(LoggedIn))then
Exit;
case Random(13) of
0: RandomRClick;
1: begin
Writeln('Performing Anti-ban Type 2');
HoverSkill('Fishing', false);
wait(4000+random(1000));
GameTab(4);
end;
2: begin
Writeln('Performing Anti-ban Type 3');
HoverSkill('Fishing', false);
wait(4000+random(1000));
GameTab(4);
end;
3: begin
Writeln('Performing Anti-ban Type 4');
MakeCompass(Random(300));
Wait(random(3000));
MakeCompass('N');
end;
4: begin
Writeln('Performing Anti-ban Type 5');
PickUpMouse;
end;
5: WriteLn('No Antiban this round');
6: PickUpMouse;
7: WriteLn('No Antiban this round');
8: begin
Writeln('Performing Anti-ban Type 9');
GameTab(1 + Random(12));
wait(4000+random(4000));
GameTab(4);
end;
9: begin
Writeln('Performing Anti-ban Type 10');
case random(8) of
2: TypeSend('Fishinging lvls');
3: TypeSend('Total levels');
4: TypeSend('Exp till next level?');
end;
end;
10: MouseBox(MSX1,MMY1,MMX2,MMY2,3);
11: WriteLn('No Antiban this round');
12: SleepAndMoveMouse(3000+random(5000));
end;
end;

Procedure AntiBan;
begin
WriteLn('Initializing Procedure Anti-Ban');
Case random(1) of
0: begin
WriteLn('Performing Anti-Ban');
ApxCustomAntiban;
end;
1: WriteLn('No Anti-Ban');
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
Case Random(2) Of
0: 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));
If IsUpText('Lure') Then
mouse(x,y,1,1,true) else
wait(200);
wait(random(200));
End;
1: Begin
If FindFishSpot(x,y,'Fly') Then
Begin
WriteLn('Fishing Spot Found At: '+ inttostr(x)+ ' ' + inttostr(y));
MoveMouse(x,y);
WriteLn('Moving Mouse To Posetion: '+ inttostr(x)+ ' ' + inttostr(y));
If IsUpText('Lure') Then
Mouse(x,y,0,0,True) Else
Break;
End else
Begin
WriteLn('Fishing Spot Found At: '+ inttostr(x)+ ' ' + inttostr(y));
MoveMouse(x,y);
WriteLn('Moving Mouse To Posetion: '+ inttostr(x)+ ' ' + inttostr(y));
If IsUpText('Lure') Then
Begin
Mouse(x,y,0,0,false);
ChooseOption('text')
End Else
Break;
End;
End;
End;//here
Until InvFull;
End;

begin
SMART_Members := MEMBERS;
SMART_Server := WORLD;
SMART_Signed := True;
SMART_SuperDetail := False;

SetupSRL;
IntroText;
SetupReflectionEx(True);
DeclarePlayers;//Calls the DeclarePlayers procedure
LoginPlayer;// This will log your player in.
WalkThePath;
if invfull then
DepositInBank else
fish;
Antiban;
Logout; //This will log your player out!
end.



i'm getting [Error] (247:3): Identifier expected at line 246
argh!!!!!!!!:fiery::mad::frusty:

i luffs yeww
08-04-2010, 09:13 PM
program SimpleReflectionWalkerEx;
{$Define SMART}
{$i SRL/SRL.scar}
{$i SRL/SRL/skill/Fishing.scar}
{$i Reflection/reflection.simba}


const
LoadsToDo = 10;
SleepAfter = 30; // +15 Random
SleepFor = 1; // +10 Random
{---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;


Procedure IntroText;
begin
ClearDebug;
WriteLn('#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#');
Wait(150);
WriteLn(' ');
Wait(150);
WriteLn('#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#');
Wait(140);
WriteLn(' _____ _ _ _ _ ');
Wait(140);
WriteLn(' | ___| | | (_) | | ');
Wait(140);
WriteLn(' | |__ __| | __ _ _____ ___| | | ___ ');
Wait(140);
WriteLn(' | __| / _` |/ _` |/ _ \ \ / / | | |/ _ \');
Wait(140);
WriteLn(' | |___| (_| | (_| | __/\ V /| | | | __/');
Wait(140);
WriteLn(' \____/ \__,_|\__, |\___| \_/ |_|_|_|\___|');
Wait(140);
WriteLn(' __/ | ');
Wait(140);
WriteLn(' |___/ ');
WriteLn('#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#');
Wait(150);
WriteLn(' ');
Wait(150);
WriteLn('#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#');
Wait(150);
WriteLn(' _____ _ ');
Wait(150);
WriteLn('| __ |___ ___| |_ ___ ___ ');
Wait(150);
WriteLn('| __ -| . | | _| -_| _| ');
Wait(150);
WriteLn('|_____|__,|_|_|_,_|___|_| ');
Wait(150);
WriteLn('#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#');
Wait(150);
end;


procedure ApxCustomAntiban;
begin
if(not(LoggedIn))then
Exit;
case Random(13) of
0: RandomRClick;
1: begin
Writeln('Performing Anti-ban Type 2');
HoverSkill('Fishing', false);
wait(4000+random(1000));
GameTab(4);
end;
2: begin
Writeln('Performing Anti-ban Type 3');
HoverSkill('Fishing', false);
wait(4000+random(1000));
GameTab(4);
end;
3: begin
Writeln('Performing Anti-ban Type 4');
MakeCompass(Random(300));
Wait(random(3000));
MakeCompass('N');
end;
4: begin
Writeln('Performing Anti-ban Type 5');
PickUpMouse;
end;
5: WriteLn('No Antiban this round');
6: PickUpMouse;
7: WriteLn('No Antiban this round');
8: begin
Writeln('Performing Anti-ban Type 9');
GameTab(1 + Random(12));
wait(4000+random(4000));
GameTab(4);
end;
9: begin
Writeln('Performing Anti-ban Type 10');
case random(8) of
2: TypeSend('Fishinging lvls');
3: TypeSend('Total levels');
4: TypeSend('Exp till next level?');
end;
end;
10: MouseBox(MSX1,MMY1,MMX2,MMY2,3);
11: WriteLn('No Antiban this round');
12: SleepAndMoveMouse(3000+random(5000));
end;
end;

Procedure AntiBan;
begin
WriteLn('Initializing Procedure Anti-Ban');
Case random(1) of
0: begin
WriteLn('Performing Anti-Ban');
ApxCustomAntiban;
end;
1: WriteLn('No Anti-Ban');
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
Case Random(2) Of
0: 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));
If IsUpText('Lure') Then
mouse(x,y,1,1,true) else
wait(200);
wait(random(200));
End;
1: Begin
If FindFishSpot(x,y,'Fly') Then
Begin
WriteLn('Fishing Spot Found At: '+ inttostr(x)+ ' ' + inttostr(y));
MoveMouse(x,y);
WriteLn('Moving Mouse To Posetion: '+ inttostr(x)+ ' ' + inttostr(y));
If IsUpText('Lure') Then
Mouse(x,y,0,0,True) Else
Break;
End else
Begin
WriteLn('Fishing Spot Found At: '+ inttostr(x)+ ' ' + inttostr(y));
MoveMouse(x,y);
WriteLn('Moving Mouse To Posetion: '+ inttostr(x)+ ' ' + inttostr(y));
If IsUpText('Lure') Then
Begin
Mouse(x,y,0,0,false);
ChooseOption('text')
End Else
Break;
End;
End;
end;
End;//here
Until InvFull;
End;

begin
SMART_Members := MEMBERS;
SMART_Server := WORLD;
SMART_Signed := True;
SMART_SuperDetail := False;

SetupSRL;
IntroText;
SetupReflectionEx(True);
DeclarePlayers;//Calls the DeclarePlayers procedure
LoginPlayer;// This will log your player in.
WalkThePath;
if invfull then
DepositInBank else
fish;
Antiban;
Logout; //This will log your player out!
end.


You were missing another end for the if..then. You should work on standards. ;) It'd make this easier.

apx900
08-06-2010, 12:21 PM
TYVM i luffs yeww!!!!!!!!!

apx900
08-07-2010, 11:44 PM
hey is anyone having problems using reflection bank opening procedures in edgeville bank? mine right clicks on the banker then clicks on the top left corner of the main screen :s

i luffs yeww
08-08-2010, 01:29 PM
That might be due to R_ChooseOption or something. I'm not sure.

Capricorn
08-08-2010, 01:51 PM
The hooks for R_ChooseOption are broken I believe.