You navigate to player.cs which is located in wServer>Realm>Entities>Player>Player.cs
Search for this
Under this will beCode:this.psr = psr; statsMgr = new StatsManager(this); switch(psr.Account.Rank) {
To change the title of a rank you just rename what is inside the "[]" So you could change "[Owner] " to, "[Founder] "Code:case 0: Name = psr.Account.Name; break; case 1: Name = "[Helper] " + psr.Account.Name; break; case 2: Name = "[Donator] " + psr.Account.Name; break; case 3: Name = "[Moderator] " + psr.Account.Name; break; case 4: Name = "[Developer] " + psr.Account.Name; break; case 5: Name = "[HDeveloper] " + psr.Account.Name; break; case 6: Name = "[Co-Owner] " + psr.Account.Name; break; case 7: Name = "[Owner] " + psr.Account.Name; break; }
I will now show you an example of how to add a rank
Copy and pasting this and then change the rank nameCode:Name = "[Developer] " + psr.Account.Name; break; case 5:
I will then place this in the list wherever i want it to be in the ladder of authorityCode:Name = "[Ragezone] " + psr.Account.Name; break; case 5:
I now have two rank 5's ("case 5:" is rank 5) so i increase the value of all of them going up by one so that it is continuously increasing in value such as 1, 2, 3, 4...Code:case 0: Name = psr.Account.Name; break; case 1: Name = "[Helper] " + psr.Account.Name; break; case 2: Name = "[Donator] " + psr.Account.Name; break; case 3: Name = "[Moderator] " + psr.Account.Name; break; case 4: Name = "[Ragezone] " + psr.Account.Name; break; case 5: Name = "[Developer] " + psr.Account.Name; break; case 5: Name = "[HDeveloper] " + psr.Account.Name; break; case 6: Name = "[Co-Owner] " + psr.Account.Name; break; case 7: Name = "[Owner] " + psr.Account.Name; break; }
it should now look like this
This means that the "Ragezone" rank is a rank under developer and a rank over Moderator. To add this to the /rank command list you navigate to admincommands.cs which is located at wServer>Realm>Entities>Commands>admincommands.csCode:case 0: Name = psr.Account.Name; break; case 1: Name = "[Helper] " + psr.Account.Name; break; case 2: Name = "[Donator] " + psr.Account.Name; break; case 3: Name = "[Moderator] " + psr.Account.Name; break; case 4: Name = "[Ragezone] " + psr.Account.Name; break; case 5: Name = "[Developer] " + psr.Account.Name; break; case 6: Name = "[HDeveloper] " + psr.Account.Name; break; case 7: Name = "[Co-Owner] " + psr.Account.Name; break; case 8: Name = "[Owner] " + psr.Account.Name; break; }
You then navigate to
or alternatively ctrl+f "/rank"Code:class Rank : ICommand { public string Command { get { return "rank"; } } public int RequiredRank { get { return 4; } } public void Execute(Player player, string[] args) { if (args.Length < 2) { player.SendHelp("Usage: /rank <username> <number>\n0: Player\n1: Donator\n2: Game Master\n3: Developer\n4: Head Developer\n5: Admin"); } else { try { using (Database dbx = new Database()) { var cmd = dbx.CreateQuery(); cmd.CommandText = "UPDATE accounts SET rank=@rank WHERE name=@name"; cmd.Parameters.AddWithValue("@rank", args[1]); cmd.Parameters.AddWithValue("@name", args[0]); if (cmd.ExecuteNonQuery() == 0) { player.SendInfo("Could not change rank"); } else player.SendInfo("Account rank successfully changed"); } } catch { player.SendInfo("Could not change rank, please change rank in database"); } } } }
You then edit this "Usage: /rank <username> <number>\n0: Player\n1: Donator\n2: Game Master\n3: Developer\n4: Head Developer\n5: Admin"
"n3: Developer" means that /rank (players name) 3 makes them a developer so we re organise this as in this it says that case 3 is developer (This is a unorganized command which i will do now i do apologise for not adding the other commands prior to this)
You should replace the text inside usage if you replaced the rank part of player.cs with mine
Thank you for reading this and hope you put this to use to manage your servers ;)Code:("Usage: /rank <username> <number>\n0: Player\n1: Helper\n2: Donator\n3: Moderator\n4: Ragezone\n5: Developer\n6: Head Developer\n7: Co-Owner\n8: Owner");
Please support us by helping us make a section by speaking your mind at this link
http://forum.ragezone.com/f600/secti...99/index2.html



Reply With Quote![[RotMG] How to edit rank tags and how to add ranks](http://ragezone.com/hyper728.png)

