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!

Client Patch Warning

Joeku

Lord
Client Patch Warning

Client Patch Warning v1.6
Originally created by Joeku AKA Demortris
Completely revamped by XxSP1DERxX

Changelog
-v1.0 > v1.1 Post #12: updated to allow seperate required and suggested patches. Fixed bug that would potentially leave players invulnerable/frozen (Thanks for the report Erica).
-v1.1 > v1.2 Post #13: fixed small bug that would sometimes send gump on invalid clients. Fixed bug that always made the player mortal and unfrozen (was an annoyance for staff who keep immortal).
-v1.2 > v1.3 Post #45 XxSP1DERxX's Complete Revamp: Consolidated the gumps into 1 gump. Consolidated the gump display. Optimized the version checks. Fixed the null Client Version bug. Fixed an exploit to defeat the gump. Fixed a timer bug keeping the timer alive indefinately. Fixed a timer bug making the gumps keep reappearing. 'bad client version' is now written to the console. Fixed a bug with freezing/blessing not being taken off. Removed the Try/Catch and added a Mobile check (jic?). Fixed the spacing on the buttons to be standard for all gump variants. Edited the messages that are sent to the client. Suggested patching no longer blesses/freezes you.
-v1.3 > v1.45 Post #55: Removed the Blessing/CantWalk crap due to bugs. Added Enforce Client Verification so that you can enforce Required clients to go through the client verification as a normal RunUO server would.
v1.45 > v1.5 Post #63: Fixed the problem with EnforceClientVerification. It will now work without any other file modifications.
v1.5 > v1.6 Post #69: Updated to allow a certain amount of seconds for invulnerability protection. Default protection is 15 seconds.

Description
Dynamic Client Patch Warning gump. No distro files included.

Features
-Automatically detects shard name/inserts where neccesary
-Pops up overtop of other gumps on player login (if player's client is not up-to-date)
-Seperate required and suggested patch versions can be enabled.
-Built-in Help Menu.
-Website button.
-Yet more sexy gump art by yours truly!
-Tons of updates and options by XxSP1DERxX!
-Optional invulnerability protection for players, time-based (you can set how long you want). Default 15 seconds.

Patch Suggested Preview*
Patch Required Preview*
Help Gump Preview*

Installation
Extract the attached file to your custom scripts directory. In the file "ClientPatchWarning.cs", locate the following code:
Code:
public class ClientPatchWarning
{
	//Settings
	public static bool EnforceClientVerification = [COLOR="Red"]false[/COLOR];
	public static ClientVersion Required = new ClientVersion( "[COLOR="red"]5.0.1a[/COLOR]" );
	public static ClientVersion Suggested = new ClientVersion( "[COLOR="red"]5.0.1j[/COLOR]" );
	public static string WebsiteURL = "[COLOR="red"]http://www.runuo.com/forums[/COLOR]";
	public static TimeSpan Delay = TimeSpan.FromSeconds( [COLOR="red"]1.0[/COLOR] );
	public static TimeSpan KickDelay = TimeSpan.FromSeconds( [COLOR="red"]30.0[/COLOR] );
	public static int InvulProtection = [COLOR="Red"]15[/COLOR];	//seconds of invulnerability protection
Set the parts in red to what is desired. Enjoy!

Future Plans
-Auto-detect new client patch versions (I have no idea how I can do this, if anyone has any idea please tell me!)
-Simple organized logging with an in-game viewer.

Thank you for using this script, I hope you enjoy it! You can e-mail suggestions/requests to [email protected], post them here, or contact XxSP1DERxX.

*Preview Images are bad quality. Images are not up-to-date.
 

Attachments

  • ClientPatchWarning.cs
    7.5 KB · Views: 233

Pyro-Tech

Knight
This is awesome! I like it...it would also be nice to possibly add in support for custom patches......although im not sure if this is neccessary or not? i never did a patch for my shard yet so....*shrug*

great job though
 

Joeku

Lord
I don't think its possible to detect what files the player's client is using. That would be cool though :p
 

Erica

Knight
So let me get this straight your saying this script if i just put it in my custom folder script and do not change nothing on the script at all that if a player is in client 5.0.1h and i just got that part on script to 5.0.1j they wont be able to do nothing or move till they patch up and they get the gump to read what they gotta do if so please let me know cause if thats the case this is awesome since lots never listen when you tell them to patch up on osi.*PS* Also was wondering if player already has account before i added this script and if there client is 5.0.1h would that also freeze them up till they patch also.
 

Joeku

Lord
If you have it set to "bool required = true;" then they can't do anything until they patch. If you have it set to "bool required = false;" then the gump just pops up every time they log in and they can exit out of it, but it should eventually annoy them enough to make them patch lol.
 

Erica

Knight
Joeku said:
If you have it set to "bool required = true;" then they can't do anything until they patch. If you have it set to "bool required = false;" then the gump just pops up every time they log in and they can exit out of it, but it should eventually annoy them enough to make them patch lol.
hmm thats odd i set this to "bool required = true;" and as a admin i cant move and im at client 5.0.1j and script also of yours set to 5.0.1j i had to prop myself to put cantwalk to true was on false might want to check that .:rolleyes:
 

Kamron

Knight
This would be better if you could have BOTH options, required and recommended. If the required is met, then the recommended is sent only, otherwise the required is used.
 

Kamron

Knight
Also you could have done this script without using new gumps. RunUO comes with OSI's default warning gump (used with moongate travelling etc). if you had used it, you would only need to specify the title, the body, and its callback.
 

Joeku

Lord
Erica said:
hmm thats odd i set this to "bool required = true;" and as a admin i cant move and im at client 5.0.1j and script also of yours set to 5.0.1j i had to prop myself to put cantwalk to true was on false might want to check that .:rolleyes:
Didn't do that for me...

I'll be running some more tests on this, should come out with a new release soon.
 

Joeku

Lord
v1.0 > v1.1
Client Patch Warning v1.1 now posted, please replace the following: "Client Patch Warning v1.0.cs" with the updated version.
Info: updated to allow seperate required and suggested patches. Fixed bug that would potentially leave players invulnerable/frozen (Thanks for the report Erica).
 

Joeku

Lord
v1.1 > v1.2
Client Patch Warning v1.2 now posted, please replace the following: "Client Patch Warning v1.1.cs" with the updated version.
Info: fixed small bug that would sometimes send gump on invalid clients. Fixed bug that always made the player mortal and unfrozen (was an annoyance for staff who keep immortal).
 
P

PoolMan

Guest
Joeku said:
If you have it set to "bool required = true;" then they can't do anything until they patch. If you have it set to "bool required = false;" then the gump just pops up every time they log in and they can exit out of it, but it should eventually annoy them enough to make them patch lol.

I cant find "bool required = " in this script
 

Joeku

Lord
The script has been updated since that post; please read through the entire thread. Now you can have a required version and a suggested version. The required version is default at 4.0.0 (which almost everyone has anyway). If you want it to be the latest version, just set it to 5.0.1j.
 

Erica

Knight
Joeku said:
The script has been updated since that post; please read through the entire thread. Now you can have a required version and a suggested version. The required version is default at 4.0.0 (which almost everyone has anyway). If you want it to be the latest version, just set it to 5.0.1j.
i found a bug ok when a gm or a admin lets say you keep the staff immortal you log off then log back on and your not immortal no more so there should be something to not conflict the admins or any staff member that like to stay immortal.
 

Joeku

Lord
Yes, I thought that I fixed that in version 1.2, but it is still bugging for me too. I'll run some more tests...
 

Kamron

Knight
This should work, but I am at school so I doubt its perfect. It should be enough for you to get an idea of how to fix it (if I didn't already). I also consolidated your gump.
 

Erica

Knight
XxSP1DERxX said:
This should work, but I am at school so I doubt its perfect. It should be enough for you to get an idea of how to fix it (if I didn't already). I also consolidated your gump.
2 errors on yours
Code:
 - Error: Scripts\CustomScripts\ClientPatchWarning.cs: CS0103: (line 25, column
47) The name 'World_Logout' does not exist in the class or namespace 'Server.Cli
entPatchWarning'
 - Error: Scripts\CustomScripts\ClientPatchWarning.cs: CS1026: (line 63, column
49) ) expected
 
Top