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!

ShardControl.cs for Common Script Changes

Lokai

Knight
[RunUO 2.0 SVN]REVISED!! ShardControl.cs for Common Script Changes

***TOTAL EDIT*** PLEASE REDOWNLOAD!!!

SHARD CONTROL

********************************************************
CHANGE LOG:

6/10/2007

Added the new AdvancedPlayerGate w/Shard Control, see this link:

http://www.runuo.com/forums/custom-...new-advanced-player-gate-w-shard-control.html

5/4/2007

Totally rewritten, and added several features.

Here are the things you can now control:

m_StartGold ..... Amount of Starting Gold for new players.
m_AccountsPerIP ...... Number of Accounts allowed per IP.
m_TCEnabled ...... Test Center Enabled/Disabled on the fly.
m_AAC ...... Automatic Account Creation for new Accounts.
m_Delay ..... Delay in Minutes between Shard Saves.
m_Warning ..... Warning time in Seconds before Saves.
m_StatCap ..... Adjust all players Total Stat Cap on the fly.
m_SkillsCap ..... Adjust all players Total Skills Cap on the fly.
m_RegsEnabled ..... Turn on/off Use of Reagents for Spells.
m_ResFullHealth ..... On/Off Full Health after Resurrection.
m_PetResFullHealth ..... Full Health for Pets on Resurrection.
m_ProfanityProtection ..... Turn On/Off Profanity Protection.
m_ProfanityAction ..... Set Profanity Action on the fly.
m_Gains ..... Set Skill Gains from Very Low to Automatic.

Settings are now saved to XML format. (Thanks to ArteGordon for his XmlSpawner2 system, that helped with inspiration and much code.)

NEW COMMANDS (** and what they do **):

[Shard (** displays current settings. same as [shardcontrol **)
[ShardControl (** displays current settings. Same as [shard **)
[Shard Help (** displays the ShardControlGump. same as dblck the item **)
[Shard Save {myfilename.xml} (** saves settings to {myfilename.xml} **)
[Shard Load {myfilename.xml} (** loads settings from {myfilename.xml} **)
[Shard Gains 3 (** sets Gains to C_Normal **)
[SetWarning 30 (** sets Warning time to 30 seconds before Saves **)
[SetDelay 25 (** sets Delay to 25 Minutes between Saves **)

********************************************************

This is a nifty little script. It takes common script change needs, and puts them all in an Item called the ShardControl.

I just know some clever scripters are going to improve on this thing, and add all kinds of stuff to it. That's cool. There is a gump that has plenty of room to add more stuff to it. (Sorry, no control of the features through the gump in this release, so you have to [props it.)

OK, as usual, back up your files, and only add this once you understand what files you are replacing and/or changing. :rolleyes: Please don't mess up a file you spent a month perfecting with no backups!

INSTALLATION

If you prefer to make changes manually, here is the list of files, and what you might be able to do manually instead of installing the files included in the release.

Look for #region code identifying what sections were changed or added for Shard Control:
CharacterCreation.cs
AccountHandler.cs
SkillCheck.cs
AutoSave.cs
Spell.cs
PetResurrectGump.cs
ResurrectGump.cs

These files are new or have been totally rewritten:
ShardControl.cs
TestCenter.cs

THESE FILES WERE CREATED WITH RunUO 2.0 SVN 181.

IF YOU HAVE A CLEAN INSTALL, OR DON'T MIND REPLACING YOUR EXISTING FILES, DROP THESE IN THE SCRIPTS FOLDER, OVERWRITING THE EXISTING FILES. (YES TO ALL)
 

Attachments

  • ShardControl.zip
    34.4 KB · Views: 368
  • ShardControl w-Advanced Player Gate.zip
    45.4 KB · Views: 235

septor

Sorceror
Nice!

You could add other commonly changed things here as well:

Map rules
FC & FCC rates
Skill gain rate
Characters per account

..?
 

wulf monat

Sorceror
Looks like a great script man!

i cant wait to see what else will be added to this or made from this, thanks for sharing with the community, even though i pretty much have all the things this controls setup manually, but im sure it will become something even greater with the creative minds at work here.


PS + Karma
 

Lokai

Knight
New Release posted

I have posted the new release I have been working on.

See the first post for changes and instructions.

Please download and replace your files, as needed.
 

septor

Sorceror
Lokai;680495 said:
I have posted the new release I have been working on.

See the first post for changes and instructions.

Please download and replace your files, as needed.
Damnit. I just and I mean JUST got done adding in some edits to your first script.

LOL. Thanks for the re-release, it has killed off all my work :[
 

Lokai

Knight
septor;680601 said:
Damnit. I just and I mean JUST got done adding in some edits to your first script.

LOL. Thanks for the re-release, it has killed off all my work :[


You are welcome. Of course, I don't even know what FC or FCC rates are, nor did I do anything with Map rules yet, so if you have any additions that could be added, feel free.
 

zetamine

Sorceror
Hey

I have just dropped your script in keeping proper structure and it's throwing this error.

Code:
+Misc/ShardControl.cs
          CS0115: Line 90: 'Server.Misc.ShardControl.DisplayWeight': no suitable method found to override

Could you help me figure out how to fix it?
 

Tru

Knight
zetamine;683904 said:
I have just dropped your script in keeping proper structure and it's throwing this error.

Code:
+Misc/ShardControl.cs
          CS0115: Line 90: 'Server.Misc.ShardControl.DisplayWeight': no suitable method found to override

Could you help me figure out how to fix it?

What SVN you using?
 

Lokai

Knight
PrinceArda;684451 said:
how can this script work with Ruo 2 RC1


Look for #region code identifying what sections were changed or added for Shard Control in these files, and add them to your files in the same place:

CharacterCreation.cs
AccountHandler.cs
SkillCheck.cs
AutoSave.cs
Spell.cs
PetResurrectGump.cs
ResurrectGump.cs

These files are new or have been totally rewritten:
ShardControl.cs
TestCenter.cs

In ShardControl.cs, comment out this method:
PHP:
        public override bool DisplayWeight { get { return ResetProperties(); } }
 

Flats

Page
Lokai;684514 said:
In ShardControl.cs, comment out this method:
PHP:
        public override bool DisplayWeight { get { return ResetProperties(); } }
Hi trying to install this for RunUO 2.0 RC1 and i looked in shard control cant find that line anywhere....

EDIT: Nvm found it
 

Flats

Page
Hi Tried to install and got this error

Code:
Errors:
+Accounting/AccountHandler.cs
CS0246: Line 225: The type or namespace name 'Hashtable' could not be found <are you missing a using directive or assembly reference?>
CS0246: Line 227: The type or namespace name 'Hashtable' could not be found <are you missing a using directive or assembly reference?>
Help is appreciated please
 

Lokai

Knight
Flats;692085 said:
Hi Tried to install and got this error

Code:
Errors:
+Accounting/AccountHandler.cs
CS0246: Line 225: The type or namespace name 'Hashtable' could not be found <are you missing a using directive or assembly reference?>
CS0246: Line 227: The type or namespace name 'Hashtable' could not be found <are you missing a using directive or assembly reference?>
Help is appreciated please

I don't know. My version does not refer to Hashtable's at line 225 or 227, as it is using the Dictionary type in SVN 181. Not sure what you did, but I think for this file, all you need to do is use the code that is within the #region tags.
 
help..?

Code:
Errors:
 + Custom/ShardControl w-Advanced Player Gate/Misc/ShardControl.cs:
    CS0115: Line 107: 'Server.Misc.ShardControl.DisplayWeight': no suitable meth
od found to override
I can't figure out why I'm getting this..

Code:
        public override bool DisplayWeight { get { return ResetProperties(); } }
        #endregion
 

Lokai

Knight
bleedingspiderlegs;695381 said:
Code:
Errors:
 + Custom/ShardControl w-Advanced Player Gate/Misc/ShardControl.cs:
    CS0115: Line 107: 'Server.Misc.ShardControl.DisplayWeight': no suitable meth
od found to override
I can't figure out why I'm getting this..

Code:
        public override bool DisplayWeight { get { return ResetProperties(); } }
        #endregion

As stated several places in this thread, that code is for the SVN version. Simply comment out that code, and your scripts should work just fine.

Thanks.
 
Top