SRL Archive - MSI Suggestions

Reflection Randoms


Coh3n

2010-12-06 23:55:12

This has been committed. You shouldn't notice any difference in the script, other than the possibility of solving more randoms.

Other changes…
  1. I added RANDOMS_MIN_WAIT const to RunMe.simba, it works exactly the same as ANTIBAN_MIN_WAIT.
  2. If a player gets stuck in a random, it should now say so in the false reason in the progress report.
  3. The MSI Short (Total) Report will now keep track of total randoms solved and total randoms failed.

Index: C:/Simba/Includes/MSI/RunMe.simba
===================================================================
--- C:/Simba/Includes/MSI/RunMe.simba (revision 403)
+++ C:/Simba/Includes/MSI/RunMe.simba (revision 404)
@@ -24,11 +24,12 @@
HUMAN_BREAKING = True; // Take more human like breaks
SWITCH_WORLDS = False; // Switch worlds when switching players or after breaks
ANTIBAN_MIN_WAIT = 14000; // Minimum time to wait between antibans
+ RANDOMS_MIN_WAIT = 10000; // Minimum time to wait between randoms checks

WORLD_SMART = 152;

- STATS_ID = '24'; // Temporary stats ID (2 digit number)
- STATS_PASS = '304002'; // Temporary stats password
+ STATS_ID = ''; // Temporary stats ID (2 digit number)
+ STATS_PASS = ''; // Temporary stats password

{$i MSI/Setup.simba}

@@ -54,16 +55,15 @@
Pin := ''; // Bank pin; leave as '' if player doesn't have one
Active := True; // Use this player?
Member := False; // Is this player a member?
- Location := LOC_POWER_SKILL; // See instructions at the top
- BreakLoads := 0; // Amount of loads before breaking/switching players; leave 0 to not take breaks
- BreakTime := 0; // Amount of time (in minutes) before breaking/witching; leave 0 to not take breaks
- TotalLoads := 0; // Total loads for the player to do; leave 0 if using TotalTime or to go forever
- TotalTime := 0; // How long for the player to run? (in minutes); leave 0 if using TotalLoads or go forever
+ Location := ; // See instructions at the top
+ BreakLoads := ; // Amount of loads before breaking/switching players; leave 0 to not take breaks
+ BreakTime := ; // Amount of time (in minutes) before breaking/witching; leave 0 to not take breaks
+ TotalLoads := ; // Total loads for the player to do; leave 0 if using TotalTime or to go forever
+ TotalTime := ; // How long for the player to run? (in minutes); leave 0 if using TotalLoads or go forever

with Scripts[0] do
begin
- Name := SCRIPT_ALCHER;
- AlchSlots := [2, 3];
+ // Copy/paste the script attributes from the setup thread
end;
end;
{
Index: C:/Simba/Includes/MSI/Walking_Color.simba
===================================================================
--- C:/Simba/Includes/MSI/Walking_Color.simba (revision 403)
+++ C:/Simba/Includes/MSI/Walking_Color.simba (revision 404)
@@ -107,6 +107,7 @@
MSI_FindRandoms;
MSI_AntiBan(RandomRange(200, 800), ANTI_BAN_CHANCE);

+ MSI_SubDebug('Flag distance: '+IntToStr(FlagDistance));
if (FlagDistance <= TOLERANCE_FLAG) or (not IsMoving) then
Exit;
until((not (FlagPresent)) and (not (IsMoving))) or (t < GetSystemTime);
Index: C:/Simba/Includes/MSI/Reports.simba
===================================================================
--- C:/Simba/Includes/MSI/Reports.simba (revision 403)
+++ C:/Simba/Includes/MSI/Reports.simba (revision 404)
@@ -82,7 +82,7 @@
MSI_PrintSave(FileName, '{----------------------------------------------------------------}');
MSI_PrintSave(FileName, '{ }');
MSI_PrintSave(FileName, '{ '+PadR('Totals:', 56)+'}');
- MSI_PrintSave(FileName, '{ - '+PadR('Players: '+IntToStr(HowManyPlayers), 53)+'}');
+ MSI_PrintSave(FileName, '{ - '+PadR('Players: '+IntToStr(HowManyPlayers), 53)+'}');

for i := 0 to High(MSI_Players) do
with MSI_Players[i] do
@@ -112,15 +112,20 @@
end;
end;

- MSI_PrintSave(FileName, '{ - '+PadR('Player Time: '+MsToTime(totals[TOTAL_TIME], TIME_SHORT), 53)+'}');
+ MSI_PrintSave(FileName, '{ - '+PadR('Player Time: '+MsToTime(totals[TOTAL_TIME], TIME_SHORT), 53)+'}');

+ {$IFDEF REFLECTION}
+ MSI_PrintSave(FileName, '{ - '+PadR('Randoms Solved: '+IntToStr(Length(RandomsResult(Result_Randoms_Solved))), 53)+'}');
+ MSI_PrintSave(FileName, '{ - '+PadR('Randoms Failed: '+IntToStr(Length(RandomsResult(Result_Randoms_Failed))), 53)+'}');
+ {$ENDIF}
+
labels := ['', 'Loads:', 'Experience:', 'Logs Chopped:', 'Rocks Mined:', 'Fish Caught:', 'Spells Cast:'];
for i := 0 to High(totals) do
begin
if ((totals[i] <= 0) or (labels[i] = '')) then
Continue;

- MSI_PrintSave(FileName, '{ - '+PadR(PadR(labels[i], 14)+GroupDigits(totals[i], ','), 53)+'}');
+ MSI_PrintSave(FileName, '{ - '+PadR(PadR(labels[i], 17)+GroupDigits(totals[i], ','), 53)+'}');
end;

MSI_PrintSave(FileName, '{ }');
@@ -151,7 +156,7 @@
TheDate(Date_Formal )+ ' at ' + TheTime + #13 + #10);
end;

- //ClearDebug;
+ ClearDebug;
MSI_SetSkillLevels();
MSI_ShortReport(f);

Index: C:/Simba/Includes/MSI/Antiban.simba
===================================================================
--- C:/Simba/Includes/MSI/Antiban.simba (revision 403)
+++ C:/Simba/Includes/MSI/Antiban.simba (revision 404)
@@ -88,11 +88,18 @@
if (not LoggedIn) then
Exit;

+ if (NextRandCheck > GetSystemTime) then
+ Exit;
+
MSI_SubDebug('Scanning for randoms...');

+ {$IFDEF REFLECTION}
+ if (R_FindRandoms) then
+ {$ELSE}
if (FindNormalRandoms) then
+ {$ENDIF}
begin
- MSI_SubDebug('MSI_FindRandoms: Found random event!');
+ MSI_SubDebug('MSI_FindRandoms: Solved Random Event!');
Inc(Stats_CustomVars[STATS_RANDOMS]);
MSI_SendStats;
end;
@@ -104,7 +111,7 @@
MSI_SendStats;
end;

- Wait(RandomRange(1000, 3000)); //to prevent lag on some computers
+ NextRandCheck := GetSystemTime + RANDOMS_MIN_WAIT;
end;

{******************************************************************************}
Index: C:/Simba/Includes/MSI/Mainloop.simba
===================================================================
--- C:/Simba/Includes/MSI/Mainloop.simba (revision 403)
+++ C:/Simba/Includes/MSI/Mainloop.simba (revision 404)
@@ -327,6 +327,9 @@

if (setReason) then
MSI_Players[CurrentPlayer].ReportInfo.FalseReason := reason;
+
+ if (Players[CurrentPlayer].Rand <> '') then
+ MSI_Players[CurrentPlayer].ReportInfo.FalseReason := 'In random: '+Players[CurrentPlayer].Rand;

MSI_ProgressReport;
NextPlayer(False);
Index: C:/Simba/Includes/MSI/Globals.simba
===================================================================
--- C:/Simba/Includes/MSI/Globals.simba (revision 403)
+++ C:/Simba/Includes/MSI/Globals.simba (revision 404)
@@ -41,8 +41,8 @@
BANK_SYMBOL_ACCURACY = 0.45; // The symbol accuracy of the bank
TOLERANCE_FLAG = 15; // The amount of pixels from the flag to player

- ENERGY_MIN = 40;
- ENERGY_MAX = 80;
+ ENERGY_MIN = 0;
+ ENERGY_MAX = 50;

(**
* All of MSI's suppoted script constants; used in player setup
@@ -656,6 +656,8 @@
StaffType : TStaffType;
AlchSlots : TIntegerArray;

+ MaxLevel : Integer; // The skill level you want to stop autoing at
+
// Not setup by the user
Items : array of TIntegerArray;
MaxCasts : TIntegerArray; // Maximum casts for each spell (calculated in MSI_SetupMagic)
@@ -818,11 +820,12 @@
* Miscellaneous variables used throughout the include
*)
var
- CurrentScript : Integer;
- ReflectionBroken : Boolean;
- MSIRev : string;
- ScriptStart : string;
- NextAntiban : Integer;
+ CurrentScript : Integer;
+ ReflectionBroken : Boolean;
+ MSIRev : string;
+ ScriptStart : string;
+ NextAntiban : Integer;
+ NextRandCheck : Integer;

// Temporary array to hopefully increase the amount of random detection (called only in MSI_Relocate)
RelocateAttempts : TIntegerArray;


Cheers,
The MSI Team