RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Shard Progress Report

Shard Progress Report

Charons' Shard Progress Report System

What is it?
Place this script in you custom folder, and start your shard. And every X amount of minutes(set in script) it will complile a list of things to add to a progress report. It is then saved as a txt document, and if you have Email.cs filled out it will send it your email. If you havnt filled out Email.cs, it will make a folder called Progress Reports in your RunUO dir and store the reports there.To enable the Progress Reports, A admin needs to say [ProgressReports True or False

Note: This script makes a Progress Report after so many minutes,that can be changed in the script.The timer will reset after a shard 'bounce'(restart).

Here is a example of what the report look like:
Code:
=======================================================
Your Shard Progress Report as of 12/29/2005 10:55:42 PM
=======================================================

On 12/29/2005 10:55:42 PM, Your shard had 7 Mobiles, 74 Items, and 0 Houses in the World.

=======================================================
Accounts = Inactive:0, Banned:1,and Total:4.

Online:
- Account:retardedhobo, Name:ADMIN, IP:127.0.0.1

Total Count: 0 Player(s),and 1 Staff Member(s).
=======================================================
The amount of gold found was 3004 pieces.

Read following post for set-up support

I accept Bugs, Comments, and things you want added to the report list! :)
 
Set up

How to change the Timer

Open Script.
Line 17.
private static TimeSpan m_Delay = TimeSpan.FromMinutes( 60.0 );
Change 60 to amount you like.

How to add support for tokens.

Open Script.
Line 127 and 128.
//int to = 0;
//int tok = 0;
Remove then // from both lines.

Go to line 179 and Line 195.
Remove the /* and */

On line 184, Change Token, to the Public name of the token in the Token system you are using.
I have it set up to count the amount of coins. TokenChecks can be added by yourself, Look at the Gold BankCheck(Line 167 to Line 170) and try to script it youself, But i would be happy to help you with that.

How to make Progress Reports on Saves instead of the timer.
Open AutoSave.cs in your Misc folder.
Go to line 81.
Right under it, Add this:
ProgressReport.GenReport();
Save the file.
Move Progress.cs to the Misc folder.
Restart Shard(or start)
Say [ProgressReports False
And now, on evey save, it will make a Progress Report, and email it( if email.cs is filled in)

I accept Bugs, Comments, and things you want added to the report list!
 

Attachments

  • Progress.txt
    7.7 KB · Views: 41
P

PoolMan

Guest
My line 81 is not the same as yours ,, Could you please show me what line it needs to be under?
 
Sry about that! Diddnt think about modded AutoSave.cs.

It needs look something like that.
Code:
public static void Save()
		{
			if ( AutoRestart.Restarting )
				return;

			try{ Backup(); }
			catch{}

			World.Save();
			[COLOR="Red"]ProgressReport.GenReport();[/COLOR]
		}

Basicly, it needs to be with the World.Save();, so jsut place whats in red under where ever your World.Save(); is, under the "public static void Save" method. :) Hope it makes sence!
 
P

PoolMan

Guest
This is my AutoSave, and the progress.cs is in the Misc folder.
Code:
		public static void Save()
		{
			if ( AutoRestart.Restarting )
				return;
			
			try{ Backup(); }
			catch{ Console.WriteLine( "Backup attempt failed!" ); }
			
			World.Save();
			
			ProgressReport.GenReport(); // Added for Progress Report 

		}

This is the error I am getting
Code:
 - Error: Scripts\Misc\AutoSave.cs: CS0122: (line 163, column 4) 'Server.Misc.Pr
ogressReport.GenReport()' is inaccessible due to its protection level
 
P

PoolMan

Guest
I'm sorry but I get this witht he new one.

Code:
 - Error: Scripts\Misc\Progress.cs: CS1585: (line 107, column 9) Member modifier
 'static' must precede the member type and name
 
P

PoolMan

Guest
Code:
World: Saving...done in 1.0 seconds.
Generating Progress Report...done

Thank you very much :) great script!
 
Top