Register for your free account! | Forgot your password?

You last visited: Today at 22:17

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[CoV2] Mob Spawns

Discussion on [CoV2] Mob Spawns within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Nov 2006
Posts: 14
Received Thanks: 0
[CoV2] Mob Spawns

I added in some new mobs to the database, added spawns, but nothing is spawning. Am I missing something?
skywar1337 is offline  
Old 02/11/2009, 09:19   #2
 
damianpesta's Avatar
 
elite*gold: 0
Join Date: Jan 2007
Posts: 1,034
Received Thanks: 58
One error at entity.cs line 212.Use other lotf to fix it.
damianpesta is offline  
Old 02/11/2009, 11:57   #3
 
elite*gold: 0
Join Date: Nov 2006
Posts: 14
Received Thanks: 0
I don't see anything wrong.

Code:
        public static void SpawnAllMobs()
        {
            try
            {
                int MobsSpawned = 0;
                int MobSpawnsToSpawn = DataBase.MobSpawns.Length;

                for (int j = 0; j < MobSpawnsToSpawn; j++)
                {
                    uint[] ThisSpawn = DataBase.MobSpawns[j];
                    string[] ThisMob = null;

                    foreach (string[] FindId in DataBase.Mobs)
                    {
                        if (FindId[0] == Convert.ToString(ThisSpawn[1]))
                        {
                            ThisMob = FindId;
                        }
                    }

                    for (int n = 0; n < Convert.ToInt32(ThisSpawn[2]); n++)
                    {
                        uint UID = (uint)General.Rand.Next(400000, 500000);
                        short spawn_x = (short)General.Rand.Next(Convert.ToInt16(ThisSpawn[3]), Convert.ToInt16(ThisSpawn[5]));
                        short spawn_y = (short)General.Rand.Next(Convert.ToInt16(ThisSpawn[4]), Convert.ToInt16(ThisSpawn[6]));
                        while (AllMobs.Contains(UID))
                        {
                            //DataBase.MobSpawns = null;
                            UID = (uint)General.Rand.Next(400000, 500000);
                        }

                        SingleMob Mob = new SingleMob((short)spawn_x, (short)spawn_y, Convert.ToInt16(ThisSpawn[7]), uint.Parse(ThisMob[3]), uint.Parse(ThisMob[3]), uint.Parse(ThisMob[6]), uint.Parse(ThisMob[7]), (uint)UID, ThisMob[2], int.Parse(ThisMob[1]), short.Parse(ThisMob[4]), (byte)General.Rand.Next(8), byte.Parse(ThisMob[5]), 0, true);

                        AllMobs.Add(UID, Mob);

                        MobsSpawned++;
                    }
                }
                DataBase.Mobs = null;
                DataBase.MobSpawns = null;
                General.WriteLine("   - Spawned " + MobsSpawned + " mobs.");
            }
            catch (Exception Exc) { General.WriteLine(Convert.ToString(Exc)); }
        }
skywar1337 is offline  
Old 02/11/2009, 12:13   #4
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 491
use this instead of manual

CREDITS TO EMMETHECODER FOR HIS AWESOME COMMAND

Code:
 if (Splitter[0] == "@addspawn") // adds a spawn to your server (exa. @addspawn 502 2 2 )
                                        {
                                            uint MobID = uint.Parse(Splitter[1]);
                                            ushort Area = byte.Parse(Splitter[2]);
                                            ushort Amount = ushort.Parse(Splitter[3]);
                                            DataBase.NewSpawn(MyChar.LocMap, (ushort)(MyChar.LocX - Area), (ushort)(MyChar.LocY + Area), (ushort)(MyChar.LocX + Area), (ushort)(MyChar.LocY - Area), Amount, MobID);
                                        }
then search for public static void NoGuild(uint UID)

and under it add

Code:
public static bool NewSpawn(ushort Map, ushort XStart, ushort YStart, ushort XEnd, ushort YEnd, ushort SpawnNr, uint MobID)
{
try
{
MySqlCommand Command = new MySqlCommand("INSERT INTO mobspawns (SpawnWhatID,SpawnNr,XStart,YStart,XEnd,YEnd,Map) VALUES (" + MobID + "," + SpawnNr + "," + XStart + "," + YStart + "," + XEnd + "," + YEnd + "," + Map + ")", Connection);
Command.ExecuteNonQuery();
return true;
}
catch { return false; }
}
example of code /addspawn 502 2 2 << i think that is guard
PeTe Ninja is offline  
Thanks
1 User
Old 02/11/2009, 12:16   #5
 
_Emme_'s Avatar
 
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,161
Make sure you restart the server once you used the command.
_Emme_ is offline  
Thanks
1 User
Old 02/11/2009, 13:03   #6
 
elite*gold: 0
Join Date: Nov 2006
Posts: 14
Received Thanks: 0
Hrm. That doesn't seem to be working either.

The spawn I added, "/addspawn 502 2 2" shows up in the mobspawns database, but nothing spawns.
skywar1337 is offline  
Old 02/11/2009, 14:34   #7
 
damianpesta's Avatar
 
elite*gold: 0
Join Date: Jan 2007
Posts: 1,034
Received Thanks: 58
Quote:
Originally Posted by skywar1337 View Post
I don't see anything wrong.

Code:
        public static void SpawnAllMobs()
        {
            try
            {
                int MobsSpawned = 0;
                int MobSpawnsToSpawn = DataBase.MobSpawns.Length;

                for (int j = 0; j < MobSpawnsToSpawn; j++)
                {
                    uint[] ThisSpawn = DataBase.MobSpawns[j];
                    string[] ThisMob = null;

                    foreach (string[] FindId in DataBase.Mobs)
                    {
                        if (FindId[0] == Convert.ToString(ThisSpawn[1]))
                        {
                            ThisMob = FindId;
                        }
                    }

                    for (int n = 0; n < Convert.ToInt32(ThisSpawn[2]); n++)
                    {
                        uint UID = (uint)General.Rand.Next(400000, 500000);
                        short spawn_x = (short)General.Rand.Next(Convert.ToInt16(ThisSpawn[3]), Convert.ToInt16(ThisSpawn[5]));
                        short spawn_y = (short)General.Rand.Next(Convert.ToInt16(ThisSpawn[4]), Convert.ToInt16(ThisSpawn[6]));
                        while (AllMobs.Contains(UID))
                        {
                            //DataBase.MobSpawns = null;
                            UID = (uint)General.Rand.Next(400000, 500000);
                        }

                        SingleMob Mob = new SingleMob((short)spawn_x, (short)spawn_y, Convert.ToInt16(ThisSpawn[7]), uint.Parse(ThisMob[3]), uint.Parse(ThisMob[3]), uint.Parse(ThisMob[6]), uint.Parse(ThisMob[7]), (uint)UID, ThisMob[2], int.Parse(ThisMob[1]), short.Parse(ThisMob[4]), (byte)General.Rand.Next(8), byte.Parse(ThisMob[5]), 0, true);

                        AllMobs.Add(UID, Mob);

                        MobsSpawned++;
                    }
                }
                DataBase.Mobs = null;
                DataBase.MobSpawns = null;
                General.WriteLine("   - Spawned " + MobsSpawned + " mobs.");
            }
            catch (Exception Exc) { General.WriteLine(Convert.ToString(Exc)); }
        }
line 212 MIninum Value is Same as Maximum Value , look closely
short spawn_y = (short)General.Rand.Next(Convert.ToInt16(ThisSpawn[4]), Convert.ToInt16(ThisSpawn[6]));
damianpesta is offline  
Old 02/11/2009, 16:33   #8
 
_Emme_'s Avatar
 
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,161
Meh its used:

/addspawn modid area amount
_Emme_ is offline  
Old 02/11/2009, 21:12   #9
 
elite*gold: 0
Join Date: Jan 2009
Posts: 1,922
Received Thanks: 491
Quote:
Originally Posted by skywar1337 View Post
Hrm. That doesn't seem to be working either.

The spawn I added, "/addspawn 502 2 2" shows up in the mobspawns database, but nothing spawns.
lol i said i think thats it , not sure if it is in your database

go to localhost/phpmyadmin

under mobs

and it says MOBID , thats where it goes

/addspawn [MOBID] [AREA] [AMOUNT]

so lets say pheasant ( which most likely = 1 )

/addspawn 1 10 10

the spot where you are it will add pheasant in 10 spots 10 of them, to see the effect that it makes yo have to restart your server


if this helps you.. thank emme not me
PeTe Ninja is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
[Help]how to spawns MVP monster in CoV2?
12/16/2009 - CO2 Private Server - 5 Replies
first,hi then in comeu server there is monster gm respawn it is MVP and in another private server i saw the saw so there is command or code i should make it and if there code what's will be the commad for it?! and Thx!:handsdown:
Help: COv2
05/10/2009 - CO2 Private Server - 7 Replies
when i create a char it doesn't save or add anything into mysql, i can save passwords and have had this source running fine awhile ago, if some one can help it would be awsome.....
CoV2
05/09/2009 - CO2 Private Server - 2 Replies
CoV2 Wat is Client Version ? Server Version is 2.6
other plvl spawns than main spawns
01/15/2009 - Conquer Online 2 - 3 Replies
hi there, im on epvp since 3 years now but this is my first thread so dont kill me for sharing only :) well what i wanted to know is, since gms work alot by hunting down botters, if someone can give me spawns (in coords) or maybe in the map(s) of serps, alienserps and basi which are not the mains. so noone else would find me afk on bot for plvl :o thnx for your replies :)
CoV2 its The Best
12/16/2008 - CO2 Private Server - 5 Replies
First Donot Delete It Donot Ask ABout Relese it pleas The Server Work List Same Real CO 1: all DisCity Work 2: luckytime 3: guard skill



All times are GMT +2. The time now is 22:17.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.