Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Snippet] Level limit for clan creation

Status
Not open for further replies.
Newbie Spellweaver
Joined
Sep 21, 2013
Messages
6
Reaction score
5
Hello guys, this is my first topic on here. I'm going to show you guys how to set a level limit for clan creation.

First of all, go to ClanManager.cs and find this:

Code:
if (Name.Length <= 3 || Name.Length >= 12) // Check for the size of the clan name 
            {
                User.send(new PACKET_CHAT("SYSTEM", PACKET_CHAT.ChatType.Whisper, "SYSTEM >> Please choose an smaller/longer name!", User.SessionID, User.Nickname));
                return;
            }

Now, add this:

Code:
if (LevelCalculator.getLevelforExp(User.Exp) < 50)
            {
                User.send(new PACKET_CHAT("SYSTEM", PACKET_CHAT.ChatType.Whisper, "SYSTEM >> You have to be level 50 to create a clan.", User.SessionID, User.Nickname));
                return;
            }

If you think 50 is too much, you can change it. Thanks for reading.
 
Junior Spellweaver
Joined
Mar 19, 2011
Messages
129
Reaction score
7
Re: Level limit for clan creation

Nice tutorial :)
 
Last edited:
Status
Not open for further replies.
Back
Top