SRL Archive - MSI Suggestions

Add # of loads per player?


Hamish

2010-07-19 13:13:18

If you are running multiple players I think it would be very useful to set the amount of loads or minutes per player. This would also increase the random factor, maybe even add an option to enable a random of 1-3 extra loads per player?

Maybe also add the feature so that it hovers over the next nearby rock/Tree.

Also you should add an option to drop gems when powermining. I manually dropped them only to notice that it picked them up again a few mins later.

A 2nd question.

Is it possible to run 2 players on different scripts? 1 mining 1 chopping? I have a script running atm so I don't wanna stop it to try.



Mining script is awesome btw. Although it seems to sometimes click the ore thats on the ground.

Coh3n

2010-07-19 13:28:53

From: Hamish
If you are running multiple players I think it would be very useful to set the amount of loads or minutes per player. This would also increase the random factor, maybe even add an option to enable a random of 1-3 extra loads per player?

Yeah, not sure why we didn't add this initially.

From: Hamish

Maybe also add the feature so that it hovers over the next nearby rock/Tree.

This was discussed for mining and will probably be added when we get the WaitWhileMining tweaks worked out.

From: Hamish

Is it possible to run 2 players on different scripts? 1 mining 1 chopping? I have a script running atm so I don't wanna stop it to try.

Yes.

From: Hamish

Mining script is awesome btw. Although it seems to sometimes click the ore thats on the ground.

Well that's no good. Which one in particular does it click? Also, does it right click, left click or hover?

Hamish

2010-07-19 14:41:49

From: Coh3n
Yeah, not sure why we didn't add this initially.


This was discussed for mining and will probably be added when we get the WaitWhileMining tweaks worked out.


Yes.


Well that's no good. Which one in particular does it click? Also, does it right click, left click or hover?


Great news, yes it seems to left click although it doesn't happen often. Not a major bug just something I have noticed happen.

Coh3n

2010-07-19 14:47:14

From: Hamish
Great news, yes it seems to left click although it doesn't happen often. Not a major bug just something I have noticed happen.

That's so weird. The uptext isn't even the same as the uptext of the rocks, is it? There's a similar problem with Woodcutting. Every once in a while it clicks a normal tree when cutting only Oaks. I had the same issue with my Draynor script and I couldn't for the life of me figure out why it was doing it.

NCDS

2010-07-19 17:11:26

From: Coh3n
That's so weird. The uptext isn't even the same as the uptext of the rocks, is it? There's a similar problem with Woodcutting. Every once in a while it clicks a normal tree when cutting only Oaks. I had the same issue with my Draynor script and I couldn't for the life of me figure out why it was doing it.


Perhaps it's a problem with reading the Uptext it self? I know it tends to be off quite frequently.

Hamish

2010-07-19 17:48:47

Also you should add an option to drop gems when powermining. I manually dropped them only to notice that it picked them up again a few mins later….

NCDS

2010-07-19 18:03:29

From: Hamish
Also you should add an option to drop gems when powermining. I manually dropped them only to notice that it picked them up again a few mins later….


lol..hmm..that's weird.

I can add that option though, I'm working on Mining right now anyways.

Coh3n

2010-07-19 21:52:10

From: Hamish
Also you should add an option to drop gems when powermining. I manually dropped them only to notice that it picked them up again a few mins later….

There is absolutely no reason why it would pick them back up. We don't even have an object that remotely resembles a gem…

Hamish

2010-07-19 22:10:11

Probably when it bugged out and accidently picked up an ore? The gem happened to be on the top stack or something.

nickrules

2010-07-19 22:39:12

From: Hamish
Probably when it bugged out and accidently picked up an ore? The gem happened to be on the top stack or something.


That would make sense, although, tbh I have never seen the bot pick up ore off the ground. Running the latest version?

Sir R. M8gic1an

2010-07-20 08:03:47

Anyway, no reason to add Gem Dropping. It'll drop them at the end of the load anyway.

~RM

Hamish

2010-07-20 10:26:30

My one doesn't drop the gems after the load. =/

Sir R. M8gic1an

2010-07-20 11:28:08

From: Hamish
My one doesn't drop the gems after the load. =/


My bad. Seems like we need to edit our dropping function to drop everything but the tools.

~RM

NCDS

2010-07-20 12:34:13

From: Rasta Magician
My bad. Seems like we need to edit our dropping function to drop everything but the tools.

~RM


We should do the same with the deposit function to handle the problem Shuttleu posted about.

Coh3n

2010-07-20 17:55:26

From: NCDS
We should do the same with the deposit function to handle the problem Shuttleu posted about.

Both the banking and dropping use MSI_ClickItems I believe. When I rewrote the ClickItems functions, I got rid of MSI_ClickItemSlots (I think). It may not be a bad idea to bring that back for dropping. The reason I switched from slots to coordinates was so the items could be clicked in many areas (bank, inv, deposit box, etc.).

We just have to make sure that we don't mess with the counting of the items as it will mess up progress reports. The banking/dropping parts of the script count the items before dropping/banking anyway, so there should be no issue. It is possible that we may need an MSI_Drop function in ItemInfo, which really isn't a bug deal. :)

Also, let's not forget the topic of this thread. ;) We'll be sure to add the number of loads for each player, and yes, it will +/- a random 3-5 or something.

3Garrett3

2010-07-20 19:10:52

This is one of the easiest things to add I believe. I'll get on it.

So add something to increase Player[CurrentPlayer].Integers[MSI_LOADS] or something and then when the current player loads is the number designated by Players[CurrentPlayer].Integers[MSI_LOADSTODO] +/- 3 then switch players?

and add something to the proggy?

E:

Looking at the proggy there is already a PlayerLoads set in the TScript record, why is that even there if it doesn't show up anywhere? :\

I can modify it to use that variable, or I could add a new system that doesn't require any new vars using the Players record in SRL?


E Again:

I think I'll just add the variable into the TProggy record, that makes more sense I believe.

NCDS

2010-07-20 19:46:21

From: 3Garrett3
This is one of the easiest things to add I believe. I'll get on it.

So add something to increase Player[CurrentPlayer].Integers[MSI_LOADS] or something and then when the current player loads is the number designated by Players[CurrentPlayer].Integers[MSI_LOADSTODO] +/- 3 then switch players?

and add something to the proggy?

E:

Looking at the proggy there is already a PlayerLoads set in the TScript record, why is that even there if it doesn't show up anywhere? :\

I can modify it to use that variable, or I could add a new system that doesn't require any new vars using the Players record in SRL?


E Again:

I think I'll just add the variable into the TProggy record, that makes more sense I believe.


Why not just make it a const and load it in DeclarePlayer like you show above? That's how I always do it, and would recommend doing it.

3Garrett3

2010-07-20 19:52:07

From: NCDS
Why not just make it a const and load it in DeclarePlayer like you show above? That's how I always do it, and would recommend doing it.


Coh3n msned me from his phone and suggested adding it into TPlayerInfo then using it as "Integers" and I can just add a global for integers I guess, 0 for loads to do, 1 for loads done? If I make the TPlayerInfo as "Loads"

NCDS

2010-07-20 20:08:33

From: 3Garrett3
Coh3n msned me from his phone and suggested adding it into TPlayerInfo then using it as "Integers" and I can just add a global for integers I guess, 0 for loads to do, 1 for loads done? If I make the TPlayerInfo as "Loads"


Exactly ;)

3Garrett3

2010-07-20 20:28:38

This would be the easiest thing ever in a normal script. I can't even figure out where to set the length for Loads… I'm going to get it to inc at the same place it incs the loads done for each Script, seems logical to me. Then I have to put a thing in the breakhandler, so I have to find where that function is too, lots of searching through msi and I'm not good at it..

i luffs yeww

2010-07-20 20:47:37

^ This reminds me; is there any way that one could search by the name of a function/procedure and it say what include (or plugin) it is in?

3Garrett3

2010-07-20 20:53:05

You can use Notepad ++ to do it, but not with Simba.

I have a vague feeling that this is already done. The more I add the more is already there. Breakafterloads? Loads being included in the TScript? This must be done..

E:

It was done to have a static #, ohhh. I will erase the old stuff and make it so that the user can determine each char, which is what I was doing..

E:

It's done, gotta test first meaning that it will be until tomorrow afternoon to see if it works right.

Coh3n

2010-07-20 23:22:03

From: 3Garrett3
You can use Notepad ++ to do it, but not with Simba.

I have a vague feeling that this is already done. The more I add the more is already there. Breakafterloads? Loads being included in the TScript? This must be done..

E:

It was done to have a static #, ohhh. I will erase the old stuff and make it so that the user can determine each char, which is what I was doing..

E:

It's done, gotta test first meaning that it will be until tomorrow afternoon to see if it works right.

Woah man, don't erase anything! You guys are overthinking this. It's very simple. Currently, we have a PlayerLoads in the TScript record. This stores the number of loads for that script, for the current player.

The mainloop uses this number to determine when to break/switch players. All you need to do is add a TotalLoads to the TPlayerInfo type.

type
TPlayerInfo = record
Name : string;
Pass : string;
Nick : string;
Pin : string;
Active : Boolean;
Location : Integer;
TotalLoads : Integer;
Scripts : TIntegerArray;
Objects : array of TVariantArray;
Items : array of array of TVariantArray;
ItemNames : array of array of TStringArray;
Experiences: array of array of TExtendedArray;
end;
Then in the mainloop, after the progress report is printed, do something like:

with ProgressReportArray[i] do
for i := 0 to High(ScriptInfo) do //add the loads for each player script
IncEx(tmpTotalLoads, ScriptInfo[i].PlayerLoads);

if (tmpTotalLoads >= (MSI_Players[CurrentPlayer].TotalLoads + RandomRange(-3, 3))) then
begin
MSI_Debug('MSI_Mainloop', 'Finished required loads', DEBUG_PLAYERS);
NextPlayer(False);
end;
Then add TotalLoads to DeclarePlayers:

with MSI_Players[0] do
begin
Name := ''; // Username
Pass := ''; // Password
Nick := ''; // Nickname (3-4 lowercase letters from username)
Pin := ''; // Bank pin; leave as '' if player doesn't have one
Active := True; // Use this player?
Location := ; // See instructions at the top
TotalLoads := ; // The total amount of loads for the player to do
Scripts := []; // See instructions at the top
Objects := [[]]; // See instructions at the top
end;

NCDS

2010-07-20 23:52:54

From: Coh3n
Woah man, don't erase anything! You guys are overthinking this. It's very simple. Currently, we have a PlayerLoads in the TScript record. This stores the number of loads for that script, for the current player.

The mainloop uses this number to determine when to break/switch players. All you need to do is add a TotalLoads to the TPlayerInfo type.

type
TPlayerInfo = record
Name : string;
Pass : string;
Nick : string;
Pin : string;
Active : Boolean;
Location : Integer;
TotalLoads : Integer;
Scripts : TIntegerArray;
Objects : array of TVariantArray;
Items : array of array of TVariantArray;
ItemNames : array of array of TStringArray;
Experiences: array of array of TExtendedArray;
end;
Then in the mainloop, after the progress report is printed, do something like:

with ProgressReportArray[i] do
for i := 0 to High(ScriptInfo) do //add the loads for each player script
IncEx(tmpTotalLoads, ScriptInfo[i].PlayerLoads);

if (tmpTotalLoads >= (MSI_Players[CurrentPlayer].TotalLoads + RandomRange(-3, 3))) then
begin
MSI_Debug('MSI_Mainloop', 'Finished required loads', DEBUG_PLAYERS);
NextPlayer(False);
end;
Then add TotalLoads to DeclarePlayers:

with MSI_Players[0] do
begin
Name := ''; // Username
Pass := ''; // Password
Nick := ''; // Nickname (3-4 lowercase letters from username)
Pin := ''; // Bank pin; leave as '' if player doesn't have one
Active := True; // Use this player?
Location := ; // See instructions at the top
TotalLoads := ; // The total amount of loads for the player to do
Scripts := []; // See instructions at the top
Objects := [[]]; // See instructions at the top
end;

Well now that you've done it, why not just commit it? :p

Coh3n

2010-07-20 23:54:44

From: NCDS
Well now that you've done it, why not just commit it? :p

Lol well I don't know if that works 100% or not. I'm pretty sure that's all you have to do and those may not be the exact code. :p

It's bed time now, but I can do it tomorrow if no one else has.

NCDS

2010-07-20 23:58:35

From: Coh3n
Lol well I don't know if that works 100% or not. I'm pretty sure that's all you have to do and those may not be the exact code. :p

It's bed time now, but I can do it tomorrow if no one else has.


He said he had it done, but I told him to test it before he committed it but he didn't have time tonight I guess.

Coh3n

2010-07-21 00:07:47

From: NCDS
He said he had it done, but I told him to test it before he committed it but he didn't have time tonight I guess.

Who? Garrett? I just want to make sure he didn't delete something that was there. If he found a better way then great, I just posted what I had in mind.

3Garrett3

2010-07-21 14:27:29

From: Coh3n
Woah man, don't erase anything! You guys are overthinking this. It's very simple. Currently, we have a PlayerLoads in the TScript record. This stores the number of loads for that script, for the current player.

The mainloop uses this number to determine when to break/switch players. All you need to do is add a TotalLoads to the TPlayerInfo type.


Yeah, I just erased "BreakAfterLoads" because that was obsolete code, you'll see when I show you my code later. I added a "Loads" variable to the TPlayer record and it is an array, so there is Loads[Current] Loads[TODO] and Loads[TOTAL] with those having globals (They are LOADS_CURRENT etc) so that way the loads for each player are stored correctly. In the main loop, it simply checks that loads[current] is greater or equal to the loads[todo] +/- 2. Then it will switch and reset loads[current] to 0 (actually other way around but I cba backspacing).

Then add TotalLoads to DeclarePlayers:

with MSI_Players[0] do
begin
Name := ''; // Username
Pass := ''; // Password
Nick := ''; // Nickname (3-4 lowercase letters from username)
Pin := ''; // Bank pin; leave as '' if player doesn't have one
Active := True; // Use this player?
Location := ; // See instructions at the top
TotalLoads := ; // The total amount of loads for the player to do
Scripts := []; // See instructions at the top
Objects := [[]]; // See instructions at the top
end;


I did that with Loads[TODO] only used a 0 because the global in the brackets made declare players ugly as shit.

I gotta test it out later, but I have to go do shit now so I can't until later tonight and I can commit.

Coh3n

2010-07-21 14:45:35

There's no need to make it an array really. Can you post the code you changed? I just don't think I'm understanding what you're saying. Lol.

3Garrett3

2010-07-21 16:23:01


type
TPlayerInfo = record
Name : string;
Pass : string;
Nick : string;
Pin : string;
Active : Boolean;
Location : Integer;
Scripts : TIntegerArray;
Objects : array of TVariantArray;
Loads : array of Integer;
Items : array of array of TVariantArray;
ItemNames : array of array of TStringArray;
Experiences: array of array of TExtendedArray;
end;

TPlayerInfoArray = array of TPlayerInfo;

(**
* The different variables for Loads
*)
const
LOADS_TODO = 0;
LOADS_CURRENT = 1;
LOADS_TOTAL = 2;

and then


if (MSI_Players[CurrentPlayer].Loads[LOADS_CURRENT] >= RandomRange(MSI_Players[CurrentPlayer].Loads[LOADS_TODO] - 2, MSI_Players[CurrentPlayer].Loads[LOADS_TODO] + 2)) then
begin
MSI_HandleBreaking;
MSI_Players[CurrentPlayer].Loads[LOADS_CURRENT] := 0;
FindNormalRandoms;
Break;
end;

in mainloop, and:


PROG_ADD_LOADS:
begin
Inc(PlayerLoads);
Inc(Stats_CustomVars[STATS_LOADS]);
Inc(MSI_Players[CurrentPlayer].Loads[LOADS_CURRENT]);
Inc(MSI_Players[CurrentPlayer].Loads[LOADS_TOTAL]);
end;

in the proggy, and:


with MSI_Players[0] do
begin
Name := ''; // Username
Pass := ''; // Password
Nick := ''; // Nickname (3-4 lowercase letters from username)
Pin := ''; // Bank pin; leave as '' if player doesn't have one
Active := True; // Use this player?
Location := ; // See instructions at the top
Scripts := []; // See instructions at the top
Objects := [[]]; // See instructions at the top
Loads[0] := ; // How many loads you wish to do before changing players
end;

in declare players.

That should do well, right?

Coh3n

2010-07-21 16:35:42

Ohh okay, I see what you mean. Yes, that should work just fine. I like it actually, nice job. The only thing I would change is in the DeclarePlayers do this:

Loads[LOADS_TODO] := 0;

Oh, and in the TPlayerInfo record, declare it as an array[0..2] of Integer, rather than a TIntegerArray since it has a set length.

Also be sure to test it thoroughly. :)

3Garrett3

2010-07-21 17:13:21

From: Coh3n
Ohh okay, I see what you mean. Yes, that should work just fine. I like it actually, nice job. The only thing I would change is in the DeclarePlayers do this:

Loads[LOADS_TODO] := 0;

Oh, and in the TPlayerInfo record, declare it as an array[0..2] of Integer, rather than a TIntegerArray since it has a set length.

Also be sure to test it thoroughly. :)


Declare players looks very ugly with it like that, the spacing will have to be completely changed to be even like it is now..

And I left it as an array in case we end up making more things to do with loads. I can't remember what I was thinking, but I remember thinking something to do with it..

Coh3n

2010-07-21 17:16:59

From: 3Garrett3
Declare players looks very ugly with it like that, the spacing will have to be completely changed to be even like it is now..

And I left it as an array in case we end up making more things to do with loads. I can't remember what I was thinking, but I remember thinking something to do with it..

I never changed it from an array? As long as you don't get out of range errors, it doesn't really matter to me.

3Garrett3

2010-07-21 17:21:25

From: Coh3n
I never changed it from an array? As long as you don't get out of range errors, it doesn't really matter to me.


I meant an open array rather than set length, but I can do that too.

NCDS

2010-07-21 17:24:52

From: 3Garrett3
I meant an open array rather than set length, but I can do that too.


You can make it a const for easy updating ;)

We will most likely need it for something else quite soon.

Coh3n

2010-07-21 17:29:44

From: NCDS
You can make it a const for easy updating ;)

We will most likely need it for something else quite soon.

For objects and stuff we use OBJECT_COUNT and ITEM_COUNT, but I don't know if that's necessary for LOADS. I'm not sure what else we could use it for.

NCDS

2010-07-21 17:32:58

From: Coh3n
For objects and stuff we use OBJECT_COUNT and ITEM_COUNT, but I don't know if that's necessary for LOADS. I'm not sure what else we could use it for.


Quite true, I was thinking of it differently for a minute for some reason.

3Garrett3

2010-07-21 17:33:12

It seemed useful but I dont see how it would be anymore :P

Coh3n

2010-07-24 15:04:43

Okay, I think I've got this sorted out in revision 184. You can set the number of total loads per player and the number of loads before breaking/switching per player. Here's the .diff if you're interested.

Index: C:/Simba/Includes/SRL/SRL/msi/ItemInfo.scar
===================================================================
--- C:/Simba/Includes/SRL/SRL/msi/ItemInfo.scar (revision 183)
+++ C:/Simba/Includes/SRL/SRL/msi/ItemInfo.scar (revision 184)
@@ -584,7 +584,7 @@
begin
for i := 0 to High(Items) do
begin
- Result[i] := MSI_Items[i].Name;
+ Result[i] := MSI_Items[Items[i]].Name;

if Result[i] = '' then
MSI_Debug('MSI_GetItemNames', 'Invalid item in ItemConstants:' + IntToStr(i), DEBUG_FORCE);
Index: C:/Simba/Includes/SRL/SRL/msi/Mainloop.scar
===================================================================
--- C:/Simba/Includes/SRL/SRL/msi/Mainloop.scar (revision 183)
+++ C:/Simba/Includes/SRL/SRL/msi/Mainloop.scar (revision 184)
@@ -598,7 +598,7 @@
t := (GetSystemTime + ((BreakTime * 60000) + RandomRange(-300000, 300000)));
while GetSystemTime < t do
begin
- Status('BreakTime remaining: '+IntToStr(t - GetSystemTime)+';');
+ Status('BreakTime remaining: '+MsToTime(t - GetSystemTime, Time_Formal)+';');
Wait(RandomRange(2000, 25000));
if LoggedIn then
FindNormalRandoms;
@@ -685,7 +685,6 @@
procedure MSI_SetPlayerInfo;
var
i, j, k: Integer;
- //l: Integer;
script: TScript;
intObjects: array of TIntegerArray;
intItems: array of array of TIntegerArray;
@@ -738,15 +737,6 @@
intItems[j][k] := MSI_VarToIntArray(Items[j][k]);
ItemNames[j][k] := MSI_GetItemNames(intItems[j][k]);
Experiences[j][k] := MSI_GetItemExperiences(intItems[j][k]);
- {
- for l := 0 to High(Items[j][k]) do
- begin
- Writeln('MSI_Players['+IntToStr(i)+'].Items['+IntToStr(j)+']['+IntToStr(k)+']['+IntToStr(l)+'] = '+IntToStr(Items[j][k][l]));
- Writeln('MSI_Players['+IntToStr(i)+'].ItemNames['+IntToStr(j)+']['+IntToStr(k)+']['+IntToStr(l)+'] = '+ItemNames[j][k][l]);
- Writeln('MSI_Players['+IntToStr(i)+'].Experiences['+IntToStr(j)+']['+IntToStr(k)+']['+IntToStr(l)+'] = '+FloatToStr(Experiences[j][k][l]));
- end;
- Writeln('MSI_Players['+IntToStr(i)+'].Objects['+IntToStr(j)+'] = '+IntToStr(Objects[j][k]));
- }
end;
end;
end;
@@ -792,7 +782,7 @@
{******************************************************************************}
{ procedure MSI_MainLoop; }
{ By: Coh3n }
-{ Date: 23 July 2010 }
+{ Date: 24 July 2010 }
{ Description: The MainLoop - performs all actions of the script }
{******************************************************************************}
procedure MSI_MainLoop;
@@ -804,6 +794,7 @@

ScriptStart := TheDate(DATE_DAY) + ' at ' + TheTime;
ScriptStart := Replace(scriptStart, ':', ' ');
+ MSI_SetRev;

// To gain access
if (SaveDebug) then
@@ -879,14 +870,14 @@
MSI_ProgressReport;

with ProgressReportArray[CurrentPlayer] do
- if (LoadsDone >= (MSI_Players[CurrentPlayer].Loads + RandomRange(-10, 0))) then
+ if (LoadsDone >= (MSI_Players[CurrentPlayer].Loads[L_TOTAL] + RandomRange(-10, 0))) then
begin
MSI_UnsetPlayer('MSI_MainLoop', 'Finished total loads!', True);
Break;
end;

Inc(tmpLoads);
- if (tmpLoads >= (BreakAfter + RandomRange(-2, 0))) then
+ if (tmpLoads >= (MSI_Players[CurrentPlayer].Loads[L_BREAK] + RandomRange(-2, 2))) then
begin
MSI_HandleBreaking;
tmpLoads := 0;
@@ -909,6 +900,7 @@
procedure MSI_ScriptTerminate;
begin
Writeln('Thank-you for using MSI Phoenix scripts!');
+ MSI_ProgressReport;
FreeSRL;
MSI_FreeAllItems;
end;
Index: C:/Simba/Includes/SRL/SRL/msi/Globals.scar
===================================================================
--- C:/Simba/Includes/SRL/SRL/msi/Globals.scar (revision 183)
+++ C:/Simba/Includes/SRL/SRL/msi/Globals.scar (revision 184)
@@ -263,6 +263,15 @@
PROG_ADD_ITEMS = 1;
PROG_ADD_LOADS = 2;

+(**
+ * Used for any array indexes in DeclarePlayers
+ *)
+const
+ L_COUNT = 2;
+
+ L_BREAK = 0;
+ L_TOTAL = 1;
+
{==============================================================================\
| Types |
\==============================================================================}
@@ -376,7 +385,7 @@
Location : Integer;
Scripts : TIntegerArray;
Objects : array of TVariantArray;
- Loads : Integer;
+ Loads : array[0..(L_COUNT - 1)] of Integer;
Items : array of array of TVariantArray;
ItemNames : array of array of TStringArray;
Experiences: array of array of TExtendedArray;
@@ -394,10 +403,10 @@
var
ProgressReportArray: TProggyArray;
CurrentScript : Integer;
- MSIRev : String;
ReflectionBroken : Boolean;
+ MSIRev : string;
+ ScriptStart : string;

-
(**
* Arrays that store all the necessary "go-to" information for MSI
*)
@@ -411,9 +420,7 @@
* User-defined variables set during script setup
*)
var
- BreakAfter : Integer;
BreakTime : Integer;
- ScriptStart: string;
SaveDebug : Boolean;

(**
@@ -425,6 +432,3 @@
Stats_ScriptID : string;
Stats_LastTime : Integer;
Stats_CustomVars: array [1..20] of Integer;
-
-
-
Index: C:/Simba/Includes/SRL/SRL/msi/RunMe.scar
===================================================================
--- C:/Simba/Includes/SRL/SRL/msi/RunMe.scar (revision 183)
+++ C:/Simba/Includes/SRL/SRL/msi/RunMe.scar (revision 184)
@@ -10,18 +10,10 @@
| |
| -> Valid arguments for Location[i]: |
| - For banking: |
-| - LOC_VE_BANK |
-| - LOC_VE_TREES |
-| - LOC_VE_OAKS |
-| - LOC_VE_MINE |
-| - LOC_GE_BANK |
-| - LOC_GE_YEWS |
-| - LOC_DB_BANK |
-| - LOC_DB_WILLOWS |
-| - LOC_FE_BANK |
-| - LOC_RM_YEWS |
-| - LOC_PS_WILLOWS |
-| - LOC_PS_DBOX |
+| - LOC_VE_BANK - LOC_DB_BANK - LOC_FE_BANK |
+| - LOC_VE_TREES - LOC_DB_WILLOWS - LOC_RM_YEWS |
+| - LOC_VE_OAKS - LOC_PS_WILLOWS - LOC_GE_BANK |
+| - LOC_VE_MINE - LOC_PS_DBOX - LOC_GE_YEWS |
| |
| - For power skilling: |
| - LOC_POWER_SKILL |
@@ -67,11 +59,10 @@
{.include SRL/SRL/MSI/Setup.scar}

const
- BREAK_AFTER = 5; // How many loads before breaking/switching players
- BREAK_TIME = 15; // How long to break for
- SAVE_DEBUG = False; // Save's the debug box text to a file
+ 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

- WORLD_SMART = 152;
+ WORLD_SMART = 152;

STATS_ID = '';
STATS_PASS = '';
@@ -99,7 +90,8 @@
Location := ; // See instructions at the top
Scripts := []; // See instructions at the top
Objects := [[]]; // See instructions at the top
- Loads := ; // The total loads for the player to do
+ Loads[0] := ; // Amount of loads before breaking/switching players
+ Loads[1] := ; // Total loads for the player to do
end;
{
with MSI_Players[1] do
@@ -113,7 +105,8 @@
Location := ;
Scripts := [];
Objects := [[]];
- Loads := ;
+ Loads[0] := ;
+ Loads[1] := ;
end;

with MSI_Players[2] do
@@ -127,7 +120,8 @@
Location := ;
Scripts := [];
Objects := [[]];
- Loads := ;
+ Loads[0] := ;
+ Loads[1] := ;
end;

with MSI_Players[3] do
@@ -141,7 +135,8 @@
Location := ;
Scripts := [];
Objects := [[]];
- Loads := ;
+ Loads[0] := ;
+ Loads[1] := ;
end;

with MSI_Players[4] do
@@ -155,7 +150,8 @@
Location := ;
Scripts := [];
Objects := [[]];
- Loads := ;
+ Loads[0] := ;
+ Loads[1] := ;
end;

with MSI_Players[5] do
@@ -169,7 +165,8 @@
Location := ;
Scripts := [];
Objects := [[]];
- Loads := ;
+ Loads[0] := ;
+ Loads[1] := ;
end;

with MSI_Players[6] do
@@ -183,7 +180,8 @@
Location := ;
Scripts := [];
Objects := [[]];
- Loads := ;
+ Loads[0] := ;
+ Loads[1] := ;
end;

with MSI_Players[7] do
@@ -197,7 +195,8 @@
Location := ;
Scripts := [];
Objects := [[]];
- Loads := ;
+ Loads[0] := ;
+ Loads[1] := ;
end;
}

@@ -218,6 +217,8 @@
end;

begin
+ ClearDebug;
+
{$IFDEF SIMBA}
AddOnTerminate('MSI_ScriptTerminate');
{$ENDIF}
@@ -240,7 +241,6 @@
{$ENDIF}

// Set global vars
- BreakAfter := BREAK_AFTER;
BreakTime := BREAK_TIME;
SaveDebug := SAVE_DEBUG;
Stats_UserID := STATS_ID;
Index: C:/Simba/Includes/SRL/SRL/msi/Debug.scar
===================================================================
--- C:/Simba/Includes/SRL/SRL/msi/Debug.scar (revision 183)
+++ C:/Simba/Includes/SRL/SRL/msi/Debug.scar (revision 184)
@@ -4,6 +4,7 @@
|==============================================================================|
| For all debugging and progress report routines |
| |
+| * procedure MSI_SetRev; * by RM & Shuttleu |
| * procedure MSI_Debug(); * by Rasta Magician |
| * procedure MSI_AddToProggy(); * by The MSI Team |
| * procedure MSI_GetReportInfo(); * by Coh3n |
@@ -14,12 +15,12 @@


{******************************************************************************}
-{ procedure SetMsiRev; }
+{ procedure MSI_SetRev; }
{ By: Rasta Magician & Shuttleu }
{ Date: 24 July 2010 }
{ Description: Retrieves the user rev of MSI and sets it to var MSIRev }
{******************************************************************************}
-procedure SetMsiRev;
+procedure MSI_SetRev;
var
i: Integer;
s: string;
@@ -250,15 +251,10 @@
WriteFileString(theFile, #13 + #10 + 'This proggie was written ' + TheDate(Date_Formal )+ ' at ' + TheTime + #13 + #10);
end;

- {$IFNDEF SIMBA}
- ClearReport;
- {$ENDIF}
- //ClearDebug;
-
MSI_GetReportInfo;
- MSI_PrintSave(theFile, '{-----------------------------------------------------------------}'); //64 from '{' to '}'
- MSI_PrintSave(theFile, '{ MSI Phoenix Player Report }');
- MSI_PrintSave(theFile, '{------------------------------ ' + PadR(MSIRev, 7) + ' -----------------------------}');
+ MSI_PrintSave(theFile, '{----------------------------------------------------------------}'); //64 from '{' to '}'
+ MSI_PrintSave(theFile, '{ MSI Phoenix Player Report }');
+ MSI_PrintSave(theFile, '{------------------------- Revision ' + MSIRev + ' -------------------------}');
MSI_PrintSave(theFile, '{ ' + PadR('Time Running: ' + TimeRunning, 59) + '}');
MSI_PrintSave(theFile, '{----------------------------------------------------------------}');


@Garrett: The reason I kept a local variable in MSI_Mainloop to keep track of the current loads is because it wasn't really necessary to have it global when it works just fine local. I would like to minimize global variables as much as possible.

I hope this is what you and RM had in mind.

Sir R. M8gic1an

2010-07-30 05:37:45

Nealy. You're forgetting one very typical MSI thing.

What the hell does Loads[0] and Loads[1] mean?!?!

Constants!

~RM

3Garrett3

2010-07-30 18:03:52

From: Rasta Magician
Nealy. You're forgetting one very typical MSI thing.

What the hell does Loads[0] and Loads[1] mean?!?!

Constants!

~RM


But it makes declare players look so ugly with the constants :(

NCDS

2010-07-30 21:00:34

From: 3Garrett3
But it makes declare players look so ugly with the constants :(


Best to use them though for readability. That was one of the main original standards for MSI, was to optimize user friendliness/readability ;)

Don't forget, we want all of SRL to be able to understand this code and make additions.

Coh3n

2010-07-30 23:10:14

There are comments beside those variables… I thought that would be enough. :p

But go ahead and change it, doesn't matter to me. :)

NCDS

2010-07-30 23:15:50

From: Coh3n
There are comments beside those variables… I thought that would be enough. :p

But go ahead and change it, doesn't matter to me. :)


I didn't even check before I posted, I just assumed there was nothing :blushing:

Comment's work for me as long as that's the only time it is used that way. Otherwise thing's would get rather sloppy I would think.

Coh3n

2010-07-30 23:28:15

From: NCDS
I didn't even check before I posted, I just assumed there was nothing :blushing:

Comment's work for me as long as that's the only time it is used that way. Otherwise thing's would get rather sloppy I would think.

Yeah, DeclarePlayers is the only place where it's used.

Sir R. M8gic1an

2010-08-01 08:33:29

From: Coh3n
Yeah, DeclarePlayers is the only place where it's used.


I'll get the consts in there sure. We'll surely use it elsewhere in the script, otherwise why would we even have it?

~RM

Coh3n

2010-08-02 11:27:46

From: Rasta Magician
I'll get the consts in there sure. We'll surely use it elsewhere in the script, otherwise why would we even have it?

~RM

I mean that's the only place where the constants aren't used.