Last Legend
2012-02-28 20:48:17
How Long have You Played Runescape?
10 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
n/a
What is your general programming knowledge?
No previous knowledge of this sort of programming. All previous programming experience was with css for web design (graphic design major).
Are you a member of any other communities?
None.
Tell us about yourself…
Please show us one (or multiple) of your scripts.
10 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
n/a
What is your general programming knowledge?
No previous knowledge of this sort of programming. All previous programming experience was with css for web design (graphic design major).
Are you a member of any other communities?
None.
Tell us about yourself…
From: TheAnubis
D1 athlete attending UofM, it restricts my hobby time quite a bit but I always try to script and play when I have a little free time. Scripting has always been wierdly entertaining for me, atleast in css and now with the srl programs, I hope to be able to reach past my current limitations eventually but I feel I know a good bit about it now to apply. Sadly my previous experience in CSS gave me a scripting style that seems out of the norm when it comes to this community, I have had comments on my standards being a bit odd but I can't seem to bring my mind to think differently from what has been drilled into my brain after all my classes to say the least :) Hopefully I'll be able to convert eventually.
Please show us one (or multiple) of your scripts.
program CatherbyFisher;
//Requirements: 76 Fishing, barb-tail harpoon equipt or harpoon in tool belt
//Start avatar at fishing spots in Catherby and watch it go
//Currently set to fish sharks only
{$DEFINE SMART}
{$i srl/srl.simba}
{$i sps/sps.simba}
var SW, TU, SH, TSH, TTU, TSW, TTL, L, XP, TP: integer;
const
SERVER = 0; // Enter "0" to pick a random server.
MEMBERS = True; // True if members, False if f2p
NumbOfPlayers= 1; //How many players are you using
StartPlayer= 0; //Player to start auoting with! (0 means first chararacter)
Pin = ''; // Your bank pin goes here (Leave blank if you don't have one)
SRLStats_Username = ''; //Leave blank if you wish
SRLStats_Password = ''; //Same as above
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; // Username?
Players[0].Pass := ''; // Password?
Players[0].Nick := ''; // 3 letters of your username (not the first letter)
Players[0].Active := True;
Players[0].Integers[0] := 527; //Price of SwordFish (Update based on GE)
Players[0].Integers[1] := 220; //Price of Tuna ""
Players[0].Integers[2] := 1593; //Price of Shark ""
Players[0].Integers[3] := 18000;//Time after a fish is caught to allow for more fish to be caught
end;
procedure CheckCheck;
begin
if not LoggedIn then Exit;
FindNormalRandoms;
end;
Procedure AntiBanStuff;
begin
if not LoggedIn then Exit;
case Random(100) of
0: begin
RandomMovement;
SetAngle(SRL_ANGLE_HIGH);
end;
1: PickUpMouse;
2: HoverSkill('Fishing', False);
3: SleepAndMoveMouse(5000 + Random(500));
4: RandomMovement;
5: PickUpMouse;
6: BoredHuman;
7: RandomRClick;
8: ExamineInv;
9:begin
MakeCompass( RandomRange( -360, 360));
Wait(200 + random(75));
end;
10: Wait( Random( 4500));
11..15: CheckCheck;
end;
end;
Function GetBackFishing: boolean;
Var
myPath:TPointArray;
begin
SetupSRL;
SPS_Setup(RUNESCAPE_SURFACE,['7_7']);
myPath := [Point(3072, 2894), Point(3072, 2901),
Point(3073, 2903), Point(3078, 2906),
Point(3086, 2905), Point(3093, 2904),
Point(3098, 2907), Point(3102, 2907),
Point(3109, 2907), Point(3123, 2907),
Point(3130, 2907), Point(3136, 2907),
Point(3144, 2907), Point(3156, 2910),
Point(3173, 2913), Point(3185, 2912),
Point(3197, 2918), Point(3200, 2923)];
if SPS_WalkPath(myPath) then
begin
FFlag(0);
Wait(500 + random(200));
SetAngle(0);
CheckCheck;
Result := True;
Exit;
end else
WriteLn('You suck at walking, get off RS');
Logout;
end;
Procedure MyValuesMan(colors: TIntegerArray; var HueMods, SatMods: Extended; var color, Tolerance: Integer);
Var
h, s, t: Extended;
I,II : integer;
HSLColor : Array[1..3] of Extended;
HSL : Array[0..1] of Array[1..3] of Extended;
begin;
For I:= 1 to 3 do
begin;
HSL[0][i] := 255;
end;
For I:= 0 to High(Colors) do
begin;
ColortoHSL(Colors[i],HSLColor[1],HSLColor[2],HSLColor[3]);
For II:= 1 to 3 do
begin;
HSL[0][II] := MinE(HSLColor[II],HSL[0][II]);
HSL[1][II] := MaxE(HSLColor[II],HSL[1][II]);
end;
end;
H := (HSL[1][1] - HSL[0][1]);
S := (HSL[1][2] - HSL[0][2]);
T := (HSL[1][3] - HSL[0][3]);
try
HueMods := (H/T);
SatMods := (S/T);
Tolerance := Round(t);
except
HueMods := 0;
SatMods := 0;
Tolerance := Round(0.0);
end;
Color := HSLToColor((HSL[1][1] + HSL[0][1]) div 2,(HSL[1][2] + HSL[0][2]) div 2,(HSL[1][3] + HSL[0][3]) div 2);
end;
function FishFinder(Var X,Y: Integer): Boolean;
var
B: TBox;
TPA: TPointArray;
Hmod,Smod: Extended;
L,i,Tol,CTS,Col: Integer;
ATPA: T2DPointArray;
begin
Result := False;
MyValuesMan([11445405, 11642527, 11708064, 11970978, 12169386, 12433588], Hmod, Smod, Col, Tol);
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(Hmod, SMod);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, Col, MSX1, MSY1, MSX2, MSY2, Tol);
ColorToleranceSpeed(CTS);
if (Length(TPA) < 1) then
Exit;
ATPA := TPAToATPAEx(TPA, 40, 40);
SortATPAFrom(ATPA, Point(MSCX,MSCY));
L := High(ATPA);
SetArrayLength(ATPA, L+1);
for i := 0 to L do
begin
if (GetArrayLength(ATPA[i]) > 5) then
begin
B := GetTPABounds(ATPA[i]);
MiddleTPAEx(ATPA[i], X, Y);
MMouse(X, Y, 15, 15);
if WaitUpTextMulti(['Net', 'et'], 555) then
begin
Result := True;
GetMousePos(X, Y);
Exit;
writeln('Found them fishies');
end else
Result := False;
GetBackFishing
end;
end;
end;
Function FishLikeABaws: boolean;
var px, xx, timer:integer;
begin
CheckCheck;
MarkTime(timer);
px := InvCount;
WriteLn('Enjoying Fishing...');
repeat
Wait(200+ random(50));
xx := InvCount;
if not (xx = px) then
begin
MarkTime(Timer);
px := xx;
end;
if (TimefromMark(Timer) > Players[CurrentPlayer].integers[3]) and (px = xx) then
begin
Exit;
end;
until(InvCount = 28);
Result := True;
end;
Function GetThemFishes: boolean;
var
x, y:Integer;
begin
CheckCheck;
FFlag(0);
If FishFinder(x, y) then
begin
Mouse(x, y, 0, 0, false);
WaitOption('Harpoon', 600);
if not DidRedClick then
Exit;
WriteLn('We gonna catch the big one');
RunEnergy(50);
if FishLikeABaws then;
begin
AntiBanStuff;
FindNormalRandoms;
writeln('Looking for fish');
end;
end;
end;
function CountTheFish: boolean;
var
SwordFishDTM, TunaDTM, SharkDTM: integer;
begin
SwordFishDTM := DTMFromString('mFQEAAHicnckxCoAwEETRSSQiQtBzpxIEQbRQBAuvGAs/JIWWceHt7LBe0malA9fLiR0LJoxYMefucJvEctdo4NFnHSJ/kRWGEFIp0LJLmR8+8wAIHQ3o');
TunaDTM := DTMFromString('m1gAAAHic42JgYKhjYmCoBOJ6IO4E4m4o3QrEtUBcAsSlQGwMxPpArA7EGlC2CRBbALEtFIPUTOnrBZrKRAQmDjASiREAAO+pCPU=');
SharkDTM := DTMFromString('mrAAAAHic42BgYKhjYmAoA+IiIC4F4iYg7gHiTiCuAeJnjAwM34H4DRA/BOK7QPwSiL8A8QcgbqiqAprChAfjB4wEMAwAAIh8DO0=');
begin
SW := CountItems('dtm', SwordFishDTM, [0]);
TU := CountItems('dtm', TunaDTM, [0]);
SH := CountItems('dtm', SharkDTM, [0]);
TSW := TSW + SW;
TTU := TTU + TU;
TSH := TSH + SH;
TTL := TTL + SW + TU + SH;
FreeDTM(SwordFishDTM);
FreeDTM(TunaDTM);
FreeDTM(SharkDTM);
Result := True;
end;
end;
Procedure ProggyStyle;
begin
XP:= (XP +(SW * 100) + (TU * 80) + (SH * 110));
TP:= (TP +(Players[CurrentPlayer].integers[0] * TU) + (Players[CurrentPlayer].integers[1] * SW) + (Players[CurrentPlayer].integers[2] * SH));
WriteLn('++++=====ANOTHER LOAD COMPLETE!====++++');
WriteLn('Progress');
WriteLn('Time Running: ' + TimeRunning);
WriteLn('Fish Caught: ' + IntToStr(TTL));
WriteLn('Total XP Gained: ' + IntToStr(XP));
WriteLn('Profit: ' + IntToStr(TP));
WriteLn('=====Thanks for using CatherbyFisher by TheAnubis=====');
end;
function GoToBank: boolean;
Var
myPath:TPointArray;
begin
SetupSRL;
SPS_Setup(RUNESCAPE_SURFACE,['7_7']);
myPath := [Point(3216, 2928), Point(3206, 2915),
Point(3196, 2912), Point(3182, 2908),
Point(3166, 2908), Point(3154, 2908),
Point(3141, 2908), Point(3128, 2904),
Point(3117, 2907), Point(3101, 2907),
Point(3092, 2907), Point(3080, 2906),
Point(3073, 2903), Point(3073, 2896)];
if SPS_WalkPath(myPath) then
begin
FFlag(0);
Wait(500 + random(200));
SetAngle(0);
CheckCheck;
Result := True;
Exit;
end else
WriteLn('You suck at walking, get off RS');
Logout;
end;
Function GetInTheBank: boolean;
begin
if (InvEmpty) then
begin
Result := True;
Exit;
end;
QuickDeposit(SRL_DEPOSIT_ALL);
Result := WaitFunc(@InvEmpty, 50, 3000);
end;
function BankDatFish: boolean;
var
NPCBox :TBox;
Colors, NPCArray :TPointArray;
ATPA: T2DPointArray;
MSNPC, NPCPoint :TPoint;
CTS, C, II, I :Integer;
begin
Result := False;
Result := (BankScreen) or (PinScreen);
If Result then
Exit;
NPCArray := GetMinimapDots('NPC');
If Length(NPCArray) < 1 then
Exit;
SortTPAFrom(NPCArray, Point(MMCX, MMCY));
for I := 0 to High(NPCArray) do
begin
NPCPoint := MMToMS(NPCArray[I])
If NPCPoint = Point(-1, -1) then
Continue;
with NPCPoint do
NPCBox := IntToBox(Max(X - 40, MSX1), Max(Y - 40, MSY1), Min(X + 40, MSX2), Min(Y + 40, MSY2));
If PixelShift(NPCBox, 200) > 500 then
Continue;
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.13, 1.52);
FindColorsTolerance(Colors, 6067652, NPCBox.X1, NPCBox.Y1, NPCBox.X2, NPCBox.Y2, 13);
SetColorSpeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(CTS);
ATPA := TPAToATPAEx(Colors, 15, 20);
SortATPASize(ATPA, True);
for II := 0 to High(ATPA) do
begin
MSNPC := MiddleTPA(ATPA[II]);
MMouse(MSNPC.X, MSNPC.Y, 3, 3);
If WaitUpTextMulti(['ooth', 'anker'], 200) then
begin
ClickMouse2(False);
If WaitOptionMulti(['Bank B', 'nk B'], 600) then
MarkTime(c);
Repeat
Wait(RandomRange(50, 100));
Until (BankScreen) or (PinScreen) or (TimeFromMark(C) > 4500);
if (Players[CurrentPlayer].Pin <> '') then
InPin(Players[CurrentPlayer].Pin);
Result := (BankScreen) or (PinScreen);
If PinScreen then
InPin (Pin);
If BankScreen then
GetInTheBank
end;
end;
end;
end;
Procedure Plan;
begin
CheckCheck
repeat
GetThemFishes
Until (InvFull)
begin
GoToBank;
CountTheFish;
BankDatFish;
GetInTheBank;
ProggyStyle;
GetBackFishing;
end;
end;
begin
ClearDebug;
SetUpSrl;
ActivateClient;
DeclarePlayers;
SetupSRLStats(543, SRLStats_Username, SRLStats_Password);
LoginPlayer;
SetAngle(0);
SetRun(True);
MouseSpeed := RandomRange(13, 19);
repeat
Plan;
until(false)
end.