ROTMG free hack Hack ROTMG and Private Server
   Realm of the Mad God Hacks, Cheats and Private Server
PS
Private Server
HC
Hacked Client
$
Donations
?
Help
C
Community

Follow us on Facebook!
Please Register and Login to our forum to access all features!

Ranks On My Server Not Working? - ROTMG Tool


Get help with your own Realm of the Mad God private server. Lean how to set up server files, add content and more!

Ranks On My Server Not Working?

Postby koalaleader » Wed 23 Aug 17 - 8:33

I'm relatively new to RotMG server programming, so please bear with me.
I guess I set my ranks up incorrectly. I need help fixing them. I can't execute commands or speak in chat.
Player.cs Stuff that Matters:
Code
        public Player(RealmManager manager, Client psr)
: base(manager, (ushort)psr.Character.ObjectType, psr.Random)
        {
            try
            {
                Client = psr;
                Manager = psr.Manager;
                StatsManager = new StatsManager(this, psr.Random.CurrentSeed);
                Name = psr.Account.Name;
                switch (psr.Account.Rank)
                {
                    case 0:
                        Name = psr.Account.Name; break;
                    case 1:
                        Name = "[P] " + psr.Account.Name; break;
                    case 2:
                        Name = "[Helper] " + psr.Account.Name; break;
                    case 3:
                        Name = "[Mod] " + psr.Account.Name; break;
                    case 4:
                        Name = "[GM] " + psr.Account.Name; break;
                    case 5:
                        Name = "[Dev] " + psr.Account.Name; break;
                    case 6:
                        Name = "[Admin] " + psr.Account.Name; break;
                    case 7:
                        Name = "[Founder] " + psr.Account.Name; break;
                }
                AccountId = psr.Account.AccountId;
                FameCounter = new FameCounter(this);
                Tokens = psr.Account.FortuneTokens;
                HpPotionPrice = 1;
                MpPotionPrice = 1;

                Level = psr.Character.Level == 0 ? 1 : psr.Character.Level;
                Experience = psr.Character.Exp;
                ExperienceGoal = GetExpGoal(Level);
                Stars = GetStars();
                Texture1 = psr.Character.Tex1;
                Texture2 = psr.Character.Tex2;
                Credits = psr.Account.Credits;
                NameChosen = psr.Account.NameChosen;
                CurrentFame = psr.Account.Stats.Fame;
                Fame = psr.Character.CurrentFame;
                XpBoosted = psr.Character.XpBoosted;
                XpBoostTimeLeft = psr.Character.XpTimer;
                xpFreeTimer = XpBoostTimeLeft != -1.0;
                LootDropBoostTimeLeft = psr.Character.LDTimer;
                lootDropBoostFreeTimer = LootDropBoost;
                LootTierBoostTimeLeft = psr.Character.LTTimer;
                lootTierBoostFreeTimer = LootTierBoost;

Commands.cs Stuff that Matters:
Code
    public abstract class Command
    {
        protected static readonly ILog log = LogManager.GetLogger(typeof (Command));

        public Command(string name, int permLevel = 0)
        {
            CommandName = name;
            PermissionLevel = permLevel;
        }

        public string CommandName { get; private set; }
        public int PermissionLevel { get; private set; }

        protected abstract bool Process(Player player, RealmTime time, string[] args);

        private static int GetPermissionLevel(Player player)
        {
            if (player.Client.Account.Rank == 1)
                return 1;
            return 0;
            if (player.Client.Account.Rank == 2)
                return 2;
            return 0;
            if (player.Client.Account.Rank == 3)
                return 3;
            return 0;
            if (player.Client.Account.Rank == 4)
                return 4;
            return 0;
            if (player.Client.Account.Rank == 5)
                return 5;
            return 0;
            if (player.Client.Account.Rank == 6)
                return 6;
            return 0;
        }

I have my account rank set to 6.
koalaleader  <i> Offline</i>
Just Joined
Just Joined
Posts: 1
Joined: Feb '15
PS Name: koalaleader
Thanks: 0

Postby Lengand » Fri 25 Aug 17 - 9:23

@koalaleader I might br able to help, which source are you using?(fsod, doomered, creepylava, etc)

"The Legend is rising...
Rising from the Graveyard of the Immortals
To destroy the Destroyer
and to beat the unbeatable
I will rise to conquer...
Conquer the Universe"

~Lengand~

↓History↓


Came Back in 2015ish
Founder of: Legends of Tomorrow
Donor since April 2017
Helper Since Oct 2017
Moderator Since Dec 2017
User avatar
Lengand  <i> Offline</i>
Moderator
Moderator
Posts: 88
Joined: Aug '16
PS Name: Legend
Location: In the corner of your room, watching you from the shadows
Thanks: 4
Bug Zapper Award



Related topics

 Topic Name    Author   Replies   Views 
This topic is locked, you cannot edit posts or make further replies. How to add different ranks and change permissions?

jackaiken

1

820

This topic is locked, you cannot edit posts or make further replies. My wServer.exe stopped working

babyk

5

1288

This topic is locked, you cannot edit posts or make further replies. Crazy Shrank isnt working for me!

Nyaro

6

1376