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:
These are fairly self explanitory, I think. Below them is the following section:
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:
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.
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.";
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 );
}
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.