Register for your free account! | Forgot your password?

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

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

Advertisement



[Dynamic maps] Whats wrong with my method

Discussion on [Dynamic maps] Whats wrong with my method within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,226
Received Thanks: 868
[Dynamic maps] Whats wrong with my method

Hey guys,

Once again I need some help, I've created a Dynamic map system for Impulses source but I dont understand why its not working.

I'm doing
-Server startup create a dynamic map counter starting at 10,000;
-upon a command @dynamic it trys to create it
-The command calls a void called MakeDynamic()
-The void makes a ushort newid and the counter get inc by one and then the counter get copied onto newid;
-The Dynamic() void is then called-
-Dynamic void then searched through gamemap.dat to find the players current mapid(in my case 1002) when it finds it, it also finds the path
-It then adds the map to the server(dict and map class) with the newid but original path as the real id
-Upon teleport to the NEW id with the path of a current map it just sits at Connecting to gameserver please wait...

So im adding a new map like so:
Code:
for (uint i = 0; i < MapCount; i++)
            {
                ushort BaseID = (ushort)BR.ReadUInt32();
                string Path = Encoding.ASCII.GetString(BR.ReadBytes(BR.ReadInt32()));
                Console.WriteLine("Dynamic: MapID Read: {0}", BaseID);
                if (mapid == BaseID)
                {
                    Game.Map D = new Game.Map(newid, Path);
                    ServerBase.Kernel.Maps.Add(newid, D);
                    Console.WriteLine(newid + " Is the ID");
                    return true;
                }
                BR.ReadInt32();
            }
But it insists in not working.
_DreadNought_ is offline  
Old 04/24/2011, 19:25   #2


 
CptSky's Avatar
 
elite*gold: 0
Join Date: Jan 2008
Posts: 1,445
Received Thanks: 1,176
My system use two things, a MapUID and a DMapID. All the server-side things use the MapUID, except when you send the MapID to the client. I use the DMapID so the client use the right map...

By example, the mine cave in the Adventure map use the same DMap that the conventional mine cave at Twin City.
Code:
1218 Adventure-8.1 1025 2114 10 1003 1278 1219 4294967295
The MapUID is 1218, so everywhere in the source, the map is considered as 1218. But when you want to spawn the character on a map (1010:74/86), I use the DMapID. In this case, it's 1025. It's the only time you need to know the "real" ID.

Maybe, it will help you to understand the dynamic map system.
CptSky is offline  
Old 04/24/2011, 20:25   #3
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,226
Received Thanks: 868
so like, When teleporting or whenever I need to tell the client my mapid respond with the real mapid?

so like
on teleport(client.map.realid, x,y)

but on everything else just have it client.map.id?
_DreadNought_ is offline  
Old 04/24/2011, 23:10   #4


 
CptSky's Avatar
 
elite*gold: 0
Join Date: Jan 2008
Posts: 1,445
Received Thanks: 1,176
Quote:
Originally Posted by _DreadNought_ View Post
so like, When teleporting or whenever I need to tell the client my mapid respond with the real mapid?

so like
on teleport(client.map.realid, x,y)

but on everything else just have it client.map.id?
Yes. Exactly.
CptSky is offline  
Reply


Similar Threads Similar Threads
[Release]Dynamic Maps(5165 Houses)
07/28/2019 - CO2 PServer Guides & Releases - 60 Replies
Alright well I found this on another forum and I got the creator's permission to post here with all credits towards him. 100% credits to pringle, you may know him. DO NOT PRESS THANKS! THIS IS NOT MY WORK! After following my guide previous guide, then proceed with the following. in DMaps.cs under: public static ArrayList MapsNeeded = new ArrayList() { 601, 700, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1018, 1020, 1021,...
How to add Dynamic Maps(5165 Houses) in conquer-sx's source?
07/06/2010 - CO2 Private Server - 0 Replies
like my title ... I'm see the Arco's shared method ... but it don't work on... when i go home .... the client display



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


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

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