Nexus Crux
2014-06-05 22:11:14
While I'm certain this already exists in a hidden section of the forum, I needed a bracelet script for my own purposes. To set up, do directX, zoomed all the way out and follow script setup instructions below.
To-Do List:
Make Login/Password into Constants for cohesion, BONUS: learn how to use player form*
Add a progress report
Add material failsafe for running out of resources*
Add antiban features to wait time*
Add "inBank()" and "inFurnace()" boolean checks as failsafes
Fix false positive color in furnace (tries to pick up on little pool next to furnace, using orange color)*
Randomize map click points*
Somehow reduce wait times from waitPlayerMoving in SPS*
*: Things I could use suggestions on
I just want to thank The Mayor for his excellent tutorial that has helped to get me started here. I would love any feedback that you guys might have! I could definitely use tips on increasing efficiency and decreasing bottyness.
Currently the script is running at about ~60k/hr xp from me doing sapphire bracelets. This is about 15-20k shy of my target xp/hr rate that I've been getting with other methods.
program cruxJewelrySmelter;
{$DEFINE SMART} // Always have this to load smart
{$I SRL-6/SRL.simba} // To load the SRL include files
{$I SPS/lib/SPS-RS3.Simba} // To load the SPS include files
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//////////// ////////////
//////////// Nexus Crux's Jewelry Maker v0.3 ////////////
//////////// ////////////
//////////// ////////////
//////////// ////////////
//////////// 1. Input BANK_PIN, loginName, and password ////////////
//////////// 2. Load your crafting stuff into bank Preset 2 ////////////
//////////// 3. Input a JEWELRY_CHOICE from the following table: ////////////
//////////// ////////////
//////////// ////////////
//////////// Ring Neck Brace Ammy ////////////
//////////// ////////////
//////////// Gold: 1 2 3 4 ////////////
//////////// Sapphire: 5 6 7 8 ////////////
//////////// Emerald: 9 10 11 12 ////////////
//////////// Ruby: 13 14 15 16 ////////////
//////////// Diamond: 17 18 19 20 ////////////
//////////// Dragon: 21 22 23 24 ////////////
//////////// Onyx: 25 26 27 28 ////////////
//////////// ////////////
//////////// ////////////
//////////// 4. Start inside Edgeville Bank (for now) ////////////
//////////// ////////////
//////////// ////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
const
BANK_PIN = '1234';
JEWELRY_CHOICE = 7;
var
numberTrips: integer;
procedure declarePlayers();
begin
setLength(players, 1);
with players[0] do
begin
loginName := 'Zezima';
password := 'ABC123';
isActive := true;
isMember := true;
end
currentPlayer := 0;
end;
procedure openBank(); //clicks banker, defeats pin screen, bypasses all that if the bank screen is already open, and lastly clicks the preset 2
var
x, y, i: integer;
begin
if not isLoggedIn() then
exit;
repeat
bankScreen.open(BANK_NPC_BLUE);
inc(i);
until bankScreen.isOpen() or pinScreen.isOpen() or (i >= 15);
if pinScreen.isOpen() then
pinScreen.enter(BANK_PIN);
if bankScreen.isOpen() then
bankScreen.clickButton(BANK_BUTTON_PRESET_2);
end;
procedure walkFurnace(); //walks to the furnace
var
myPath: TPointArray;
begin
tabBackpack.waitWhileLocked();
wait(randomRange(500, 1000));
myPath := [Point(189, 178), Point(239, 167)];
SPS.walkPath(myPath);
end;
procedure walkBank(); //walks to the bank to start all over
var
myPath: TPointArray;
begin
myPath := [Point(239, 167), Point(189, 178)];
SPS.walkPath(myPath);
end;
procedure makeBracelets(); //finds the furnace, clicks make, waits, and uses key tokens
var
x, y, i: integer;
begin
//ClickingFurnace and Production
repeat
mainscreen.findObject(x, y, 1121980, 5, colorSetting(2, 0.32, 1.71), mainscreen.playerPoint, 23, 30, 8, ['melt', 'urnace'], MOUSE_LEFT);
wait(randomRange(1000, 2000));
inc(i);
writeln('Try');
until productionScreen.isOpen() or (i >= 10);
if (productionScreen.isOpen()) then
begin
if (numberTrips=0) then
begin
if not (productionScreen._getSelectedBox(JEWELRY_CHOICE)) then
begin
productionScreen.selectBox(JEWELRY_CHOICE);
productionScreen.clickStart();
end;
end else begin
productionScreen.clickStart();
end;
end;
wait(randomRange(25500, 27000));
claimTicket();
end;
// main loop
begin
smartPlugins := ['d3d9.dll'];
clearDebug(); // Clear the debug box
smartEnableDrawing := true; // So we can draw on SMART
setupSRL(); // Load the SRL include files
declarePlayers(); // Set up your username/pass
SPS.setup('crux_edgevilleMap', RUNESCAPE_SURFACE); //map setup
repeat
if not isLoggedIn() then // If player isn't logged in then
begin
players[currentPlayer].login(); // Log them in
exitTreasure(); // Exit squeal if found
minimap.setAngle(MM_DIRECTION_NORTH); // Make compass north and angle high
mainScreen.setAngle(MS_ANGLE_HIGH);
tabBackpack.open();
end;
openBank();
walkFurnace();
makeBracelets();
walkBank();
inc(numberTrips);
writeln(numberTrips);
until false;
end.
To-Do List:
Make Login/Password into Constants for cohesion, BONUS: learn how to use player form*
Add a progress report
Add material failsafe for running out of resources*
Add antiban features to wait time*
Add "inBank()" and "inFurnace()" boolean checks as failsafes
Fix false positive color in furnace (tries to pick up on little pool next to furnace, using orange color)*
Randomize map click points*
Somehow reduce wait times from waitPlayerMoving in SPS*
*: Things I could use suggestions on
I just want to thank The Mayor for his excellent tutorial that has helped to get me started here. I would love any feedback that you guys might have! I could definitely use tips on increasing efficiency and decreasing bottyness.
Currently the script is running at about ~60k/hr xp from me doing sapphire bracelets. This is about 15-20k shy of my target xp/hr rate that I've been getting with other methods.