Register for your free account! | Forgot your password?

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

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

Advertisement



[Help] Hellmouth Mob Spawn

Discussion on [Help] Hellmouth Mob Spawn within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old 04/10/2011, 18:21   #16
 
chickmagnet's Avatar
 
elite*gold: 0
Join Date: Jun 2009
Posts: 372
Received Thanks: 53
Quote:
Originally Posted by alexalx View Post
Added you.

Are you online on msn?
ye iam
chickmagnet is offline  
Old 04/10/2011, 18:22   #17
 
F i n c h i's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 785
Received Thanks: 421
Add me on msn, It doesn't work.
F i n c h i is offline  
Old 04/10/2011, 18:25   #18
 
F i n c h i's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 785
Received Thanks: 421
Talking

Quote:
Originally Posted by chickmagnet View Post
ye iam
Accept my invitation.
F i n c h i is offline  
Old 04/11/2011, 00:00   #19
 
F i n c h i's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 785
Received Thanks: 421
Alright,I can't figure out why it doesn't work.

Sorry for spam :S
F i n c h i is offline  
Old 04/11/2011, 02:46   #20
 
taylor2846's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 469
Received Thanks: 94
hay this is not relly on topic but it kinda is lmao,

i got mobs spawning,
now where would i start coding the movement codes.
and the attacking codes.


just need to no where to start.
taylor2846 is offline  
Old 04/11/2011, 03:15   #21
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,378
Make a new server thread and then perform some simple AI calculations on your spawn.


For example...


while(running)
{
foreach(Spawn spawn in Dictionary.Spawns.Values);//make sure you are adding to this db when loading a new spawn from db or command
{
//optional check to see if the map the spawn is on has active players (if not do not perform ai checks... no players to see it!
foreach(Mob monster in spawn.Members.Values);//select each mob inside the spawn!)
{

//check if mob is alive: If so perform these other things, if not check if valid time for re spawn, if so re spawn it somewhere inside the spawn (pull new random coords, etc)

//Check for players near monster

//Check distance to player: if < attack range && last attack was at least attack speed ago, try attack (you need to code a monster>player attack calculation as well)


//Else, calculate direction monster needs to walk to move towards player (if last walk > walk speed ago)

//Walk in that direction (send walk packet, update the map so mob moves in the map objects)
}
}

}


That would be a POOR system to use but it gives you some general concept of how you'd go about it.

Personally I'd do a foreach player in server, then check for spawns within say... 2 screens of them and then perform AI checks only on those spawns (saves you cpu time because you only operate on spawns with players near'ish to them)

I'd also add in all sorts of other helper methods and checks to make sure say a monster doesn't wander too far away from the spawn and such... but you get the idea.
pro4never is offline  
Thanks
1 User
Old 04/11/2011, 17:56   #22
 
F i n c h i's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 785
Received Thanks: 421
So,the mobs won't spawn cause the map is nulled?
Or whats wrong in those breakpoints?

CLICK THE BAR TO SEE THE FULL IMAGE!
F i n c h i is offline  
Old 04/11/2011, 18:20   #23
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,378
Yes, make sure M.Map is assigned to and that Map is assigned to.

Seems right now it's using _map instead of Map which is wrong.

Just fix it.
pro4never is offline  
Thanks
1 User
Old 04/11/2011, 18:28   #24
 
F i n c h i's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 785
Received Thanks: 421
Quote:
Originally Posted by pro4never View Post
Yes, make sure M.Map is assigned to and that Map is assigned to.

Seems right now it's using _map instead of Map which is wrong.

Just fix it.
Quote:
Originally Posted by chickmagnet View Post
can u plz hint me a lil 2 how i can fix this coz i messed wit all the lines the console said and yet i still get same error

I have the same problem as this user.

Look at picture.
F i n c h i is offline  
Old 04/11/2011, 21:23   #25
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,378
Simply make sure the maps are assigned to before calculating this ****...

***... no wonder almost no one wrote the 10 lines of code needed to do this before and just waited for something to be released.
pro4never is offline  
Thanks
1 User
Old 04/11/2011, 21:36   #26
 
F i n c h i's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 785
Received Thanks: 421
Quote:
Originally Posted by pro4never View Post
Simply make sure the maps are assigned to before calculating this ****...

***... no wonder almost no one wrote the 10 lines of code needed to do this before and just waited for something to be released.
Lol,sometimes it works,It spawns the monsters / guards in twin city , sometimes not.
And btw,monsters aren't moving =(
F i n c h i is offline  
Old 04/12/2011, 00:47   #27
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,378
jesus christ... you people REALLY need to learn to read.

The twin city stuff works because the map is already initialized (there are players/npcs/etc loaded onto it so the map has been created)

They don't move because this is ONLY RELATED TO SPAWNING.

You have to code monster AI, movement, attacking, death, re spawning still.

I'm sorry but if you guys can't figure this out from the 50+ posts I've made on the subject then you have no reason using a computer let alone trying to code a source.
pro4never is offline  
Thanks
1 User
Old 04/12/2011, 00:52   #28
 
F i n c h i's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 785
Received Thanks: 421
Quote:
Originally Posted by pro4never View Post
jesus christ... you people REALLY need to learn to read.

The twin city stuff works because the map is already initialized (there are players/npcs/etc loaded onto it so the map has been created)

They don't move because this is ONLY RELATED TO SPAWNING.

You have to code monster AI, movement, attacking, death, re spawning still.

I'm sorry but if you guys can't figure this out from the 50+ posts I've made on the subject then you have no reason using a computer let alone trying to code a source.
Alright,I understand now,Thanks!
F i n c h i is offline  
Old 04/12/2011, 01:28   #29
 
taylor2846's Avatar
 
elite*gold: 0
Join Date: Aug 2007
Posts: 469
Received Thanks: 94
when a mob dies how would i remove the mod from the map to wait for it to respawn?
taylor2846 is offline  
Old 04/12/2011, 01:43   #30
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,378
It's all up to you. You could always just flag it as dead and when spawning just ensure that what is being pulled is alive.

Saves adding/removing all the time but again... it's all up to you (you're going to be adding/removing with this system anyways due to the way the location info works... which sucks but w/e)

So yah, I'd remove. Doesn't really make any diff.
pro4never is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
[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...
[How to add monsters in Hellmouth]
03/11/2011 - CO2 Private Server - 12 Replies
Hey guys, I dont know what Im doing wrong I added a MySqlReader for the MobSpawns but there are no spawns at all.. so I looked in Spawn.cs
New Npc for HellMouth source
03/08/2011 - CO2 PServer Guides & Releases - 3 Replies
Closed #
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.



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


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.