Can anyone help?
So I have been trying to get my new dungeon to work for the last few hours. I have watched all the tutorials many times, and I just cant seem to get it working. If I remove the line of code from RealmManager.cs the Wserver doesn't crash anymore, but the portal doesn't work.
Here is what the error looks like: http :// imgur .com/ Tkc9OPs
As for all the code I have added
Shatters.cs
=using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using wServer.realm.entities;
using wServer.logic.loot;
namespace wServer.realm.worlds
{
public class Shatters : World
{
public Shatters()
{
Name = "Shatters";
Background = 0;
AllowTeleport = true;
base.FromWorldMap(typeof(RealmManager).Assembly.Ge tManifestResourceStream("wServer.realm.worlds.Shat ters.wmap"));
}
public override World GetInstance(ClientProcessor psr)
{
return RealmManager.AddWorld(new Shatters());
}
}
}
Player.cs
case 0x5050:
world = RealmManager.AddWorld(new Shatters()); break;
World.cs
public const int Shatters = -13;
RealmManager.cs
Worlds[World.Shatters] = new Shatters();
XML
<Object type="0x5049" id="Shatters Key">
<Class>Equipment</Class>
<Item/>
<RemoteTexture>
<Instance>draw</Instance>
<Id>105357490</Id>
</RemoteTexture>
<SlotType>10</SlotType>
<Description>Do you dare enter?</Description>
<Sound>use_key</Sound>
<Consumable/>
<Soulbound/>
<Activate id="Shatters Portal">Create</Activate>
</Object>
<Object type="0x5050" id="Shatters Portal">
<Class>Portal</Class>
<IntergamePortal/>
<DungeonName>The Shatters</DungeonName>
<RemoteTexture>
<Instance>draw</Instance>
<Id>5347860293877760</Id>
</RemoteTexture>
</Object>
Last edited by Tehflames; 02-14-2016 at 08:16 AM.
<DungeonName>The Shatters</DungeonName>
^ The dungeon name should be the same as the name of the class you made ( public class Shatters : World )
so change it to
<DungeonName>Shatters</DungeonName>
in World.cs above this line
protected World()
put in
public const int SHATTERS = -13;
in RealmManager.cs above this line
Monitor = new RealmPortalMonitor(this);
(or if your using a different source than fab, below one of these lines: AddWorld(World._______ID, new _______()); )
put in this:
Worlds[World.SHATTERS] = new Shatters();
You don't want your class name and the world.cs name to be the same, so one will be caps for this.
If you get an error with something about embeddedResource, make sure your .jm or .wmap file is inside of the solution and in it's correct location (for you it's wServer/realm/worlds/Shatters.wmap) and then in visual studio, click on the map file, goto the file properties, and in build action change it from None to Embedded Resource and rebuild the solution.
AFTER MAKING CHANGES TO THE GAME ALWAYS REBUILD THE SOLUTION
Hope it works for you!
Last edited by plokijjikolp; 02-14-2016 at 10:57 AM.
Thanks for the reply, I added everything that you said and it still gives me the error when I try to launch the Wserver.
When I remove "public const int SHATTERS = -13;" from Realmmanager.cs the Wserver doesn't crash anymore.
And if this helps here is what the error looks like: http :// imgur .com/ Tkc9OPs
Thanks again for your reply.
Oh and I forgot to mention that I am using club source.
Is this a common problem with Club source? Should I try switching sources?