Register for your free account! | Forgot your password?

Go Back   elitepvpers > Conquer Online 2 > CO2 PServer - Discussions / Questions
You last visited: Today at 13:18

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


Some help in monster spawning and loading on 5165 impulse

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2010
Posts: 492
Received Thanks: 50
Some help in monster spawning and loading on 5165 impulse

Hello, I've recently started playing around with an 5165 impulse, it has no monster loading and spawning so I've chosen to implement the one used in Virtual legends, after I've added the loading option and I added the tables in database I added the Monster.cs with suppose to spawn them intro the world, but it wont I am aware that i might done something wrong along the way as there were some dependencies that I couldn't match here is what i edited in Monster.cs:

this

public static void Spawn(Receivers.ClientState client, ushort mesh)

with this

public static void Spawn(Client.GameState client, ushort mesh)

I am looking for you advices.The item drops i have not added yet as my first goal is to spawn at least one monster first.



mujake is offline  
Old 11/02/2012, 02:32   #2
 
elite*gold: 0
Join Date: Dec 2009
Posts: 583
Received Thanks: 118
Quote:
Originally Posted by mujake View Post
Hello, I've recently started playing around with an 5165 impulse, it has no monster loading and spawning so I've chosen to implement the one used in Virtual legends, after I've added the loading option and I added the tables in database I added the Monster.cs with suppose to spawn them intro the world, but it wont I am aware that i might done something wrong along the way as there were some dependencies that I couldn't match here is what i edited in Monster.cs:

this

public static void Spawn(Receivers.ClientState client, ushort mesh)

with this

public static void Spawn(Client.GameState client, ushort mesh)

I am looking for you advices.The item drops i have not added yet as my first goal is to spawn at least one monster first.
The one in Virtual Legends is of a higher patch isn't it?


.Ryu is offline  
Old 11/02/2012, 06:23   #3
 
elite*gold: 0
Join Date: Dec 2010
Posts: 492
Received Thanks: 50
yes,but i don't just copy paste the text and files.Like monster.cs the only error is the one i mentioned above.in monster table there are few problems regarding monster drop and drop rate, but i can fix them easily.there are errors regarding some undefined things in kernel.cs and program.cs. The things defined in program i can't find there match on the later patch.Like receivers...it is an cs but it is and different type of coding
mujake is offline  
Old 11/02/2012, 22:45   #4
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,311
Don't try copying an entire system from another source... especially when they are as intricately tied to the base functionality as the monster system.

Here's the steps for a basic monster system (functions similarly in every source I've seen)

Reference to monster types

-Generally a static collection loaded from database on runtime.
-Contains statistics of each 'type' of monster (health, mesh, name, attack, defense, droprules, etc)

Reference to spawns

-Generally a static collection or by map collection of all spawns of monsters
-Contains statistics concerning location, number and type of monsters, spawn rate, etc
-Some reference to individual monsters

Reference to individual monsters

-Generally inherited from the entity class and referenced in the spawn class so they can be controlled on a 'by spawn basis' (lets to operate only on spawns where players are nearby/on the map, etc)



Now... When you load the server you need to populate the monster types and spawns from database/flatfile. This is quite simple and just a mater of reading the information and creating new objects in memory.


Map system

How you organize this is all up to you honestly. You could have a reference to spawns in your map, or simply insert your monsters into the map objects collection. Personally I would organize it like..

Map>Spawns>Monsters (reference to the same object as is in the objects collection of the map)
Map>ILocatableObjects (anything that can be viewed in game space. Monsters, players, items, npcs, etc)


Now... when a monster is spawned, it is added to the objects collection of the map. This means it is now viewable by players

When a monster is killed, it's still stored in the spawn collection (there are more efficient ways, I'm using a simple example here). When respawned you can heal it up, moved to a random, valid location within the spawn radius and re-added to the visible objects collection of the map.


Displaying the monster to players

Any time your client moves by jumping, walking, teleporting (loging in counts as teleporting) you need to update what is nearby (removing objects no longer on your screen and adding ones that are now visible).

Any time an object is added to this, you need to send a valid spawn packet in order for the client to see it. You need to alter your screen method so that all of these steps also apply to monsters. If not, you will see nothing.





best of luck!


pro4never is offline  
Thanks
1 User
Old 11/03/2012, 07:30   #5
 
elite*gold: 0
Join Date: Dec 2010
Posts: 492
Received Thanks: 50
yes, i added the database loading and i am having trouble to spawn them and with send scree, as the newer source has some more thing defined and some classes added witch original hasn't


mujake is offline  
Reply



« OffSets of soulgear head | NewestCoServer Crash because Of MobInfos And Mobspawns?? »

Similar Threads
[Help]i need code for fix monster in impulse source 5165
04/06/2011 - CO2 PServer - Discussions / Questions - 0 Replies
i need code for fix monster in impulse source 5165 or nobility and vinding
[HELP] 5165 Monster Spawning
05/05/2010 - CO2 PServer - Discussions / Questions - 4 Replies
I need a code to spawn a monster at a certain time in a certain place. Example: Ganoderma and Titan. I can't find any codes for them and i am very bad a codeing. The source is coded in c# but i am looking for a Source that runs better. Please Help!
Monster Spawning
07/19/2009 - CO2 PServer - Discussions / Questions - 13 Replies
Could someone give me the command to spawn a monster?



All times are GMT +1. The time now is 13:18.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2018 elitepvpers All Rights Reserved.