SCAR Code:
{So here my first script it runs pretty well
only bugs so far is thta sumtimes it clicks sumwhere else and doesnt drop allt he ore
(ong thts not to bad)
ty tickyy i looked on to your miner for proggy help and antibans and more
____________________setup__________________________
1. set up declareplayers
2. set ore type in line 38
3. setup player by rock you want to mine
3. save
4. run
5. post proggies and any bugs
btw it posts proggies all the way though so only post them t the end and takes 5-10 minute breaks every 50 loads
and enjoy :0
______________________________________________________}
program SimplePowerMiner;
{.Include SRL\SRL\Misc\SMART.SCAR}
{.include SRL\SRL.scar}
{agenda
0. fix DTMs
3. anti randoms
4. multi ores???
5. release it}
var
u,l,j,x,y,g,i,y,z,f,switches,oredtm,gemdtm: Integer;
const
NumOfPlayers = 1;
StartPlayer = 0;
useagain = true;// use players again
world = 49;// world to auto in
procedure DeclarePlayers;//add more if needed
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := 'jphm';
Players[0].Active := True; // Use this account??
Players[0].Integers[1]:= 100; // How many Loads??
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
disguise('TY for using jps powerminer')
ClearDebug;
SMARTSetupEx(world, False, True, False);
Wait(5000);
SetTargetDC(SmartGetDC);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
SetupSRL;
activateclient;
end;
procedure MineTheOre;
var
x, y, H, m, cts, i, maincolor, basecolor, inv, invset: integer;
TreeUptext: string;
MainPoints, BasePoints, TPA: TPointArray;
ATPA: T2DPointArray;
begin
disguise('mining')
if not LoggedIn then exit;
case Lowercase(Players[CurrentPlayer].Strings[0]) of
'tin':
begin
maincolor := 10197927;
basecolor := 10000805;
end;
'copper':
begin
maincolor := 3430801;
basecolor := 3495029;
end;
'iron':
begin
maincolor := 2503507;
Basecolor := 2767197;
end;
'coal':
begin
maincolor := 2768447;
basecolor := 2241074;
end;
'mithril':
begin
maincolor := 5913916;
basecolor := 6505283;
end;
'adamentite':
begin
maincolor := 4741960;
basecolor := 6454114;
end;
end;
repeat
if not LoggedIn then exit;
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.2, 0.2);
FindColorsTolerance(MainPoints, maincolor, MSX1, MSY1, MSX2, MSY2, 5);
FindColorsTolerance(BasePoints, Basecolor, MSX1, MSY1, MSX2, MSY2, 5);
TPA := CombineTPA(MainPoints, BasePoints);
if (Length(TPA) = 0) then Exit;
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, 1, 1, True);
invset:=invcount;
repeat
inv:=invcount;
wait (100);
FindNormalRandoms;
until ((invset < Inv) or (TimeFromMark(m) > 15000) or FindChatBoxText('availa', 8, 0));
AntiBanz;
FindNormalRandoms;
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)
Inc(f);
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(g));
WriteLn('ores mined ' +inttostr(g *27)) ;
WriteLn('gems dropped ' + IntToStr(f));
WriteLn('plsyers used ' +inttostr(switches));
writeLn('plz post the proggie here [url]http://www.villavu.com/forum/showthr...565#post542565');[/url]
end;
procedure break;
begin
disguise('breaking now')
logout;
wait(300000+random(300000));
end;
begin
Setup;
DeclarePlayers;
GraphicsSet := true;
LoginPlayer;
repeat
repeat
FindNormalRandoms;
GetTimeRunning;
ClearDebug;
Proggy;
if g = 25 + random(25) then
break;
findnormalrandoms;
MineTheore;
findnormalrandoms;
OreDropping;
findnormalrandoms;
if Players[CurrentPlayer].Booleans[0]=true then
Gemdroping;
FindNormalRandoms;
Inc(g);
until (g= (Players[CurrentPlayer].Integers[1])) or (not LoggedIn);
NextPlayer(Useagain);
until(AllPlayersInactive);
end.