Untitled diff

생성일 비교 결과 만료 없음
551 삭제
838 행
548 추가
836 행
program TheMayorsVEBMiner;
program TheMayorsVEBMiner;
{$DEFINE SMART}
{$DEFINE SMART} // <--- Delete this line to not use SMART
{$I SRL-6/SRL.Simba}
{$I SRL-6/SRL.Simba}
{$I SPS/LIB/SPS-RS3.simba}
{$I SPS/LIB/SPS-RS3.simba}
{$i SRL-6/LIB/MISC/SRLPLAYERFORM.Simba}
const
const
REVISION = '7.1';
(* .
(* .
.---. .-. .-..----. .-. .-. .--..-. .-..----. .----.|\.----.
.---. .-. .-..----. .-. .-. .--..-. .-..----. .----.|\.----.
{_ _}| {_} || {_ | `.' | / {} \\ \/ // {} \| {} }{ {__
{_ _}| {_} || {_ | `.' | / {} \\ \/ // {} \| {} }{ {__
| | | { } || {__ | |\ /| |/ /\ \} { \ /| .-. \.-._} }
| | | { } || {__ | |\ /| |/ /\ \} { \ /| .-. \.-._} }
`-' `-' `-'`----' `-' ` `-'`-' `-'`--' `----' `-' `-'`----'
`-' `-' `-'`----' `-' ` `-'`-' `-'`--' `----' `-' `-'`----'
.-. .-..----..----. .-. .-..-..-. .-..----..----.
.-. .-..----..----. .-. .-..-..-. .-..----..----.
| | | || {_ | {} } | `.' || || `| || {_ | {} }
| | | || {_ | {} } | `.' || || `| || {_ | {} }
\ \_/ /| {__ | {} } | |\ /| || || |\ || {__ | .-. \
\ \_/ /| {__ | {} } | |\ /| || || |\ || {__ | .-. \
`---' `----'`----' `-' ` `-'`-'`-' `-'`----'`-' `-'
`---' `----'`----' `-' ` `-'`-'`-' `-'`----'`-' `-'
Completed: 16th April 2014 for the LOLs
Completed: 16th April 2014 for the LOLs
Updated: 26th July 2014
Updated: 2nd October 2014
REVISION 8
------------
Press play and fill in the form
---------------------------------
*)
*)
MIN_PIXEL_SHIFT = 120;
{- 1. Player Info -}
NICKNAME = 'barry'; { Nickname of player entered into the Rafiki player manager }
PLAYER_FILE = 'TheMayor';{ The name of your player file that you made in Rafiki }
LOGIN_WORLD = -1; { The world number you wish to play on. Leave -1 to just click play }
USE_DIRECTX = True; { True if using DirectX (have plugin installed) }
SPS_ANY_ANGLE = True; { False to keep compass north
Set to false if walking is buggy }
{- 2. Mining Settings -}
POWER_MINING = False; { True if dropping, False if banking }
MINE_IRON = False; { Mine Iron ore? }
MINE_TIN = False; { Mine Tin ore? }
MINE_COPPER = True; { Mine Copper ore? }
LOADS_TO_DO = 500; { Stop after how many loads (banking & powermining) }
SEARCH_RADIUS = 280; { The distance from the player to look for rocks.
Measured in pixels (280px is the full mainScreen)
Lower to 100 to powermine 2-3 clustered rocks only }
MINE_TIMER = 4800; { Max time to wait for ore after clicking a rock.
You would want to increase this if using a
low level pickaxe (5000 = 5 seconds) }
{- 3. Break Settings -}
ENABLE_BREAKS = True; { Enable breaks? }
MIN_P_TIME = 45; { Minimum play time before taking a break }
MAX_P_TIME = 195; { Max play time before taking a break }
MIN_B_TIME = 5; { Minimum break duration }
MAX_B_TIME = 45; { Max break duration }
{- 4. Paint & Debug Settings -}
PAINT_STATUS = True; { Paint status on SMART? }
STATUS_COLOUR = 12807424;{ What colour do you want the paint to be (choose with color picker) }
PAINT_DEBUG = False; { Paint colour finding debug on SMART? }
ENABLE_DEBUG = False; { Show text debug output in the debug box? }
(* -------------------------------------------------------------------------- *)
(* Colour & Area Constants *)
{* EASY UPDATE - Update colours yourself! *}
(* -------------------------------------------------------------------------- *)
{ If future RS updates change the colours, then you can easily update them
yourself by changing the values below. Look at the AIO tutorial in my
signature if you don't know how to pick colours using ACA.
}
{ Iron Ore }
{ Iron Ore }
IRON_COLOUR = 2242428;
IRON_COLOUR = 2242428;
IRON_TOL = 8;
IRON_TOL = 8;
IRON_HUE = 0.09;
IRON_HUE = 0.09;
IRON_SAT = 0.33;
IRON_SAT = 0.33;
{ Tin Ore }
{ Tin Ore }
TIN_COLOUR = 10853037;
TIN_COLOUR = 10853037;
TIN_TOL = 19;
TIN_TOL = 19;
TIN_HUE = 0.39;
TIN_HUE = 0.39;
TIN_SAT = 0.33;
TIN_SAT = 0.33;
{ Copper Ore }
{ Copper Ore }
COPPER_COLOUR = 5278153;
COPPER_COLOUR = 5278153;
COPPER_TOL = 11;
COPPER_TOL = 11;
COPPER_HUE = 0.20;
COPPER_HUE = 0.20;
COPPER_SAT = 0.86;
COPPER_SAT = 0.86;
{ Bank booth in VEB }
{ Bank booth in VEB }
BOOTH_COLOUR = 5731714;
BOOTH_COLOUR = 5731714;
BOOTH_TOL = 9;
BOOTH_TOL = 9;
BOOTH_HUE = 0.09;
BOOTH_HUE = 0.09;
BOOTH_SAT = 1.00;
BOOTH_SAT = 1.00;
{ Banker NPC in VEB (purple ones) }
{ Banker NPC in VEB (purple ones) }
BANKER_COLOUR = 5517369;
BANKER_COLOUR = 5517369;
BANKER_TOL = 12;
BANKER_TOL = 12;
BANKER_HUE = 0.20;
BANKER_HUE = 0.20;
BANKER_SAT = 0.48;
BANKER_SAT = 0.48;
{ VEM mine box SPS coords }var
{ VEM mine box SPS coords }
VEM_MINE_BOX := intToBox(380, 330, 442, 393);
VEM_MINE_BOX: Tbox = [380, 330, 442, 393];
(* -------------------------------------------------------------------------- *)
(* -------------------------------------------------------------------------- *)
{* DON'T TOUCH ANYTHING BELOW *}
(* DON'T TOUCH ANYTHING BELOW *)
{* (unless you know what you're doing) *}
(* (unless you know what you're doing) *)
(* -------------------------------------------------------------------------- *)
(* -------------------------------------------------------------------------- *)
(* Internal Constants *)
{
These are used so TPlayers integers/booleans (i.e. players.integers[0] etc.)
are easier to interpret throughout the script.
}
const
REVISION = 8;
MOUSE_RANDOM = 99;
{ Custom Types }
{ Form Integers }
LOGIN_WORLD = 0;
LOADS_TO_DO = 1;
SEARCH_RADIUS = 2;
BREAK_TIME = 3;
BREAK_DURATION = 4;
SWITCH_AFTER = 5;
{ Form Booleans }
MINE_IRON = 0;
MINE_TIN = 1;
MINE_COPPER = 2;
POWER_MINING = 3;
SPS_ANY_ANGLE = 4;
ENABLE_DEBUG = 5;
{ Player Stats }
P_LOADS_DONE = 6;
P_XP_GAINED = 7;
P_ORES_MINED = 8;
P_GEMS_FOUND = 9;
P_PROFIT = 10;
P_RECOVERIES = 11;
P_TOTAL_BREAKS = 12;
(* Custom Types *)
type TRock = record
type TRock = record
Name: String;
Name: String;
OverText: TStringArray;
OverText: TStringArray;
Colour, Tol, Price, ID: Integer;
Colour, Tol, Price, ID: Integer;
Hue, Sat: Extended;
Hue, Sat: Extended;
end;
end;
{ Global Variables }
(* Global Variables *)
var
var
PathToBank, PathToMine, FailSafeToMine: TPointArray; { Paths }
{ SPS Areas & Paths }
Gems : integer; { DTMs }
Varrock: TSPSArea;
OresMined, DTMs: Array [0..2] of integer;
PathToBank, PathToMine, FailSafeToMine: TPointArray;
{ DTMs }
Gems : integer;
DTMs: Array [0..2] of Integer;
{ Rock Variables }
Hues, Sats: Array [0..2] of extended;
Hues, Sats: Array [0..2] of extended;
AreMiningRocks: Array [0..2] of boolean;
AllRocks: Array [0..2] of TRock;
AllRocks: Array [0..2] of TRock;
PlayerRocks: Array of TRock;
PlayerRocks: Array of Array of TRock;
TotalBreakTime, RockTimer, StatsTimer: TTimeMarker; { Timers }
TotalProfit, XPGained, GemsFound, Recoveries,
{ Global Timers }
BreakTime, Breaked, LoadsDone: integer; { Proggy Stats }
RockTimer, StatsTimer: TTimeMarker;
TotalBreakTime: Array of TTimeMarker;
SwitchTime: Integer;
NewValues, OldValues: Array [0..7] of integer; { Stats variables }
{ Proggy Stats }
OresMined: Array of Array [0..2] of Integer;
BreakTime: integer;
procedure autoUpdateMe();
{ Stats Tracking Variables }
NewValues, OldValues: Array [0..6] of Integer;
TotalStats: Array [0..5] of Integer;
{ Other }
SRLDebug: boolean;
procedure checkForUpdates();
var
var
newFile: integer;
newFile: integer;
onlineVersion, latestScript, newFileName: string;
latestScript, newFileName: string;
onlineVersion: extended;
begin
begin
writeln('Checking for script updates...');
writeln('Checking for script updates:');
writeLn('');
onlineVersion := strToFloat(getPage('http://veb-miner.googlecode.com/git/version.txt'));
onlineVersion := getPage('http://veb-miner.googlecode.com/git/version.txt');
writeLn(' -----> Script revision: ' + toStr(REVISION) + ' | Online revision: ' + toStr(onlineVersion));
writeLn('NOTIFICATION: Current script revision: ' + REVISION + ' | Online revision: ' + onlineVersion);
if (trim(onlineVersion) > REVISION) then
if onlineVersion > REVISION then
begin
begin
writeLn('NOTIFICATION: Downloading the newer revision from Google Code');
writeLn(' -----> Downloading the newer revision from Google Code');
latestScript := GetPage('http://veb-miner.googlecode.com/git/TheMayorsVEBMiner.simba');
latestScript := getPage('http://veb-miner.googlecode.com/git/TheMayorsVEBMiner.simba');
newFileName := scriptPath+ 'TheMayorsVEBMiner Rev '+OnlineVersion+'.simba';
newFileName := scriptPath+ 'TheMayorsVEBMiner Rev ' + toStr(onlineVersion) +'.simba';
newFile := rewriteFile(newFileName, true);
newFile := rewriteFile(newFileName, true);
if not writeFileString(newFile, latestScript) then
if not writeFileString(newFile, latestScript) then
begin
begin
writeLn('NOTIFICATION: Fatal error writing to ' + newFileName);
writeLn(' -----> Fatal error writing to ' + newFileName);
terminatescript();
terminatescript();
end;
end;
closeFile(newFile);
closeFile(newFile);
writeLn('NOTIFICATION: New script downloaded to ' + newFileName + ' | Please use this one!');
writeLn(' -----> New script downloaded to ' + newFileName);
writeLn(' -----> Please use the new one instead!');
writeLn('');
writeLn('');
terminateScript();
terminateScript();
end else
end else
writeLn('NOTIFICATION: You have the latest version.');
writeLn(' -----> You have the latest revision.');
end;
end;
function walkPath(path: TPointArray): boolean;
procedure initPlayerForm();
begin
with playerForm do
begin
name := 'The Mayor''s VEB Miner';
scriptHelpThread := 'https://villavu.com/forum/showthread.php?t=108775';
editBoxLabels := ['Login World', 'Loads To Do', 'Search Radius', 'Time Until Break', 'Break Duration', 'Switch Players After'];
editBoxDefaults := ['-1', '1000', '280', '60', '10', '180'];
editBoxHints := ['Leave -1 to just click play', 'Stop using player after how many loads?', 'Distance from player look for rocks (280px is full screen)', 'Play time before break (minutes)', 'Break duration (minutes)', 'Play time before switching player (minutes)'];
checkBoxLabels := ['Iron', 'Tin', 'Copper', 'Power Mining', 'Use SPS AnyAngle', 'Enable debug'];
checkBoxDefaults := ['True', 'False', 'False', 'False', 'False', 'False'];
checkBoxHints := ['Mining Iron Rocks?', 'Mining Tin Rocks?', 'Mining Copper Rocks?', 'Are you powermining (dropping ore)?', 'Enable to walk at any compass angle (may be buggy)', 'Display debug on SMART and in the debug box'];
Text moved with changes from lines 732-734 (83.1% similarity)
end;
end;
procedure declarePlayers();
var
i: integer;
begin
players.setup(playerForm.players);
currentPlayer := 0;
for i := 0 to high(players) do
with players[i] do
begin
integers[LOGIN_WORLD] := strToInt(playerForm.players[i].settings[0]);
integers[LOADS_TO_DO] := strToInt(playerForm.players[i].settings[1]);
integers[SEARCH_RADIUS] := strToInt(playerForm.players[i].settings[2]);
integers[BREAK_TIME] := strToInt(playerForm.players[i].settings[3]);
integers[BREAK_DURATION] := strToInt(playerForm.players[i].settings[4]);
integers[SWITCH_AFTER] := strToInt(playerForm.players[i].settings[5]);
booleans[MINE_IRON] := strToBool(playerForm.players[i].settings[6]);
booleans[MINE_TIN] := strToBool(playerForm.players[i].settings[7]);
booleans[MINE_COPPER] := strToBool(playerForm.players[i].settings[8]);
booleans[POWER_MINING] := strToBool(playerForm.players[i].settings[9]);
booleans[SPS_ANY_ANGLE] := strToBool(playerForm.players[i].settings[10]);
booleans[ENABLE_DEBUG] := strToBool(playerForm.players[i].settings[11]);
if booleans[ENABLE_DEBUG] then
SRLDebug := true;
world := integers[LOGIN_WORLD];
end;
setLength(TotalBreakTime, length(Players));
setLength(OresMined, length(players));
setLength(PlayerRocks, length(players));
end;
procedure debugSPFSettings();
var
i: integer;
begin
writeLn('');
for i := 0 to high(players) do
begin
writeLn('Player[' + toStr(i) + '] Settings:');
writeLn('Login World: ', players[i].integers[LOGIN_WORLD]);
writeLn('Loads to do: ', players[i].integers[LOADS_TO_DO] );
writeLn('Search radius: ', players[i].integers[SEARCH_RADIUS] );
writeLn('Time before break: ', players[i].integers[BREAK_TIME]);
writeLn('Break duration: ', players[i].integers[BREAK_DURATION]);
writeLn('Switch after: ', players[i].integers[SWITCH_AFTER]);
writeLn('Mine Iron: ', players[i].booleans[MINE_IRON]);
writeLn('Mine Tin: ', players[i].booleans[MINE_TIN]);
writeLn('Mine Copper: ', players[i].booleans[MINE_COPPER]);
writeLn('Power mining: ', players[i].booleans[POWER_MINING]);
writeLn('DSPS AnyAngle: ', players[i].booleans[SPS_ANY_ANGLE]);
writeLn('Enable Debug: ', players[i].booleans[ENABLE_DEBUG]);
writeLn('');
end;
end;
procedure debug(text: String);
begin
if players[currentPlayer].booleans[ENABLE_DEBUG] then
writeLn(text);
end;
procedure paintStatus(status: string);
begin
{$IFDEF SMART}
try
smartImage.clear();
smartImage.drawText('Status: ' + status, point(chatbox.x2 - 320, chatbox.y2 - 19), smallChars, false, 255);
except
end;
{$ENDIF}
end;
procedure paintDebug(what: string; ATPA: T2DPointArray = []);
begin
{$IFDEF SMART}
if players[currentPlayer].booleans[ENABLE_DEBUG] then
try
case lowercase(what) of
'atpa': smartImage.debugATPA(ATPA);
'circle': smartImage.drawCircle(mainscreen.playerPoint, SEARCH_RADIUS, false, clRed);
'box': smartImage.drawBox(mainScreen.playerBox, false, clWhite);
'clear': smartImage.clearArea(mainScreen.getBounds());
end;
except
end;
{$ENDIF}
end;
function randomClick(RClickChance: Integer; chooseOptions: TStringArray): Boolean;
var
x, y: integer;
begin
if random(RClickChance) = 0 then
begin
fastClick(MOUSE_RIGHT);
result := chooseOption.select(chooseOptions);
end else
begin
getMousePos(x, y);
result := multiClick([x, y], 10, 3);
end;
end;
procedure randomMouse(chance: Integer; sleep: Boolean = false; min, max: Integer = 0);
begin
if random(chance) = 1 then
if sleep then
sleepAndMoveMouse(randomRange(min, max))
else
smallRandomMouse();
end;
function isPlayerMoving(minShift: Integer): Boolean;
var
shift: Integer;
begin
paintDebug('box');
shift := getPixelShiftAverage(mainscreen.Playerbox, 150, 700);
result := shift > minShift;
debug('Player pixel shift: ' + toStr(shift));
end;
function waitPackMoving(minShift, maxTime: Integer): Boolean;
var
count: Integer;
t: TTimeMarker;
begin
count := tabBackpack.count();
wait(randomRange(600, 800));
Text moved from lines 630-632
t.start();
repeat
wait(250);
randomMouse(8);
randomMouse(12, true, 500, 4000);
if tabBackpack.count() <> count then
begin
paintDebug('clear');
exit(true);
end;
until (not isPlayerMoving(minShift)) or (t.getTime() > maxTime);
end;
procedure packManagement();
var
x, y, i, gemSlot, freeSlot: integer;
begin
for i := 28 downto 1 do
if not tabBackPack.isItemInSlot(i) then
begin
freeSlot := i;
break;
end;
for i := 1 to 28 do
if findDTM(Gems, x, y, tabBackPack.getSlotBox(i)) then
begin
gemSlot := i;
break;
end;
if gemSlot < freeSlot then
tabBackPack.dragSlot(gemSlot, freeSlot);
end;
Text moved with changes from lines 418-443 (96.3% similarity)
procedure antiBan(ran: integer; walking: boolean = false);
var
i: integer;
begin
i := random(ran);
if i < 63 then
begin
paintStatus('Engaging in antiban');
case i of
0..4: boredHuman(false);
5..20: begin
hoverSkill(SKILL_MINING);
wait(gaussRangeInt(1500,5000));
end;
21..23: mouseMovingObject();
24..34: sleepAndMoveMouse(randomRange(100,6000));
35..45: begin
mouseOffClient(random(4));
wait(randomRange(2000, 15000));
end;
46..50: wait(randomRange(1000, 2000));
51..55: randomCameraAngle(MS_ANGLE_HIGH);
56..63: pickUpMouse();
63..66: hoverRandomSkill();
67..72: packManagement();
end;
if walking then
begin
minimap.setAngle(MM_DIRECTION_NORTH);
paintStatus('Continuing to walk');
Text moved from lines 452-455
end;
end;
end;
function TSPSArea.walkPath(path: TPointArray): boolean; override;
var
var
p, lastPos, mmPoint: TPoint;
p, lastPos, mmPoint: TPoint;
t, fails, h, l, i: integer;
t, fails, h, l, i: integer;
begin
begin
result := false;;
result := false;;
h := high(path);
h := high(path);
l := low(path);
l := low(path);
t := (getSystemTime() + randomRange(15000, 20000));
t := (getSystemTime() + randomRange(15000, 20000));
repeat
repeat
if (not isLoggedIn()) then
if (not isLoggedIn()) then
exit(false);
exit(false);
p := SPS.getPlayerPos();
p := self.getPlayerPos();
writeLn('Player position: ' + toStr(p));
for i := h downto l do
for i := h downto l do
if (SPS_PosToMM(path[i], p, mmPoint)) then
if (SPS_PosToMM(path[i], p, mmPoint)) then
begin
begin
if (distance(minimap.getCenterPoint(), mmPoint) >= 8) then
if (distance(minimap.getCenterPoint(), mmPoint) >= 10) then
begin
begin
if (spsMultiMouse) then
if (spsMultiMouse) then
multiClick(mmPoint, 25, 3)
multiClick(mmPoint, 25, 3)
else
else
mouse(mmPoint, MOUSE_LEFT);
mouse(mmPoint, MOUSE_LEFT);
if (minimap.isFlagPresent(2500 + random(500))) then
if (minimap.isFlagPresent(2500 + random(500))) then
minimap.waitFlag(10 + random(25));
minimap.waitFlag(10 + random(25));
end;
end;
t := (getSystemTime() + randomRange(15000, 20000));
t := (getSystemTime() + randomRange(15000, 20000));
result := (i = h) or (distance(path[i], path[h]) < 10);
result := (i = h) or (distance(path[i], path[h]) < 10);
if (result) then
if (result) then
break(2)
break(2)
else
else
break();
break();
end;
end;
lastPos := SPS.getPlayerPos();
writeLn('Last position: ' + toStr(lastPos));
if (p.x = lastPos.x) and (p.y = lastPos.y) then
if (p.x = lastPos.x) and (p.y = lastPos.y) then
inc(fails);
inc(fails);
until (getSystemTime() > t) or (fails > 3);
lastPos := p;
randomMouse(10);
antiBan(750, true);
until (getSystemTime() > t) or (fails > 5);
if (minimap.isFlagPresent()) or (minimap.isPlayerMoving()) then
if (minimap.isFlagPresent()) or (minimap.isPlayerMoving()) then
minimap.waitPlayerMoving();
minimap.waitPlayerMoving();
print('sps.walkPath(): result = '+boolToStr(result));
print(self.getName()+'.walkPath(): result = '+boolToStr(result));
end;
end;
procedure freeTheDTMs();
procedure freeTheDTMs();
begin
begin
freeDTMs([DTMs[0], DTMs[1], DTMs[2], Gems]);
freeDTMs([DTMs[0], DTMs[1], DTMs[2], Gems]);
end;
end;
procedure findRandoms();
procedure loginPlayer();
begin
begin
players[currentPlayer].login();
wait(randomRange(4000, 6000));
paintStatus('Setting up player');
mainscreen.setAngle(MS_ANGLE_HIGH);
exitTreasure();
exitTreasure();
claimTicket();
claimTicket();
mainScreen.setZoom(true);
end;
end;
procedure paintStatus(status: string);
procedure resetSwitchTimer();
var
ran: integer;
begin
begin
if PAINT_STATUS then
ran := round((players[currentPlayer].integers[SWITCH_AFTER] * 60000) * 0.2);
begin
SwitchTime := (getSystemTime() + (players[currentPlayer].integers[SWITCH_AFTER] * 60000) + randomRange(-ran, ran));
smartImage.clear();
smartImage.drawText('Status: ' + status, point(chatbox.X2-320,chatbox.Y2-19), SmallChars, false, STATUS_COLOUR);
end;
end;
end;
procedure resetBreakTimer();
procedure resetBreakTimer();
var
ran: integer;
begin
begin
BreakTime := getSystemTime() + gaussRangeInt(MIN_P_TIME * 60000, MAX_P_TIME * 60000);
ran := round((players[currentPlayer].integers[BREAK_TIME] * 60000) * 0.2);
BreakTime := (getSystemTime() + (players[currentPlayer].integers[BREAK_TIME] * 60000) + randomRange(-ran, ran));
end;
end;
function timeUntilBreak(): string;
function switchPlayers(active: Boolean): Boolean;
var
breakFromNow, H, M, S: integer;
begin
begin
if ENABLE_BREAKS then
if players.getActive() < 2 then
exit(false);
paintStatus('Switching players');
if players.next(active) then
begin
begin
breakFromNow := BreakTime - getSystemTime();
result := true;
convertTime(breakFromNow, H, M, S);
loginPlayer();
resetBreakTimer();
resetSwitchTimer();
end;
end;
function timeUntil(time: integer): string;
var
H, M, S: integer;
begin
convertTime((time - getSystemTime()), H, M, S);
result := (toStr(H)+ 'h ' + toStr(M)+ 'm ' + toStr(S)+ 's');
result := (toStr(H)+ 'h ' + toStr(M)+ 'm ' + toStr(S)+ 's');
end else
result := ('Breaking disabled');
end;
end;
procedure takeBreak();
procedure takeBreak();
var
var
H, M, S, HH, MM, SS, breakFor, timeLeft: integer;
H, M, S, breakFor, timeLeft, ran: integer;
breakStartTimer: TTimeMarker;
breakDuration: TTimeMarker;
begin
begin
if not ENABLE_BREAKS then
exit;
if (getSystemTime() >= BreakTime) then
if (getSystemTime() >= BreakTime) then
begin
begin
TotalBreakTime.start();
TotalBreakTime[currentPlayer].start();
paintStatus('Taking a break');
paintStatus('Taking a break');
if random(2) = 0 then
if random(2) = 0 then
players[currentPlayer].logout()
players[currentPlayer].logout()
else
else
players[currentPlayer].exitToLobby();
players[currentPlayer].exitToLobby();
breakFor := gaussRangeInt(MIN_B_TIME * 60000, MAX_B_TIME * 60000);
ran := round((players[currentPlayer].integers[BREAK_DURATION] * 60000) * 0.2);
breakFor := (players[currentPlayer].integers[BREAK_DURATION] * 60000) + randomRange(ran, -ran);
convertTime(breakFor, H, M, S);
convertTime(breakFor, H, M, S);
writeLn('You are breaking for: ' + toStr(H)+ 'h ' + toStr(M)+ 'm ' + toStr(S)+ 's');
writeLn('You are breaking for: ' + toStr(H)+ 'h ' + toStr(M)+ 'm ' + toStr(S)+ 's');
breakStartTimer.start();
breakDuration.start();
repeat
repeat
timeLeft := breakFor - breakStartTimer.getTime();
timeLeft := breakFor - breakDuration.getTime();
convertTime(timeLeft, HH, MM, SS);
convertTime(timeLeft, H, M, S);
writeLn('Ending break in: ' + toStr(HH)+ 'h ' + toStr(MM)+ 'm ' + toStr(SS)+ 's');
writeLn('Ending break in: ' + toStr(H)+ 'h ' + toStr(M)+ 'm ' + toStr(S)+ 's');
wait(25000 + random(4000));
wait(25000 + random(4000));
until breakFor < breakStartTimer.getTime();
until breakFor < breakDuration.getTime();
inc(Breaked);
inc(players[currentPlayer].integers[P_TOTAL_BREAKS]);
resetBreakTimer();
resetBreakTimer();
TotalBreakTime.pause();
TotalBreakTime[currentPlayer].pause();
players[currentPlayer].login();
wait(gaussRangeInt(1500, 3500));
loginPlayer();
exitTreasure();
findRandoms();
minimap.clickCompass();
sleepAndMoveMouse(randomRange(750, 1200));
rockTimer.reset();
rockTimer.reset();
rockTimer.start();
rockTimer.start();
end;
end;
end;
end;
function getGEPrice(itemString: string): integer;
function getGEPrice(itemString: String): Integer;
var
var
wikiaPage, priceString: string;
wikiaPage, priceString: string;
begin
begin
wikiaPage := getPage('http://runescape.wikia.com/wiki/Exchange:' + itemString);
wikiaPage := getPage('http://runescape.wikia.com/wiki/Exchange:' + itemString);
priceString := between('GEPrice">', '</span>', wikiaPage);
priceString := between('GEPrice">', '</span>', wikiaPage);
result := strToIntDef(priceString, -1);
result := strToIntDef(extractFromStr(priceString, numbers), -1);
writeLn('-- ' + itemString + ' price: '+ toStr(result) + ' gp');
writeLn('-- ' + itemString + ' price: '+ toStr(result));
end;
end;
procedure checkForImages(path, link, item: string);
procedure checkForFile(path, link, item: String);
var
var
progFile: longInt;
itemFile: longInt;
picName: string;
itemName: string;
begin
begin
picName := AppPath + path;
writeLn('Checking for ' + item);
itemName := appPath + path;
try
try
if not fileExists(picName) then
if not fileExists(itemName) then
begin
begin
writeLn('NOTIFICATION: ' + item + ' does not exist - Downloading it now!');
writeLn(' -----> ' + item + ' does not exist - Downloading it now!');
progFile := createFile(picName);
itemFile := createFile(itemName);
end else
end else
begin
begin
writeLn('NOTIFICATION: ' + item + ' already exists!');
writeLn(' -----> ' + item + ' already exists');
exit;
exit;
end;
end;
closeFile(progFile);
closeFile(itemFile);
progFile := rewriteFile(picName, false);
itemFile := rewriteFile(itemName, false);
writeFileString(progFile, getPage(link));
writeFileString(itemFile, getPage(link));
writeLn('NOTIFICATION: ' + item + ' has been download to Simba folder!');
writeLn(' -----> ' + item + ' has been download to Simba folder!');
writeLn('');
writeLn('');
finally
finally
if (progFile > 0) then
if (itemFile > 0) then
closeFile(progFile);
closeFile(itemFile);
end;
end;
end;
end;
function isActionbarSlotEmpty(slot: integer): boolean;
function isActionbarSlotEmpty(slot: integer): boolean;
begin
begin
result := (getColor(actionBar.__slots[slot - 1].getMiddle().x, actionBar.__slots[slot - 1].getMiddle().y) = 2761233);
result := (getColor(actionBar.__slots[slot - 1].getMiddle().x, actionBar.__slots[slot - 1].getMiddle().y) = 2761233);
end;
end;
function clearActionBarSlot(slot: integer): boolean;
function clearActionBarSlot(slot: integer): boolean;
var
var
i, t: integer;
i, t: integer;
begin
begin
if isActionbarSlotEmpty(slot) then
if isActionbarSlotEmpty(slot) then
exit(true);
exit(true);
paintStatus('Clearing actionbar slot');
paintStatus('Clearing actionbar slot');
while i < 4 do
while i < 4 do
begin
begin
actionbar.unlock();
actionbar.unlock();
mouseBox(actionBar.getSlotBox(slot), MOUSE_MOVE, MOUSE_ACCURATE);
mouseBox(actionBar.getSlotBox(slot), MOUSE_MOVE, MOUSE_ACCURATE);
wait(randomRange(74, 287));
wait(randomRange(74, 287));
dragMouse(point(50 + random(450), 220 + random(140)));
dragMouse(point(50 + random(450), 220 + random(140)));
t := getSystemTime() + randomRange(1788, 2895);
t := getSystemTime() + randomRange(1750, 2900);
repeat
repeat
wait(randomRange(1847, 2575));
wait(randomRange(1850, 2570));
if isActionbarSlotEmpty(slot) then
if isActionbarSlotEmpty(slot) then
exit(true);
exit(true);
until (getSystemTime() > t);
until (getSystemTime() > t);
inc(i);
inc(i);
end;
end;
end;
end;
function addItemToActionBar(packSlot, actionBarSlot: integer): boolean;
function addItemToActionBar(packSlot, actionBarSlot: integer): boolean;
var
var
t, i: integer;
t, i: integer;
p: TPoint;
p: TPoint;
begin
begin
if not tabBackPack.isItemInSlot(packSlot) then
if not tabBackPack.isItemInSlot(packSlot) then
exit(false);
exit(false);
if not isActionbarSlotEmpty(actionBarSlot) then
if not isActionbarSlotEmpty(actionBarSlot) then
clearActionBarSlot(actionBarSlot);
clearActionBarSlot(actionBarSlot);
paintStatus('Adding ore to actionbar');
paintStatus('Adding ore to actionbar');
while i < 4 do
while i < 4 do
begin
begin
gaussBox(p, actionBar.getSlotBox(actionBarSlot));
gaussBox(p, actionBar.getSlotBox(actionBarSlot));
mouseBox(tabBackPack.getSlotBox(packSlot), MOUSE_MOVE, MOUSE_ACCURATE);
mouseBox(tabBackPack.getSlotBox(packSlot), MOUSE_MOVE, MOUSE_ACCURATE);
wait(randomRange(176, 387));
wait(randomRange(176, 387));
dragMouse(p);
dragMouse(p);
t := getSystemTime() + randomRange(1788, 2895);
t := getSystemTime() + randomRange(1788, 2895);
repeat
repeat
wait(randomRange(232, 567));
wait(randomRange(232, 567));
if not isActionbarSlotEmpty(actionBarSlot) then
if not isActionbarSlotEmpty(actionBarSlot) then
exit(true);
exit(true);
until (getSystemTime() > t);
until (getSystemTime() > t);
inc(i);
inc(i);
end;
end;
end;
end;
Text moved with changes to lines 374-399 (96.3% similarity)
function antiBan(): boolean;
var
i: integer;
begin
i := random(1500);
if i < 66 then
begin
paintStatus('Engaging in antiban');
case i of
1..4: boredHuman(false);
5..20: begin
hoverSkill(SKILL_MINING);
wait(gaussRangeInt(1500,5000));
end;
21..23: mouseMovingObject();
24..34: sleepAndMoveMouse(randomRange(100,6000));
35..45: begin
mouseOffClient(Random(4));
wait(randomRange(2000, 15000));
end;
46..50: wait(randomRange(1000, 2000));
51..55: randomCameraAngle(MS_ANGLE_HIGH);
56..63: pickUpMouse();
63..66: begin
powersScreen.open();
wait(randomRange(1000, 3000));
powersScreen.openTab(random(5 + 1));
wait(randomRange(2000, 4000));
if random(2) = 1 then
powersScreen.openSubTab(random(2));
powersScreen.close();
end;
Text moved to lines 407-410
end;
end;
end;
procedure calculateStats();
procedure calculateStats();
var
var
i: integer;
i, c: integer;
calcValues: Array [0..7] of integer;
calcValues: Array [0..6] of integer;
begin
begin
calcValues := [round(getTimeRunning() / 1000), XPGained, TotalProfit, sumIntegerArray(OresMined),
calcValues := [round(getTimeRunning() / 1000), // Time
GemsFound, OresMined[0], OresMined[1], OresMined[2]];
TotalStats[0], // XP
TotalStats[1], // Iron
TotalStats[2], // Tin
TotalStats[3], // Copper
TotalStats[4], // Gems
TotalStats[5] // Profit
];
for i := 0 to high(NewValues) do
for i := 0 to high(NewValues) do
begin
begin
newValues[i] := calcValues[i] - oldValues[i];
newValues[i] := calcValues[i] - oldValues[i];
oldValues[i] := calcValues[i];
oldValues[i] := calcValues[i];
end;
end;
end;
end;
function sendStats: boolean;
function sendStats: boolean;
var
var
c, i: integer;
c, i: integer;
statVars: Array [0..7] of string;
statVars: Array [0..6] of string;
begin
begin
statVars := ['Time', 'XP', 'Profit', 'Ore', 'Gems', 'Iron', 'Tin', 'Copper'];
statVars := ['Time', 'XP', 'Iron', 'Tin', 'Copper', 'Gems', 'Profit'];
c := initializeHTTPClient(false);
c := initializeHTTPClient(false);
for i := 0 to high(statVars) do
for i := 0 to high(statVars) do
addPostVariable(c, statVars[i], intToStr(newValues[i]));
addPostVariable(c, statVars[i], intToStr(newValues[i]));
result := pos('true', lowercase(postHTTPPageEx(c, 'http://srlmayor.com/mayorstats/miner/UpdateStats.php'))) <> 0;
result := pos('true', lowercase(postHTTPPageEx(c, 'http://srlmayor.com/mayorstats/miner/UpdateStats.php'))) <> 0;
freeHTTPClient(c);
freeHTTPClient(c);
if result then
calculateStats();
end;
end;
procedure progressReport();
function getTotals(): TStringArray;
var
var
i, xpPerHour, oresPerHour, profit, profitPerHour, PAD: integer;
i: integer;
totalBreaks: extended;
tmp: TIntegerArray;
begin
begin
XPGained := round((OresMined[0] * 35) + (OresMined[1] * 17.5) + (OresMined[2] * 17.5));
setLength(tmp, 8);
xpPerHour := round(xpGained * (3600.0 / (GetTimeRunning / 1000.0)));
setLength(result, length(tmp));
oresPerHour := round(sumIntegerArray(OresMined) * (3600.0 / (GetTimeRunning / 1000.0)));
totalBreaks := (TotalBreakTime.getTime()/3600000);
for i := 0 to 2 do
profit := profit + OresMined[i] * AllRocks[i].Price;
TotalProfit := profit;
profitPerHour := round(profit * (3600.0 / (GetTimeRunning / 1000.0)));
PAD := 39;
clearDebug();
writeLn('||-------------------------------------||');
writeLn(padR('|| The Mayor''s VEB Miner (Rev. ' + REVISION + ')', PAD) + '||') ;
writeLn(padR('||', PAD) + '||');
writeLn(padR('|| Time running: ' + msToTime(getTimeRunning(), TIME_SHORT), PAD) + '||') ;
writeLn(padR('|| Ores mined: ' + toStr(sumIntegerArray(OresMined)) + ' (' + toStr(oresPerHour) + ' PH)', PAD) + '||');
writeLn(padR('|| Iron: ' + toStr(OresMined[0]) + ' Tin: ' + toStr(OresMined[1]) + ' Copper: ' + toStr(OresMined[2]) , PAD) + '||');
writeLn(padR('|| Gems found: ' + toStr(GemsFound), PAD) + '||') ;
writeLn(padR('|| Loads done: ' + toStr(loadsDone) + ' of ' + toStr(LOADS_TO_DO), PAD) + '||');
writeLn(padR('|| Experience earned: ' + toStr(xpGained) + ' (' + toStr(xpPerHour) + ' PH)', PAD) + '||');
if POWER_MINING then
writeLn(padR('|| Value of ore dropped: ' + toStr(profit), PAD) + '||')
else
writeLn(padR('|| Profit made: ' + toStr(profit) + ' (' + toStr(profitPerHour) + ' PH)', PAD) + '||');
writeLn(padR('|| Lodestone recoveries: ' + toStr(Recoveries), PAD) + '||');
writeln(padR('|| Time until break: ' + timeUntilBreak(), PAD) + '||');
writeln(padR('|| Breaks taken: ' + toStr(Breaked)+ ' (' + toStr(trunc(totalBreaks)) + ' h & ' + toStr(trunc(totalBreaks * 60) mod(60)) + ' m)', PAD) + '||');
writeLn('||-------------------------------------||');
if statsTimer.getTime() > 300000 then
for i := 0 to high(players) do
begin
with players[i] do
if sendStats() then
begin
begin
writeLn('Successfully committed stats');
incEx(tmp[0], worked.getTime());
calculateStats();
incEx(tmp[1], integers[P_XP_GAINED]);
statsTimer.reset();
incEx(tmp[2], OresMined[i][0]);
statsTimer.start();
incEx(tmp[3], OresMined[i][1]);
incEx(tmp[4], OresMined[i][2]);
incEx(tmp[5], integers[P_GEMS_FOUND]);
incEx(tmp[6], integers[P_PROFIT]);
incEx(tmp[7], integers[P_TOTAL_BREAKS]);
end;
end;
end;
end;
for i := 1 to high(tmp) - 1 do
TotalStats[i - 1] := tmp[i];
procedure endScript(reason: string);
result[0] := msToTime(tmp[0], TIME_BARE);
begin
paintStatus('Terminating script');
for i := 1 to high(tmp) do
wait(randomRange(4000, 3000));
result[i] := groupDigits(tmp[i], ',');
players[currentPlayer].exitToLobby();
progressReport();
writeLn('Terminated because: ' + reason);
writeLn('');
writeLn('Post all proggys on the thread to keep Mayor happy :) ');
terminateScript();
end;
end;
function mayorObjectFinder(filter, cluster: boolean; hue, sat: extended; W, H, colour, tolerance, clickType: Integer; mouseOverText, chooseOptions: array of string): boolean;
function getProggyStats(stat: integer; perHour: boolean): string;
var
var
i, x, y: integer;
perHourTmp: integer;
p: TPoint;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
begin
if not isLoggedIn() then
exit;
findColorsSpiralTolerance(x, y, TPA, colour, mainScreen.getBounds(), tolerance, colorSetting(2, hue, sat));
if filter then
begin
TPA.excludePointsDist(0, SEARCH_RADIUS, mainScreen.playerPoint.x, mainScreen.playerPoint.y);
if SEARCH_RADIUS < 195 then
try
try
smartImage.drawCircle(mainscreen.playerPoint, SEARCH_RADIUS, false, clRed);
perHourTmp := round(stat * (3600.0 / (players[currentPlayer].worked.getTime() / 1000.0)));
except
except
end;
end;
end;
mainScreen.filterPointsPlayer(TPA);
if (Length(TPA) < 1) then exit;
if cluster then
ATPA := TPA.cluster(W, H)
else
ATPA := TPA.toATPA(W, H);
ATPA.filterBetween(0, 3);
ATPA.sortFromMidPoint(mainscreen.playerPoint);
if PAINT_DEBUG then
smartImage.debugATPA(ATPA);
for i := 0 to high(ATPA) do
begin
if random(3) = 1 then
missMouse(middleTPA(ATPA[i]), true)
else
mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
if isMouseOverText(mouseOverText, 500) then
case perHour of
begin
true: result := groupDigits(stat, ',') + ' (' + groupDigits(perHourTmp, ',') + ' PH)';
fastClick(ClickType);
false: result := groupDigits(stat, ',');
if clickType = MOUSE_LEFT then
begin
if PAINT_DEBUG then
smartImage.clearArea(mainscreen.getBounds());
exit(true);
end;
if chooseOption.select(chooseOptions) then
begin
if PAINT_DEBUG then
smartImage.clearArea(mainscreen.getBounds());
exit(true);
end else
begin
gaussBox(p, mainscreen.getBounds());
mouse(p, MOUSE_MOVE);
end;
end;
end;
end;
end;
end;
function lodestoneIsOpen(): boolean;
procedure progressReport();
begin
result := (getColor(63, 76) = 243) or (getColor(61, 43) = 379903);
end;
function waitLodestoneOpen(time: integer = 1000): boolean;
var
x, y: integer;
t: TTimeMarker;
begin
Text moved to lines 334-336
t.start();
repeat
if not isLoggedIn() then
exit;
wait(100);
if lodestoneIsOpen() then
begin
writeLn('Lodestone screen is open');
exit(true);
end;
until t.getTime() > time;
end;
procedure getBackToMine();
var
var
b: TBox;
i, xpPerHour, oresPerHour, profit, profitPerHour, PAD_S, PAD_M: integer;
totalBreaks: extended;
totals: TStringArray
begin
begin
paintStatus('Recovering lost player - lodetone teleporting');
for i := 0 to 2 do
profit := profit + OresMined[currentPlayer][i] * AllRocks[i].Price;
mouseCircle(minimap.button[MM_BUTTON_LODESTONE].center.x, minimap.button[MM_BUTTON_LODESTONE].center.y,
totalBreaks := (TotalBreakTime[currentPlayer].getTime()/3600000);
minimap.button[MM_BUTTON_LODESTONE].radius, MOUSE_LEFT);
if waitLodestoneOpen(5000) then
with players[currentPlayer] do
begin
begin
writeLn('Lodestone Screen is open');
integers[P_XP_GAINED] := round((OresMined[currentPlayer][0] * 35) +
b := intToBox(365, 151, 381, 170);
(OresMined[currentPlayer][1] * 17.5) +
mouseBox(b, MOUSE_LEFT);
(OresMined[currentPlayer][2] * 17.5));
wait(randomRange(13000, 16000));
minimap.clickCompass();
mainscreen.setAngle(MS_ANGLE_HIGH);
sleepAndMoveMouse(randomRange(750, 1200));
walkPath(FailSafeToMine);
inc(Recoveries);
end;
end;
function findBankerNPCDots(var bank: TPoint): boolean;
integers[P_ORES_MINED] := sumIntegerArray(OresMined[currentPlayer]);
var
integers[P_PROFIT] := profit;
i: integer;
B, gB: TPointArray;
aTPA: T2DPointArray;
begin
result := false;
B := minimap.getDots(MM_DOT_NPC, minimap.getBounds());
aTPA := splitTPA(B, 10);
sortATPASize(aTPA, true);
if length(aTPA) = 0 then
exit;
B := aTPA[0];
for i := 0 to high(B) - 1 do
begin
if (Abs(B[i].Y - B[i + 1].Y) < 15) and (Abs(B[i].X - B[i + 1].X) < 60) then
begin
setLength(gB, length(gB) + 1);
gB[high(gB)] := B[i];
if high(gB) > 3 then // at least 4 bankers lined up
begin
bank := middleTPA(gB);
bank.Y := bank.Y - 5;
exit(true);
end;
end else
setLength(gB, 0);
end;
end;
end;
procedure walkToBank();
var
p: TPoint;
walkTimer: TTimeMarker;
x, y: integer;
begin
walkTimer.start();
incEx(GemsFound, tabBackpack.countDTM(Gems));
paintStatus('Walking to Varrock East Bank');
repeat
if not isLoggedIn() then
exit;
if sps.getPlayerPos().x = -1 then
minimap.setAngle(MM_DIRECTION_NORTH);
if walkTimer.getTime() > 60000 then
getBackToMine();
if not walkPath(PathToBank) then
begin
minimap.clickCompass();
mainScreen.setAngle(MS_ANGLE_HIGH);
smallRandomMouse();
if not walkPath(PathToBank) then
begin
writeLn('Walkpath failed twice - trying blindwalk');
sps.blindWalk(Point(287, 138));
Text moved with changes to lines 196-198 (83.1% similarity)
end;
end;
minimap.setAngle(MM_DIRECTION_NORTH);
if findBankerNPCDots(p) then
begin
mouse(p, MOUSE_LEFT);
exit;
end;
until walkTimer.getTime() > 300000;
endScript('failed to walk to the bank within 5 minutes');
end;
procedure openBank();
var
bankTimer: TTimeMarker;
p: TPoint;
begin
bankTimer.start();
paintStatus('Opening Varrock East Bank');
repeat
if (not isLoggedIn) or bankScreen.isOpen() or pinScreen.isOpen() then
exit;
minimap.waitFlag(5);
minimap.waitPlayerMoving(350);
if mayorObjectFinder(false, true, BOOTH_HUE, BOOTH_SAT, 5, 5, BOOTH_COLOUR, BOOTH_TOL, MOUSE_LEFT, ['ooth', 'ank boo'], ['ank Bank']) then
if (bankScreen.isOpen(5000)) or (pinScreen.isOpen(5000)) then
exit;
if mayorObjectFinder(false, true, BANKER_HUE, BANKER_SAT, 5, 5, BANKER_COLOUR, BANKER_TOL, MOUSE_RIGHT, ['anker', 'ank Ban'], ['ank Bank']) then
if bankScreen.isOpen(5000) or pinScreen.isOpen(5000) then
exit;
if findBankerNPCDots(p) then
mouse(p, MOUSE_LEFT)
else
minimap.setAngle(randomRange(35, 50));
until (bankTimer.getTime() > 120000) or (not isLoggedIn());
clearDebug();
endScript('we failed to open the bank within 2 minutes');
PAD_M := 95;
end;
procedure depositOre();
if length(players) > 1 then
var
bankTimer: TTimeMarker;
begin
if bankScreen.isOpen(3000) or pinScreen.isOpen(3000) then
begin
begin
totals := getTotals();
paintStatus('Depositing Ore');
if pinScreen.isOpen() then
pinScreen.enter(Players[currentPlayer].bankPin);
bankTimer.start();
writeLn(' /=============================================================================================\');
writeLn(PadR('|| The Mayor''s VEB Miner', PAD_M) + '||');
writeLn(PadR('|| - Revision ' + toStr(REVISION) + ' -', PAD_M) + '||');
writeLn('||=============================================================================================||');
writeLn(PadR('|| Time running: ' + timeRunning(), PAD_M) + '||');
writeLn('||───────────── ────────── ──────── ───────── ─────── ────── ──────── ────── ───────── ────────||');
writeLn('|| Nickname | Worked | Active | XP | Iron | Tin | Copper | Gems | Profit | Breaks ||');
writeLn('||───────────── ────────── ──────── ───────── ─────── ────── ──────── ────── ───────── ────────||');
repeat
for i := 0 to high(Players) do
if (bankscreen.getPackCount() > 0) then
with Players[i] do
begin
writeln('|| ' + padR(nickname, 12) + '| '
bankScreen.quickDeposit(QUICK_DEPOSIT_INVENTORY);
+ padR(msToTime(worked.getTime(), TIME_BARE), 3) + ' | '
if random(2) = 0 then
+ padR(boolToStr(isActive), 7) + '| '
wait(gaussRangeInt(1100, 1750))
+ padR(groupDigits(integers[P_XP_GAINED], ','), 8) + '| '
else
+ padR(groupDigits(OresMined[i][0], ','), 6) + '| '
sleepAndMoveMouse(randomRange(1100, 1750));
+ padR(groupDigits(OresMined[i][1], ','), 5) + '| '
+ padR(groupDigits(OresMined[i][2], ','), 7) + '| '
+ padR(groupDigits(integers[P_GEMS_FOUND], ','), 5) + '| '
+ padR(groupDigits(integers[P_PROFIT], ','), 8) + '| '
+ padR(groupDigits(integers[P_TOTAL_BREAKS], ','), 7) + '||');
writeln('||=============================================================================================||');
writeln(padR('|| Totals: ', 15) + '| '
+ padR(totals[0], 9) + '| '
+ padR('', 7) + '| '
+ padR(totals[1], 8) + '| '
+ padR(totals[2], 6) + '| '
+ padR(totals[3], 5)+ '| '
+ padR(totals[4], 7)+ '| '
+ padR(totals[5], 5)+ '| '
+ padR(totals[6], 8)+ '| '
+ padR(totals[7], 7)+ '||');
writeln(' \=============================================================================================/');
writeLn('');
end;
end;
if bankscreen.getPackCount() < 3 then
PAD_S := 43;
begin
bankscreen.close();
if random(2) = 0 then
wait(gaussRangeInt(1100, 1750))
else
sleepAndMoveMouse(randomRange(1100, 1750));
inc(LoadsDone);
exit;
end;
until (bankTImer.getTime() > 45000) or (not isLoggedIn());
endScript('Failed to deposit ore within 45 seconds');
end;
end;
function isAtMine(): boolean;
with players[currentPlayer] do
var
pos: TPoint;
begin
begin
pos := SPS.getPlayerPos();
writeLn(' /=========================================\');
result := pointInBox(pos, VEM_MINE_BOX);
writeLn(padR('|| The Mayor''s VEB Miner (Rev. ' + toStr(REVISION) + ')', PAD_S) + '||') ;
writeLn(padR('||', PAD_S) + '||');
if result then
writeLn(padR('|| Current Player: [' + toStr(currentPlayer) + '] ' + nickname, PAD_S) + '||');
writeLn('Player is inside VE Mine');
writeLn(padR('|| Total Time: ' + msToTime(worked.getTotalTime(), TIME_ABBREV), PAD_S) + '||') ;
end;
procedure walkToMine();
writeLn(padR('|| Ores mined: ' + getProggyStats(sumIntegerArray(OresMined[currentPlayer]),true), PAD_S) + '||');
var
writeLn(padR('|| Iron: ' + toStr(OresMined[currentPlayer][0]) + ' Tin: ' + toStr(OresMined[currentPlayer][1]) + ' Copper: ' + toStr(OresMined[currentPlayer][2]) , PAD_S) + '||');
walkTimer: TTimeMarke
writeLn(padR('|| Experience earned