OK, got it to wait, now It just repeats the MineOre and WaitFunc. How can I get it too continue???
{/----------------------------------------------------------------------\\
| |
| ~~ [HardRockin] Iron Miner ~~ |
| ~Version: 0.3~ |
| |
| Please Post Progress Reports |
| Because the script is still in Beta please Monitor |
| All Feedback Helps, Good or Bad |
| |
| Features: |
| -Mines iron ore(at any location right now) |
| -Good Antiban |
| -Uses Smart |
| -Stat tracking, and progress reports. |
| -2 Methods, Regular and M1D1 |
| - FASTEST mining exp on a Simba Script. |
| |
| |
| Instructions: |
| -Place Character in a place with Iron ore In Sight |
| -Fill in account information Under Declare Players |
| -Choose A Method Under Const, 1 or 2 |
| -Press Start |
| |
| |
| |
| |
\\----------------------------------------------------------------------//}
program HardRockinYanilleMiner;
{$DEFINE SMART}
{$i SRL\SRL.scar}
{$i sps/sps.simba}
{$i SRL\SRL\Misc\Stats.simba}
Var
Count, PlusOne: Integer;
Exp, EPH: Extended;
Const
SRLStats_Username = '';
SRLStats_Password = '';
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 := '';
Players[0].Pass := '';
Players[0].Nick := '';
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
x,y, 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
Status('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
Status('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;
//Function WaitUntilMined
//By Dynamite
//From his PowerMining Script
function WaitUntilMined: Boolean;
var
t, IC: Integer;
begin
IC := 0;
t := 0;
Status('Walking to Rock');
MarkTime(t);
repeat
Wait(10);
if (TimeFromMark(t) >= 6000) then Exit;
until (not FlagPresent) and FindBlackChatMessage('u swi');
Status('Mining Rock');
IC := InvCount;
t := 0;
MarkTime(t);
repeat
Wait(10);
if (TimeFromMark(t) >= 12000) then Exit;
Wait(750); //was 500
if IC <> InvCount then
Break;
until (FindBlackChatMessage('anage'));
Result := True;
end;
procedure ProgressReport;
begin
Exp := 35;
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
repeat
MineOre;
WaitFunc(@WaitUntilMined, (500 + Random(500)), 15000);
Continue;
DropOre;
ProgressReport;
Stats_Commit;
if(Invfull) Then
Begin
DropAll;
AntiBan;
End;
Until (false);
end.