Adding a new dungeon!
Okey so as a part 2 for my previously thread.
now as the first thing: If there is any tutorials like this one that is better please tell me
Anyways here we go:
Step1:
Go to editor and make your map, save it to your server folder and run worldconverter.exe and make a wmap. We are gonna call the map: MpghMap(IF YOU DONT KNOW HOW TO DO THIS LOOK AT MY PREVIOUSLY THREAD!)
step2:
Open your server solution and find the "worlds" folder wich is located in:
Wserver>Realm>worlds.
paste your .jm(MpghMap.jm) file and .wmap(MpghMap.wmap) file in there and make a new .cs file called: MpghMap.cs
inside that replace everything with this:
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System****;
namespace wServer.realm.worlds
{
public class MpghMap : World
{
public MpghMap()
{
Name = "Mpgh Test Dungeon";
Background = 0;
// Difficulty = 5;
// SetMusic("test music");
AllowTeleport = true;
base.FromWorldMap(typeof(RealmManager).Assembly.GetManifestResourceStream("wServer.realm.worlds.MpghMap.wmap"));
}
public override World GetInstance(ClientProcessor psr)
{
return RealmManager.AddWorld(new MpghMap());
}
}
}
Step3:
Go to Wserver>Realm and go in World.cs
When your in there find this:
Right above that add this code:
Code:
public const int MPGHMAP = -38;
Step4:
Go to Wserver>Realm and go into RealmManager.cs
when your inside that find this code:
Code:
Monitor = new RealmPortalMonitor(Worlds[World.NEXUS_ID] as Nexus);
Right above that add this code:
Code:
Worlds[World.MPGHMAP] = new MpghMap();
Step5:
Now go to Wserver>Realm>Entities>Player and go into player.cs
When your in that find this code:
Code:
default: SendError("Portal Not Implemented!"); break;
Right above that add this code:
Code:
case 0x5065:
world = RealmManager.AddWorld(new MpghMap()); break;
NOTE! The "0x5065:" is the obj id of my dungeon portal. Change it to the obj id you use for your portal!
When this is done save all! and rebuild the project!
If this helped you please lave a "thanks"
-Enjoy!