Anyone still working on this source? If so can someone please help me!
I have been at it for days and can't get mobs to spawn. I have tried different ways.... e.g calling from Sql and txt files neither way works for me and I don't know why.
If anyone can offer me a solution to my problem this would be very grateful.
Also I tried creating mobs the same way portals are loaded and also the same way NPCs are loaded (kind of) couldn't figure it out 100% though.
Currently I am trying to load from txt files again.
Here
public static void LoadMonsters()
{
string[] Monsters = File.ReadAllLines(ServerBase.Constants.MobSpawnsPa th);
for (int i = 0; i < Monsters.Length; i++)
{
string[] Monster = Monsters[i].Split(' ');
Game.Monsters mob = new Conquer_Online_Server.Game.Monsters();
int MobID = int.Parse(Monsters[0]);
int SpawnAmount = int.Parse(Monsters[1]);
ushort MapID = ushort.Parse(Monsters[2]);
ushort StartX = ushort.Parse(Monsters[3]);
ushort StartY = ushort.Parse(Monsters[4]);
ushort FinishX = ushort.Parse(Monsters[5]);
ushort FinishY = ushort.Parse(Monsters[6]);
if (!ServerBase.Kernel.Monsters.ContainsKey(mob.Start X.ToString() + mob.StartY.ToString() + mob.MapID.ToString()))
ServerBase.Kernel.Monsters.Add(mob.StartY.ToString () + mob.StartY.ToString() + mob.MapID.ToString(), mob);
}
Console.WriteLine("Monsters Loaded");
}
public static object M { get; set; }
This is under LoadPortals in DMaps.cs
and this is in Map.cs
public class Monsters
{
private ushort _MapID;
private ushort _MobID;
private ushort _StartX;
private ushort _StartY;
private ushort _FinishX;
private ushort _FinishY;
private ushort _SpawnAmount;
public Monsters(ushort MapID, ushort MobID, ushort StartX, ushort StartY, ushort FinishX, ushort FinishY, ushort SpawnAmount)
{
_MapID = MapID;
_MobID = MobID;
_StartX = StartX;
_StartY = StartY;
_FinishY = FinishY;
_SpawnAmount = SpawnAmount;
}
public Monsters()
{
}
public ushort MapID
{
get
{
return _MapID;
}
set
{
_MapID = value;
}
}
public ushort MobID
{
get
{
return _MobID;
}
set
{
_MobID = value;
}
}
public ushort StartX
{
get
{
return _StartX;
}
set
{
StartX = value;
}
}
public ushort StartY
{
get
{
return StartY;
}
set
{
_StartY = value;
}
}
public ushort FinishX
{
get
{
return FinishX;
}
set
{
_FinishX = value;
}
}
public ushort FinishY
{
get
{
return FinishY;
}
set
{
_FinishY = value;
}
}
public ushort SpawnAmount
{
get
{
return SpawnAmount;
}
set
{
_SpawnAmount = value;
}
}
}
Someone please tel me where I am being very nooby.
Oh btw I know that mob infos are not called yet. I need to figure this out as well.
Looked at many guides and many sources for help but to no avail
Thanks in advance
@Mods and Other epvp users. I posted for help here as it keeps everything about Impulses source in one place and makes it easier for everyone. :)