MySqlCommand cmd = new MySqlCommand(MySqlCommandType.SELECT);
cmd.Select("mobspawns");
uint Count = 0;
MySqlReader r = new MySqlReader(cmd);
while (r.Read())
{
MobSpawn S = new MobSpawn(r.ReadUInt16("Amount"), Dictionary.BaseMobs[r.ReadUInt16("SpawnMob")], r.ReadUInt16("X"), r.ReadUInt16("Y"), r.ReadUInt16("Spread"), r.ReadUInt16("Map"));
Count += (uint)S.Members.Count;
}
Console.WriteLine(Program.Title + " Spawning " + Count + " monsters into the world");
}
but there are no spawns at all..
so I looked in Spawn.cs
Quote:
public class MobSpawn
{
public Mob MobCoords(Mob M)
{
M.X = (ushort)Program.Rand.Next(X - Spread, Y + Spread);
M.Y = (ushort)Program.Rand.Next(Y - Spread, Y + Spread);
return M;
}
public MobSpawn(uint Amount, BaseMob Type, ushort BindX, ushort BindY,ushort Dist, ushort BindMap)
{
try
{
MobType = Type;
TotalSpawn = Amount;
X = BindX;
Y = BindY;
Spread = Dist;
if(!Dictionary.Maps.ContainsKey(BindMap))
{
Map = new Map(Enum.PkType.None);
Dictionary.Maps.ThreadSafeAdd(BindMap, Map);
}
for (uint I = 0; I < Amount; I++)
{
Mob M = new Mob();
M.Map = BindMap;
M = MobCoords(M);
int Tries = 10;
while (Tries > 0 && !Calculations.FreeCoord(M.X, M.Y, M.Map, M.Instance))
{ M = MobCoords(M); Tries--; }
M.UID = this.Map.MobCounter + I;
}
Map.MobCounter += Amount;
}
catch (Exception E) { Console.WriteLine(E.ToString()); }
}
public Dictionary<uint, Mob> Members = new Dictionary<uint, Mob>();
BaseMob MobType;
public uint TotalSpawn;
public uint TotalDead
{
get
{
uint Count = 0;
foreach (Mob M in Members.Values)
if (!M.Alive)
Count++;
return Count;
}
}
public ushort X, Y, Spread;
public Map Map;
}
}
I added a catch (Exception E) { Console.WriteLine(E.ToString()); } to gimme the errors,
and it said
Object reference is not set to an instance of an object,
I don't know how to solve this prob, Any advice?
Im still a learner , so a little help would be very appriciated
So I just took a few seconds to open up the source...
Massive hint for you.
It's a total of 2 lines of code you need to add... and they are exactly related to what I said in the faq.
You need to add the monsters you are creating to the spawn and you need to add them to the map.
*gasp*
I'm sorry if my temper seems a tad short atm but this question has been brought up at LEAST 50 times in the past two days (seriously... every time I come back like 5 new ppl have added me on msn and that's the first thing they say) and it's getting a little old.
Adding the basic spawns is a very simple thing which I've essentially done for you. I suggest you read through the code and see what is missing... cause it's not missing much for that.
Movement/attacking/respawns/drops and anything advanced, you're on your own for that part (although I've also provided advice about that)
So I just took a few seconds to open up the source...
Massive hint for you.
It's a total of 2 lines of code you need to add... and they are exactly related to what I said in the faq.
You need to add the monsters you are creating to the spawn and you need to add them to the map.
*gasp*
I'm sorry if my temper seems a tad short atm but this question has been brought up at LEAST 50 times in the past two days (seriously... every time I come back like 5 new ppl have added me on msn and that's the first thing they say) and it's getting a little old.
Adding the basic spawns is a very simple thing which I've essentially done for you. I suggest you read through the code and see what is missing... cause it's not missing much for that.
Movement/attacking/respawns/drops and anything advanced, you're on your own for that part (although I've also provided advice about that)
Cool you are one of members in epvpers who make most guides in coding glad to see you here so long....
[Dev] Hellmouth Revival 03/16/2011 - CO2 Private Server - 235 Replies <Cleaned for personal use>
NOTE: This is not related to the old hellmouth server. This is a private project which will most likely never see the light of day but I wanted a simple place for me to put my notes and document a few things....
Goals
See how much the conquer client can be streamlined and turned into something that I feel is worthwhile playing. This will consist of the following steps...
Question About Hellmouth 03/07/2011 - CO2 Private Server - 6 Replies Well Maybe this is not the right section, But I'm going to post it here.
This is a Personal question to pro4never (Chris)
Why You Did THIS??
First, It's unfair to the minority who managed to update to 5365.
I had to keep Trying and to Learn to do this,
Now every leecher, Every guy who doesn't know a shit about programming can have 5365 Source.
This is going to destroy the whole pserver community. It will be Just Like NewestCOServer. 412344543534 NPC Releases and 93243562652345 Requests....
HellMouth Client 02/18/2011 - CO2 Weapon, Armor, Effects & Interface edits - 17 Replies Basically I've done the client for HellMouth and would like some feedback and some input to what can be done to improve it. The logo is already going to be removed since its blurry.
Thanks.
http://i47.tinypic.com/2i1h0km.png
## Updated
-Removed Logo
-Added new background to top and bottom
I'm happy with what it has turned out as.