Dynamite
2012-01-04 14:06:23
I don't understand the application standards anymore…
This script didn't get in:
Which includes TPAs, standards and a range of object finding techniques.
But this is tied and might get it:
Can someone explain exactly what we are looking for?
It seems nobody knows….
Thanks
-Boom
This script didn't get in:
{*******************************************************************************
Granite Miner
by ForgotMyName
public release
revision 1
This script will power mine granite in the kharidian desert quarry.
Setup:
Adjust constants as necessary.
Fill in account info under DeclarePlayers.
Start logged out in the northern part of the desert quarry.
Wear desert clothing.
Either wear an enchanted tiara, or carry 2+ waterskins and humidify runes.
Keep everything you do not want dropped (picks, runes, skins, etc)
within the first 4 rows of your inventory.
Revision history:
1: Initial release.
*******************************************************************************}
program GraniteMiner;
{$i SRL\SRL.scar}
const
NumbOfPlayers = 1; //single player script
StartPlayer = 0; //do not change these lines
RockColor = 6458286; //granite color (careful, no fence/dropped ore colors)
RockTol = 2;
RockRadius = 5;
MouseTol = 2;
BitmapTol = 3;
MineWait = 7000;
UseHumidify = True; //true if humidifying, false if wearing tiara
RunLimit = 120; //time in mins to run
var
HumidifyBitmap: Integer;
ScriptStartMark: Integer;
LastHumidifyMark: Integer;
{*******************************************************************************
procedure DeclarePlayers;
By: SRL
Description: SRL's Player Setup
*******************************************************************************}
procedure DeclarePlayers;
var i:integer;
begin
NumberOfPlayers(NumbOfPlayers);
CurrentPlayer := StartPlayer;
for i := 0 to NumbOfPlayers-1 do
Players[i].BoxRewards := ['ithril', 'oal', 'une', 'oins'];
with Players[0] do
begin
Name := '---------------'; //Player username.
Pass := '-------------'; //Player password.
Nick := '---'; //Player nickname - 3-4 letters of Player username.
Active := True;
end;
end;
{*******************************************************************************
procedure SetUpScript
By: ForgotMyName
Description: Initialize SRL, script data, etc
*******************************************************************************}
procedure SetUpScript;
begin
HumidifyBitmap := BitmapFromString(15, 8, 'meJxNj7sNgEAMQ0NxC9DSsBVr0DM' +
'EkyBdzQD0t9AJS0+yLLlInJff6O291+fcpOvY51fS6E0xpqqY+MCQ' +
'ipH5NGkB9goGuj1Nt3h1LiLVIsktiuGRD/DAfI35xDmZEqYfATZp3' +
'ilV7klyqUreH/0DU50c');
MarkTime(ScriptStartMark);
MarkTime(LastHumidifyMark);
ActivateClient;
MakeCompass('n');
SetAngle(True);
end;
{*******************************************************************************
procedure TakeDownScript
By: ForgotMyName
Description: Frees resources, cleans up
*******************************************************************************}
procedure TakeDownScript;
begin
FreeBitmap(HumidifyBitmap);
end;
{*******************************************************************************
procedure BailOut
By: ForgotMyName
Description: If we get here, something horrible broke. Log out, terminate.
*******************************************************************************}
procedure BailOut;
begin
Logout;
Logout;
TerminateScript;
end;
{*******************************************************************************
function FindRock: Boolean
By: ForgotMyName
Description: Find a granite rock and mouse over it
Returns: True if rock found and mouse at rock, false if failed
*******************************************************************************}
function FindRock: Boolean;
var RockPoints: TPointArray;
RockSplits: T2DPointArray;
I, H, X1, Y1: Integer;
begin
SetColorToleranceSpeed(1);
if not (FindColorsSpiralTolerance(MSCX, MSCY, RockPoints, RockColor, MSX1, MSY1, MSX2, MSY2, 3)) then
begin
WriteLn('Could not find rock color on mainscreen!');
Result := False;
Exit;
end;
RockSplits := TPAtoATPA(RockPoints, RockRadius);
H := High(RockSplits);
for I := 0 to H do
begin
MiddleTPAEx(RockSplits[I], X1, Y1);
MMouse(X1, Y1, MouseTol, MouseTol);
Wait(50 + Random(100));
if IsUpText('ine') then
begin
Result := True;
Exit;
end;
end;
Result := False;
end;
{*******************************************************************************
function MineRock: Boolean
By: ForgotMyName
Description: Mine a rock, click and wait
Precondition: Mouse is over the rock we want
Returns: True if we believe we succeeded, false otherwise
*******************************************************************************}
function MineRock: Boolean;
var X1, Y1, ClickedTime: Integer;
begin
GetMousePos(X1, Y1);
MMouse(X1, Y1, 0, 0);
Wait(50 + Random(100));
if not IsUpText('ine') then
begin
Result := False;
Exit;
end;
Mouse(X1, Y1, 0, 0, True);
Flag;
Wait(500 + Random(100));
MarkTime(ClickedTime);
repeat
Wait(500 + Random(100));
if (TimeFromMark(ClickedTime) > MineWait) then
begin
Result := False;
Exit;
end;
until InChat('quarry');
Result := True;
Wait(200 + Random(500));
end;
{*******************************************************************************
procedure ClearSpace;
By: ForgotMyName
Description: Clear inventory space, drop everything in last 3 rows
*******************************************************************************}
procedure ClearSpace;
var I: Integer;
begin
for I := 17 to 28 do
begin
DropItem(I);
Wait(100 + Random(100));
end;
Wait(500 + Random(100));
end;
{*******************************************************************************
procedure LunarHumidify;
By: ForgotMyName
Description: Cast humidify
*******************************************************************************}
procedure LunarHumidify;
var X1, Y1: Integer;
begin
GameTab(tab_Magic);
Wait(50 + Random(100));
if not FindBitmapToleranceIn(HumidifyBitmap, X1, Y1, MIX1, MIY1, MIX2, MIY2, BitmapTol) then
begin
Writeln('Could not find Lunar humidify!');
end;
MMouse(X1, Y1, MouseTol, MouseTol);
if not IsUpText('umid') then
begin
Writeln('Humidify uptext missing!');
end;
Mouse(X1, Y1, MouseTol, MouseTol, True);
Wait(6000 + Random(500));
end;
{*******************************************************************************
procedure RecenterMine;
By: ForgotMyName
Description: Walk to mine center, failsafe, then move to north rocks
*******************************************************************************}
procedure RecenterMine;
var X1, Y1: Integer;
begin
MakeCompass('n');
SetAngle(True);
if not FindSymbol(X1, Y1, 'mine') then
begin
Writeln('Could not find mining symbol!');
BailOut;
end;
Mouse(X1, Y1, MouseTol, MouseTol, True);
Flag;
Wait(1000 + Random(500));
//the northern rocks are better
//more availability, less stickage
//todo: better than blind click?
Mouse(630, 60, MouseTol, MouseTol, True);
Flag;
Wait(1000 + Random(500));
end;
{*******************************************************************************
procedure MainLoop;
By: ForgotMyName
Description: Main script loop
*******************************************************************************}
procedure MainLoop;
var Health: String;
MinedNow, ToMine, FindFails: Integer;
Done: Boolean;
begin
repeat
FindNormalRandoms;
GetMMLevels('health', Health);
if (Health = 'Red') or (Health = 'Orange') then
begin
Writeln('Dying!');
BailOut;
end;
if InvCount > 20 then
begin
ClearSpace;
end;
if (UseHumidify and (TimeFromMark(LastHumidifyMark) > (10 * 60000))) then
begin
LunarHumidify;
MarkTime(LastHumidifyMark);
end;
MinedNow := 0;
FindFails := 0;
ToMine := 5 + Random(3);
repeat
FindNormalRandoms;
if FindRock then
begin
MineRock;
end
else begin
FindFails := FindFails + 1;
end;
if FindFails > 3 then
begin
RecenterMine;
end;
MinedNow := MinedNow + 1;
until MinedNow >= ToMine;
until TimeFromMark(ScriptStartMark) > (RunLimit * 60000);
Writeln('Done!');
BailOut;
end;
{... and finally ...}
begin
SetUpSRL;
DeclarePlayers;
LoginPlayer;
SetUpScript;
Wait(2000 + Random(500));
MainLoop;
LogOut;
TakeDownScript;
end.Which includes TPAs, standards and a range of object finding techniques.
But this is tied and might get it:
{/----------------------------------------------------------------------\\
| |
| ~~ [HardRockin] Iron Miner ~~ |
| ~Version: 0.5~ |
| |
| 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. | - Banking
| -Banking (only at yanille 3 iron ore spot |
| |
| Instructions: |
| -Place Character in a place with Iron ore In Sight |
| -Fill in account information Under Declare Players |
| -Choose A Method Under Const, 1,2 or 3 |
| -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.5'; //NO TOUCHY!
Method= 3;//For regular drop use 1, for M1D1 use 2, for Banking use 3
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 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'], [2832738, 2502212, 2701150,2371667], 5) Then
Begin
WriteLn('There is ore here.');
GetMousePos(x, y);
Mouse(x, y, 2, 2, True);
IncEx(Count, 1);
stats_IncVariable('Iron Ore (Mined)', 1);
Flag;
Case(Method) of
1: Repeat
FindNormalRandoms;
MarkTime(MineCounter);
wait(100);
Antiban;
If InvCount= PlusOne Then
WriteLn('You got ore');
Until (InvCount= PlusOne) OR (TimeFromMark(MineCounter) > 3000);
2: Repeat
FindNormalRandoms;
MarkTime(MineCounter);
wait(100);
If InvCount= PlusOne Then
WriteLn('You got ore');
Until (InvCount= PlusOne) OR (TimeFromMark(MineCounter) > 3000);
3:Repeat
FindNormalRandoms;
MarkTime(MineCounter);
wait(100);
Antiban;
If InvCount= PlusOne Then
WriteLn('You got ore');
Until (InvCount= PlusOne) OR (TimeFromMark(MineCounter) > 3000);
end;
end;
end;
//Function Walking
//By Camaro'
//Uses a combination of coordinates and color to walk using the MM.
Function Walking(Color, Tolerance: Integer; SortFrom: tpoint): Boolean;
var
i, x, y, rx, ry: Integer;
TPA: TPointArray;
begin
if not LoggedIn then Exit;
FindNormalRandoms;
FindColorsSpiralTolerance(MMCX, MMCY, TPA, Color, MMX1, MMY1, MMX2, MMY2, Tolerance);
SortTPAFrom(TPA, SortFrom);
for i := 0 to High(TPA) do
begin
x := TPA[i].x;
y := TPA[i].y;
rx := RandomRange(-6, 6);
ry := RandomRange(-6, 6);
if (not rs_OnMinimap(x + rx, y + ry)) then
Continue;
Mouse(x + rx, y + ry, 0, 0, true);
FFlag(0);
Wait(200 + Random(500));
Result := True;
Break;
end;
end;
Procedure WalkToBank;
Begin
if not LoggedIn then Exit;
FindNormalRandoms;
ClickNorth(True);
Walking(2920289, 20, Point(619, 152));
Flag;
Walking(2985828, 20, Point(596, 143));
Flag;
Walking(7302775, 20, Point(597, 127));
Flag;
Walking(14474724, 20, Point(628, 130));
Openbank('ynb', False,True);
DepositAll;
CloseBank;
End;
Procedure WalkToIron;
Begin
if not LoggedIn then Exit;
FindNormalRandoms;
ClickNorth(True);
Walking(6580843, 10, Point(640, 48));
Flag;
Walking(2918254, 10, Point(646, 21));
Flag;
Walking(2390608, 10, Point(662, 26));
Flag;
Walking(2837593, 10, Point(633, 73));
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 := 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;
Procedure Method1;
Begin
if not LoggedIn then Exit;
FindNormalRandoms;
repeat
repeat;
MineOre;
Until (InvFull);
DropAll;
ProgressReport;
Stats_Commit;
Until (NoT Loggedin);
End;
Procedure Method2;
Var
MineCounter: Integer;
Begin
if not LoggedIn then Exit;
FindNormalRandoms;
PlusOne:= InvCount + 1;
repeat
repeat
MineOre;
Repeat
FindNormalRandoms;
MarkTime(MineCounter);
wait(100);
If InvCount= PlusOne Then
WriteLn('You got ore');
Until (InvCount= PlusOne) OR (TimeFromMark(MineCounter) > 3000);
DropOre;
ProgressReport;
Stats_Commit;
Until (InvFull);
if(Invfull) Then
DropAll;
AntiBan;
Until (Not LoggedIn);
End;
Procedure Method3;
Begin
if not LoggedIn then Exit;
FindNormalRandoms;
Repeat
Repeat
MineOre;
ProgressReport;
Until (InvFull);
WalkToBank;
WalkToIron;
Stats_Commit
Until (Not LoggedIn);
End;
begin
StartScript;
SetupSRLStats(425, SRLStats_Username, SRLStats_Password);
Case(Method) of
1:Method1;
2:Method2;
3:Method3;
end;
end.Can someone explain exactly what we are looking for?
It seems nobody knows….
Thanks
-Boom