I'm pretty sure I'm using REV 14 w/ this, not sure what that means though.
I really need an edgeville power flyfisher, so I decided to make one. It won't compile, there's an error, well here's the script.
There were some minor mistakes, i finished them:
SCAR Code:{I "used" Wizzups? whirlpool feature from his edgeville fisher
but I don't know if it even works cuz my script won't compile!!}
program PowerFisher;
{.include srl/srl.scar}
{.include srl/srl/skill/fishing.scar}
const
fishspot1= 10453355;
fishspot2= 10650477;
salmon= 5990048;
trout= 10066341;
var x, y, Tries: integer;
procedure DeclarePlayer;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer:= 0
Players[0].Name := 'Username';
Players[0].Pass := 'Password';
Players[0].Nick := '';
Players[0].Active := True;
end;
Function FindWhirlPool(x, y: integer): Boolean; forward; //WhirlPool so it can be used in antirandoms.
procedure AntiRandoms;
begin
If(FindFight)Then
RunAway('N', True, 1, 15000);
FindNormalRandoms;
FindLamp('Defense');
If FindWhirlPool(x, y) Then //You put the FindWhirlPool function under this one, so i forwarded it above.
Begin
Mouse(648, 84, 4, 4, True);
Wait(100);
WriteLn('Whirlpool found.');
Inc(Whirlpools);
End;
end;
Function FindWhirlPool(x, y: integer): Boolean;
Var
FishPoints: TPointArray;
Begin
If Not LoggedIn Then Exit;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(x, y, FishPoints, 13947343, x - 20, y - 20, x + 20, y + 20, 40)
If GetArrayLength(FishPoints) > Round(230 * WhirlPoolAcc) Then
Begin
WhirlPools := Whirlpools + 1;
WriteLn(IntToStr(Round(GetArrayLength(FishPoints) / 1600))+ '% Change');
Result := True;
End;
ColorToleranceSpeed(1);
End;
procedure AntiBan;
begin
if not LoggedIn then Exit;
case Random(30) of
1: RandomRClick;
2: HoverSkill('Defense', False);
3: BoredHuman;
4: AlmostLogout;
end;
end;
procedure LureThatFish;
begin
if not LoggedIn then
Exit;
if (not (FindObjCustom(x, y, ['Lur', 'ure'], [FishSpot1, FishSpot2], 7))) then //You did the TIntegerArray wrong
Wait(100+random(75));
Tries := Tries +1;
if(Tries = 20)then
begin
Logout;
Exit;
end else
if FindObjCustom(x, y, ['Lur', 'ure'], [FishSpot1, FishSpot2], 7) then
repeat
case (Random(2)) of
1: begin
Mouse(x, y, 4, 4, false);
ChooseOption('ure');
end;
2: Mouse(x, y, 4, 4, True);
end;
until (InvFull)
end;
function DropTo(StartSlot, EndSlot: Integer): Boolean; //By Floor66.
var I : Integer;
begin
for I := StartSlot to EndSlot do
begin
DropItem(I);
Result := True;
end;
end;
procedure DropFish;
begin
if FindObjCustom(x, y, ['Trou', 'rout'], [Trout], 7) then
DropTo(3,28); //You forgot 2 'thens'
if FindObjCustom(x, y, ['Salm', 'almon'], [Salmon], 7) then
DropTo(3,28); //DropTo isnt in SRL anymore, i created one for you above!
end;
begin
SetupSRL;
repeat
LureThatFish;
DropFish;
AntiBan;
AntiRandoms;
until(False);
end.
I commented the problems.
Ce ne sont que des gueux
Thank you so much, I'm going to test it out right now. I'm going to try to make a real powerfisher later on using everything required for SRL membership.
*edit*
[Runtime Error] : Out Of Range in line 1211 in script C:\Documents and Settings\Owner\Desktop\Multiple SCAR\SCAR 3.15(unsigned,f2p)\includes\SRL/SRL/Core/AntiRandoms/AntiRandoms.scar
any idea what this is?
I wish you very good luck![]()
Ce ne sont que des gueux
SCAR Code:{I "used" Wizzups? whirlpool feature from his edgeville fisher
but I don't know if it even works cuz my script won't compile!!}
program PowerFisher;
{.include srl/srl.scar}
{.include srl/srl/skill/fishing.scar}
const
fishspot1= 10453355;
fishspot2= 10650477;
salmon= 5990048;
trout= 10066341;
var x, y, Tries: integer;
procedure DeclarePlayer;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer:= 0
Players[0].Name := 'Username';
Players[0].Pass := 'Password';
Players[0].Nick := '';
Players[0].Active := True;
end;
procedure AntiBan;
begin
if not LoggedIn then Exit;
case Random(30) of
1: RandomRClick;
2: HoverSkill('Defense', False);
3: BoredHuman;
4: AlmostLogout;
end;
end;
Function FindWhirlPool(x, y: integer): Boolean; forward;
procedure AntiRandoms;
begin
If(FindFight)Then
RunAway('N', True, 1, 15000);
FindNormalRandoms;
FindLamp('Defense');
If FindWhirlPool(x, y) Then
Begin
Mouse(648, 84, 4, 4, True);
Wait(100);
WriteLn('Whirlpool found.');
Inc(Whirlpools);
End;
end;
Function FindWhirlPool(x, y: integer): Boolean;
Var
FishPoints: TPointArray;
Begin
If Not LoggedIn Then Exit;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(x, y, FishPoints, 13947343, x - 20, y - 20, x + 20, y + 20, 40)
If GetArrayLength(FishPoints) > Round(230 * WhirlPoolAcc) Then
Begin
WhirlPools := Whirlpools + 1;
WriteLn(IntToStr(Round(GetArrayLength(FishPoints) / 1600))+ '% Change');
Result := True;
End;
ColorToleranceSpeed(1);
End;
procedure LureThatFish;
begin
if not LoggedIn then
Exit;
if (not (FindObjCustom(x, y, ['Lur', 'ure'], [FishSpot1, FishSpot2], 7))) then
Wait(100+random(75));
Tries := Tries +1;
if(Tries = 20)then
begin
Logout;
Exit;
end else
if FindObjCustom(x, y, ['Lur', 'ure'], [FishSpot1, FishSpot2], 7) then
repeat
case (Random(2)) of
1: begin //Needs Begin and End Here
Mouse(x, y, 4, 4, false);
ChooseOption('ure');
end;
2: Mouse(x, y, 4, 4, True);
end;
until (InvFull)
end;
procedure DropFish; // Drop To doesnt work any more
var i: integer;
begin
for i := 3 to 28 do //FindObjCustom?! WTF man, Doesnt work for inventory.
DropItem(i);
end;
begin
SetupSRL;
repeat
LureThatFish;
DropFish;
AntiBan;
AntiRandoms;
until (False)
end.
More like this.. You dont use FindObjCustom for Inventory!
This is how it should look 0_o
Jus' Lurkin'
Thanks =]
But yeah, FindObjCustom shouldnt be used for dropping. At all.
Jus' Lurkin'
Object finding is just for in the game screen, like finding ores, fishing spots, NPC's etc. For inventory's thats just not needed.
Ce ne sont que des gueux
No, it just doesnt find it in the inventory.
FindObjCustom looks on the main screen, not the inventory or minimap.
EDIT: floor beat me to it ^^
Jus' Lurkin'
Hmm.. maybe its with the Players[#].Nick?
Can u give me the line?
Ce ne sont que des gueux
Here we go it all works now
SCAR Code:{I "used" Wizzups? whirlpool feature from his edgeville fisher
but I don't know if it even works cuz my script won't compile!!}
{Fixed by NaumanAkhlaQ}
program PowerFisher;
{.include srl/srl.scar}
{.include srl/srl/skill/fishing.scar}
const
fishspot1= 10453355;
fishspot2= 10650477;
salmon= 5990048;
trout= 10066341;
var x, y, Tries: integer;
procedure DeclarePlayer;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer:= 0
Players[0].Name := 'Username';
Players[0].Pass := 'Password';
Players[0].Nick := '';
Players[0].Active := True;
end;
procedure AntiBan;
begin
if not LoggedIn then Exit;
case Random(30) of
1: RandomRClick;
2: HoverSkill('Defense', False);
3: BoredHuman;
4: AlmostLogout;
end;
end;
Function FindWhirlPool(x, y: integer): Boolean; forward;
procedure AntiRandoms;
begin
If(FindFight)Then
RunAway('N', True, 1, 15000);
FindNormalRandoms;
FindLamp('Defense');
If FindWhirlPool(x, y) Then
Begin
Mouse(648, 84, 4, 4, True);
Wait(100);
WriteLn('Whirlpool found.');
Inc(Whirlpools);
End;
end;
Function FindWhirlPool(x, y: integer): Boolean;
Var
FishPoints: TPointArray;
WhirlPoolAcc: Extended;
Begin
If Not LoggedIn Then Exit;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(x, y, FishPoints, 13947343, x - 20, y - 20, x + 20, y + 20, 40)
If GetArrayLength(FishPoints) > Round(230 * WhirlPoolAcc) Then
Begin
WhirlPools := Whirlpools + 1;
WriteLn(IntToStr(Round(GetArrayLength(FishPoints) / 1600))+ '% Change');
Result := True;
End;
ColorToleranceSpeed(1);
End;
procedure LureThatFish;
begin
if not LoggedIn then
Exit;
if (not (FindObjCustom(x, y, ['Lur', 'ure'], [FishSpot1, FishSpot2], 7))) then
Wait(100+random(75));
Tries := Tries +1;
if(Tries = 20)then
begin
Logout;
Exit;
end else
if FindObjCustom(x, y, ['Lur', 'ure'], [FishSpot1, FishSpot2], 7) then
repeat
case (Random(2)) of
1: begin //Needs Begin and End Here
Mouse(x, y, 4, 4, false);
ChooseOption('ure');
end;
2: Mouse(x, y, 4, 4, True);
end;
until (InvFull)
end;
procedure DropFish; // Drop To doesnt work any more
var i: integer;
begin
for i := 3 to 28 do //FindObjCustom?! WTF man, Doesnt work for inventory.
DropItem(i);
end;
begin
SetupSRL;
repeat
LureThatFish;
DropFish;
AntiBan;
AntiRandoms;
until (False);
end.
You needed findwhirlpoolacc as an Extended;
Rep me if i helped![]()
well I repped all 3 of you, but here's the line that i'm having problems with. I've uninstalled/reinstalled SCAR/SRL. Here's the exact line.
if FindTPAinTPA(Players[CurrentPlayer].NickTPA,TPA,Matches) then //Length check inside the function
here's the error message:
[Runtime Error] : Out Of Range in line 1216 in script C:\Program Files\SCAR 3.15\includes\SRL/SRL/Core/AntiRandoms/AntiRandoms.scar
I really do hope this can be figured out =D and thank you so much everyone for all of your help. You took my attempt and made it look amazing.
Okay, I took out the declare players part, and the script will lure the fish(this needs work =/ it constantly clicks/rclicks lure, like 10 times a second, idk how to make it wait.) but after it lures the fish it drops them and has the same error in line 1216. I really don't know what to do with this.
make a wait while fishingproc which times out after 3-4 secs.
Double post, but I really wanna bring attention to this <.<
Here's the script so far:
SCAR Code:{I "used" Wizzups? whirlpool feature from his edgeville fisher
but I don't know if it even works cuz my script won't compile!!}
{Fixed by NaumanAkhlaQ}
program PowerFisher;
{.include srl/srl/misc/smart.scar}
{.include srl/srl.scar}
{.include srl/srl/skill/fishing.scar}
const
fishspot1= 15191480;
fishspot2= 14858129;
salmon= 5990048;
trout= 10066341;
var x, y, Tries: integer;
procedure declarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; //username
Players[0].Pass := ''; //password
Players[0].Nick := ''; //3-4 letters from your username
Players[0].Active := True;
end;
procedure AntiBan;
begin
if not LoggedIn then Exit;
case Random(30) of
1: RandomRClick;
2: HoverSkill('Defense', False);
3: BoredHuman;
4: AlmostLogout;
end;
end;
Function FindWhirlPool(x, y: integer): Boolean; forward;
procedure AntiRandoms;
begin
If(FindFight)Then
RunAway('N', True, 1, 15000);
FindNormalRandoms;
FindLamp('Defense');
If FindWhirlPool(x, y) Then
Begin
Mouse(648, 84, 4, 4, True);
Wait(100);
WriteLn('Whirlpool found.');
Inc(Whirlpools);
End;
end;
Function FindWhirlPool(x, y: integer): Boolean;
Var
FishPoints: TPointArray;
WhirlPoolAcc: Extended;
Begin
If Not LoggedIn Then Exit;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(x, y, FishPoints, 13947343, x - 20, y - 20, x + 20, y + 20, 40)
If GetArrayLength(FishPoints) > Round(230 * WhirlPoolAcc) Then
Begin
WhirlPools := Whirlpools + 1;
WriteLn(IntToStr(Round(GetArrayLength(FishPoints) / 1600))+ '% Change');
Result := True;
End;
ColorToleranceSpeed(1);
End;
procedure LureThatFish;
begin
if not LoggedIn then
Exit;
if (not (FindObjCustom(x, y, ['Lur', 'ure'], [FishSpot1, FishSpot2], 7))) then
Wait(100+random(75));
Tries := Tries +1;
if(Tries = 20)then
begin
Logout;
Exit;
end else
if FindObjCustom(x, y, ['Lur', 'ure'], [FishSpot1, FishSpot2], 7) then
repeat
case (Random(1)) of
1: begin //Needs Begin and End Here
Mouse(x, y, 4, 4, false);
ChooseOption('ure');
FindNormalRandoms;
Wait(6000+(random(3000)))
end;
end;
until (InvFull)
end;
procedure DropFish; // Drop To doesnt work any more
var i: integer;
begin
for i := 3 to 28 do //FindObjCustom?! WTF man, Doesnt work for inventory.
DropItem(i);
FindNormalRandoms;
end;
begin
SetupSRL;
Wait(1000);
declarePlayers;
LoginPlayer;
repeat
LureThatFish;
DropFish;
AntiBan;
AntiRandoms;
until (False);
end.
The only problem it really has is that it doesn't accurately find the fishing spots, and it also detects a lot of whirlpools that aren't there.
If you dont like something remove it.
Or if it doesn't work for you (whirlpool finder) Pm the creator.
Im sure he'll be happy to help.
There are currently 1 users browsing this thread. (0 members and 1 guests)