class Server
{
public SwitchBoard sBoard = new SwitchBoard();
public void Start()
{
// Create a communication with another server.
// the 'true' makes it constantly connected.
sBoard.Add("192.168.0.1", 2001, "Heaven", true);
// Starts our server.
StartServer("192.168.0.1", 2000, "Planet");
}
}
class HeavenPortal : Item
{
public override void OnUse()
{
// Switches the player to that server, all current
// properties go with him.
Player["Location"] = "Heaven";
sBoard.TradePlayer("Heaven", Player);
}
}