SRL Archive - Archive

-daazndagger- - SRL Member Application


Press Play

2010-06-26 09:44:18

How Long have You Played Runescape?
6 Year(s)


Are you affilated in anyway with Jagex LTD?
No

Were you Referred to SRL?



What is your general programming knowledge?
C, Pascal, (learning) Java.


Are you a member of any other communities?
Facebook? lol


Tell us about yourself…
From: -daazndagger-
I live in Australia and am in year 10 at the moment. I like to skate, play basketball, dance, hang with friends and PARRTYYY! ;) I like programming bots for rs because it gives me a challenge.



Please show us one (or multiple) of your scripts.

// can be found at 'http://villavu.com/forum/showthread.php?t=57582'
// Just added it today :) I'm very proud of it.


program PMiner;
{.include SRL/SRL/Misc/Smart.scar}
{.include SRL/SRL.scar}
{.include SRL/SRL/Misc/Reports.scar}

{==============================================================================]
[ Daazndagger's Ultimate Miner ]
[==============================================================================]
[ [SCAR 3.23] ]
[ [SRL] ]
[ [SMART] ]
[------------------------------------------------------------------------------]
[ Description: | ]
[-------------------. ]
[ - A neat litle powermining script that was made in 2007-08. Now edited, ]
[ organising and updated to really test and improve my scripting skills. ]
[ Use it wisely, post proggies and have fun :) ]
[------------------------------------------------------------------------------]
[ Features: | ]
[-------------------. ]
[ ## Version 3.6 and below (07-08): ]
[ - uses SMART ]
[ - uses TPAs for the rock-finding procedure ]
[ - anti-randoms ]
[ - anti-ban (human-like features) ]
[ - gem dropper ]
[ ## Version 3.7 (2010): ]
[ - fixed it up because it was outdated ]
[ ]
[ ## Reverted to Version 1.00: ]
[ - uses ATAPs for the rock-finding procedure ]
[ - fixed every procedure :P ]
[ - made progress report better ]
[ - changed name to 'Ultimate Miner' ]
[ - released to the forums ]
[------------------------------------------------------------------------------]
[ Instructions: | ]
[-------------------. ]
[ 1. Fill out varibles. DO NOT EDIT PAST THE STOP SIGN! ]
[ 2. Place your character near the rocks you want to mine. ]
[ 3. Your should have a pickaxe! It doesn't matter where you put it. ]
[ 4. Press PLAY! ]
[------------------------------------------------------------------------------}

const
SMARTMembers = false; // Members?
GemDroppingp = true; // Do you want to drop your gems that you get from mining?
WriteDebug = false; // Shows EVERYTHING that is happening in debug log
LoadsToDoAll = 20; // Total loads to do per character

{------------------------------------------------------------------------------]
[ DECLARE PLAYERS: ]
[ Change accordingly. ]
[------------------------------------------------------------------------------}
Procedure SETUP_DeclarePlayers;
begin
HowManyPlayers := 2; // How many players will you be using?
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name :=''; // Character's username
Players[0].Pass :=''; // Characters password
Players[0].Nick :=''; // 3-4 lower case letters of your character's name
Players[0].Integers[0] := 10; // Amount of loads to do before switching
Players[0].Integers[1] := 5000; // Time(ms) to wait before attemting to mine another rock
Players[0].Strings[0] :='iron' // Ore you want to mine
Players[0].Active := True; // Are you using this player?

// <-- Remove curly brace to add more players

Players[1].Name :='';
Players[1].Pass :='';
Players[1].Nick :='';
Players[1].Integers[0] := 10;
Players[1].Integers[1] := 5000;
Players[1].Strings[0] :='copper'
Players[1].Active := True;

{// Add { at the very front to use only 2 players

Players[2].Name :='';
Players[2].Pass :='';
Players[2].Nick :='';
Players[2].Integers[0] := 10;
Players[2].Integers[1] := 5000;
Players[2].Strings[0] :='copper'
Players[2].Active := True;

// Add { at the very front to use 3 players

Players[3].Name :='';
Players[3].Pass :='';
Players[3].Nick :='';
Players[3].Integers[0] := 10;
Players[3].Integers[1] := 5000;
Players[3].Strings[0] :='copper'
Players[3].Active := True;

} // <-- Remove curly braces to use all 4 players

Writeln('You are using ' + IntToStr(HowManyPlayers) + ' Player(s)' );
end;

{------------------------------------------------------------------------------]
[ ORE COLOURS: ]
[ Note: You MIGHT need to change these but you can if need be. Please ]
[ post on the forums if you pick a 'good' colour for me. ]
[ These ore colours were picked in 2007-08 lol. ]
[------------------------------------------------------------------------------}
const
d_copper = 3824771; // (updated colour 17/6/10) [dark copper]
l_copper = 4154768; // (updated colour 26/6/10) [light copper]
tin = 8618889; // (updated colour 26/6/10)
iron = 2699851; // (updated colour 4/5/10)
silver = 8816529; // not tested/needed yet
coal = 2503218; // (updated colour 4/5/10)
gold = 1880022; // not tested/needed yet
mith = 8739675; // not tested/needed yet
addy = 5202510; // not tested/needed yet

{------------------------------------------------------------------------------}
{ STOP STOP STOP STOP STOP-STOP STOP STOP }
{ STOP STOP STOP STOP STOP | }
{ ===== STOP STOP STOP STOP STOP STOP STOP ===== }
{ STOP STOP STOP STOP STOP }
{ STOP STOP STOP STOP-STOP STOP }
{------------------------------------------------------------------------------}

const
Version = '1.00';
ScriptName = 'Ultimate Miner';

{ *** For Debug}
D_SETUP = 1;
D_GOOD = 2;
D_BAD = 3;
D_RANDOM = 4;
D_NOTE = 5;

{ *** For HSL Colours}
C_HUE = 0;
C_SAT = 1;
C_LUM = 2;

{ *** For Player Reports - Integers }
P_I_SWITCHLOADS = 0;
P_I_WAITTIME = 1;
P_I_LOADS = 2;
P_I_ORES = 3;
P_I_ORESHOUR = 4;
P_I_XP = 5; // is now an extended
P_I_XPHOUR = 6; // is now an extended
P_I_LEVELSGAIN = 7;

{*** For Player Reports - Strings }
P_S_WHATROCK = 0;
P_S_REASON = 1;

{*** For Ore Colour Arrays }
O_DCOPPER = 1;
O_TIN = 2;
O_IRON = 3;
O_SILVER = 4;
O_COAL = 5;
O_GOLD = 6;
O_MITH = 7;
O_ADDY = 8;
O_LCOPPER = 9;

var
{ ### All and Everything}
x, y: Integer;
UnableToMineOre: Integer;
PatternForDrop: Array of TIntegerArray;
ore_XP: Array[1..9] of Extended;

{ ### DTMs}
OreInInv_DTM: Integer;

{ ### Overall Totals}
Total_Ores, Total_Loads: Integer;
Total_XP: Extended;
BreaksTaken, SleepsTaken: Integer;

{ ### Colours}
HSL_Colour: Array[1..9] of Array[0..2] of Extended; // HSL_Colour[WHICH_ORE][HUE or SAT or LUM]
HSMods: Array[1..9] of Array[0..2] of Extended; // HSMods[WHICH_ORE][HUE_MOD, SAT_MOD]
OreColour: Array[1..9] of Integer;

{ ### Player Info}
Rock_SetupInfo, WaitTime_SetupInfo: Integer;
Player_Time, Loads_Break: Integer;


{*******************************************************************************
Procedure Debug(thestring: string; typeofstring: Integer);
By: -daazndagger-
Description: Writes Debug.
*******************************************************************************}
Procedure Debug(thestring: string; typeofstring: Integer);
begin
if(WriteDebug)then
begin
case typeofstring of
1: writeln('SETUP : ' + thestring);
2: writeln('GOOD : ' + thestring);
3: writeln('BAD : ' + thestring);
4: writeln('RANDOMS: ' + thestring);
5: writeln('NOTE : ' + thestring);
end;
end;
end;

{*******************************************************************************
procedure Writeline(thestring: string; typeofstring: Integer);
By: -daazndagger-
Description: My modified Writeln.
*******************************************************************************}
procedure Writeline(thestring: string; typeofstring: Integer);
begin
case typeofstring of
1: writeln('SETUP : ' + thestring);
2: writeln('GOOD : ' + thestring);
3: writeln('BAD : ' + thestring);
4: writeln('RANDOMS: ' + thestring);
5: writeln('NOTE : ' + thestring);
end;
end;

{*******************************************************************************
Function CHECK_CorrectVersion: boolean;
By: -daazndagger-
Description: Checks to see if your version is up to date.
*******************************************************************************}
{Function CHECK_CorrectVersion: boolean;
begin

end; } // Do this soon

{*******************************************************************************
Procedure SETUP_SetupColours;
By: -daazndagger-
Description: Sets up ore colours.
*******************************************************************************}
Procedure SETUP_SetupColours;
var
i: Integer;
begin
OreColour[1]:= d_copper;
OreColour[2]:= tin;
OreColour[3]:= iron;
OreColour[4]:= silver;
OreColour[5]:= coal;
OreColour[6]:= gold;
OreColour[7]:= mith;
OreColour[8]:= addy;
OreColour[9]:= l_copper;

for i:=1 to 9 do
begin
ColorToHSL(OreColour[i], HSL_Colour[i][C_HUE], HSL_Colour[i][C_SAT], HSL_Colour[i][C_LUM]);
Debug('HSL- Hue:' +floattostr(HSL_Colour[i][C_HUE])+ '. Sat:' +floattostr(HSL_Colour[i][C_SAT])+ '. Lum:' +floattostr(HSL_Colour[i][C_LUM]), D_SETUP);
HSMods[i][C_HUE]:= HSL_Colour[i][C_HUE] / HSL_Colour[i][C_LUM];
HSMods[i][C_SAT]:= HSL_Colour[i][C_SAT] / HSL_Colour[i][C_LUM];
Debug('Mods- Hue:' +floattostr(HSMods[i][C_HUE])+ '. Sat:' +floattostr(HSMods[i][C_SAT]), D_SETUP);
end;

Debug('All Colours', D_SETUP);
end;

{*******************************************************************************
Procedure SETUP_SetupPlayerColours;
By: -daazndagger-
Description: Sets up ore colours.
*******************************************************************************}
Procedure SETUP_SetupPlayerColours;
begin
case lowercase(Players[CurrentPlayer].Strings[P_S_WHATROCK]) of
'copper' : Rock_SetupInfo:= 1;
'tin' : Rock_SetupInfo:= 2;
'iron' : Rock_SetupInfo:= 3;
'silver' : Rock_SetupInfo:= 4;
'coal' : Rock_SetupInfo:= 5;
'gold' : Rock_SetupInfo:= 6;
'mithril', 'mith' : Rock_SetupInfo:= 7;
'adamant', 'addy' : Rock_SetupInfo:= 8;
end;

Debug('Ore colours for ' +Players[CurrentPlayer].Name , D_SETUP);
end;

{*******************************************************************************
procedure SETUP_LoadDTMS;
By: -daazndagger-
Description: Defines DTMs.
*******************************************************************************}
procedure SETUP_LoadDTMS;
begin
OreInInv_DTM := DTMFromString('78DA63EC6066608863644006660A120CFF813' +
'448F43F1030F603D584A3AA61606002933051B09A28026AFA30ED' +
'C250D30354134F404D1B504D2401354D40358904D47402D5A4E25' +
'7030015B40CE4');

Debug('DTMs loaded.', D_SETUP);
end;

{*******************************************************************************
Procedure SETUP_LoadDropPatterns;
By: -daazndagger-
Description: Defines some patterns that we can drop with.
*******************************************************************************}
Procedure SETUP_LoadDropPatterns;
begin
SetArrayLength(PatternForDrop, 4);
PatternForDrop[0]:= [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28];
PatternForDrop[1]:= [1,2,3,4,8,7,6,5,9,10,11,12,16,15,14,13,17,18,19,20,24,23,22,21,25,26,27,28];
PatternForDrop[2]:= [1,5,9,13,17,21,25,2,6,10,14,18,22,26,3,7,11,15,19,23,27,4,8,12,16,20,24,28];
PatternForDrop[3]:= [1,5,9,13,17,21,25,26,22,18,14,10,6,2,3,7,11,15,19,23,27,28,24,20,16,12,8,4];
Debug('Drop patterns loaded.', D_SETUP);
end;

{*******************************************************************************
Procedure UpdateDisguise;
By: -daazndagger-
Description: Increases specified totals.
*******************************************************************************}
Procedure UpdateDisguise(is_end: boolean);
begin
if not(is_end) then
begin
Disguise('Ores: ' +inttostr(Total_Ores)+ ' Loads: ' +inttostr(Total_Loads)+ ' XP: ' +floattostr(Total_XP) );
end else
begin
Disguise('SCRIPT FINISHED! Ores: ' +inttostr(Total_Ores)+ ' Loads: ' +inttostr(Total_Loads)+ ' XP: ' +floattostr(Total_XP) );
end;
end;

{*******************************************************************************
Procedure IncreaseTotals(what: string);
By: -daazndagger-
Description: Increases specified totals.
*******************************************************************************}
Procedure IncreaseTotals(what: string);
begin
case lowercase(what) of
'ores' : begin
Inc(Total_Ores);
Inc(Players[CurrentPlayer].Integers[P_I_ORES]);
UpdateDisguise(false);
end;
'loads' : begin
Inc(Total_Loads);
Inc(Loads_Break);
Inc(Players[CurrentPlayer].Integers[P_I_LOADS]);
UpdateDisguise(false);
end;
'breaks' : Inc(BreaksTaken);
'sleeps' : Inc(SleepsTaken);
end;
end;

{*******************************************************************************
procedure SETUP_ProgXP;
By: -daazndagger-
Description: Sets up XP gain amounts.
*******************************************************************************}
procedure SETUP_ProgXP;
begin
ore_XP[O_DCOPPER] := 17.5;
ore_XP[O_LCOPPER] := 17.5;
ore_XP[O_TIN] := 17.5;
ore_XP[O_IRON] := 35;
ore_XP[O_SILVER] := 40;
ore_XP[O_COAL] := 50;
ore_XP[O_GOLD] := 65;
ore_XP[O_MITH] := 80;
ore_XP[O_ADDY] := 95;
end;

{*******************************************************************************
procedure PROG_CalculateAll;
By: -daazndagger-
Description: Calculates XP, XP/hour, Ores/hour.
*******************************************************************************}
procedure PROG_CalculateAll;
var
A: Integer;
subtotal: Extended;
begin
Player_Time := GetSystemTime;
Players[CurrentPlayer].Worked := Players[CurrentPlayer].Worked + (Player_Time - PlayerStartTime);

PlayerStartTime:= GetSystemTime;

Players[CurrentPlayer].Extendeds[P_I_XP] := Players[CurrentPlayer].Integers[P_I_ORES] * Ore_XP[Rock_SetupInfo];
Players[CurrentPlayer].Extendeds[P_I_XPHOUR] := Round( (Players[CurrentPlayer].Extendeds[P_I_XP] * 3600) / (Players[CurrentPlayer].Worked / 1000) );
Players[CurrentPlayer].Integers[P_I_ORESHOUR] := (Players[CurrentPlayer].Integers[P_I_ORES] * 3600) / (Players[CurrentPlayer].Worked / 1000);

subtotal:= 0;
for A:=0 to HowManyPlayers-1 do
begin
subtotal:= subtotal + Players[A].Extendeds[P_I_XP];
end;
Total_XP:= subtotal;
end;

{*******************************************************************************
procedure PROG_ProgressReport;
By: -daazndagger-
Description: My progress report using SRL.
*******************************************************************************}
procedure PROG_ProgressReport;
begin
PROG_CalculateAll;

ClearReport;
AddToReport('');
Writeln('');
SRLProgressReport(ResultReportBox, ScriptName, 'Daazndagger', Version,
['Run Time', 'Total Mined', 'Total Loads', 'Total XP', 'Breaks Taken'], // Total levels gained, Average ores/hr, Average XP/hr ??
[MsToTime(GetTimeRunning, Time_Abbrev), Total_Ores, Total_Loads, Total_XP, BreaksTaken]);

SRLPlayerReport( ResultDebugBox, 0, False,
[True, False, False{True}, False, False, False],
['Loads', 'Ores', 'Ores/Hour', 'Levels', 'Reason', 'XP', 'XP/Hour'],
[], [2,3,4,7], [1], [5,6]);
end;

{*******************************************************************************
function CHECK_Lost: boolean;
By: -daazndagger-
Description: Returns true if the player is not at the mining spot.
*******************************************************************************}
function CHECK_Lost: boolean;
var
Found: boolean;
begin
if not(LoggedIn) then Exit;

SymbolAccuracy := 0.5;
repeat
Found := FindSymbol(x, y, 'mining spot');
SymbolAccuracy := SymbolAccuracy - 0.1;
until((Found) or (SymbolAccuracy = 0.1));

if not(Found)then
begin
Debug('Could not find the mining symbol', D_BAD);
if( FindColorSpiralTolerance(x, y, OreColour[Rock_SetupInfo], MSX1, MSY1, MSX2, MSY2, 6) ) then //if( FindRock(x, y, Rock_SetupInfo) )then
begin
Result := false;
Debug( Players[CurrentPlayer].Name + ' is not lost.', D_GOOD);
Exit;
end;
Result := true;
Writeline( Players[CurrentPlayer].Name + ' is lost.', D_BAD);
Players[CurrentPlayer].Strings[P_S_REASON]:='Lost';
Exit;
end;
end;

{*******************************************************************************
Procedure ANTI_B_ActHumanLike;
By: -daazndagger-
Description: Does stuff like a human for anti-ban.
*******************************************************************************}
Procedure ANTI_B_ActHumanLike;
begin;
if not(LoggedIn) then Exit;
case Random(150) of
10: HoverSkill('mining', false);
15: HoverSkill('mining', false);
20: RandomMovement;
25: RandomMovement;
30: RandomAngle(1);
40: PickupMouse;
50: RandomAngle(1);
60: RandomRClick;
70: ExamineInv;
end;
end;

{*******************************************************************************
Function CHECK_CheckMyRandoms: Boolean;
By: -daazndagger-
Description: Checks for most/all? randoms, level up and if AllPlayersInactive
*******************************************************************************}
Function CHECK_CheckMyRandoms: Boolean;
var
timeforrandoms_start, timeforrandoms_current: Integer;
begin
if not(LoggedIn) then Exit;

timeforrandoms_start:= GetSystemTime;
Result:=false;

if (LevelUp) then
begin
Inc(Players[CurrentPlayer].Integers[P_I_LEVELSGAIN]);
end;

LampSkill := 'Mining';
if (FindNormalRandoms) then
begin
Debug('A random was found!', D_RANDOM);
SRLRandomsReport;
ANTI_B_ActHumanLike;
if (CHECK_Lost) then
begin
Result:=True;
Exit;
end;
end;

ClickContinue(True, False);

if (AllPlayersInactive) then
begin
Writeline( 'All Players are inactive', D_NOTE);
Writeln('');
Writeln('Terminating Script...');
TerminateScript;
end;
SendSRLReport;
timeforrandoms_current:= GetSystemTime;
Debug('Completed randoms check in '+ inttostr(timeforrandoms_current - timeforrandoms_start)+ ' ms', D_RANDOM);
Result:=false;
end;

{*******************************************************************************
Function MINE_FindRock(var x, y: Integer; ColourToFind: Integer): Boolean;
By: -daazndagger-
Description: Finds a specific rock colour using ATPAs and finds UpText to
confirm that it is a rock.
*******************************************************************************}
function MINE_FindRock(var x, y: Integer; ColourToFind: Integer): Boolean;
var
CTS, I, HighATPA: Integer; //CTS will store the ColorToleranceSpeed before we change it, for later.
Rock_TPA: TPointArray; //The TPointArray in which all Coordinates which are found later will be stored
Rock_ATPA: Array of TPointArray;

begin
if not LoggedIn then Exit;

CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(HSMods[ColourToFind][C_HUE], HSMods[ColourToFind][C_SAT]); //HueMod(H/L) and SatMod(S/L)
FindColorsSpiralTolerance(MSCX, MSCY, Rock_TPA, OreColour[ColourToFind], MSX1, MSY1, MSX2, MSY2, 6);
ColorToleranceSpeed(CTS); //Change back for text finding
Rock_ATPA := TPAToATPAEx(Rock_TPA, 20, 20);
SortATPAFrom(Rock_ATPA, Point(MSCX, MSCY));

if ( Length(Rock_ATPA)=0 ) then
begin
Debug('Found no possible rocks', D_BAD);
end else
begin
Debug('Found ' +IntToStr(Length(Rock_ATPA))+ ' possible rocks?', D_GOOD);
end;

HighATPA:= High(Rock_ATPA);
For I := 0 to HighATPA do
begin
MiddleTPAEx(Rock_ATPA[i], x, y); //Gets middle coords of TPA in current ATPA
MMouse(x, y, 2, 2);
//wait(100+random(250))
if ( WaitUpTextMulti(['Min', 'ine', 'Roc', 'ocks'], 200) ) then//If( IsUpTextMultiCustom(['Min', 'ine', 'Roc', 'ocks']) ) then
begin
Debug('Found uptext', D_GOOD);
Result:= True;
GetMousePos(x, y); //Sets the x and y values for future use (Like clicking)
Break; //Exits the For To Do statement so it doesn't keep moving around looking for the object
end else //wait(200 + random(200));//Result:=false;
begin
CHECK_CheckMyRandoms;
ANTI_B_ActHumanLike;
end;
end;
end;

{*******************************************************************************
Function MINE_MiningRock: Boolean;
By: -daazndagger-
Description: If a rock is found, it will click.
*******************************************************************************}
function MINE_MiningRock: Boolean;
var
unFoundRock: Integer;
begin
if( (not(LoggedIn)) or (InvFull) or (CHECK_Lost) )then Exit;
unFoundRock:= 0;

repeat
if(MINE_FindRock(x, y, Rock_SetupInfo)) then
begin
unFoundRock:= 0;
case Random(4) of
0,1,2: begin
Mouse(x, y, 0, 0, false);
ChooseOption('Mine');
end;
3: Mouse(x, y, 0, 0, true);
end;
Debug('Clicked a rock', D_GOOD);
FFlag(1);
Result:= True;
Exit;
end else
begin
Debug('Could not find the rock: '+inttostr(unFoundRock)+' times', D_BAD)
inc(unFoundRock);
CHECK_CheckMyRandoms;
wait(150+random(50))
if(unFoundRock=51) then
begin
Result:= False;
Players[CurrentPlayer].Strings[P_S_REASON]:='No Rock';
Players[CurrentPlayer].Active:=false;
wait(random(1000));
Exit;
end;
end;

until(false)
end;

{*******************************************************************************
Procedure MINE_MineRock;
By: -daazndagger-
Description: Waits until the ore is mined or time is up.
*******************************************************************************}
Procedure MINE_MineRock;
var
Before_inv, After_inv: Integer;
MineTheRock_Time: Integer;
A: Integer;
begin
if( (not(LoggedIn)) or (InvFull) or (CHECK_Lost) )then Exit;

Before_inv:= ItemAmount('inv', 'dtm', OreInInv_DTM, []);
Debug('Ores in inventory: ' +inttostr(Before_inv)+ '.', D_NOTE);
if MINE_MiningRock then
begin
MarkTime(MineTheRock_Time);

repeat
if(CHECK_CheckMyRandoms) then Exit;
ANTI_B_ActHumanLike;

for A:=0 to 15 do
begin
wait(50+random(50));
After_inv:= ItemAmount('inv', 'dtm', OreInInv_DTM, []);
if(After_inv = Before_inv+1)then
begin
UnableToMineOre:= 0;
Debug('Ores in inventory: ' +inttostr(After_inv)+ '.', D_NOTE);
Exit;
end;
end;

until(TimeFromMark(MineTheRock_Time)> WaitTime_SetupInfo+random(150) )

inc(UnableToMineOre);

end;
end;

{*******************************************************************************
Procedure DROP_DropOres;
By: -daazndagger-
Description: Drops all ores and any gems you may have.
*******************************************************************************}
Procedure DROP_DropOres;
var
GemInInv_DTM, PickInv_DTM, WhichPattern, I, OreAmount: Integer;
InvSlot: TBox;
begin
if not LoggedIn then Exit;

WhichPattern:= Random(4);

GemInInv_DTM := DTMFromString('78DA634C67606070674001FC42050CFF81342' +
'310FF0702C614202380010D30814946288F318B0835F940C29B08' +
'355E04D444030927026A1281840D7E35008BB00A70');
PickInv_DTM := DTMFromString('78DA63B460606070654001AE26720CFF81342' +
'310FF0702462320C39A010D30814946288FD1820835FA40C28280' +
'1A7322D480E47D08A8310512DE04D43803093BFC6A00EE030969');

For I:=0 to 27 do
begin
if CHECK_CheckMyRandoms then Exit;
InvSlot:= InvBox(PatternForDrop[WhichPattern][I]);
OreAmount:= ItemAmount('inv', 'dtm', OreInInv_DTM, []);
Debug('Ores in inventory: ' +inttostr(OreAmount)+ '.', D_NOTE);

if FindDTM(OreInInv_DTM, x, y, InvSlot.X1, InvSlot.Y1, InvSlot.X2, InvSlot.Y2) then
begin
Debug('Found ore in inventory slot: ' +inttostr(PatternForDrop[WhichPattern][I]) , D_GOOD);
MouseItem(PatternForDrop[WhichPattern][I], false);
case random(25) of
1: begin
ChooseOption('xami');
MouseItem(PatternForDrop[WhichPattern][I], false);
end;
8: begin
ChooseOption('Use');
MouseItem(PatternForDrop[WhichPattern][I], true);
MouseItem(PatternForDrop[WhichPattern][I], false);
end;
end;
ChooseOption('rop');
Debug('Dropped an ore', D_GOOD);
IncreaseTotals('ores');
end else
begin
Debug('No ore found in inventory slot: ' +inttostr(PatternForDrop[WhichPattern][I]) , D_BAD);

if GemDroppingp then
begin
if FindDTM(GemInInv_DTM, x, y, InvSlot.X1, InvSlot.Y1, InvSlot.X2, InvSlot.Y2) then
begin
Debug('Found gem in inventory slot: ' +inttostr(PatternForDrop[WhichPattern][I]) , D_GOOD);
MouseItem(PatternForDrop[WhichPattern][I], false);
case random(25) of
1: begin
ChooseOption('xami');
MouseItem(PatternForDrop[WhichPattern][I], false);
end;
8: begin
ChooseOption('Use');
MouseItem(PatternForDrop[WhichPattern][I], true);
MouseItem(PatternForDrop[WhichPattern][I], false);
end;
end;
ChooseOption('rop');
Writeline('Dropped a gem!', D_GOOD);
end;
end;

if FindDTM(PickInv_DTM, x, y, InvSlot.X1, InvSlot.Y1, InvSlot.X2, InvSlot.Y2) then
begin
Debug('Found pickaxe in inventory slot: ' +inttostr(PatternForDrop[WhichPattern][I]) , D_NOTE);
end;

end;
end;
IncreaseTotals('loads');
end;

Procedure BREAK_DoBreak;
var
breaktime, timeleft, i, e: Integer;
begin
if (LoggedIn) then Logout;
breaktime:= randomrange(Players[CurrentPlayer].Worked / 8, Players[CurrentPlayer].Worked / 4);
Writeline('Taking a break for: ' +mstotime(breaktime, Time_Abbrev) , D_GOOD);

i:= GetSystemTime;
repeat
wait(1000);
e:= GetSystemTime;
timeleft:= breaktime - (e - i);
Disguise('Breaking... Time left: ' + mstotime(timeleft, Time_Abbrev) );
until( (e-i) >= breaktime)

timeleft:= 0;
Disguise('Breaking... Time left: ' + mstotime(timeleft, Time_Abbrev) );

IncreaseTotals('breaks');
end;

Procedure LOGOUT_LogoutProcess;
begin
Loads_Break:= 0;

if UnableToMineOre > 15 then
begin
UnableToMineOre:= 0;
ExitToLobby;
WorldScreen;
if not ( ChangeWorld( RandomWorld(SMARTMembers, False) ) ) then
begin
Players[CurrentPlayer].Active:= false;
Players[CurrentPlayer].Strings[P_S_REASON]:= 'Failed to change world';
Writeline('Failed to change worlds', D_BAD);
end else
begin
Writeline('Changed worlds sucessfully', D_GOOD);
end;
end;

Player_Time:= GetSystemTime;
Players[CurrentPlayer].Worked := Players[CurrentPlayer].Worked + (Player_Time - PlayerStartTime);

Logout;

PROG_ProgressReport;
BREAK_DoBreak;

if AllPlayersInactive then TerminateScript;

if( lowercase(Players[CurrentPlayer].Strings[P_S_REASON]) = '') then
begin
NextPlayer(true);
end else
begin
NextPlayer(false);
end;

end;

Procedure SETUP_SetupScript;
begin
SETUP_LoadDTMs;
SETUP_LoadDropPatterns;
SETUP_SetupColours;
SETUP_DeclarePlayers;

UpdateDisguise(false);

Writeline('Finished setting up script', 1);
end;

{*******************************************************************************
Procedure SETUP_SetupPlayer;
By: -daazndagger-
Description: Sets up the individual player
*******************************************************************************}
Procedure SETUP_SetupPlayer;
begin
SETUP_SetupPlayerColours;
SETUP_ProgXP;

WaitTime_SetupInfo:= Players[CurrentPlayer].Integers[P_I_WAITTIME] // Defines time to wait
Debug('Wait time for ' +Players[CurrentPlayer].Name+ ' is ' +inttostr(WaitTime_SetupInfo)+ 'ms', D_NOTE);

LoginPlayer;
Wait(100+random(50));

Players[CurrentPlayer].Level[Skill_Mining] := GetSkillLevel('Mining');
Writeline( +Players[CurrentPlayer].Name + '''s Mining Level is: ' +inttostr(Players[CurrentPlayer].Level[Skill_Mining]) , D_NOTE);

SetAngle(true);
SetRun(true);

if (Rock_SetupInfo = 1) then
if not( MINE_FindRock(x, y, O_DCOPPER) ) then Rock_SetupInfo:= 9;


Writeline('Finished setting up player: ' +Players[CurrentPlayer].Name , D_SETUP);
end;

{*******************************************************************************
Procedure ScriptTerminate;
By: -daazndagger-
Description: Stuff added when script is terminated.
*******************************************************************************}
procedure ScriptTerminate;
begin
PROG_ProgressReport;

Writeln('');
Writeln('Thankyou for using '+ScriptName);
Writeln('Please post progess reports, problems,');
Writeln('feedback and questions to villavu.com');
Writeln('Thanks :)');
Writeln(' -daazndagger-');
UpdateDisguise(true);

FreeDTM(OreInInv_DTM);
end;





BEGIN
ClearDebug;
ClearReport;

Smart_Server := 169;
Smart_Members := False
Smart_Signed := True;
Smart_SuperDetail := False;

SetupSRL;

SETUP_SetupScript;

while not RSReady do wait(100);

REPEAT
SETUP_SetupPlayer;

repeat

repeat
if (not LoggedIn) or (not Players[CurrentPlayer].Active)then Break;
MINE_MineRock;
if UnableToMineOre > 15 then Break;
until(InvFull)

if (not LoggedIn) or (not Players[CurrentPlayer].Active)then Break;

DROP_DropOres;
PROG_ProgressReport;

if UnableToMineOre > 15 then Break;

if( Players[CurrentPlayer].Integers[P_I_LOADS] >= LoadsToDoAll )then
begin
Writeline( Players[CurrentPlayer].Name + ' has finished it''s loads.', D_GOOD);
Players[CurrentPlayer].Strings[P_S_REASON]:='Finished Loads';
Players[CurrentPlayer].Active:= false;
Break;
end;

until( Loads_Break >= Players[CurrentPlayer].Integers[P_I_SWITCHLOADS] + RandomRange(-3,3) )

LOGOUT_LogoutProcess;

UNTIL(False)

END.

ZephyrsFury

2010-06-26 10:00:17

Looks very nice. Yes from me. Good luck :)

Main

2010-06-26 10:01:04

Yes from me too:) However I think zeph forgot to vote lol.

Rich

2010-06-26 10:07:40

Multiplayer : Check
DTMs : Check
TPAs : Check
Antirandoms : Check
Antiban : Check
Failsafes : Check
Knowledge of SRL include : Semi-check

Yes!

Griff

2010-06-26 12:49:08

From: Main_Ftw
Yes from me too:) However I think zeph forgot to vote lol.


Zeph ya crazy guy!

Yes from me.

ZephyrsFury

2010-06-26 12:56:09

No idea what you guys are on about.

MylesMadness

2010-06-26 13:42:39

Bold words shouldn't be capitals, and I see some un needed begins and ends in there, but besides that, looks good.

Dynamite

2010-06-26 14:10:45

Script looks good, but you are not active…
In my honest opinion a SRL member / Applicant should be Semi-active to Active and should be helpful.

Therefore I am not going to vote.
But good luck

Gu3st...

2010-06-26 14:22:52

From: The Man
Script looks good, but you are not active…
In my honest opinion a SRL member / Applicant should be Semi-active to Active and should be helpful.

Therefore I am not going to vote.
But good luck
Imho that's a lousy reason not o vote :(

I voted yes :)

Dynamite

2010-06-26 14:30:38

From: Zyt3x
Imho that's a lousy reason not o vote :(

I voted yes :)


It is my opinion, I am not taking anything away from him by voting no, I have simply not voted, it would be the same as if I had not read the thread. I just thought I would state my opinion

Awkwardsaw

2010-06-26 15:35:35

From: MylesMadness
Bold words shouldn't be capitals, and I see some un needed begins and ends in there, but besides that, looks good.


bolded capitals are a personal prefrence, ;)

and i like your use of arrays/constants, and tpas ect :)

YoHoJo

2010-06-26 16:08:04

From: The Man
Script looks good, but you are not active…
In my honest opinion a SRL member / Applicant should be Semi-active to Active and should be helpful.

Therefore I am not going to vote.
But good luck


Well he has released this script publicly and will probably keep it updated and working:
http://villavu.com/forum/showthread.php?t=57582

And his sig says he has a CowKiller on the way next. Active enough for me.

Dynamite

2010-06-26 16:36:09

From: YoHoJo
Well he has released this script publicly and will probably keep it updated and working:
http://villavu.com/forum/showthread.php?t=57582

And his sig says he has a CowKiller on the way next. Active enough for me.[/QUOTE

/me proven wrong.
Yes from me.

Press Play

2010-06-27 17:55:18

Wow!! I'm so excited! 100% yess! That's amazing :) thanks everyone! Also, thankyou for all the feedback; very useful.

ps: my Ultimate Miner will most deffinately be improved, updated and kept working.

:)

Sir R. M8gic1an

2010-06-27 21:17:11

Impressive work. You have definitely come a long way from your basic power miner.

~RM

Press Play

2010-06-28 04:53:51

From: Rasta Magician
Impressive work. You have definitely come a long way from your basic power miner.

~RM


Thankyou :) hehe. By the way, I like my "promising newcomer" cup! It looks cool :P
The award is given out the those new members that show a positive attitude towards learning how to script and who attempt to fix problems instead of giving up. The SRL Staff have seen great potential in these members and encourage them to continue scripting and improving themselves.

Blumblebee

2010-06-28 21:07:06

Looks good, well done. Yes from me and goodluck :)

cycrosism

2010-06-29 00:23:46

Yes

noidea

2010-06-29 00:44:51

Look good to me, almost every one continues to learn after being accepted in, so be part of that many.

I say yes :)

Rich

2010-06-29 03:00:38

Hmm…Is there even any point in continuing to vote? 14-0

Wizzup?

2010-06-29 03:37:12

15-0. ;) Welcome.