Results 1 to 6 of 6
  1. #1
    FlashFlyyy's Avatar
    Join Date
    Jun 2017
    Gender
    male
    Posts
    141
    Reputation
    10
    Thanks
    19
    My Mood
    Amazed

    FSOD /realm /vault /petyard /dq /nexus /ghall commands

    Hey all! Thought I should contribute a bit more to say thanks to the community for helping me out!

    To add these commands, simply navigate to 'WordCommand.cs' and paste them in

    1. /realm command
    Code:
        internal class RealmCommand : Command
        {
            public RealmCommand()
                : base("realm")
            {
            }
    
            protected override bool Process(Player player, RealmTime time, string[] args)
            {
                World world = player.Client.Manager.Monitor.GetRandomRealm();
    
                player.Client.Reconnect(new ReconnectPacket
                {
                    Host = "",
                    Port = Program.Settings.GetValue<int>("port"),
                    GameId = world.Id,
                    Name = world.Name,
                    Key = world.PortalKey,
                });
                return true;
            }
        }
    2. /ghall command
    Code:
        internal class GHallCommand : Command
        {
            public GHallCommand()
                : base("ghall")
            {
            }
    
            protected override bool Process(Player player, RealmTime time, string[] args)
            {
                try
                {
                    World world = player.Guild.GuildHall;
                    player.Client.Reconnect(new ReconnectPacket
                    {
                        Host = "",
                        Port = Program.Settings.GetValue<int>("port"),
                        GameId = world.Id,
                        Name = world.Name,
                        Key = world.PortalKey,
                    });
                    return true;
                }
                catch
                {
                    player.SendError("You are not a member of a guild!");
                    return false;
                }
            }
        }
    3. /petyard command
    Code:
        internal class PetYardCommand : Command
        {
            public PetYardCommand()
                : base("petyard")
            {
            }
    
            protected override bool Process(Player player, RealmTime time, string[] args)
            {
                World world = player.Client.Manager.AddWorld(new PetYard(player));
                player.Client.Reconnect(new ReconnectPacket
                {
                    Host = "",
                    Port = Program.Settings.GetValue<int>("port"),
                    GameId = world.Id,
                    Name = world.Name,
                    Key = world.PortalKey,
                });
                return true;
            }
        }
    4. /vault command
    Code:
        internal class VaultCommand : Command
        {
            public VaultCommand()
                : base("vault")
            {
            }
    
            protected override bool Process(Player player, RealmTime time, string[] args)
            {
                        player.Client.Reconnect(new ReconnectPacket
                        {
                            Host = "",
                            Port = Program.Settings.GetValue<int>("port"),
                            GameId = player.Manager.PlayerVault(player.Client).Id,
                            Name = player.Manager.PlayerVault(player.Client).Name,
                            Key = player.Manager.PlayerVault(player.Client).PortalKey,
                        });
                        return true;
            }
        }
    A little buggy if you use it within vault

    5. /dq command
    Code:
        internal class DailyQuest : Command
        {
            public DailyQuest()
                : base("dq")
            {
            }
    
            protected override bool Process(Player player, RealmTime time, string[] args)
            {
                player.Client.Reconnect(new ReconnectPacket
                {
                    Host = "",
                    Port = Program.Settings.GetValue<int>("port"),
                    GameId = World.DAILY_QUEST_ID,
                    Key = Empty<byte>.Array,
                });
                return true;
            }
        }
    6. /nexus command
    Code:
        internal class NexusCommand : Command
        {
            public NexusCommand()
                : base("nexus")
            {
            }
    
            protected override bool Process(Player player, RealmTime time, string[] args)
            {
                player.Client.Reconnect(new ReconnectPacket
                {
                    Host = "",
                    Port = Program.Settings.GetValue<int>("port"),
                    GameId = World.NEXUS_ID,
                    Name = "Nexus",
                    Key = Empty<byte>.Array,
                });
                return true;
            }
        }
    Enjoy
    Any problems let me know plz! Or if you know how to perfect the /vault command plz let me know as well

  2. #2
    sgrawsreghawrhgwrhgr's Avatar
    Join Date
    Oct 2014
    Gender
    male
    Location
    UK
    Posts
    516
    Reputation
    10
    Thanks
    729
    My Mood
    Angelic
    I recommend having small checks so that these commands are not usable in given worlds (so if the player is already inside a vault, tell them that they cannot use the command because they're already inside a vault world), all in all looks good.
    Example if Player is p
    Code:
                if (p.Owner is Vault)
                {
                    p.SendError("You're already inside your Vault...");
                    return;
                }

  3. #3
    FlashFlyyy's Avatar
    Join Date
    Jun 2017
    Gender
    male
    Posts
    141
    Reputation
    10
    Thanks
    19
    My Mood
    Amazed
    Quote Originally Posted by Nobody77 View Post
    I recommend having small checks so that these commands are not usable in given worlds (so if the player is already inside a vault, tell them that they cannot use the command because they're already inside a vault world), all in all looks good.
    Example if Player is p
    Code:
                if (p.Owner is Vault)
                {
                    p.SendError("You're already inside your Vault...");
                    return;
                }
    Ye definitely as sometimes '/vault' may keep you on a forever loading page. But then again, the aim is to connect regardless of which world you're in. Makes testing easier as well.
    But, ye can add it

  4. #4
    sebastianfra12's Avatar
    Join Date
    Dec 2013
    Gender
    male
    Posts
    361
    Reputation
    21
    Thanks
    75
    My Mood
    Inspired
    Isn't it better to create one command :thinking:, like /world {name of the world}

  5. #5
    FlashFlyyy's Avatar
    Join Date
    Jun 2017
    Gender
    male
    Posts
    141
    Reputation
    10
    Thanks
    19
    My Mood
    Amazed
    Quote Originally Posted by sebastianfra12 View Post
    Isn't it better to create one command :thinking:, like /world {name of the world}
    Up to the programmer
    For me, I was inspired by Nilly's Realm so I tried to replicate their commands, which were the ones I created

  6. #6
    gewz's Avatar
    Join Date
    Oct 2015
    Gender
    male
    Location
    New Jersey, USA
    Posts
    69
    Reputation
    10
    Thanks
    7
    where in the code do i copy and paste these commands's code in? im sorta new to programming so i based it off of the other commands and tried to find the pattern (i did, but the commands don't register as real commands in game)

Similar Threads

  1. [Solved] [FSoD] Realm Portals Don't Spawn In Nexus
    By Lunacy Gaming in forum Realm of the Mad God Private Servers Help
    Replies: 2
    Last Post: 11-23-2016, 02:05 PM
  2. [Solved] [FSoD] Realm portals don't appear...PLEASE HELP!
    By Lunacy Gaming in forum Realm of the Mad God Private Servers Help
    Replies: 5
    Last Post: 11-23-2016, 10:26 AM
  3. [Solved] [FSoD] Realm portals don't appear
    By Lunacy Gaming in forum Realm of the Mad God Private Servers Help
    Replies: 5
    Last Post: 11-21-2016, 02:16 PM
  4. [Help Request] [FSoD] /realm command
    By Narwallz in forum Realm of the Mad God Private Servers Help
    Replies: 7
    Last Post: 08-20-2016, 03:28 PM
  5. [AS3] How to make Realm Portals appear in Nexus!
    By lkdjnfoskjednfblksjdfn in forum Realm of the Mad God Private Servers Tutorials/Source Code
    Replies: 14
    Last Post: 05-12-2016, 02:41 PM