That's weird. I was out of the house all day today, and it looks like it may be similar tomorrow. We can just look at the .diff for revision 259 and see if there's anything that jumps out.
E: It's too late, I have to go to bed. Here's what I've tried, and nothing's worked.
- Setting ENABLE_REMOTE to False.
- Disabling the Player Remote extension altogether.
- Uncommenting the try statements in the INI functions (committed).
- Reverting MSI_TrackObject back to exactly how it was in Revision 258.
- Tried with woodcutting and mining.
- Tested the Remote and INI functions several times without errors.
Here's the .diff if someone else wants to take a look.
Index: C:/Simba/Includes/SRL/SRL/msi/Debug.simba
===================================================================
--- C:/Simba/Includes/SRL/SRL/msi/Debug.simba (revision 258)
+++ C:/Simba/Includes/SRL/SRL/msi/Debug.simba (revision 259)
@@ -28,6 +28,7 @@
procedure MSI_Debug(debug: string);
var
DebugMSG, path, str: string;
+ theFile: Integer;
begin
//Status(debug);
Index: C:/Simba/Includes/SRL/SRL/msi/RunMe.simba
===================================================================
--- C:/Simba/Includes/SRL/SRL/msi/RunMe.simba (revision 258)
+++ C:/Simba/Includes/SRL/SRL/msi/RunMe.simba (revision 259)
@@ -22,8 +22,8 @@
const
BREAK_TIME = 15; // Single player only - how long to break for (in minutes)
- SAVE_DEBUG = False; // Save's the debug box text to a file
- ENABLE_REMOTE = False; // Do you want to enable the Player Remote?
+ SAVE_DEBUG = True; // Save's the debug box text to a file
+ ENABLE_REMOTE = True; // Do you want to enable the Player Remote?
LEVEL_TO_DEBUG = 10; // The lower the number, the less the script will debug
WORLD_SMART = 152;
@@ -51,11 +51,11 @@
Pin := ''; // Bank pin; leave as '' if player doesn't have one
Active := True; // Use this player?
Member := False; // Is this player a member?
- Location := ; // See instructions at the top
+ Location := 0; // See instructions at the top
Scripts := []; // See instructions at the top
Objects := [[]]; // See instructions at the top
Loads[0] := 0; // Amount of loads before breaking/switching players
- Loads[1] := 999; // Total loads for the player to do
+ Loads[1] := 0; // Total loads for the player to do
end;
{
with MSI_Players[1] do
@@ -203,9 +203,6 @@
ReflectionBroken := True; // Set to true because it's not even being used
{$ENDIF}
- if (ReflectionBroken) then
- Writeln('** REFLECTION HOOKS OUTDATED **');
-
LevelToDebug := LEVEL_TO_DEBUG;
BreakTime := BREAK_TIME;
SaveDebug := SAVE_DEBUG;
@@ -214,9 +211,9 @@
Stats_UserID := STATS_ID;
Stats_Password := STATS_PASS;
Stats_ScriptID := '47';
+ CurrDebugLevel := 1;
DeclarePlayers;
- RewriteFile(IncludePath + 'SRL/SRL/msi/Player.INI', False);
MSI_Mainloop;
end.
Index: C:/Simba/Includes/SRL/SRL/msi/Objects.simba
===================================================================
--- C:/Simba/Includes/SRL/SRL/msi/Objects.simba (revision 258)
+++ C:/Simba/Includes/SRL/SRL/msi/Objects.simba (revision 259)
@@ -712,6 +712,9 @@
Begin
If (Not LoggedIn) Then Exit;
+ try
+ MSI_AddHeader('MSI_FindObjectsTPA');
+
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(MSI_Objects[objID].Hue, MSI_Objects[objID].Sat);
@@ -731,7 +734,7 @@
For I := 0 To H Do
If (Length(ATPA) < 1) Then
Begin
- MSI_SubDebug('MSI_FindObjectsTPA: All colors weren''t found!');
+ MSI_Debug('All colors weren''t found!');
Objs := [];
Exit;
End;
@@ -741,7 +744,7 @@
If (Length(TPA) < MSI_Objects[objID].Accuracy) Then
Begin
- MSI_SubDebug('MSI_FindObjectsTPA: No colors found!');
+ MSI_Debug('No colors found!');
Objs := [];
Exit;
End;
@@ -781,7 +784,7 @@
If MSI_Objects[objID].Anim Then
If (Not Animating2[I]) Then
Begin
- MSI_SubDebug('MSI_FindObjectsTPA: Not animating!');
+ MSI_Debug('Not animating!');
BadPoint := True;
End;
@@ -790,7 +793,7 @@
If MSI_Objects[objID].ExcludeSelf Then
If PointInBox(TPA[I], Box) Then
Begin
- MSI_SubDebug('MSI_FindObjectsTPA: Own character!');
+ MSI_Debug('Own character!');
BadPoint := True;
End;
@@ -798,7 +801,7 @@
If (Not BadPoint) Then
If ((TPA[I].X + TPA[I].Y) < 1) Then
Begin
- MSI_SubDebug('MSI_FindObjectsTPA: Invalid point!');
+ MSI_Debug('Invalid point!');
BadPoint := True;
End;
@@ -806,7 +809,7 @@
If (Not BadPoint) Then
If (Length(ATPA[I]) < MSI_Objects[objID].Accuracy) Then
Begin
- MSI_SubDebug('MSI_FindObjectsTPA: Not enough points!');
+ MSI_Debug('Not enough points!');
BadPoint := True;
End;
@@ -817,7 +820,7 @@
MSI_Debug('Looking for bad color: '+IntToStr(MSI_Objects[objID].BadColors[II]));
If FindColorSpiralTolerance(TMP, TMP, MSI_Objects[objID].BadColors[II], TPA[I].X - (MSI_Objects[objID].W / 2), TPA[I].Y - (MSI_Objects[objID].H / 2), TPA[I].X + (MSI_Objects[objID].W / 2), TPA[I].Y + (MSI_Objects[objID].H / 2), MSI_Objects[objID].BadColorTolerance) Then
Begin
- MSI_SubDebug('MSI_FindObjectsTPA: Bad color found!');
+ MSI_Debug('Bad color found!');
BadPoint := True;
Break;
End;
@@ -831,7 +834,7 @@
TempTPA := MSI_ReturnPointsInBox(ATPA[II], IntToBox(TPA[I].X - (MSI_Objects[objID].W / 2), TPA[I].Y - (MSI_Objects[objID].H / 2), TPA[I].X + (MSI_Objects[objID].W / 2), TPA[I].Y + (MSI_Objects[objID].H / 2)));
If (Length(TempTPA) < 1) Then
Begin
- MSI_SubDebug('MSI_FindObjectsTPA: All colors weren''t found!');
+ MSI_Debug('All colors weren''t found!');
BadPoint := True;
Break;
End;
@@ -846,7 +849,9 @@
End;
Result := (Length(Objs) > 0);
- MSI_Debug('MSI_FindObjectsTPA: ' + BoolToStr(Result));
+ finally
+ MSI_CloseHeader('MSI_FindObjectsTPA: ' + BoolToStr(Result));
+ end;
End;
@@ -859,7 +864,7 @@
function MSI_TrackObject(ObjID: integer): boolean;
var
TPA: TPointArray;
- CTS, T, CurrentLevel: integer;
+ CTS, T: integer;
B: TBox;
Previous: TPoint;
begin
@@ -869,22 +874,6 @@
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(MSI_Objects[ObjID].Hue, MSI_Objects[ObjID].Sat);
- {ensures we have started moving}
- //RM - why do we waste time on this...?
- {
- T := GetSystemTime + 3000;
- while (GetSystemTime < T) do
- begin
- if (FlagPresent) or (IsMoving) then
- Break;
- Wait(20);
- end;
- }
-
- //to avoid an awful lot of debugs
- CurrentLevel := CurrDebugLevel;
- CurrDebugLevel := LevelToDebug + 1;
-
//Preparing vars for loop
Previous := Point(MSI_Objects[ObjID].X, MSI_Objects[ObjID].Y);
T := GetSystemTime + 30000;
@@ -896,7 +885,6 @@
if MSI_FindObjectsTPA(TPA, ObjID, B) then
MiddleTPAEx(TPA, MSI_Objects[ObjID].X, MSI_Objects[ObjID].Y)
else begin
- CurrDebugLevel := CurrentLevel;
MSI_SubDebug('Lost track of object');
Result := false;
break;
@@ -911,10 +899,8 @@
Previous := Point(MSI_Objects[ObjID].X, MSI_Objects[ObjID].Y);
Wait(5);
- until (T < GetSystemTime)
+ until (T < GetSystemTime);
- CurrDebugLevel := CurrentLevel;
-
SetColorSpeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(2);
end;
Index: C:/Simba/Includes/SRL/SRL/msi/Extensions/msi_player_remote.sex
===================================================================
--- C:/Simba/Includes/SRL/SRL/msi/Extensions/msi_player_remote.sex (revision 258)
+++ C:/Simba/Includes/SRL/SRL/msi/Extensions/msi_player_remote.sex (revision 259)
@@ -4,6 +4,8 @@
* [url]http://villavu.com/forum/forumdisplay.php?f=313[/url]
*
* - Coh3n
+ *
+ * - This extension was last updated 07 September 2010 by Coh3n
*)
program MSI_Player_Remote;
@@ -35,6 +37,8 @@
SKILL_SUMMONING = 23;
SKILL_DUNGEONEERING = 24;
+ PLAYER_TXT_PATH = IncludePath + 'SRL\SRL\MSI\Player.txt';
+
function MSI_MirrorTPA(TPA: TPointArray): TPointArray;
var
i, h: integer;
@@ -94,15 +98,15 @@
for i:=0 to High(Playersss) do
with Playersss[i] do
begin
- Active:= StrToBool(ReadINI(IntToStr(i), 'Active', IncludePath+'SRL\SRL\MSI\Player.INI'));
- Location:= MSI_Locations[StrToInt(ReadINI(IntToStr(i), 'Location', IncludePath+'SRL\SRL\MSI\Player.INI'))].Name;
+ Active:= StrToBool(ReadINI(IntToStr(i), 'Active', PLAYER_TXT_PATH));
+ Location:= MSI_Locations[StrToInt(ReadINI(IntToStr(i), 'Location', PLAYER_TXT_PATH))].Name;
- LengthOfScripts:= StrToInt(ReadINI(IntToStr(i), 'ScriptAmount', IncludePath+'SRL\SRL\MSI\Player.INI'));
+ LengthOfScripts:= StrToInt(ReadINI(IntToStr(i), 'ScriptAmount', PLAYER_TXT_PATH));
SetLength(Scripts, LengthOfScripts);
for j := 0 to High(Scripts) do
- Scripts[j]:= MSI_Scripts[StrToInt(ReadINI(IntToStr(i), 'Script'+IntToStr(j), IncludePath+'SRL\SRL\MSI\Player.INI'))].Name;
+ Scripts[j]:= MSI_Scripts[StrToInt(ReadINI(IntToStr(i), 'Script'+IntToStr(j), PLAYER_TXT_PATH))].Name;
end;
end;
@@ -136,17 +140,17 @@
i, x, j: Integer;
Begin
WriteLn('Saving!');
- WriteINI('Changed', 'Changed', 'True', IncludePath+'SRL\SRL\MSI\Player.INI');
+ WriteINI('Changed', 'Changed', 'True', PLAYER_TXT_PATH);
for i:=0 to High(Playersss) do
begin
- WriteINI(IntToStr(i), 'Active', BoolToStr(ActiveBox[i].Checked), IncludePath+'SRL\SRL\MSI\Player.INI');
+ WriteINI(IntToStr(i), 'Active', BoolToStr(ActiveBox[i].Checked), PLAYER_TXT_PATH);
for x:=0 to High(MSI_Locations) do
if MSI_Locations[x].Name = Location[i].Text then
- WriteINI(IntToStr(i), 'Location', IntToStr(MSI_Locations[x].Constant), IncludePath+'SRL\SRL\MSI\Player.INI');
+ WriteINI(IntToStr(i), 'Location', IntToStr(MSI_Locations[x].Constant), PLAYER_TXT_PATH);
{for x:=0 to High(MSI_Scripts) do
for j:=0 to High(Script[i]) do
if MSI_Scripts[x].Name = Script[i][j].Text then
- WriteINI(IntToStr(i), 'Script'+IntToStr(j), IntToStr(MSI_Scripts[x].Constant), IncludePath+'SRL\SRL\MSI\Player.INI');}
+ WriteINI(IntToStr(i), 'Script'+IntToStr(j), IntToStr(MSI_Scripts[x].Constant), PLAYER_TXT_PATH);}
end;
frmDesign.ModalResult:= mrOk;
End;
@@ -319,7 +323,7 @@
begin
//MSI_LoadAllScripts;
MSI_LoadAllLocations;
- HowManyPlayerss:= StrToInt(ReadINI('HowMany', 'HowMany', IncludePath+'SRL\SRL\MSI\Player.INI'));
+ HowManyPlayerss:= StrToInt(ReadINI('HowMany', 'HowMany', PLAYER_TXT_PATH));
if (HowManyPlayerss>-1) then
begin
Writeln('Opening Player Remote');
Index: C:/Simba/Includes/SRL/SRL/msi/Skills/Woodcutting.simba
===================================================================
--- C:/Simba/Includes/SRL/SRL/msi/Skills/Woodcutting.simba (revision 258)
+++ C:/Simba/Includes/SRL/SRL/msi/Skills/Woodcutting.simba (revision 259)
@@ -37,7 +37,7 @@
{******************************************************************************}
{ Procedure WaitWhileChopping(TreeX, TreeY: Integer; TreeInfo: TMSObject); }
{ By: marpis }
-{ Date: 11 July 2010 }
+{ Date: 07 September 2010 }
{ Description: Wait while tree's been cut }
{******************************************************************************}
Procedure MSI_WaitWhileChopping(TreeID: integer);
@@ -100,7 +100,10 @@
Repeat
R := RandomRange(Tab_Combat, Tab_Notes);
Until(R <> CT);
- GameTab(R);
+
+ if (R <> tab_Diary) then
+ GameTab(R);
+
Wait(RandomRange(500, 1000));
GameTab(tab_Inv);
End;
Index: C:/Simba/Includes/SRL/SRL/msi/Antiban.simba
===================================================================
--- C:/Simba/Includes/SRL/SRL/msi/Antiban.simba (revision 258)
+++ C:/Simba/Includes/SRL/SRL/msi/Antiban.simba (revision 259)
@@ -11,12 +11,12 @@
{******************************************************************************}
{ Procedure MSI_AntiBan(HowLong, ChancePerc: Integer); }
{ By: Naum }
-{ Date: 10 June 2010 }
+{ Date: 07 September 2010 }
{ Description: The AntiBan procedure to be used throughout the scripts. }
{******************************************************************************}
Procedure MSI_AntiBan(HowLong, ChancePerc: Integer);
Var
- CurTab, I, Time : Integer;
+ RanTab, I, Time : Integer;
Begin
if (Random(100) > ChancePerc) then
Exit;
@@ -27,10 +27,11 @@
Case Random(3) Of
0 : SleepAndMoveMouse(HowLong + Random(HowLong/10));
1 : Begin
- CurTab := GetCurrentTab;
- GameTab(RandomRange(TAB_Combat, TAB_LogOut));
+ RanTab := RandomRange(TAB_Combat, TAB_LogOut);
+ if (RanTab <> tab_Diary) then
+ GameTab(RanTab);
Wait(HowLong + Random(HowLong/10));
- GameTab(CurTab);
+ GameTab(tab_Inv);
End;
2 : RandomRClick;
End;
@@ -68,8 +69,6 @@
end;
end;
End;
-
- GameTab(tab_Inv); // For inventory checks in the skills functions
End;
{******************************************************************************}
@@ -83,7 +82,7 @@
if (not LoggedIn) then
Exit;
- MSI_SubDebug('Scanning for randoms...');
+ MSI_Debug('Scanning for randoms...');
if (FindNormalRandoms) then
begin
Index: C:/Simba/Includes/SRL/SRL/msi/Mainloop.simba
===================================================================
--- C:/Simba/Includes/SRL/SRL/msi/Mainloop.simba (revision 258)
+++ C:/Simba/Includes/SRL/SRL/msi/Mainloop.simba (revision 259)
@@ -111,7 +111,7 @@
gameTabs, FishingTool: TIntegerArray;
script: TScript;
begin
- try MSI_AddHeader('MSI_SetupPlayer');
+ MSI_AddHeader('MSI_SetupPlayer');
if (not LoggedIn) then
LoginPlayer;
@@ -138,6 +138,7 @@
if (MSI_FindTool(k, gameTabs[j], x, y)) then
begin
Result := True;
+ MSI_CloseHeader('MSI_SetupPlayer: ' + BoolToStr(Result));
Exit;
end;
@@ -146,11 +147,10 @@
begin
if (script.BankType = NoBank) then
begin
- MSI_Debug('Failed to find required tool');
+ MSI_CloseHeader('MSI_SetupPlayer: ' + BoolToStr(Result));
Exit;
end;
-
if (MSI_OpenBank(Script.WhichBank, MSI_Players[CurrentPlayer].Pin)) then
for k := bestTool downto worstTool do
if (MSI_Withdraw([k], [1])) then
@@ -184,7 +184,7 @@
begin
if (script.BankType = NoBank) then
begin
- MSI_Debug('Failed to find required tool');
+ MSI_CloseHeader('MSI_SetupPlayer: ' + BoolToStr(Result));
Exit;
end;
@@ -206,9 +206,7 @@
MSI_Debug('Invalid tool option in script: ' + script.Name);
end;
- finally
- MSI_CloseHeader('MSI_SetupPlayer: ' + BoolToStr(Result));
- end;
+ MSI_CloseHeader('MSI_SetupPlayer: ' + BoolToStr(Result));
end;
{******************************************************************************}
@@ -533,7 +531,7 @@
{******************************************************************************}
procedure MSI_SetPlayerInfo;
var
- i, j, k: Integer;
+ i, j, k, l: Integer;
script: TScript;
intObjects: array of TIntegerArray;
intItems: array of array of TIntegerArray;
@@ -585,7 +583,10 @@
intItems[j][k] := MSI_VarToIntArray(Items[j][k]);
ItemNames[j][k] := MSI_GetItemNames(intItems[j][k]);
- Experiences[j][k] := MSI_GetItemExperiences(intItems[j][k]);
+ Experiences[j][k] := MSI_GetItemExperiences(script.SkillConstant, intItems[j][k]);
+
+ for l := 0 to High(Experiences[j][k]) do
+ MSI_Debug('Player['+IntToStr(i)+'].Scripts['+IntToStr(j)+'].Objects['+IntToStr(k)+'] Experience = '+FloatToStr(Experiences[j][k][l]));
end;
end;
end;
@@ -629,55 +630,86 @@
end;
{******************************************************************************}
-{ procedure MSI_WritePlayerINI; }
-{ By: Shuttleu & Coh3n }
-{ Date: 31 August 2010 }
-{ Description: Writes the required Player Remote settings to an INI }
+{ procedure MSI_DeleteINI; }
+{ By: Coh3n }
+{ Date: 07 September 2010 }
+{ Description: Deletes the Player.INI titles and leaves an empty file }
{******************************************************************************}
-procedure MSI_WritePlayerINI;
+procedure MSI_DeleteINI;
var
i: Integer;
begin
if (not RemoteEnabled) then
- begin
- MSI_SubDebug('Player Remote disabled!');
Exit;
- end;
- try
- if (FileExists(IncludePath+'SRL\SRL\MSI\Player.INI')) then
- if (Length(ReadINI('Changed', 'Changed', ScriptPath+'Player.INI')) > 0) then
- if StrToBool(ReadINI('Changed', 'Changed', IncludePath+'SRL\SRL\MSI\Player.INI')) then
- for i := 0 to High(MSI_Players) do
- begin
- MSI_Players[i].Active:= StrToBool(ReadINI(IntToStr(i), 'Active', IncludePath+'SRL\SRL\MSI\Player.INI'));
- MSI_Players[i].Location:= StrToInt(ReadINI(IntToStr(i), 'Location', IncludePath+'SRL\SRL\MSI\Player.INI'));
- Players[i].Active := MSI_Players[i].Active;
- {
- if (Length(MSI_Players[i].Scripts) > 0) then
- for j := 0 to High(MSI_Players[i].Scripts) do
- MSI_Players[i].Scripts[j]:= StrToInt(ReadINI(IntToStr(i), 'Script'+IntToStr(j), IncludePath+'SRL\SRL\MSI\Player.INI'));
- }
- end;
+ //try
+ DeleteINI('Changed', 'Changed', PLAYER_INI_PATH);
+ DeleteINI('HowMany', 'HowMany', PLAYER_INI_PATH);
- WriteINI('Changed', 'Changed', 'False', IncludePath+'SRL\SRL\MSI\Player.INI');
- WriteINI('HowMany', 'HowMany', IntToStr(Length(MSI_Players)), IncludePath+'SRL\SRL\MSI\Player.INI');
+ for i := 0 to High(MSI_Players) do
+ begin
+ DeleteINI(IntToStr(i), 'Active', PLAYER_INI_PATH);
+ DeleteINI(IntToStr(i), 'Location', PLAYER_INI_PATH);
+ end;
+ //except
+ //MSI_Debug('MSI_DeleteINI: Error!');
+ //end;
+end;
+{******************************************************************************}
+{ procedure MSI_WriteINI; }
+{ By: Coh3n }
+{ Date: 07 September 2010 }
+{ Description: Writes the initial Player.INI; should only be called once at }
+{ the beginning of the script }
+{******************************************************************************}
+procedure MSI_WriteINI;
+var
+ i: Integer;
+begin
+ if (not RemoteEnabled) then
+ Exit;
+
+ //try
+ MSI_DeleteINI;
+
+ WriteINI('Changed', 'Changed', 'False', PLAYER_INI_PATH);
+ WriteINI('HowMany', 'HowMany', IntToStr(Length(MSI_Players)), PLAYER_INI_PATH);
+
for i := 0 to High(MSI_Players) do
begin
- WriteINI(IntToStr(i), 'Active', BoolToStr(MSI_Players[i].Active), IncludePath+'SRL\SRL\MSI\Player.INI');
- WriteINI(IntToStr(i), 'Location', IntToStr(MSI_Players[i].Location), IncludePath+'SRL\SRL\MSI\Player.INI');
- {
- WriteINI(IntToStr(i), 'ScriptAmount', IntToStr(Length(MSI_Players[i].Scripts)), IncludePath+'SRL\SRL\MSI\Player.INI');
-
- if (Length(MSI_Players[i].Scripts) > 0) then
- for j := 0 to High(MSI_Players[i].Scripts) do
- WriteINI(IntToStr(i), 'Script'+IntToStr(j), IntToStr(MSI_Players[i].Scripts[j]), IncludePath+'SRL\SRL\MSI\Player.INI');
- }
+ WriteINI(IntToStr(i), 'Active', BoolToStr(MSI_Players[i].Active), PLAYER_INI_PATH);
+ WriteINI(IntToStr(i), 'Location', IntToStr(MSI_Players[i].Location), PLAYER_INI_PATH);
end;
+ //except
+ //MSI_Debug('MSI_WriteINI: Error! Retrying...');
+ //end;
+end;
+{******************************************************************************}
+{ procedure MSI_ResetINI; }
+{ By: Coh3n }
+{ Date: 07 September 2010 }
+{ Description: Checks to see if Player.INI was updated. If so, it updates the }
+{ necessary player attributes }
+{******************************************************************************}
+procedure MSI_ResetINI;
+var
+ i: Integer;
+begin
+ if (not RemoteEnabled) then
+ Exit;
+
+ try
+ if (StrToBool(ReadINI('Changed', 'Changed', PLAYER_INI_PATH))) then
+ for i := 0 to High(MSI_Players) do
+ begin
+ MSI_Players[i].Active:= StrToBool(ReadINI(IntToStr(i), 'Active', PLAYER_INI_PATH));
+ MSI_Players[i].Location:= StrToInt(ReadINI(IntToStr(i), 'Location', PLAYER_INI_PATH));
+ Players[i].Active := MSI_Players[i].Active;
+ end;
except
- MSI_SubDebug('MSI_WritePlayerINI: Error reading/writing Player.INI!');
+ MSI_Debug('MSI_ResetINI: Error!');
end;
end;
@@ -693,7 +725,7 @@
begin
MSI_SetPlayerInfo;
MSI_SetReportInfo;
- MSI_WritePlayerINI;
+ MSI_WriteINI;
ScriptStart := TheDate(DATE_DAY) + ' at ' + TheTime;
ScriptStart := Replace(scriptStart, ':', ' ');
@@ -711,7 +743,7 @@
SmartSetDebug(True);
repeat
- MSI_WritePlayerINI;
+ MSI_ResetINI;
tmpLoads := 0;
// Setup player
@@ -777,7 +809,7 @@
end;
MSI_ProgressReport;
- MSI_WritePlayerINI;
+ MSI_ResetINI;
with ProgressReportArray[CurrentPlayer] do
if (LoadsDone >= (MSI_Players[CurrentPlayer].Loads[L_TOTAL] + RandomRange(-10, 10))) then
@@ -814,9 +846,9 @@
{******************************************************************************}
procedure MSI_ScriptTerminate;
begin
+ MSI_ProgressReport;
Writeln('Thank-you for using MSI Phoenix scripts!');
- MSI_ProgressReport;
+ MSI_DeleteINI;
FreeSRL;
MSI_FreeAllItems;
- RewriteFile(IncludePath + 'SRL/SRL/msi/Player.INI', False);
end;
Index: C:/Simba/Includes/SRL/SRL/msi/Items.simba
===================================================================
--- C:/Simba/Includes/SRL/SRL/msi/Items.simba (revision 258)
+++ C:/Simba/Includes/SRL/SRL/msi/Items.simba (revision 259)
@@ -1011,12 +1011,12 @@
end;
{******************************************************************************}
-{ function MSI_GetItemExperiences(Objects: TIntegerArray): TExtendedArray; }
+{ function MSI_GetItemExperiences(...): TExtendedArray; }
{ By: The MSI Team }
{ Date: 03 July 2010 }
{ Description: Retunrs an array of experiences depending on the objects array }
{******************************************************************************}
-function MSI_GetItemExperiences(Items: TIntegerArray): TExtendedArray;
+function MSI_GetItemExperiences(Skill: Integer; Items: TIntegerArray): TExtendedArray;
var
i: integer;
e: extended;
@@ -1024,7 +1024,7 @@
for i := 0 to High(Items) do
begin
e := 0;
- case MSI_Scripts[MSI_Players[CurrentPlayer].Scripts[CurrentScript]].SkillConstant of
+ case Skill of
SKILL_WOODCUTTING:
case Items[i] of
LOGS_NORMAL : e := 25.0;
@@ -1035,7 +1035,7 @@
LOGS_MAGIC : e := 250.0;
else
- MSI_SubDebug('MSI_GetItemExperiences: Invalid item for woodcutting');
+ MSI_SubDebug('MSI_GetItemExperiences: Invalid item for woodcutting ' + IntToStr(Items[i]));
end;
SKILL_MINING:
@@ -1226,7 +1226,7 @@
end;
end;
- MSI_SubDebug('MSI_FindItemSlots: Found '+IntToStr(Length(result))+' '+MSI_Items[Item].Name+' in inventory');
+ MSI_Debug('MSI_FindItemSlots: Found '+IntToStr(Length(result))+' '+MSI_Items[Item].Name+' in inventory');
end;
{******************************************************************************}
Index: C:/Simba/Includes/SRL/SRL/msi/Globals.simba
===================================================================
--- C:/Simba/Includes/SRL/SRL/msi/Globals.simba (revision 258)
+++ C:/Simba/Includes/SRL/SRL/msi/Globals.simba (revision 259)
@@ -69,6 +69,8 @@
RELOCATE_MIN_DIST = 3; // Minimum pixel distance from the player to relocation point
RELOCATE_TIME = 8000; // Time (in ms) to wait before relocating
+ PLAYER_INI_PATH = IncludePath + 'SRL\SRL\MSI\Player.txt'; // The path location for the player remote file
+
(**
* Represents the stats system's custom variable array indexes
*)
If we can't find what's wrong soon we may have to revert back to 258 and I'll have to redo the updates I made and hopefully find what happened.