muddesigner/MudGame/Scripts/WorldCalifornia.cs
Scionwest_cp 93a27ca75f MudEngine:
- Fixed the ScriptEngine and CommandEngine not loading Custom game commands from scripts.
 - BaseCharacter's Create, Initialize, Send and FlushConsole are now overridable via scripts.
 - Invalid commands are now printed to the player "Invalid Command."

MudGame:
 - Added CommandSay script that adds primitive chatting support. Only players within the same Room can see the messages.
 - Renamed California script to WorldCalifornia
 - Renamed MyGame script to EarthGame.
 - Added Clear command script for and Say command script for showing how to build custom commands for use with the game. The commands can only be added server-side, but used client-side.
2010-08-15 14:11:21 -07:00

50 lines
No EOL
1.9 KiB
C#

public class WorldCalifornia
{
private Game _Game;
public WorldCalifornia(Game game)
{
_Game = game;
}
public void Create()
{
//Instance our Realm
Realm myRealm = new Realm(_Game);
myRealm.Name = "California";
myRealm.Description = "The Beaches of California are relaxing and fun to be at.";
myRealm.IsInitialRealm = true;
_Game.World.AddRealm(myRealm);
Zone myZone = new Zone(_Game);
myZone.Name = "San Diego";
myZone.Realm = myRealm.Name;
myZone.Description = "San Diego has many attractions, including Sea World!";
myZone.IsInitialZone = true;
myRealm.AddZone(myZone);
//Create our HotelRoom
Room myRoom = new Room(_Game);
myRoom.Name = "Hotel Room B33";
myRoom.IsInitialRoom = true;
myZone.AddRoom(myRoom);
myRoom.DetailedDescription.Add("Your Hotel Room is pretty clean, it is small but not to far off from the beach so you can't complain.");
myRoom.DetailedDescription.Add("You can exit your Hotel Room by walking West");
Room myHallway = new Room(_Game);
myHallway.Name = "Hotel Hallway";
myHallway.DetailedDescription.Add("The Hotel Hallway is fairly narrow, but there is plenty of room for people to traverse through it.");
myHallway.DetailedDescription.Add("Your Hotel Room B33 is to the East.");
myHallway.DetailedDescription.Add("Hotel Room B34 is to your West.");
myZone.AddRoom(myHallway);
myZone.LinkRooms(AvailableTravelDirections.West, myHallway, myRoom);
Room nextRoom = new Room(_Game);
nextRoom.Name = "Hotel Room B34";
nextRoom.DetailedDescription.Add("This Hotel Room is pretty dirty, they must not have cleaned it yet.");
nextRoom.DetailedDescription.Add("You can exit this room by walking East");
myZone.AddRoom(nextRoom);
//Link
myZone.LinkRooms(AvailableTravelDirections.East, myHallway, nextRoom);
}
}