SeanStar
2013-03-31 09:16:25
How Long have You Played Runescape?
7 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
-
What is your general programming knowledge?
C, C++, Java, Python, Perl, PHP, etc.
Are you a member of any other communities?
-
Tell us about yourself…
Please show us one (or multiple) of your scripts.
A script I made especially for this application: A simple lumbridge copper/tin miner, bronze bar smelter, and banker. The script passed BobboHobbo's SRL Member Decider.
7 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
-
What is your general programming knowledge?
C, C++, Java, Python, Perl, PHP, etc.
Are you a member of any other communities?
-
Tell us about yourself…
From: SeanStar
17 year old programmer/web developer. I've contributed slightly towards some of the SRL-OSR repository, and even made my own SPS to go with it. Most of the scripts I develop are goldfarming related and thus are not released in the public sections (Don't want to ruin prices for myself)
Please show us one (or multiple) of your scripts.
A script I made especially for this application: A simple lumbridge copper/tin miner, bronze bar smelter, and banker. The script passed BobboHobbo's SRL Member Decider.
program BronzeBarMaker;
{$DEFINE SMART8}
{$i SRL/Srl.simba}
{$i SPS/sps.simba}
Var
Lumbridge, LumbridgeLoadstone: Integer;
PathToMine, PathToFurnace: TPointArray;
Procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
With Players[0] Do
Begin
Name := ''; // ***RS Username***
Pass := ''; // ***RS Pass***
Pin := ''; // ***RS Pin***
BoxRewards := ['Coins', 'oins'];
Active := True;
End;
End;
function FindRock(var fx, fy, rt: Integer): Boolean;
var
TPA: TPointArray;
ATPA: T2DPointArray;
tmpCTS, I, RTColor, RTTol: Integer;
P: TPoint;
RTMod1, RTMod2: Extended;
Begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
Case rt Of //0 is copper, 1 is tin
0:
Begin
RTMod1 := 0.03;
RTMod2 := 1.56;
RTColor := 6132201;
RTTol := 14;
End;
1:
Begin
RTMod1 := 0.08;
RTMod2 := 2.21;
RTColor := 12501219;
RTTol := 16;
End;
End;
SetColorSpeed2Modifiers(RTMod1, RTMod2);
If Not(FindColorsTolerance(TPA, RTColor, MSX1, MSY1, MSX2, MSY2, RTTol)) Then
Begin
Result := False;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
End;
SortTPAFrom(TPA, Point(MSCX, MSCY));
ATPA := TPAtoATPAEx(TPA, 10, 10);
For I := 0 To High(ATPA) Do
Begin
If (Length(ATPA[I]) < 15) Then Continue;
P := MiddleTPA(ATPA[I]);
MMouse(P.x, P.y, 5, 5);
Wait(100 + Random(100));
if (WaitUpTextMulti(['ine','ore','ocks'], 500)) then //Find uptext of rocks
Begin;
Result := True;
Break;
End;
End;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
GetMousePos(fx, fy);
End;
Procedure CreateBitmaps;
Begin
LumbridgeLoadstone := BitmapFromString(14, 18, 'meJxtkSFIA2EYhrPNYDAaZK4MBB' +
'2ICxNlXlCMOhhTWPCuLgriiaAzWDWclk1Y0CCyMEQQhoLK4iwuLIh' +
'FWJlxGHzkleNzJzwc733f8//f/f8FB8XAUD0pBftFqPg5cbi1vreR' +
'AgJUdnO/+Lnt5aTrxD0nrqcCIO8Usn4hS7COGzG9fMZdSa2lY8DrQ' +
'mz44aoMBO/vKjmCbvW41O1+fPX79dMjyQNOqHVeX9DEzfU5xVBYmh' +
'4DKpzr/a3T++zhEHiSJcuZn/rROBG70QI04BuAwCAEaZyo1WyohU9' +
'ut56B3G49ERiHtpqeoWI1S/P+9vGuBm4+w4UwURp1ixxo1C+5Cn0V' +
'U1SMOsBuHE0Tw9aAI02gqRJ1rAa2bmdZ51+fvDk3y4VclM+sz4msT' +
'wtnYmQInGSCLrBEwa7i5+JMjo8CYTGZ4AdJg28v5q6s');
End;
Procedure CreateDTMs;
Begin
Lumbridge := DTMFromString('mggAAAHicY2NgYChmYmCoZoLQiUBcC8QTgLidAYJ7gTgbiCOh/P///zP4h3iDsWGKKBg7pkgz8APllLFgRhwYAgBjNw15');
End;
Procedure FreeImages;
Begin
FreeBitmap(LumbridgeLoadstone);
FreeDTM(Lumbridge);
End;
Procedure Setup;
Begin
ClearDebug;
{$IFDEF SIMBAMAJOR980}
SMART_SERVER := 10;
SMART_MEMBERS := TRUE;
SMART_SIGNED := TRUE;
SMART_SUPERDETAIL := FALSE;
{$ELSE}
SRL_SIXHOURFIX := TRUE;
SMART_FIXSPEED := TRUE;
{$ENDIF}
SetupSRL;
DeclarePlayers;
If Not LoggedIn Then
LoginPlayer;
CreateBitmaps;
CreateDTMs;
AddOnTerminate('FreeImages'); //Free bitmaps/dtms on terminate.
SPS_Setup(RUNESCAPE_SURFACE, ['10_10', '10_8', '10_9', '11_10', '11_8', '11_9']);
MakeCompass('N');
End;
Procedure TeleportLumbridge;
Var
X,Y,T: Integer;
Angle: Extended;
Begin
GameTab(tab_Magic);
If (CountColorTolerance(3815994, 650, 210, 655, 215, 5) < 20) Then
Mouse(665,225,12,12,mouse_Left); //If we're not on mage tab, select it.
If (CountColorTolerance(16695068, 650, 245, 680, 247, 5) < 20) Then
Mouse(665,260,12,12,mouse_Left); //If we're not on teleports tab, select it.
Wait(RandomRange(350,700));
Mouse(575,305,12,12,True); //Click loadstone teleport button
MarkTime(T);
Repeat
Wait(RandomRange(350,700)); //Wait until we find the Lumbridge teleport from Loadstone Interface.
Until FindBitmapSpiralTolerance(LumbridgeLoadstone, X, Y, MSX1, MSY1, MSX2, MSY2, 10) or (TimeFromMark(T) > 5000);
If (TimeFromMark(T) > 5000) Then //If it took longer than 5 seconds for the interface to pop up
Begin
If Not LoggedIn Then //Check if we're logged in
LoginPlayer;
TeleportLumbridge; //Try to teleport again
Exit;
End;
Mouse(X+7,Y+9,10,10,mouse_Left); //Click Lumbridge teleport from Loadstone Interface
MarkTime(T);
Repeat
Wait(1000);
Until FindDTMRotated(Lumbridge, X, Y, MMX1, MMY1, MMX2, MMY2, -Radians(35), Radians(35), 0.05, Angle) or (TimeFromMark(T) > 30000);
If (TimeFromMark(T) > 30000) Then //Did it take longer than 30 seconds to arrive at our location?
Begin
If Not LoggedIn Then //Check if we're logged in
LoginPlayer;
TeleportLumbridge; //Try to teleport again
Exit;
End Else
Begin
Wait(RandomRange(2350,2700));
End;
End;
Procedure WalkToMine;
Var
I: Integer;
Begin
PathToMine := [Point(4742, 3797), Point(4771, 3853), Point(4721, 4001)];
For I:=0 To High(PathToMine) Do
Begin
SPS_BlindWalk(PathToMine[I]); //Loop through path to mine using blindwalk
End;
End;
Procedure WalkToFurnace;
Var
I: Integer;
Begin
PathToFurnace := [Point(4711, 3675), Point(4702, 3642), Point(4700, 3589)];
For I:=0 To High(PathToFurnace) Do
Begin
SPS_BlindWalk(PathToFurnace[I]); //Loop through path to furnace using blindwalk
End;
End;
Procedure WalkToBank;
Var
X,Y: Integer;
Angle: Extended;
Begin
Wait(RandomRange(1500,2500));
RadialWalkTolerance(8095110,260,280,74,5,5,35); //Walk to castle
FFlag(0);
RadialWalkTolerance(667482,260,200,70,5,5,20); //Walk to stairs
FFlag(0);
//If FindDTMRotated(CastleStairs, X, Y, MMX1, MMY1, MMX2, MMY2, -Radians(35), Radians(35), 0.05, Angle) Then
// Mouse(X,Y,2,2,mouse_Left);
FFlag(0);
Wait(RandomRange(600,800));
If FindObjCustom(X,Y,['limb','tair','case'],[9541271],8) Then //Find Staircase
Begin
ClickMouse2(True);
End;
FFlag(0);
Wait(RandomRange(1500,2500));
If FindObjCustom(X,Y,['limb','tair','case'],[9541271],8) Then //Find Staircase
Begin
ClickMouse2(False);
ChooseOptionMulti(['limb-up','up']); //Select to climb up the staircase.
End Else
Begin
If Not LoggedIn Then
LoginPlayer;
WalkToBank;
Exit;
End;
FFlag(0);
Wait(RandomRange(1500,2500));
If (FindSymbol(X,Y,'Bank')) Then //Click near bank symbol
Mouse(X,Y,5,5,mouse_Left)
Else
Begin
If Not LoggedIn Then //Check if logged in
LoginPlayer;
WalkToBank;
Exit;
End;
FFlag(0);
Wait(RandomRange(900,1500));
End;
Procedure MineOres;
Var
X,Y,T,OreCount,RT: Integer;
Begin
Repeat
If (InvCount >= 14) Then
RT := 1
Else
RT := 0;
If FindRock(X,Y,RT) Then
Begin
OreCount := InvCount;
ClickMouse2(True);
FFlag(0);
MarkTime(T);
Repeat
Wait(RandomRange(500,800));
Until (OreCount < InvCount) or (TimeFromMark(T) > 15000); //Wait until ore mined or timeout
Wait(RandomRange(500,800));
End;
If Not LoggedIn Then
LoginPlayer;
Until (InvFull) //Repeat until inventory is full
End;
Procedure SmeltBars;
Var
X,Y,T: Integer;
Begin
FFlag(0);
If FindObj(X,Y,'melt',2043102,10) Then //Find furnace
Begin
ClickMouse2(True);
FFlag(0);
MarkTime(T);
Repeat
Wait(RandomRange(500,700)); //Wait until Smithing Interface is up
Until (CountColorTolerance(921102, 400, 50, 450, 85, 5) > 1250) or (TimeFromMark(T) > 5000);
If (TimeFromMark(T) > 5000) Then //If it takes longer than 5 seconds, try again.
Begin
If Not LoggedIn Then
LoginPlayer;
SmeltBars;
Exit;
End;
If (CountColorTolerance(1290732, 30, 84, 60, 86, 15) < 10) Then
Mouse(45,100,12,12,mouse_Left); //If bronze bars not selected, select them
Wait(RandomRange(500,1500));
MouseBox(260,305,480,320,mouse_Left); //Click blue "Smith" button on Smithing Interface
Wait(RandomRange(500,1500));
Repeat
Wait(RandomRange(500,700));
Until (CountColorTolerance(263402, 220, 175, 300, 185, 15) < 400); //Wait until red cancel box is gone.
End Else
Begin
If Not LoggedIn Then
LoginPlayer;
TeleportLumbridge;
WalkToFurnace;
SmeltBars;
Exit;
End;
End;
Procedure BankBars;
Var
X,Y: Integer;
Begin
FindNormalRandoms;
Repeat
If FindObj(X,Y,'ooth',8817040,10) Then //Finding bank booth
Begin
Mouse(X,Y,3,3,True);
FFlag(0);
Wait(RandomRange(700,1200));
End;
Until BankScreen or PinScreen;
If PinScreen Then //If pinscreen, insert pin
InPin(Players[0].Pin);
If BankScreen Then //If bankscreen, deposit entire inventory of bars
Begin
QuickDeposit(SRL_DEPOSIT_ALL);
CloseBank;
End;
End;
Procedure Calibrate;
Begin
MakeCompass('N');
SetAngle(0);
End;
Procedure Antiban;
Begin
FindNormalRandoms;
Case Random(90) Of
1,2,3,4,5: Begin PickUpMouse; End;
6: Begin BoredHuman; Calibrate; End;
7: Begin RandomAngle(1); Calibrate; End;
8: Begin Wait(1000+Random(2500)); End;
9: Begin Wait(4000+Random(1000)); End;
10,11: Begin RandomMovement; Calibrate; End;
12,13,14: Begin HoverSkill('Mining', False); Gametab(tab_inv); End;
15,16,17,18: Begin HoverSkill('Smithing', False); Gametab(tab_inv); End;
End;
End;
Begin
Setup;
While (True) Do
Begin
TeleportLumbridge;
Antiban;
WalkToMine;
Antiban;
MineOres;
Antiban;
TeleportLumbridge;
Antiban;
WalkToFurnace;
Antiban;
SmeltBars;
Antiban;
TeleportLumbridge;
Antiban;
WalkToBank;
Antiban;
BankBars;
Antiban;
End;
End.