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!

[1.0 and 2.0] Razor Feature Negotiation

Zippy

Razor Creator
[1.0 and 2.0] Razor Feature Negotiation

Summary
This script allows your server to negotiate with Razor to determine which features are allowed on your server. This script will work with both 1.0 and 2.0 RunUO versions.

Installation
Simply place this script anywhere in your Scripts sub-folder.

Configuration
The following entries appear at the top of the script file:
Code:
		public const bool Enabled = true; // Is the "Feature Enforced" turned on?
		public const bool KickOnFailure = true; // When true, this will cause anyone who does not negotiate (include those not running Razor at all) to be disconnected from the server.
		public static readonly TimeSpan HandshakeTimeout = TimeSpan.FromSeconds( 30.0 ); // How long to wait for a handshake response before showing warning and disconnecting
		public static readonly TimeSpan DisconnectDelay = TimeSpan.FromSeconds( 15.0 ); // How long to show warning message before they are disconnected
		public const string WarningMessage = "The server was unable to negotiate features with Razor on your system.<BR>You must be running the <A HREF=\"http://razor.runuo.com/download.php\">latest version of Razor</A> to play on this server.<BR>Once you have Razor installed and running, go to the <B>Options</B> tab and check the box in the lower right-hand corner marked <B>Negotiate features with server</B>.  Once you have this box checked, you may log in and play normally.<BR>You will be disconnected shortly.";
These are fairly self explanitory, I think. Below them is the following section:
Code:
		public static void Configure()
		{
			// TODO: Add your server's feature allowances here
			// For example, the following line will disallow all looping macros on your server
			//DisallowFeature( RazorFeatures.LoopedMacros );
		}
You can add a list of features to be blocked by editing this area. The list of features appears directly below it. So, to disallow The light filter and the weather filter, you would change this section to the following:
Code:
		public static void Configure()
		{
			DisallowFeature( RazorFeatures.FilterWeather );
			DisallowFeature( RazorFeatures.FilterLight );
		}

How it works (This section describes the default configuration. If you change the configuration, it will work differently.)
This script negotiates features with Razor by sending a packet to the client and listening for a response sent by Razor.
Razor sends the response if and only if the "Negotiate features with server" option is checked on the "Options" tab. If players do not check this box, then Razor will not respond to the negotiation packet.
After starting negotiation, the server waits for 30 seconds for Razor to respond. If no response is received, a message is displayed to the user and 15 seconds later they are disconnected from the server. This means that both users who have not checked the "Negotiate features with server" box and users who do not have Razor running at all will be disconnected from your server. If you use this script with the default configuration, your users must be running Razor version 1.0.8 or higher in order to play on your server. The reason for this is that the users must voluntarily allow the server to detect Razor. If they chose not to allow it, then the server will be unable to detect them.
If the user has their Razor properly configured, they will see no messages and can play as normal. Features which have be disallowed by the server will show up as "locked" on the Razor window and players will not be able to use them.

Note: This script also requires Razor version 1.0.8 to work. This Razor version is being released today, and all users will be automatically updated over the next 24 hours. Users who prevent razor from updating properly or who use an other version of Razor will be treated as though they are not using Razor at all. In the default configuration, this means they will be shown a message and then disconnected from the server.

NOTICE: This feature and this script have only undergone a small amount of testing. There may be unexpected problems related to this script, and you are using it AT YOUR OWN RISK. Please test it before placing it on your live shard. Also, please DO NOT post bugs in this thread. Please post bugs relating to this feature and this script in the Razor Support Forum here on RunUO.com. Please post all general support questions (How do I do ____? Why is my ____ not working?) in this thread. Please do not ask questions about this script in the Razor Support Forum. The Razor Forum is for Razor questions and bugs related to this script (not support questions)!

Thank you, and enjoy.
 

Attachments

  • RazorNegotiator.cs
    6 KB · Views: 752

Pyro-Tech

Knight
wow...this is great.

too bad there isn't a better way to distinguish old versions and people who arent using it. That may be one reason i won't use this right away due to it require's everyone to run razor.

but this will be helpful to many....thanks for this :)
 
I agree with you wholeheartedly, but i can see from a technical standpoint where that would be difficult. TBH, I'd just put in the connectuo listing for the shard "Requires Razor" in description field.

If a player really wants to play the shard, they'll install it and just minimize/ignore it.
 
this does sound great, and i would use it, except to many of my players use the old encryption method (at least until connect uo can split up the patch files and support multi uo for gm's)

to bad can not make 2 different versions of 1.0.8 (1.0.8 & 1.0.8 old enc or what ever)
one for the new encryption and one for old encryption - because many many people are still using the old encrption method
 

Dr. Phillie

Wanderer
It gives me this:

Why? How to get rid of that message?
 

Zippy

Razor Creator
Lord_Greywolf;698342 said:
this does sound great, and i would use it, except to many of my players use the old encryption method (at least until connect uo can split up the patch files and support multi uo for gm's)

to bad can not make 2 different versions of 1.0.8 (1.0.8 & 1.0.8 old enc or what ever)
one for the new encryption and one for old encryption - because many many people are still using the old encrption method
There is no "old" encryption method. Razor will work with anything back until around 4.0.0.

Dr. Phillie;698437 said:
It gives me this:

Why? How to get rid of that message?
I'll fix that and post an update later today.
 

Setharnas

Sorceror
Dr. Phillie;698473 said:
Will there come a change, if a player doesn't use razor he could still play the game?

Zippy;698652 said:
Unlikely.

But definitely a usefull thing, and as such a feature request supported by me. :p

(Disclaimer: of course I recognize that your word on it is final. A request is hardly a bad thing though.)
 
Dudes, I think that its more of a technical problem than him choosing not to allow non razor users on.

Zippy said:
This script negotiates features with Razor by sending a packet to the client and listening for a response sent by Razor.

I'm guessing that since they were made before this negotiation script, older versions of razor don't know how to respond to the packet sent by the script. They can't be detected as existing thus they are treated the same as not having razor running. So, In order for the script to allow clients without razor running at all, it would also have to allow earlier versions of razor that cannot respond to the packet sent by the server, which defeats the purpose of blocking some razor features, since the players will just use an older version to use features which aren't allowed.
 
Zippy;698456 said:
There is no "old" encryption method. Razor will work with anything back until around 4.0.0.

sorry, i should have been more specific
It will work with the clients, but not all 3rd party programs using the old encryption method (the one introduced in 5.0.65 is the new method that osi uses)
so only those using razor or connect uo to coonnect can use the newest razor

and like i said - neither one supports multi uo, multiple patches, and a few other features, that a lot of shards still use

I still love the idea, and hopefully once connect uo gets fully finctional, i amy be able to use it then
until then myself and a lot of other players are stuch using razor 1.0.1 or earlier versions only
 
connect uo will only allow me to have 1 big patch file, not many smaller ones
can have many files instide of it but only 1 patch file
unless it was changed in the last couple of months again

but i have never got multi uo to work it - just sits there whne i try to open a second one up - but i could be doing something wrong

but it still does not fully support all of the different files either - there are a few that players still complain about, like bodydef, etc not working right

but things like that are for the connect uo discussion forums and not for here
 

Estelendil

Sorceror
Hi,
i have problem, when i set this row to Configuration method

Code:
public static void Configure()
		{
			DisallowFeature( RazorFeatures.FilterWeather );
			DisallowFeature( RazorFeatures.FilterLight );
		}

And i start with "Negotiate features with server" as checked, an i have set filter light on razor. Light on server is stay filtered by razor.

I was thing that this setting can help disable this filter. Or i understand wrong? :rolleyes:
 
a nice simple question - has any one have this running yet on their shard and got it working correctly?

And was it worth it?

just making sure before i force everyone to have razor :)
 

Tru

Knight
Lord_Greywolf;703792 said:
a nice simple question - has any one have this running yet on their shard and got it working correctly?

And was it worth it?

just making sure before i force everyone to have razor :)

I use it to simply filter Light and Weather and it works fine. I toyed with nulling auto doors and it worked but I removed it as that one annoyed people.
 
Top