Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 20:49

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

Advertisement



How do you make a monster spawn with a command?

Discussion on How do you make a monster spawn with a command? within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old 01/08/2010, 07:16   #16
 
elite*gold: 0
Join Date: Dec 2005
Posts: 231
Received Thanks: 85
haha its all good thanks for the help Ill try adding it to the hashtable now.
dragon89928 is offline  
Old 01/08/2010, 17:16   #17
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,338
Received Thanks: 490
U dont need to restart the server after changes to flatfiles (never)
~Yuki~ is offline  
Old 01/09/2010, 00:20   #18
 
elite*gold: 0
Join Date: Dec 2005
Posts: 231
Received Thanks: 85
Quote:
Originally Posted by ~Yuki~ View Post
U dont need to restart the server after changes to flatfiles (never)
You dont? Idk.. I tried it and it didnt work until i restarted the server. And what do you mean by never, how did you do it?
dragon89928 is offline  
Old 01/09/2010, 18:47   #19
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
So I was bored and decided to give it a whirl.

Monsters are now able to be spawned by command. The version I coded is VERY poorly done and most of the values are hard coded to avoid messing things up myself.

I did it in CoEmu but it should be fairly similar.


Go to where your source controls monster spawning (in coEmu it's MonsterSpawn.cs. It should be a very obvious section regardless of source)

Then just copy the required section over to where your source handles player commands in a way that will allow you to change what you want (map, x, y, mobid, number of mobs)

In CoEmu the main line that actually controls the final spawning was a little something like...

ConquerPacket.ToLocal(ConquerPacket.SpawnMonster(M on.UID, MobInfo.Mesh, Mon.X, Mon.Y, MobInfo.Name, Mon.CurrentHP, Mon.Level, Mon.Direction), Mon.X, Mon.Y, Mon.Map, 0, 0);
ConquerPacket.ToLocal(ConquerPacket.MobSpawnEffect (Mon.UID, Mon.X, Mon.Y, Mon.Direction, 131), Mon.X, Mon.Y, Mon.Map, 0, 0);
Interlocked.Add(ref SpawnNumber, 1);

Note that the Interlocked.Add(ref SpawnNumber, 1); is just a section that was in the monsterspawn.cs file that controls if it should start spawning new ones (for ever monster it spawns it says "hey, I finished spawning this one. Do I need to spawn another?" basically controlling how many should be spawned. I just copied basically the entire section out of there for testing purposes so I haven't tried removing it. In mine I just set it to 1 and let it be.

For any sort of quest monster I'd strongly suggest adding a timer of some form to control respawn. if not you would have to summon it manually via command every time you want. You could always use a combination of adding to the database and reloading it if you wanted a recurring spawn though I suppose.

ooh and just cause I am extra bored. Screenshot



They move, attack, die, drop items etc all like normal mobs should via cmd.
pro4never is offline  
Old 01/10/2010, 04:23   #20
 
elite*gold: 0
Join Date: Dec 2005
Posts: 231
Received Thanks: 85
Ahh thanks . I took spare2's advice also and got it to work adding it to hashtables.
dragon89928 is offline  
Reply


Similar Threads Similar Threads
csv monster spawn
01/06/2010 - Dekaron - 2 Replies
Never mind lol problem solved :D
[Request] Mob Spawn command
06/28/2009 - CO2 Private Server - 0 Replies
#Request close! found it hehe sorry
[help]Need Spawn Nps/Mobs command
04/04/2009 - CO2 Private Server - 3 Replies
heya guys infact i need command spawn for nps and mobs i have it in my source and it's powersource but i cant write it there is wrong thing so can anyone tell me how to write it like this /spawn ..... or things like this and thanks =] and i searched already for 3 hours in the wepsite about it and i cant find it too.
Monster Spawn Rate
12/05/2008 - Dekaron - 36 Replies
I have succesfully been able to adjust the AI as most for the mobs to not attack, then I traced the Monster follow distance, agro Number, avoid rates, etc. Now I can pull just about every monster on the map and have them nicely pile on top of each other for a few quick aoe attacks and watch the XP flow in. The problem is I then have to wait for new mobs to spawn. Has anyone had any success in increasing the Monster Spawn rate? I noticed at one point that there is a limit of 200 monsters per...
spawn command?
09/05/2008 - CO2 Private Server - 6 Replies
In the LOFT source and shadow source how does the spawn command work, can someone give me an example so they dont come out invincible



All times are GMT +1. The time now is 20:49.


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.