SRL Archive - Jr. Member RS3 Scripts

[BETA] Inc's Lodestone Unlocker


Incurable

2014-10-10 00:18:08

UPDATE (03/03/2015): Afaik this script still works, so feel free to use/improve/fix it as you please. But I won't be updating it any time in the next few months, I've gotten really busy IRL so I'm taking a temporary break from SRL and scripting.

Inc's Lodestone Unlocker
This thread was last updated on 10th Oct, 2014.

Current Version: beta


NOTE: I'm releasing this as a beta because I need some serious feedback from as many people as possible. I aim to make this a flawless script that can be used on any account to unlock whatever lodestones the account hasn't currently unlocked regardless of how many. Your help and feedback is greatly appreciated. <3

WARNING


This script is in BETA. This means that, while it does work, it has several bugs unintended features that need to be squashed corrected and improvements that need to be made before it can be properly released as a working script.

Known Bugs & Issues


  • Use of static TBox's to hit OK on the tutorial hints that pop-up on a new character (findBitmap/DTM wouldn't work for some reason)
  • Individual colour settings for each lodestone, need to be combined into one if possible (help needed)
  • Will always find correct lodestone TPA, but will sometime search a bunch of background TPA's first (looks botlike)
  • Cannot be run on an account with any lodestones already unlocked without stopping
  • Mugger in Edgeville can attack and stop from resting which causes a lack of energy
  • Almost no failsafes

Requirements


  • A new account with no previously unlocked lodestones


TODO List


  • Use bitmap/DTM/colour to click the OK buttons instead of a TBox
  • Use a combined colour to find every lodestone instead of individual colours (help needed)
  • Put a hit out on that damned Mugger
  • Add failsafes
  • Add form support
  • Add multi-player support
  • Add auto-updating

Setup Instructions
IMPORTANT: Failure to follow these instructions will result in a PEBCAK error!
NOTE: Do NOT run this on an account that already has unlocked lodestones; it will NOT work Scratch that, apparently it will!


  1. Ensure that you have properly installed and setup Simba for RS3
  2. Download the attached script
  3. Click here (imgur) and save each image to a folder inside of "runescape_other" named "lodestones". Ensure that they are correctly named the same as their title or else the script will not work
  4. Check that d3d9.dll is correctly placed in "C:\Simba\Plugins" if using DirectX
  5. Check that Simba is using Lape (in Simba, Script > Interpreter > Lape)
  6. Check that your Display Mode is correct for your desired type (in RuneScape, Settings > Graphics > Custom > OpenGL *OR* DirectX)
  7. Setup the script by changing the CFG labelled constants in the user configuration area (don't make me point out what lines :p)
  8. Click the "RUN" button in Simba
  9. Do something productive with your life while the game is automated
  10. Post any progress reports, bugs, and suggestions!

Script



program LodestoneUnlocker;
{$DEFINE SMART}
{$I SRL-6/SRL.simba}
{$I SRL-6/lib/misc/srlplayerform.simba}
{$I SPS/lib/SPS-RS3.Simba}

{
MM_SYMBOL_LODESTONE:
with result do
begin
name := 'Lodestone';
bmp := BitmapFromString(12, 11, 'meJwdiklLAmEAhv9Qh0BlJAgcFR' +
'EtmrFtsrHJpVz6LP1mnFxQXDJwoSzRATGLUiOs6BClENGhU+cCf05' +
'vwXN43mXcLjXV4PdAu0/m7xL5l9IxgCD+DDVME+3oVPZPR61bJfNe' +
'rzxk8u1AHEAQUU5H7YYS6GWjX1r9MproU5XMrxTCaQC5iaV7JIEJh' +
'7dGdkiV6wO5wEtJH31+/QAQRJQDqkzOs5NaqhsmnVBEta9Rb+yseQ' +
'EgiJ1gpBvZG1cPW7LvKSdXBE/RtbE8YyZbBECKnFhZ92BqUZ/ktHy' +
'epNIO1xUJqDZenDUDCGLG6cKEA2c1KcJCP76r2paqglD7B4I4lIOY' +
'cNjkHHNGhq46HpOhptedW+QBBBElJhxEzsmaWIPBwDK6ssSPUjsAg' +
'vhXmlgcymRb9ov7kmC3WhjGqNfpAQQRJSYcfgH3Zq3k');
color := 7751249;
end;
}

const
CFG_LOGIN_NAME = '';
CFG_PASSWORD = '';
CFG_MEMBER = false;
CFG_WORLD = 20;
CFG_DISPLAY_MODE = 1; // 0 for OpenGL, 1 for DirectX
CFG_DISABLE_DEBUG = true; // Disable Simba debug?

{ // Colour config
If the script can't find the lodestones, PLEASE update these using ACA and
post on the forum thread so that I can update them for other people to use!
If you don't know how, read The Mayor's AIO RS3 Scripting tutorial! }

// Taverley
TAV_COL = 5068115;
TAV_TOL = 1;
TAV_HUE = 5.36;
TAV_SAT = 0.70;

// Al Kharid
ALK_COL = 6916520;
ALK_TOL = 2;
ALK_HUE = 0.26;
ALK_SAT = 1.10;

// Varrock
VAR_COL = 6186602;
VAR_TOL = 2;
VAR_HUE = 1.00;
VAR_SAT = 0.93;

// Edgeville
EDG_COL = 4939884;
EDG_TOL = 2;
EDG_HUE = 0.26;
EDG_SAT = 0.43;

// Falador
FAL_COL = 5464684;
FAL_TOL = 2;
FAL_HUE = 0.34;
FAL_SAT = 0.23;

// Port Sarim
POR_COL = 5333098;
POR_TOL = 2;
POR_HUE = 0.21;
POR_SAT = 0.42;

// Draynor
DRA_COL = 5464181;
DRA_TOL = 2;
DRA_HUE = 0.25;
DRA_SAT = 0.51;

{###############################################################################
################################################################################
################################################################################
########## ##########
########## DON'T TOUCH BELOW THIS UNLESS YOU KNOW WHAT YOU'RE DOING ##########
########## DON'T TOUCH BELOW THIS UNLESS YOU KNOW WHAT YOU'RE DOING ##########
########## DON'T TOUCH BELOW THIS UNLESS YOU KNOW WHAT YOU'RE DOING ##########
########## ##########
################################################################################
################################################################################
###############################################################################}

VERSION = 'beta';

BUR_TAV = 0;
LUM_ALK = 1;
LUM_VAR = 2;
VAR_EDG = 3;
EDG_FAL = 4;
FAL_POR = 5;
POR_DRA = 6;

var
SPSMapA: array [0..6] of TSPSArea;
MapNameA: array of string;
pathBurTav, pathLumAlk, pathLumVar, pathVarEdg, pathEdgFal, pathFalPor, pathPorDra: TPointArray;
PathA: T2DPointArray;
isScriptRunning, tavUnlocked, alkUnlocked, varUnlocked, edgUnlocked, falUnlocked, porUnlocked, draUnlocked: boolean;
unlockCount, bmpCloseButton, bmpOkButton: integer;
mmOkBox, wmOkBox: TBox;

{ ============================================================================ )
Procedure: GaussWait
Description: Waits a period of time normally distributed in the given range
Credit: Incurable, original idea (with different code) by Slacky
( ============================================================================ }
procedure GaussWait(min, max: integer);
begin
wait(gaussRangeInt(min, max));
end;

{ ============================================================================ )
Procedure: SetupSmartPlugin
Description: Waits a period of time normally distributed in the given range
Credit: Incurable
Note: Should be deprecated in future, Simba 1.1 will handle it (?)
( ============================================================================ }
// Choose which display mode plugin SMART needs to use
procedure SetupSmartPlugin();
begin
if (CFG_DISPLAY_MODE = 0) then
smartPlugins := ['openGL32.dll']
else
smartPlugins := ['d3d9.dll'];
end;

{ ============================================================================ )
Procedure: SetupDebug
Description: Enable/disable SRL debug based on user config
Credit: Incurable
( ============================================================================ }
procedure SetupDebug();
begin
if (CFG_DISABLE_DEBUG = true) then
disableSRLDebug := true;
end;

{ ============================================================================ )
Procedure: DeclarePlayers
Description: Declares players to be used by the script
Credit: Whoever the orignal author was, SRL-6 development team
( ============================================================================ }
procedure DeclarePlayers();
begin
setLength(players, 1);
with players[0] do
begin
loginName := CFG_LOGIN_NAME;
password := CFG_PASSWORD;
isActive := true;
isMember := CFG_MEMBER;
world := CFG_WORLD;
end
currentPlayer := 0;
end;

{ ============================================================================ )
Procedure: LoadBMPs
Description: Loads script bitmaps
Credit: Incurable
( ============================================================================ }
procedure LoadBMPs();
begin
bmpCloseButton := BitmapFromString(14, 14, 'meJyNkDELQWEUhsWNhZTcxairzM' +
'pgu7MySMlosJj8BYvVwkqyWvADyHZ/gsVEFgapL6uHU18nqXvr6et' +
'93/N0h+t6q0RhG4r71eq9Syji+50TuTu58ZItekRL5RcElv7x1Vwb' +
'bVIZOZHRoNIIgL0VPHn/VjG96g70VWty1aZQW579vQGC3tHimTF/w' +
'FKcm/LmAQS9o4F8mZobXRF4bWCUq5iQLE3tlfxTrfahfcjO7ux6pD' +
'JykhpzhiCyrXrkm3qMgpMeRNTeyi/Xlw==');

bmpOkButton := BitmapFromString(23, 10, 'meJyzPvzL+vAv9ablIo7BAibOHF' +
'KKECSf0WoNloLIAkUYGBiUS6dBRIAqWXgFlTJbTVbdtDkCEgGqB4r' +
'ozzlhefCX2d5fJrt/iXqnALWI+aRY7v9ldQikBmIIxATt/u0Q9XBb' +
'lGuXA2VlUlqBepGRoF0wsji7JMgQIEN7+gmggRATIJaa7vnFZ+QMl' +
'NVddBPNEPmCaUBxLlUjZEO0pp0AMoAkmmIGMEATRJYy3P4LiCCGAM' +
'0UCy012AYSMd6FrlJ50TM4UlrwVHHuE4XZT4DiTFz8QAYQsYjKAbm' +
'8dtFAUjC4CqgAqAyuhUPdBiguFNkhP/MxRD0ESbceBYoDZWUnPwQi' +
'FhGQIUAGm5wuxBygGrhRgvETgYKsstrSk27JTL4NR/x+pSDDEydK9' +
'd8EIhZhWVA4T74t1XmGTVYH6EKxsvUyU+9Iz7wvPfuhWOclTrMQkH' +
'8twiRaT0OMAioAKgOaA+SCDOm7yQw2RLzninjvFfG6PUBZIBJOmgR' +
'UDFQj1n0JiPhje9hULZiFZYCITd2Sw9BdIKlXYvIV8YmXxXovCaTN' +
'YuTkA4VJcJ1o0xGgeqH8FSwyWiCrHZMEUmYBAPuzBiI=');

end;

{ ============================================================================ )
Procedure: FreeTheBMPs
Description: Frees all script bitmaps from memory
Credit: Incurable
( ============================================================================ }
procedure FreeTheBMPs;
begin
freeBitmap(bmpCloseButton);
freeBitmap(bmpOkButton);
writeLn('ENDSCRIPT: BMPs freed');
end;

{ ============================================================================ )
Procedure: LoadMapNames
Description: Assign all of the SPS map names and load them into an array
Credit: Incurable
( ============================================================================ }
procedure LoadMapNames();
var
mapBurTav, mapLumAlk, mapLumVar, mapVarEdg, mapEdgFal, mapFalPor, mapPorDra:string;

begin;
mapBurTav := 'bur_tav';
mapLumAlk := 'lum_alk';
mapLumVar := 'lum_var';
mapVarEdg := 'var_edg';
mapEdgFal := 'edg_fal';
mapFalPor := 'fal_por';
mapPorDra := 'por_dra';

MapNameA := [(mapBurTav), (mapLumAlk), (mapLumVar), (mapVarEdg), (mapEdgFal), (mapFalPor), (mapPorDra)];
end;

{ ============================================================================ )
Procedure: SetupMaps
Description: Assign maps to SPSMapA
Credit: Incurable
( ============================================================================ }
procedure SetupMaps();
begin
SPSMapA[BUR_TAV].setup(MapNameA[BUR_TAV], 'runescape_other\lodestones\');
SPSMapA[LUM_ALK].setup(MapNameA[LUM_ALK], 'runescape_other\lodestones\');
SPSMapA[LUM_VAR].setup(MapNameA[LUM_VAR], 'runescape_other\lodestones\');
SPSMapA[VAR_EDG].setup(MapNameA[VAR_EDG], 'runescape_other\lodestones\');
SPSMapA[EDG_FAL].setup(MapNameA[EDG_FAL], 'runescape_other\lodestones\');
SPSMapA[FAL_POR].setup(MapNameA[FAL_POR], 'runescape_other\lodestones\');
SPSMapA[POR_DRA].setup(MapNameA[POR_DRA], 'runescape_other\lodestones\');
end;

{ ============================================================================ )
Procedure: LoadPaths
Description: Assign all of the SPS path TPA's and load them into an array
Credit: Incurable
( ============================================================================ }
procedure LoadPaths();
begin;
pathBurTav := [Point(203, 83), Point(206, 105), Point(214, 125), Point(214, 147), Point(211, 166), Point(206, 189), Point(205, 210), Point(199, 228), Point(189, 244), Point(184, 264), Point(184, 284), Point(187, 306), Point(187, 328), Point(186, 352), Point(190, 372), Point(195, 398), Point(187, 412), Point(164, 431), Point(142, 452), Point(126, 465)];
pathLumAlk := [Point(117, 145), Point(134, 127), Point(167, 120), Point(216, 124), Point(253, 118), Point(296, 116), Point(309, 146), Point(316, 178), Point(322, 217), Point(348, 242), Point(357, 276), Point(375, 279)];
pathLumVar := [Point(199, 709), Point(233, 683), Point(283, 684), Point(284, 627), Point(273, 588), Point(254, 536), Point(234, 482), Point(229, 431), Point(231, 381), Point(240, 322), Point(239, 279), Point(210, 238), Point(174, 208), Point(172, 169), Point(144, 138), Point(127, 80)];
pathVarEdg := [Point(665, 581), Point(608, 587), Point(569, 583), Point(517, 567), Point(482, 544), Point(450, 522), Point(415, 498), Point(375, 485), Point(342, 460), Point(309, 436), Point(280, 407), Point(231, 403), Point(188, 374), Point(178, 330), Point(165, 292), Point(101, 282), Point(87, 242), Point(85, 192), Point(86, 151), Point(90, 109), Point(89, 62)];
pathEdgFal := [Point(548, 96), Point(548, 130), Point(547, 181), Point(535, 225), Point(513, 263), Point(491, 296), Point(452, 332), Point(422, 357), Point(374, 388), Point(318, 392), Point(266, 389), Point(230, 408), Point(203, 446), Point(161, 463), Point(144, 501)];
pathFalPor := [Point(218, 197), Point(214, 247), Point(228, 296), Point(277, 313), Point(314, 337), Point(360, 368), Point(380, 420), Point(382, 470), Point(378, 517), Point(370, 573), Point(375, 628), Point(373, 689), Point(375, 750), Point(378, 794), Point(381, 838), Point(378, 884), Point(387, 931)];
pathPorDra := [Point(78, 376), Point(116, 344), Point(119, 300), Point(153, 271), Point(175, 238), Point(200, 196), Point(245, 183), Point(279, 163), Point(316, 138), Point(346, 117), Point(387, 85), Point(433, 64), Point(460, 53)];

PathA := [(pathBurTav), (pathLumAlk), (pathLumVar), (pathVarEdg), (pathEdgFal), (pathFalPor), (pathPorDra)];
end;

{ ============================================================================ )
Procedure: SetupScript
Description: Setup SMART, SRL, etc before running the main loop
Credit: Incurable
( ============================================================================ }
procedure SetupScript();
begin
ClearDebug();
SetupSmartPlugin();
smartEnableDrawing := true;
smartShowConsole := false;
SetupDebug();
SetupSRL();
DeclarePlayers();
LoadBMPs();
addOnTerminate('FreeTheBMPs');
LoadMapNames();
SetupMaps();
LoadPaths();
mouseSpeed := 22;
isScriptRunning := true;
wait(1000);
end;

{ ============================================================================ )
Procedure: SetupScreen
Description: Sets mainScreen angle, height, and zoom to SRL standards
Credit: Incurable
( ============================================================================ }
procedure SetupScreen();
begin
GaussWait(500, 700);

if (not isLoggedIn()) then
begin
writeLn('ERROR: Not logged in');
exit();
end;

writeLn('STATUS: Setting up the screen (changing angles, etc)');
minimap.clickCompass();
GaussWait(50, 100);
mainScreen.setAngle(MS_ANGLE_HIGH);
GaussWait(50, 100);
mainscreen.setZoom(true);
GaussWait(50, 100);
exitTreasure();
GaussWait(50, 100);
end;

{ ============================================================================ )
Function: customObjectFinder : boolean
Description: Finds and clicks an object with a chance to miss the first click,
an option to show SMART debug drawing, and a choice of left or right clicking
Credit: 90% to The Mayor, 10% lightly modified by Incurable
( ============================================================================ }
function customObjectFinder(name: string; col, tol: integer; hue, sat: extended; w, h, mouseButton, missChance: integer; mouseOverText, menuOption: array of string; excludeSmall, debug: boolean): boolean;
var
i, x, y: integer;
p: TPoint;
TPA: TPointArray;
ATPA: T2DPointArray;

begin
if (not isLoggedIn()) then
begin
writeLn('ERROR: Not logged in');
exit();
end;

findColorsSpiralTolerance(x, y, TPA, col, mainScreen.getBounds(), tol, colorSetting(2, hue, sat));
mainScreen.filterPointsPlayer(TPA);

if (length(TPA) = 0) then
begin
writeLn('ERROR: No points in object ' + name + ' found, update colours!');
exit();
end;

ATPA := TPA.toATPA(w, h);
ATPA.sortFromMidPoint(mainScreen.playerPoint);

smartImage.debugATPA(ATPA);

for i := 0 to high(ATPA) do
begin
if (excludeSmall) then
if (length(ATPA[i])) < w then
continue;

if (random(100) <= missChance) then
begin
missMouse(ATPA[i].getMiddle().randRange(-3, 3), true);
if (debug) then
writeLn('DEBUG: Used missMouse()');
end else
mouse(ATPA[i].getMiddle().randRange(-3, 3), MOUSE_MOVE);

if isMouseOverText(mouseOverText, 500) then
begin
if (debug) then
writeLn('DEBUG: Found mouseOverText');
fastClick(mouseButton);
if (mouseButton = MOUSE_LEFT) then
begin
if (debug) then
writeLn('DEBUG: Used mouseButton MOUSE_LEFT on object ' + name);
smartImage.clearArea(mainscreen.getBounds());
exit(true);
end;
if (chooseOption.select(menuOption)) then
begin
if (debug) then
begin
writeLn('DEBUG: Used mouseButton MOUSE_RIGHT on object ' + name);
smartImage.clearArea(mainscreen.getBounds());
end;
exit(true);
end else
begin
gaussBox(p, mainscreen.getBounds());
mouse(p, MOUSE_MOVE);
end;
end;
end;
end;

{ ============================================================================ )
Function: closeTask : boolean
Description: Closes the "Task" popup crap and returns true
Credit: Incurable
( ============================================================================ }
function closeTask(): boolean;
var
closeBox: TBox;
begin
closeBox := intToBox(443, 78, 450, 83);
mouseBox(closeBox, MOUSE_LEFT);
Result := true;
end;

{ ============================================================================ )
Procedure: Rest
Description: Find and click the given symbol on the minimap, return false
if unable to find it
Credit: The Mayor: https://villavu.com/forum/showthread.php?t=109896&p=1304627#post1304627
NOTE: Why the hell isn't this in the include yet? o.O
( ============================================================================ }
procedure Rest();
var
p: TPoint;
begin
p := minimap.button[MM_BUTTON_RUN].center;

if (not minimap.isResting()) then
begin
mouseCircle(p.x, p.y, minimap.button[MM_BUTTON_RUN].radius, MOUSE_RIGHT);
chooseOption.select(['Rest']);
print('minimap.rest(): Enabled rest', TDebug.SUB);
end;

wait(randomRange(5000, 8000));
GaussWait(500, 900);
end;

{ ============================================================================ )
Function: clickSymbol : boolean
Description: Find and click the given symbol on the minimap, return false
if unable to find it
Credit: Incurable
( ============================================================================ }
function clickSymbol(symbol: integer): boolean;
var
p: TPoint;

begin
if (minimap.findSymbol(p, symbol, minimap.getBounds())) then
begin
mouse(p, MOUSE_LEFT);
p.y := p.y + randomRange(8, 12);
wait(randomRange(5000, 6000));
Result := true;
end else
Result := false;
end;

{ ============================================================================ )
Function: teleport : boolean
Description: Use lodestoneScreen to teleport to destination i and wait
roughly how long it takes for the animation to be completed
Credit: Incurable
( ============================================================================ }
function teleport(i: integer): boolean;
begin
if (not isLoggedIn()) then
exit();

if (lodestoneScreen.teleportTo(i)) then
Result := true;
GaussWait(18000, 22000);
end;

{ ============================================================================ )
Function: unlockLodestone : boolean
Description: Unlock a lodestone by walking the path to it from the last one
using given parameters... bad explanation, but it works and it's a hell of
a lot cleaner than having a function for each lodestone
Credit: Incurable
( ============================================================================ }
function unlockLodestone(routeName: integer; unlockState: boolean; col, tol: integer; hue, sat: extended; w, h: integer; excludeSmall: boolean): boolean;
begin
if (not isLoggedIn()) then
exit();

// getRunEnergy is broken
//if (minimap.getRunEnergy() < 40) then
wait(randomRange(500, 1000));
Rest();

if (not SPSMapA[routeName].walkPath(PathA[routeName])) then
begin
writeLn('ERROR: Failed walking route ' + toStr(routeName) + ', trying again');
if not(SPS.walkPath(PathA[routeName])) then // Try again
begin
writeLn('ERROR: Failed to walk route ' + toStr(routeName) + ', we should probably do something instead of exiting...');
exit();
end;
end;

minimap.waitPlayerMoving();

// Failsafe
if (clickSymbol(MM_SYMBOL_LODESTONE)) then
writeLn('STATUS: Clicking minimap lodestone symbol to ensure it can be found in mainScreen')
else
writeLn('ERROR: Lodestone symbol not found, we''re probably lost! :(');

GaussWait(100, 200);
unlockState := customObjectFinder('Lodestone', col, tol, hue, sat, w, h, MOUSE_LEFT, 0, ['ctivate'], ['ctivate'], excludeSmall, true);
Result := unlockState;
smartImage.clear();
if (unlockState) then
begin
GaussWait(9000, 12000);
closeTask();
end else
writeLn('ERROR: unlockState is false, we probably couldn''t find any colours. Consider updating them for me. ;)');
GaussWait(800, 1200);
end;

{ ============================================================================ )
Procedure: UnlockEmAll
Description: Unlock each lodestone in a specific order, recording the success
or fail of each attempt... such a terrible way to do it, don't look! :x
Credit: Incurable
( ============================================================================ }
procedure UnlockEmAll();
begin
if (not isLoggedIn()) then
players[currentPlayer].login();

if (isLoggedIn()) then
SetupScreen();

// Unlock Taverley
if (not tavUnlocked) then
begin
writeLn('STATUS: Taverley is NOT unlocked, attempting to unlock it now');

teleport(LOCATION_BURTHORPE);

// Click OK on the tutorial pop-up... I know that this is crap, but for some
// reason I couldn't get findDTM or findBitmap.. working and I was in a hurry
// TODO: Get rid of this static rubbish
mmOkBox := intToBox(548, 366, 632, 383);
mouseBox(mmOkbox, MOUSE_LEFT);
wait(randomRange(500, 1000));

if (unlockLodestone(BUR_TAV, tavUnlocked, TAV_COL, TAV_TOL, TAV_HUE, TAV_SAT, 60, 60, false)) then
begin
writeLn('SUCCESS: Taverley unlocked!');
inc(unlockCount);
end else
writeLn('ERROR: Taverley NOT unlocked, will try again next loop');
end;

// Unlock Al Kharid
if (not alkUnlocked) then
begin
writeLn('STATUS: Al Kharid is NOT unlocked, attempting to unlock it now');

teleport(LOCATION_LUMBRIDGE);

// TODO: Argh, see above
wmOkBox := intToBox(594, 342, 676, 361);
mouseBox(wmOkbox, MOUSE_LEFT);
wait(randomRange(500, 1000));

if (unlockLodestone(LUM_ALK, alkUnlocked, ALK_COL, ALK_TOL, ALK_HUE, ALK_SAT, 50, 50, true)) then
begin
writeLn('SUCCESS: Al Kharid unlocked!');
inc(unlockCount);
end else
writeLn('ERROR: Al Kharid NOT unlocked, will try again next loop');
end;

// Unlock Varrock
if (not varUnlocked) then
begin
writeLn('STATUS: Varrock is NOT unlocked, attempting to unlock it now');

teleport(LOCATION_LUMBRIDGE);

if (unlockLodestone(LUM_VAR, varUnlocked, VAR_COL, VAR_TOL, VAR_HUE, VAR_SAT, 50, 50, true)) then
begin
writeLn('SUCCESS: Varrock unlocked!');
inc(unlockCount);
end else
writeLn('ERROR: Varrock NOT unlocked, will try again next loop');
end;

// Unlock Edgeville
if (not edgUnlocked) then
begin
writeLn('STATUS: Edgeville is NOT unlocked, attempting to unlock it now');

if (not clickSymbol(MM_SYMBOL_LODESTONE)) then
teleport(LOCATION_VARROCK);

if (unlockLodestone(VAR_EDG, edgUnlocked, EDG_COL, EDG_TOL, EDG_HUE, EDG_SAT, 50, 50, false)) then
begin
writeLn('SUCCESS: Edgeville unlocked!');
inc(unlockCount);
end else
writeLn('ERROR: Edgeville NOT unlocked, will try again next loop');
end;

// Unlock Falador
if (not falUnlocked) then
begin
writeLn('STATUS: Falador is NOT unlocked, attempting to unlock it now');

if (not clickSymbol(MM_SYMBOL_LODESTONE)) then
teleport(LOCATION_EDGEVILLE);

if (unlockLodestone(EDG_FAL, falUnlocked, FAL_COL, FAL_TOL, FAL_HUE, FAL_SAT, 50, 50, false)) then
begin
writeLn('SUCCESS: Falador unlocked!');
inc(unlockCount);
end else
writeLn('ERROR: Falador NOT unlocked, will try again next loop');
end;

// Unlock Port Sarim
if (not porUnlocked) then
begin
writeLn('STATUS: Port Sarim is NOT unlocked, attempting to unlock it now');

if (not clickSymbol(MM_SYMBOL_LODESTONE)) then
teleport(LOCATION_FALADOR);

if (unlockLodestone(FAL_POR, porUnlocked, POR_COL, POR_TOL, POR_HUE, POR_SAT, 50, 50, false)) then
begin
writeLn('SUCCESS: Port Sarim unlocked!');
inc(unlockCount);
end else
writeLn('ERROR: Port Sarim NOT unlocked, will try again next loop');
end;

// Unlock Draynor Village
if (not draUnlocked) then
begin
writeLn('STATUS: Draynor Village is NOT unlocked, attempting to unlock it now');

if (not clickSymbol(MM_SYMBOL_LODESTONE)) then
teleport(LOCATION_PORT_SARIM);

if (unlockLodestone(POR_DRA, draUnlocked, DRA_COL, DRA_TOL, DRA_HUE, DRA_SAT, 50, 50, false)) then
begin
writeLn('SUCCESS: Draynor Village unlocked!');
inc(unlockCount);
end else
writeLn('ERROR: Draynor Village NOT unlocked, will try again next loop');
end;

// Return to the start
teleport(LOCATION_BURTHORPE);

if (unlockCount = 7) then
begin
writeLn('SUCCESS: It looks like every lodestone has been unlocked, happy botting!');
isScriptRunning := false;
end;
end;

{ ============================================================================ )
Procedure: EndScript
Description: End the sript and finalise everything
Credit: Incurable
( ============================================================================ }
procedure EndScript();
begin
GaussWait(1500, 3500);
if (isLoggedIn()) then
players[currentPlayer].logout();
//clearDebug();
smartImage.clear();
end;

{ ============================================================================ )
Procedure: Main
Description: It's main... duh
Credit: Alan Turing
( ============================================================================ }
begin
//CheckForUpdates();
SetupScript();
//while (isScriptRunning) do
UnlockEmAll();
EndScript();
end.

Credit


  • <3 @3Garrett3 - Script testing and feedback
  • <3 @BMWxi and @Justin - F2P maps that I made my SPS maps from
  • <3 Everyone else who helped me with small bugs and ways to do what I needed

The Mayor

2014-10-10 01:05:03

Very nice :D I like your array of TSPSArea ;)

Ian

2014-10-10 03:07:38

Looks useful. For the lodestones, individual colours might be the best way to go if they're not all the same colour.

Frement

2014-10-10 04:08:20

Run #1:
All complete.

Run #2:
Failed to unlock Al kharid.

Run #3:
Failed to unlock Al kharid.

Most problems I had was with Al kharid. And add multiplayer please, the reason I only did 3 runs was because it didn't have multiplayer.

The Mayor

2014-10-10 04:38:13

If Al Kharid SPS sucks, you could probably use MM symbols as a failsafe. You could get away with Gem Stall -> Tanner -> Lodestone symbols.

Frement

2014-10-10 04:53:50

From: The Mayor
If Al Kharid SPS sucks, you could probably use MM symbols as a failsafe. You could get away with Gem Stall -> Tanner -> Lodestone symbols.


Walked fine there everytime, didn't find lodestone.

Incurable

2014-10-10 05:25:58

From: Frement
Walked fine there everytime, didn't find lodestone.


Yeah, that's a bug with the version I PM'd you last night. Try the one posted, it should do the whole route just fine. If not, please let me know.

Ross

2014-10-10 06:25:04

This is pretty cool man! I will be using for sure!

Any particular reason why this is in Juniors?

Incurable

2014-10-10 08:38:24

From: Ross
This is pretty cool man! I will be using for sure!

Any particular reason why this is in Juniors?


Thanks. :)

Two reasons:
1. It's in beta
2. I feel like there needs to be more useful scripts available in Jr that people really want so that it encourages them to contribute

That's it really.

Ross

2014-10-10 08:59:56

From: Incurable
Thanks. :)

Two reasons:
1. It's in beta
2. I feel like there needs to be more useful scripts available in Jr that people really want so that it encourages them to contribute

That's it really.


While I get that, here are my counters:

1. You get more testing in public, so people can help you go from BETA to perfect faster.
2. Rewards for gaining access to higher boards should probably be more gold farming oriented, as to preserve prices. Something this useful would be much more appreciated in the public section :)

Ian

2014-10-10 09:46:23

From: Ross
While I get that, here are my counters:

1. You get more testing in public, so people can help you go from BETA to perfect faster.
2. Rewards for gaining access to higher boards should probably be more gold farming oriented, as to preserve prices. Something this useful would be much more appreciated in the public section :)


Realistically though goldfarmers are the only ones likely to be creating enough accounts for this to be really useful.

Incurable

2014-10-10 09:56:20

From: Ross
While I get that, here are my counters:

1. You get more testing in public, so people can help you go from BETA to perfect faster.
2. Rewards for gaining access to higher boards should probably be more gold farming oriented, as to preserve prices. Something this useful would be much more appreciated in the public section :)


The people who are likely to help me perfect this script have access to this forum anyway, so the larger audience isn't really a problem. Also, I do agree that money making scripts should be kept more private (especially with high profit rates), but this is a simple script that new users are able to go just fine without. Jr Member is already incredibly easy to gain, so I don't think that's really an issue either. :p

bonsai

2014-10-10 16:31:48

My opinion: I agree with Ross that this one could/should be public.

I am strong on the sentiment that we should avoid profitable scripts in the public sections. Not because I care if someone makes runegold or, bless them, sells runegold for real gold.

Just because making a big deal out of it, making it too easy, yammering about it publicly… these things could seriously hamper our fun. It wouldn't take too much to put a hurt on if they cared to.

I think it's helpful to all if public scripts are xp focused and/or not worth setting up a farm of 20 doing it.

Spaceblow

2014-10-10 19:28:34

Looks great, nice to see this getting released! :)

Incurable

2014-10-11 04:39:35

Just catching up on a few replies…

From: The Mayor
Very nice :D I like your array of TSPSArea ;)


Thanks. :D I have Olly to thank for that, I'd credit him but I don't think he cares for credits. ^^

From: BMWxi
Looks useful. For the lodestones, individual colours might be the best way to go if they're not all the same colour.


I'd like to be able to use a single colour if I could, but so far they're just way too different. I might be able to get away with just two colours, one for a set of lodestones, the other for the remainder.

From: bonsai
My opinion: I agree with Ross that this one could/should be public.

I am strong on the sentiment that we should avoid profitable scripts in the public sections. Not because I care if someone makes runegold or, bless them, sells runegold for real gold.

Just because making a big deal out of it, making it too easy, yammering about it publicly… these things could seriously hamper our fun. It wouldn't take too much to put a hurt on if they cared to.

I think it's helpful to all if public scripts are xp focused and/or not worth setting up a farm of 20 doing it.


To concur with BMWxi, this script could also be helpful for gold farmers. The average user is going to find this useful, sure, but I don't think they're going to use it to unlock 20-30 accounts.

From: Spaceblow
Looks great, nice to see this getting released! :)


Thanks mate. :D

Trollcrank

2014-10-19 14:14:11

Maybe rename it to f2p loadstone unlocker because all of the current ones are in free to play.

aran armath

2014-10-21 18:39:35

Worked great for me with the one account I ran through it. Only issue being was that it tried to activate the Falador Lodestone when I already activated it. Will do the other 19 later tonight.

Incurable

2014-10-22 00:14:30

From: Trollcrank
Maybe rename it to f2p loadstone unlocker because all of the current ones are in free to play.


Will do, thanks for the suggestion! ;)

From: aran armath
Worked great for me with the one account I ran through it. Only issue being was that it tried to activate the Falador Lodestone when I already activated it. Will do the other 19 later tonight.


It did continue to Port Sarim after trying to unlock the Falador one though, right?

Sorry that you have to do that manually (unless you add multiplayer yourself) for each account, I don't have the time to update it right now. :p

aran armath

2014-10-22 02:07:51

From: Incurable
It did continue to Port Sarim after trying to unlock the Falador one though, right?

Sorry that you have to do that manually (unless you add multiplayer yourself) for each account, I don't have the time to update it right now. :p


Yes, it did everything correct, except for that one issue. I am not going to take the time to add it, its a one time use script, at least for the near term for me. Besides it'll give me something to do while cleaning 3000 herbs.

AttilaBilly

2015-03-06 17:48:58

Yes, I ran this and it worked perfectly. The only things I'd suggest adding, is p2p lodestones, and make it check which lodestones you actually need instead of wandering to the ones that are already unlocked. Nonetheless this was an excellent and easy to use script. Hope to see more :)