HardRockers
2011-12-31 18:17:32
ok I am trying to use WaitColorGone as to tell my miner how long to wait before clicking the ore again. Is it possible to use it this way? Like I want it to use the x and y values it got from here:
And wait for the color it clicked on to disappear, and then continue on with the loop.
If FindObjCustom(x, y, ['Mine','Rocks','e R'], [5017334, 5017076, 5082871, 4818922], 5) Then And wait for the color it clicked on to disappear, and then continue on with the loop.
program HardRockinYanilleMiner;
{$DEFINE SMART}
{$i SRL\SRL.scar}
{$i sps/sps.simba}
{$i SRL\SRL\Misc\Stats.simba}
Var
Count, PlusOne, x, y: Integer;
Exp, EPH: Extended;
Const
SRLStats_Username = 'HardRockers';
SRLStats_Password = 'trivers';
NumbOfPlayers= 1;
BreakEvery= 120;
BreakFor= 5;
Version= '0.3'; //NO TOUCHY!
Method= 2;//For regular drop use 1, for M1D1 use 2.
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Players[0].Name := 'tarringtonisarocker@hotmail.com';
Players[0].Pass := 'trivers7';
Players[0].Nick := 'ew W';
Players[0].Active := True;
Players[0].Pin := '';
end;
end;
procedure StatsGuise(wat:String);
Begin
Status(wat);
Disguise(wat);
End;
Procedure StartScript;
Begin
SetUpSRL;
MouseSpeed := 15;
ActivateClient;
DeclarePlayers;
If (Not LoggedIn) then
LoginPlayer;
SetAngle(True);
MakeCompass('n');
End;
procedure AntiBan;
begin
case random(100) of
0: RandomRClick;
1: BoredHuman;
2: HoverSkill('Mining', False);
3: ExamineInv;
4: RandomMovement;
end;
end;
Function MineOre:Boolean;
Var
MineCounter: Integer;
Begin
If Not(LoggedIn) Then Exit;
FindNormalRandoms;
PlusOne:= InvCount +1;
x:= MSCX;
y:= MSCY;
If FindObjCustom(x, y, ['Mine','Rocks','e R'], [5017334, 5017076, 5082871, 4818922], 5) Then
Begin
WriteLn('There is ore here.');
GetMousePos(x, y);
Case Random(1) of
0: Mouse(x, y, 5, 5, True);
end;
IncEx(Count, 1);
stats_IncVariable('Iron Ore (Mined)', 1);
Flag;
If Method= 1 Then
Repeat
FindNormalRandoms;
MarkTime(MineCounter);
wait(100);
Antiban;
If InvCount= PlusOne Then
WriteLn('You got ore');
Until (InvCount= PlusOne) OR (TimeFromMark(MineCounter) > 3000);
If Method= 2 Then
end;
end;
//Procedure DropOre;
//By: Hero
//From Hero's Ardy M1D1 script, it is very accurate and precise.
procedure DropOre;// simple and accurate first inventory spot drop loop
begin//Right clicks and drops first inventory slot and adds
MMouse(580, 226, 2, 2);
Mouse(580, 226, 1, 1, false);
Wait(200 + Random(100));
ChooseOption('Drop');
Wait(200 + Random(100));
end;
procedure ProgressReport;
begin
Exp := 17.5;
EPH := Round(((Count * Exp) * 3600.0) / (GetTimeRunning / 1000.0));
ClearDebug;
WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
WriteLn('~~~~~~~~~~~~~ HardRockin Iron Miner ~~~~~~~~~~~~~~');
WriteLn('Time Running: '+ TimeRunning);
WriteLn('Mining EXP: '+ FloatToStr(Count * Exp) + ' ');
WriteLn('Iron Ore Mined : ' + ToStr(Count)+ ' ');
WriteLn('Mining EXP/HR : ' + ToStr(EPH)+ ' ');
WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
FindNormalRandoms;
end;
begin
StartScript;
SetupSRLStats(425, SRLStats_Username, SRLStats_Password);
If Method = 1 then
repeat;
MineOre;
if (InvFull) Then
Begin
DropAll;
end;
ProgressReport;
Stats_Commit;
Until (false);
If Method = 2 then
PlusOne:= InvCount + 1;
repeat
MineOre;
WaitColorGone([5017334, 5017076, 5082871, 4818922], x, y, 5, 15000);
DropOre;
ProgressReport;
Stats_Commit;
if(Invfull) Then
DropAll;
AntiBan;
Until (false);
end.