Code:
program SimplePowerMiner;
//{.Include SRL\SRL\Misc\SMART.SCAR}
{.include SRL\SRL.scar}
var
x,y,oredtm,gemdtm, loads: Integer;
const
NumOfPlayers = 1;
StartPlayer = 0;
useagain = true;// use players again
world = 5;// world to auto in
version= '0.1';
procedure DeclarePlayers;//add more if needed
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active := True; // Use this account??
Players[0].Integers[0]:= 100; // How many Loads??
players[0].integers[1] := 2;//how many to mine until droping ex if there are 3 rocks put three
// put 28 if u want a full load
Players[0].Booleans[0]:= false//drop gems??
Players[0].strings[0]:='iron';//what ore??
Players[0].BoxRewards := ['Xp', 'ostume', 'gem', 'mote', 'ithril', 'oal'];//What do u want out of randomns
//must be perfect EX. capitalazation and spelling
{ Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := '';
Players[1].Active := True; // Use this account??
Players[1].Integers[1]:= 150; // How many Loads??
Players[1].Booleans[0]:= false//drop gems??
Players[1].strings[0]:='iron';//what ore??
Players[1].BoxRewards := ['Xp', 'ostume', 'gem', 'mote', 'ithril', 'oal']; }
end;
procedure antibanz;
begin
If(not LoggedIn)then Exit;
Case Random(9) of
1: PickupMouse;
2: SleepAndMoveMouse(500+Random(1500));
3: RandomMovement;
4: boredhuman;
5: hoverskill('Mining', false);
6..8: Exit;
9:
begin
keydown(VK_Right);
wait(100 + random (30));
keyup(VK_Right);
end;
end;
end;
procedure Setup;
begin
writeln(' __ .__ .__ ');
writeln(' |__|_____ |__|______________| | ____ ______ ');
writeln(' | \____ \| \___ /\___ / | _/ __ \ / ___/ ');
writeln(' | | |_> > |/ / / /| |_\ ___/ \___ \ ');
writeln(' /\__| | __/|__/_____ \/_____ \____/\___ >____ > ');
writeln(' \______|__| \/ \/ \/ \/ ');
writeln(' .__ ');
writeln('______ ______ _ __ ___________ _____ |__| ____ ___________ ');
writeln('\____ \ / _ \ \/ \/ // __ \_ __ \ / \| |/ \_/ __ \_ __ \ ');
writeln('| |_> > <_> ) /\ ___/| | \/ | Y Y \ | | \ ___/| | \/ ');
writeln('| __/ \____/ \/\_/ \___ >__| |__|_| /__|___| /\___ >__| ');
writeln('|__| \/ \/ \/ \/ ');
{Smart_Server := 107;
Smart_Members := False;
Smart_Signed := True;
Smart_SuperDetail := False; }
ClearDebug;
SetupSRL;
activateclient;
end;
function AutoColorstone: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
R, G, B: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(4.25, 11.86);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 1849168, MSX1, MSY1, MSX2, MSY2, 1);
if (Length(arP) = 0) then
begin
Writeln('Failed to find the stone color, no result.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
ColorToRGB(arC[i], R, G, B);
if (R >= 73) and (R <= 90) and (G >= 44) and (G <= 75) and (B >= 20) and (B <= 35) then
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 4.03) and (X <= 6.74) and (Y >= 3.43) and (Y <= 7.10) and (Z >= 1.57) and (Z <= 1.99) then
begin
Result := arC[i];
Writeln('stone = ' + IntToStr(arC[i]));
Break;
end;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
function AutoColorore: Integer;
var
arP: TPointArray;
arC: TIntegerArray;
tmpCTS, i, arL: Integer;
R, G, B: Integer;
X, Y, Z: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.04, 0.17);
FindColorsSpiralTolerance(MSCX, MSCY, arP, 2766939, MSX1, MSY1, MSX2, MSY2, 6);
if (Length(arP) = 0) then
begin
Writeln('Failed to find the ore color, no result.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
ClearSameIntegers(arC);
arL := High(arC);
for i := 0 to arL do
begin
ColorToRGB(arC[i], R, G, B);
if (R >= 73) and (R <= 109) and (G >= 44) and (G <= 68) and (B >= 33) and (B <= 52) then
begin
ColorToXYZ(arC[i], X, Y, Z);
if (X >= 4.03) and (X <= 8.81) and (Y >= 3.43) and (Y <= 7.46) and (Z >= 1.95) and (Z <= 4.12) then
begin
Result := arC[i];
Writeln('ore Color = ' + IntToStr(arC[i]));
Break;
end;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (i = arL + 1) then
Writeln('AutoColor failed in finding the color.');
end;
procedure MineTheOre;
var
x, y, H, m, cts, i,ore,stone, maincolor, basecolor, inv, invset, tx, oreset, orefinish: integer;
TreeUptext: string;
MainPoints, BasePoints, TPA: TPointArray;
ATPA: T2DPointArray;
begin
ore := autocolorore;
stone := autocolorstone;
oreset := invcount;
disguise('mining ' + Players[CurrentPlayer].Strings[0] )
if not LoggedIn then exit;
repeat
if not LoggedIn then exit;
orefinish := invcount
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.2, 0.2);
FindColorsTolerance(MainPoints, ore, MSX1, MSY1, MSX2, MSY2, 5);
FindColorsTolerance(BasePoints, stone, MSX1, MSY1, MSX2, MSY2, 25);
TPA := CombineTPA(MainPoints, BasePoints);
if (Length(TPA) > 0) then
begin
Tx := 0;
ATPA := SplitTPAEx(TPA, 9, 9);
SortATPAFrom(ATPA, Point(MSCX, MSCY));
H := High(ATPA) - 1;
for I := 0 to H do
begin
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 3, 3);
Wait(100 + Random(200));
if IsUpText('Mine') then
begin
Marktime(m);
Mouse(x, y, 0, 0, True);
invset:=invcount;
repeat
inv:=invcount;
wait (100);
FindNormalRandoms;
until ((invset < Inv) or (TimeFromMark(m) >30000) or FindChatBoxText('availa', 8, 0));
AntiBanz;
FindNormalRandoms;
end;
end;
end else
begin
if tx > 5 then
begin
inc(tx);
writeln('problem mining tring again');
minetheore;
if tx < 5 then
begin
writeln('error mining next player');
logout;
end;
end;
end;
until invfull;
end;
procedure OreDropping;
var
OreDTM,drops:integer;
begin
If Not LoggedIn then exit;
OreDTM := DTMFromString('78DA637463626078C28002FC0C54181E02694' +
'620FE0F048CEE40353718D000231209A403816AEE1350E30D54F3' +
'86801A7BA09A4F04D49800D53C26C29CEBF8D5000045B70DB0');
repeat
Disguise('dropping ores');
If FindDTM(OreDTM,x,y,MIX1,MIY1,MIX2,MIY2) then
Begin
Mouse(x,y,2,2,False);
wait(random(200));
ChooseOption('Drop');
wait(500 + random(100))
FindNormalRandoms;
Inc(drops);
end;
Until not FindDTM(OreDTM,x,y,MIX1,MIY1,MIX2,MIY2);
FreeDTM(oreDTM);
end;
procedure GemDroping;
var
GemDrops,GemDTM:integer;
begin
If Not LoggedIn then exit;
GemDTM := DTMFromString('78DA8DD2510E82300C06E06E814C144C500E0' +
'3461F603199E869B83127C17F3324F3616BFBB026DB97656BAB46' +
'4D6414C5715E2EB422FBDD0DA15E30EADFFC4EF71579862918F38' +
'6A904C630E603734A9BC2670BD3A54DE9F324307DFE5FC10C304D' +
'DA1CF67B8E02A31933E47B11CC4347D54A182B30BE3E1BE58D13B' +
'C87998D60EE3057C6DC605A410D6BC68CF9BE7782F909E629308E' +
'375FE5310F20');
repeat
Disguise('dropping gems');
if findDTM(GemDTM,x,y,MIX1,MIY1,MIX2,MIY2) then
Begin
Mouse(x,y,2,2,False);
wait(random(200));
ChooseOption('Drop');
wait(500 + random(100))
FindNormalRandoms;
inc(gemdrops)
end;
Until not FindDTM(GemDTM,x,y,MIX1,MIY1,MIX2,MIY2) or (gemdrops = 5);//dont think your gonna get more than 1 a tie but just incase
FreeDTM(GemDTM);
end;
procedure Proggy;
begin
WriteLn(' _____ ______')
WriteLn(' | || \')
WriteLn(' | || |')
WriteLn(' | || ___/')
WriteLn(' /_____/ |__| ')
writeLn('____________________________________________')
writeln('Script has been running for ' +TimeRunning);
WriteLn('Player '+ Players[CurrentPlayer].Nick);
WriteLn('loads done '+ IntToStr(loads));
WriteLn('ores mined ' +inttostr(loads *27 )) ;
writeLn('plz post the proggie here http://www.villavu.com/forum/showthr...565#post542565');
end;
procedure break;
begin
disguise('breaking now')
logout;
wait(300000+random(300000));
end;
begin
Setup;
activateclient;
DeclarePlayers;
GraphicsSet := true;
LoginPlayer;
repeat
repeat
FindNormalRandoms;
GetTimeRunning;
ClearDebug;
Proggy;
if loads = 25 + random(25) then
break;
findnormalrandoms;
MineTheore;
findnormalrandoms;
oredropping;
findnormalrandoms;
if Players[CurrentPlayer].Booleans[0] then
Gemdroping;
FindNormalRandoms;
Inc(loads);
until (loads= (Players[CurrentPlayer].Integers[0])) or (not LoggedIn);
NextPlayer(Useagain);
until(AllPlayersInactive);
end.