4.3 Mormonman
Technique (66/100)
[INDENT]
+ Limited use of Global variables
+ DDTM Walking
+ Random Left or Right clicking on the rock to start mining - good antiban.
- Need more failsafes for walking using symbols. Failsafes are backups for when things go wrong (such as when the symbol is covered or when the DDTM failed, etc).
- FindShopKeeper fails to use it's own parameter's.
- DDTM's could have all been declared shorter and more simple.
Statements like this:
if not (Result) then
begin
Exit;
end;
Can be better written like this:
if no (Result) then
Exit;
There is no need for a begin..end nest if you are only doing one action.
[/INDENT]
Individuality (68/100)
[INDENT]
+ Uses SRL extra's such as Path.scar and NewAutoColor.scar. Good job.
- You didn't create your own autocolor functions, you just relied on ACA to do it for you.
[/INDENT]
Follows all SRL rules (60/100)
[INDENT]
+ Frees all dtms.
+ Has LoggedIn checks in all functions.
- Multiplayer does not work - you do not call NextPlayer at all in your main loop.
- Possible infinite loops:
repeat
if FindShopKeeper(x,y) then
begin
Mouse(x, y, 1, 1, False);
Wait(300+random(100));
ChooseOption('rade');
Wait(3000);
if FindDTM(OreDTM,x,y,mix1,miy1,mix2,mix2) then
begin
Mouse(x,y,3,3,false);
Wait(300+random(100));
ChooseOption('ell 50');
end;
if FindDTM(ClayDTM,x,y,mix1,miy1,mix2,mix2) then
begin
Mouse(x,y,3,3,false);
Wait(300+random(100));
ChooseOption('ell 50');
end;
Mouse(485,42,7,7,true);
end;
until not FindDTM(OreDTM,x,y,mix1,miy1,mix2,mix2);
If for example FindShopKeeper broke, the script would keep looping until the OreDTM disappeared which of course won't happen if you're not able to sell it.
Also,
repeat
WalkPath(0);
FFlag(0);
until (FindPath(1, True));
If FindPath() fails the character will keep trying to click on path 0 ad infinitum.
- Missing some begins and ends after if then statements. Eg:
if MakeCompass('N') then
begin
if FindSymbol(x, y, 'portal') then
Mouse(x, y, 3, 3, True);
FFlag(0);
LoadS2M;
WalkPath(2);
if DTMRotated(DTM, x, y, mmx1, mmy1, mmx2, mmy2) then
begin
Mouse(x, y, 1, 1, true);
Flag;
Wait(1000+random(500));
end;
Writeln(' Walk To Mine. - Complete.');
Result := True;
Notice how after if FindSymbol(x, y, 'portal') then you don't have a begin. This means only the Mouse() will depend on FindSymbol(). The rest will be executed regardless if whether the portal symbol was found or not.
[/INDENT]
Creativity (68/100)
[INDENT]
- Nothing really creative. The progress report is just plain and over 400 lines of your script are DDTMs.
[/INDENT]
Efficiency (64/100)
[INDENT]
+ Used one DTM to find all ores rather than 4 or 5 separate DTMs.
- Lots of long waits which slow your script down.
- Many functions could be combined/shortened.
- DDTM declarations take up a great deal of your scripts. You could perhaps shorten it down a bit but not by much.
- Script isn't finished.[/INDENT]
Presentation (21/100)
[INDENT]
+ Standards are acceptable however it gets messy in places - mostly incorrect nesting which makes it harder for you to see where you need Begins and Ends. Overall your standards could be improved a great deal.
+ Some commenting.
- No script intro/header/description.
- Very basic progress report.
- Repetitive coding - you tend to copy and paste functions or parts of functions when it isn't required.
Eg.
Case lowercase(Ore) of
'iron' : begin
RockDTM := LoadRockWalk('iron');
if DTMRotated(RockDTM, x, y, mmx1, mmy1, mmx2, mmy2) then
begin
Mouse(x, y, 1, 1, true);
FFlag(0);
Result := True;
Writeln('RockWalk Done');
end else
begin
Result := False;
Writeln('RockWalk failed');
end;
end;
'copper' : begin
if FindSymbol(x, y, 'mining spot') then
Mouse(x, y, 1, 1, true);
FFlag(0);
RockDTM := LoadRockWalk('copper');
if DTMRotated(RockDTM, x, y, mmx1, mmy1, mmx2, mmy2) then
begin
Mouse(x, y, 1, 1, true);
FFlag(0);
Result := True;
Writeln('RockWalk Done');
end else
begin
Result := False;
Writeln('RockWalk failed');
end;
end;
'tin' : begin
if FindSymbol(x, y, 'mining spot') then
Mouse(x, y, 1, 1, true);
FFlag(5);
RockDTM := LoadRockWalk('tin');
if DTMRotated(RockDTM, x, y, mmx1, mmy1, mmx2, mmy2) then
begin
Mouse(x, y, 1, 1, true);
FFlag(0);
Result := True;
Writeln('RockWalk Done');
end else
begin
Result := False;
Writeln('RockWalk failed');
end;
end;
'gold' : begin
RockDTM := LoadRockWalk('gold');
if DTMRotated(RockDTM, x, y, mmx1, mmy1, mmx2, mmy2) then
begin
Mouse(x, y, 1, 1, true);
FFlag(0);
Result := True;
Writeln('RockWalk Done');
end else
begin
Result := False;
Writeln('RockWalk failed');
end;
end;
'clay' : begin
if FindSymbol(x, y, 'mining spot') then
Mouse(x, y, 1, 1, true);
FFlag(0);
RockDTM := LoadRockWalk('clay');
if DTMRotated(RockDTM, x, y, mmx1, mmy1, mmx2, mmy2) then
begin
Mouse(x, y, 1, 1, true);
FFlag(0);
Result := True;
Writeln('RockWalk Done');
end else
begin
Result := False;
Writeln('RockWalk failed');
end;
end;
end;
Is there a reason why you can't replace all that with this:
begin
if FindSymbol(x, y, 'mining spot') then
Mouse(x, y, 1, 1, true);
FFlag(0);
RockDTM := LoadRockWalk(Lowercase(ore)); //NOTE HERE
if DTMRotated(RockDTM, x, y, mmx1, mmy1, mmx2, mmy2) then
begin
Mouse(x, y, 1, 1, true);
FFlag(0);
Result := True;
Writeln('RockWalk Done');
end else
begin
Result := False;
Writeln('RockWalk failed');
end;
end;
[/INDENT]
Meeting all Requirements (0/100)
[INDENT]
- Pretty much ok except your multiplayer features are non-existant. Therefore I'd say no you haven't met the requirements.[/INDENT]
Added Extras (26/100)
[INDENT]
+ Able to mine Clay also. But nothing else apart from that.
[/INDENT]
Total Score: (373 / 800) = 46.63%