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