0wn 4 skill
2008-08-17 13:10:01
0wn 4 skill - SRL Member Application Form
0wn 4 skill
What is the meaning to life?
Where you Referred to SRL? If yes, by whom?
yes
Method
Programming Knowledge
Other Communitys
Sythe
How Long have You Played Runescape
About 2 years
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
Hey, Im James. I live in the UK, North East England.
I enjoy all sports and in my spare time I enjoy scripting scar.
I would say that scar plays a bigger role in my life than runescape does. I like to look over scripts and see what I can understand. I admit that I am fairly new to scar, however, I can make quite complex scripts. And even if you are pro at scar you are always still learning (or so I heard).
I was making a Barbarian Banker and Fisher using normal SRL commands and Scar functions but then I heard about reflection. This is why I present to you my script using reflection.
If you were to test the script you would find that it works for hours and hours. My thread hasnt really look of yet. However, I think if reflection was promoted abit more, The script would definatley hit a top script spot; one similar to munks - forefeathers, it works in a similar way. Fishes and Banks for a certain amount of time, then sleeps, repeats. Thankyou for your time in reading this short paragraph about me.
I give thanks to all the people who wrote tutorials on Scar and I hope that they understand how helpful they have been to me.
Thankyou.
Yours Sincerely,
James Bell (0wn 4 skill)
P.S I would just like to say how great Method is. He really was a great help to me.
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
Program BarbarianFishernBankerRelection;
{.Include SRL\SRL\Misc\Smart.Scar}
{.Include SRL\SRL.Scar}
{.Include SRL\SRL\Reflection\Reflection.Scar}
/////////////////////////////////////////////////////
// _____ ___ _ _ _ _ //
// | _ | / | | | (_) | | //
// | |/ |_ ___ __ / /| | ___| | ___| | | //
// | /| \ \ /\ / / _ \ / /_| | / __| |/ / | | | //
// \ |_/ /\ V V /| | | | \___ | \__ \ <| | | | //
// \___/ \_/\_/ |_| |_| |_/ |___/_|\_\_|_|_| //
/////////////////////////////////////////////////////
//Start in Edgeville Bank or the FishingSpot//
// Setup Lines 21-24 33-53 and off you go! //
// Have Fly Fishing Rod and Feathers in Inv //
//////////////////////////////////////////////
Const
SRLStatsID='';//Your SRL stats ID
SRLStatsPass='';//Your SRL Stats Password
SleepEvery=9;// 9 mins works good.
SleepForHowLong=1;//Lets keep it short shall we? Random 1-1.5mins will be added.
SmartWorld='world16'; //Change number if you want a different world.
Var
x,y, FlyRod, Bankes, Walkesbank, Walkesfish, LTD: Integer;
TimesSlept, Fishes, Mark, WhirlPoolAvoid, Tries : Integer;
Procedure DeclarePlayers;
Begin
HowManyPlayers := 2;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
Players[0].Integers[0]:=200;//Number Of Loads. I do 10ish an hour on lvl 70 fish.
Players[1].Name :='';
Players[1].Pass :='';
Players[1].Nick :='';
Players[1].Active:=True;
Players[1].Integers[0]:=200;//Number Of Loads
{Players[2].Name :='';
Players[2].Pass :='';
Players[2].Nick :='';
Players[2].Active:=True;
Players[2].Integer[0]:=1;//Number Of Loads}
Writeln('Using '+IntToStr(HowManyPlayers)+' Players!');
Writeln('Doing '+IntToStr(Players[CurrentPlayer].Integers[0])+' Loads!');
end;
Procedure SetupSmart;
Begin
SmartSetup(SmartWorld, True, True, False);
Wait(1000);
SetTargetDC(SmartGetDC);
end;
Procedure OwnAntiBan;
Begin
If Not LoggedIn then Exit;
case Random(20) of
1: RandomRClick;
2: Begin
HoverSkill('Fishing', False);
Wait(1000+Random(800));
end;
3: RandomMovement;
4: BoredHuman;
6: DoEmote(400 +Random(90));
7: Begin
GameTab(1+Random(12));
Wait(RandomRange(800,1200));
GameTab(4);
end;
8: PickUpMouse;
9: Begin
MMouse(Random(500),Random(500),0,0);
end;
10: Sleep(RandomRange(1000,3000));
end;
GameTab(4);
end;
Procedure LoadDTMs(DTM: String);
begin
Case lowercase(DTM) Of
'flyrod':
begin
FlyRod := DTMFromString('78DA8DD2CB0E82301445D12204796940DEA0F' +
'1FFFFD27367C4C93E0C360356DAB4DCAC4F29BDD2DF935DAA777C' +
'9FC00CCA0226F6DA0C738079281F30ADF2055319EB94CA1B4CA1E' +
'C6072E3EC776504532B0398467982E994164CAC511BFFAB021367' +
'2AC1CC4A016631CC66EC15F3958389B9B881398DBD76E37E56A53' +
'3EEA70733F16CFC00FDE603D0');
end;
end;
end;
Procedure Proggy; Forward;
{My Location finder. Checks between two points and returns where you are.}
Function FindLocation: String;
Var
Me: TMe;
Begin
If Not LoggedIn then Exit;
Me:= GetMe;
GetMyPos;
If PointInBox(Me.Tile, IntToBox(3090, 3486, 3100, 3500)) then
Result:='AtBank';
If PointInBox(Me.Tile, IntToBox(3100, 3420, 3112, 3435)) then
Result:='AtFishingSpot';
If (Result = '') then
begin
Writeln('Not In any place?');
Logout;
Result:='NoLocation';
Proggy;
Players[CurrentPlayer].Active := False;
NextPlayer(Players[CurrentPlayer].Active);
end;
end;
function WalkPath(Path: TPointArray; Tol, R_FFlag: Integer): Boolean;
var
Count : Integer;
begin
Count:= 0;
repeat
Result:= WalkToTile(Path[Count], Tol, R_FFlag);
if (not Result) then
Result:= WalkToTile(Path[Count], tol, R_FFlag);
Count:= Count + 1;
until (not Result) or (Count > High(Path));
end;
function LoadPath(Which:String): TPointArray;
begin
Case Lowercase(which) of
'walkfishe':
Begin
SetLength(Result, 8);
Result[0] := Point(3094, 3484);
Result[1] := Point(3100, 3476);
Result[2] := Point(3099, 3466);
Result[3] := Point(3088, 3462);
Result[4] := Point(3090, 3451);
Result[5] := Point(3093, 3442);
Result[6] := Point(3099, 3435);
Result[7] := Point(3103, 3425);
end;
'walkfishz':
Begin
SetLength(Result, 8);
Result[0] := Point(3088, 3485);
Result[1] := Point(3081, 3477);
Result[2] := Point(3081, 3466);
Result[3] := Point(3088, 3456);
Result[4] := Point(3091, 3445);
Result[5] := Point(3095, 3436);
Result[6] := Point(3102, 3433);
Result[7] := Point(3104, 3425);
end;
'walkbanke':
Begin
SetLength(Result, 8);
Result[0] := Point(3101, 3433);
Result[1] := Point(3093, 3441);
Result[2] := Point(3091, 3449);
Result[3] := Point(3087, 3461);
Result[4] := Point(3094, 3465);
Result[5] := Point(3099, 3473);
Result[6] := Point(3094, 3484);
Result[7] := Point(3095, 3491);
end;
'walkbankz':
Begin
SetLength(Result, 9);
Result[0] := Point(3102, 3433);
Result[1] := Point(3093, 3441);
Result[2] := Point(3094, 3450);
Result[3] := Point(3089, 3457);
Result[4] := Point(3084, 3465);
Result[5] := Point(3081, 3475);
Result[6] := Point(3081, 3483);
Result[7] := Point(3089, 3486);
Result[8] := Point(3095, 3492);
end;
end;
end;
Procedure WalkToFish;
Begin
If Not LoggedIn Then Exit;
Case Random(2) of
0: SetRun(True);
1: SetRun(False);
end;
GameTab(4);
Case Random(2) of
0: WalkPath(LoadPath('walkfishe'),2, 4);
1: WalkPath(LoadPath('walkfishz'),2, 4);
end;
Wait(500+Random(300));
WalkesFish:=Walkesfish+1;
end;
Procedure WalkToBank;
Begin
If Not LoggedIn Then Exit;
SetRun(False);
Case Random(2) of
0:WalkPath(LoadPath('walkbanke'), 2, 4);
1:WalkPath(LoadPath('walkbankz'), 2, 2);
end;
Wait(500+Random(300));
Walkesbank:=Walkesbank+1;
end;
Function HaveWeGotFeathers: Boolean;
Begin
If Not LoggedIn then Exit;
GameTab(4);
Result:= FindColorTolerance(x,y, 11119028, 554, 205, 640, 244, 10);
end;
Procedure FeatherMessage;
Begin
Writeln('No Feathers on this account, switching players.')
Logout;
Players[CurrentPlayer].Active := False;
NextPlayer(Players[CurrentPlayer].Active);
end;
Function HaveWeGotFlyRod: Boolean;
begin
if not LoggedIn then Exit;
Gametab(4);
Result:= FindColorTolerance(x,y, 873327, MIX1,MIY1,MIX2,MIY2, 20);
end;
Function WithdrawFlyRod: Boolean;
Begin
If Not LoggedIn then Exit;
If Not BankScreen then Exit;
LoadDTMs('FlyRod');
If FindDTM(flyrod,x,y,MSX1,MSY1,MSX2,MSY2) then
Begin
MMouse(x,y,3,3);
IsUpText('ithdra');
GetMousePos(x,y);
Mouse(x,y,0,0,true);
Writeln('Got new Fly Rod')
Result:=True;
end else
Begin
CloseBank;
Writeln('Out of Rods on this account... Logging out... Buy more!');
Logout;
WriteLn('No FlyRods on this account');
Players[CurrentPlayer].Active := False;
NextPlayer(Players[CurrentPlayer].Active);
end;
FreeDTM(Flyrod);
end;
Procedure GoGetFlyRod;
Var
Tries: Integer;
Begin
Begin
If FindLocation='AtBank' then
Begin
Repeat
OpenBankFast('eb');
Tries:=Tries+1
Until (BankScreen) or (Tries>5);
Wait(1000+Random(500));
WithdrawFlyRod;
end;
If FindLocation='AtFishingSpot' then
Begin
WalkToBank;
Repeat
OpenBankFast('eb');
Tries:=Tries+1;
Until (BankScreen) or (Tries>5)
WithdrawFlyRod;
WalkToFish;
end;
end;
end;
Procedure FindFlyRodFloor;
Begin
If Not LoggedIn Then Exit;
Gametab(4);
If HaveWeGotFlyRod then exit;
begin
MakeCompass('W');
SetAngle(True);
If FindObj(x,y, 'rod' , 805217, 15) then
begin
writeln('Found the lost rod');
Mouse(x,y,3,3,true);
R_FFlag(0);
MakeCompass('N');
If HaveWeGotFlyRod then exit;
end else
begin
Writeln('We lost the rod!');
MakeCompass('N');
GoGetFlyRod;
end;
end;
End;
{My Fishing Spot Finder. Returns True if found. Will find any fishing spot}
Function FindFishingSpotTrue:Boolean;
var
FishingSpot: array of TNPC;
I: Integer;
begin
If Not Loggedin Then Exit;
FishingSpot := SortNPCs(GetNPCsByID(328));
for I := 0 to High(FishingSpot) do
If FishingSpot[i].MS.X<>0 then
begin
Result:=True;
if (Result) then exit;
end;
end;
{My Fishing Spot Finder Returns Co-Ords of x,y. Will Find Any Fishing Spot.}
Procedure FindFishingSpot(var x,y: Integer);
var
FishingSpot: array of TNPC;
I: Integer;
begin
If Not Loggedin Then Exit;
FishingSpot := SortNPCs(GetNPCsByID(328));
for I := 0 to High(FishingSpot) do
If FishingSpot[i].MS.X<>0 then
begin
x := FishingSpot[I].MS.X;
y := FishingSpot[I].MS.Y;
end;
end;
Procedure DepositFished;
Begin
If Not Loggedin then Exit;
If FindLocation='AtBank' then
Begin
SetAngle(True);
Repeat
OpenBankFast('eb');
Tries:=Tries+1;
Wait(2000+Random(1000));
Until (BankScreen) or (Tries>5);
If BankScreen then
Begin
Deposit(3, 28,true);
Case Random(2) of
0: CloseBank;
end;
Bankes:=Bankes+1;
Fishes:=Fishes+26;
LTD:=LTD+1;
Writeln('Desposited Items');
Proggy;
end else
Begin
Writeln('Could Not find BankScreen');
end;
end;
end;
{My Whirl Pool Finder. Returns True if found.}
Function FindWhirlPool: Boolean;
var
WhirlPool: array of TNPC;
I: Integer;
begin
WhirlPool := SortNPCs(GetNPCsByID(405));
for I := 0 to High(WhirlPool) do
if WhirlPool[I].MS.X<>0 then
begin
Result := True;
if (Result) then Exit;
end;
end;
{This Procedure moves spot if a whirlpool is found.}
Procedure MoveSpotIfWhirlPool;
Begin
If Not Loggedin then exit;
If FindWhirlPool then
Begin
FindFishingSpot(x,y);
Mouse(x,y,3,3,true);
Writeln('Avoided WhirlPool');
WhirlPoolAvoid:=WhirlPoolAvoid + 1;
end else
Begin
WalkToTile(IntToPoint(3110, 3433), 3, 0);
Wait(1500+Random(100));
FindFishingSpot(x,y);
Mouse(x,y,3,3,true);
WhirlPoolAvoid:=WhirlPoolAvoid + 1;
end;
end;
function AreWeFishing: Boolean;
Var
Me:TMe;
begin
Me:= GetMe;
Result := (InRange(Me.Animation,618,623));
end;
Procedure DoFishing;
Var
Me:TMe;
Begin
Me:= GetMe;
If FindLocation='AtFishingSpot' then
Begin
Writeln('Doing Fishing');
Repeat
GameTab(4);
If Not HaveWeGotFlyRod then FindFlyRodFloor;
If Not AreWeFishing then
Begin
MakeCompass('N');
SetAngle(true);
If FindFishingSpotTrue then
Begin
FindFishingSpot(x,y);
Case Random(2) of
0: Begin
Mouse(x,y,3,3,true);
end;
1: Begin
Mouse(x,y,3,3,false);
Wait(500+Random(300));
ChooseOption('ure');
end;
end;
end else
WalkToTile(IntToPoint(3110, 3433), 2, 0);
If FindFishingSpotTrue then
Begin
FindFishingSpot(x,y);
Case Random(2) of
0: Begin
Mouse(x,y,3,3,true);
end;
1: Begin
Mouse(x,y,3,3,false);
Wait(500+Random(300));
ChooseOption('ure');
end;
end;
end else
WalkToTile(IntToPoint(3102, 3424), 2, 0);
end;
OwnAntiBan;
If FindWhirlPool then MoveSpotIfWhirlPool;
If Me.InFight then
Begin
Writeln('Oh shit, fight, lets get out of here.');
SetRun(True);
WalkToBank;
DepositFished;
end else
Begin
FindNormalRandoms;
OwnAntiBan;
Wait(RandomRange(2000, 4000));
If FindWhirlPool then MoveSpotIfWhirlPool;
If Me.InFight then
Begin
WalkToBank;
end;
end;
Until(InvFull);
end;
If InvFull then
Begin
WalkToBank;
DepositFished;
WalkToFish;
end;
end;
Procedure Signature;
Begin
ClearDebug;
Writeln('Thankyou For using...............')
Wait(300);
Writeln(' _____ ___ _ _ _ _');
Wait(300);
Writeln('| _ | / | | | (_) | |');
Wait(300);
Writeln('| |/ |_ ___ __ / /| | ___| | ___| | |');
Wait(300);
Writeln('| /| \ \ /\ / / _ \ / /_| | / __| |/ / | | |');
Wait(300);
Writeln('\ |_/ /\ V V /| | | | \___ | \__ \ <| | | |');
Wait(300);
Writeln(' \___/ \_/\_/ |_| |_| |_/ |___/_|\_\_|_|_|');
Wait(300);
Writeln('Barbarian Fisher And Banker!!')
Wait(2500);
ClearDebug;
end;
Procedure Sleepy;
Begin
If Not LoggedIn then Exit;
Begin
Logout;
TimesSlept:=TimesSlept+1;
Writeln('Sleeping... zzzZZZZzzzzzzZZZZzzzzzz');
Sleep(SleepForHowLong*60000+RandomRange(60000,90000));
Writeln('Finished Sleeping... Your Characted feels refreshed.');
end;
end;
Procedure Proggy;
begin
writeln('--------------------------------------');
writeln('|Barbarian-Fisher-Banker-0wn 4 skill-|');
writeln('|------------------------------------|');
Writeln(' Ran For ' +TimeRunning);
writeln(' Did '+inttostr(Bankes)+' loads!');
writeln(' Banked '+inttostr(Fishes)+' Fishes!')
writeln(' Walked to bank '+inttostr(walkesbank)+' times');
writeln(' Walked to fish '+inttostr(walkesfish)+' times');
writeln(' Avoided '+inttostr(WhirlpoolAvoid)+' Whirlpools!');
writeln(' Slept '+IntToStr(TimesSlept)+' times!');
writeln('-------------------------------------|');
writeln('| Thank you for using my script! |');
writeln('-------------------------------------|');
end;
procedure Stats;
begin
writeln('--------------------------------------');
writeln('|Barbarian-Fisher-Banker-0wn 4 skill-|');
writeln('|------------------------------------|');
Writeln(' Ran For ' +TimeRunning);
writeln(' Did '+inttostr(Bankes)+' loads!');
ReportVars[0]:=ReportVars[0]+Bankes;
writeln(' Banked '+inttostr(Fishes)+' Fishes!');
ReportVars[1]:=ReportVars[1]+Fishes;
writeln(' Walked to bank '+inttostr(walkesbank)+' times');
ReportVars[2]:=ReportVars[2]+walkesbank;
writeln(' Walked to fish '+inttostr(walkesfish)+' times');
ReportVars[3]:=ReportVars[3]+walkesfish;
writeln(' Avoided '+inttostr(WhirlpoolAvoid)+' Whirlpools!');
ReportVars[4]:=ReportVars[4]+WhirlPoolAvoid;
writeln(' Slept '+IntToStr(TimesSlept)+' times!');
ReportVars[5]:=ReportVars[5]+TimesSlept;
writeln('-------------------------------------|');
writeln('| Thank you for using my script! |');
writeln('-------------------------------------|');
SRLRandomsReport;
SendSRLReport;
end;
Procedure MainLoop;
Begin
LoginPlayer;
SetChat('off',2);
If Not LoggedIn then Exit;
If FindLocation='AtBank' then
Begin
If Not HaveWeGotFeathers then FeatherMessage;
If HaveWeGotFlyRod then
Begin
If (InvCount>3) then
Begin
Writeln('Banking Fish!');
DepositFished;
end else
Begin
Writeln('We Are at bank, no fish are present');
Writeln('Walking to Fishing Spot');
WalkToFish;
end;
end else
GoGetFlyRod;
end;
Begin
If FindLocation='AtFishingSpot' then
Begin
If Not HaveWeGotFeathers then FeatherMessage;
If HaveWeGotFlyRod then
Begin
DoFishing;
end else
Begin
GoGetFlyRod;
end;
end;
end;
end;
procedure SRLstats;
begin
SetupSRL;
ScriptID := '963';
if ((SRLStatsID = '') or (SRLStatsPass = ''))then
begin
Writeln('Please get a SRL Stats ID');
TerminateScript;
end else
begin
SRLID := SRLStatsID;
SRLPassword := SRLStatsPass;
end;
end;
Begin
SetupSmart;
SetupSRL;
SRLStats;
Signature;
DeclarePlayers;
Repeat
MarkTime(Mark);
Repeat
MainLoop;
If (TimeFromMark(Mark)> SleepEvery*60000) then break;
If (LTD>=(Players[CurrentPlayer].Integers[0])) then Break;
Until(LTD>=(Players[CurrentPlayer].Integers[0])) or (Not (LoggedIn));
If (TimeFromMark(Mark)> SleepEvery*60000) then
Begin
If FindLocation='AtFishes' then
WalkToBank;
Sleepy;
end;
Begin
If FindLocation='AtBank' then
Sleepy;
end;
If (LTD>=(Players[CurrentPlayer].Integers[0])) then
Begin
Writeln('Loads done on this player, changing players');
Logout;
NextPlayer(False);
LTD:=0;
end;
Stats;
Until (False);
Logout;
Proggy;
Writeln('All Players are inactive');
end.——————————————————<!– END TEMPLATE: formanswers –>