Register for your free account! | Forgot your password?

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

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

Advertisement



Save players on current map if relog

Discussion on Save players on current map if relog within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: May 2011
Posts: 84
Received Thanks: 2
Save players on current map if relog

Can someone help me with saving the players in current map if relog?
and not saving the players in current map if relog?

I think its something like this

Code:
if (client.Entity.MapID == 6003) || client.Disconnect();
If i am wrong correct me
And where exactly I have to put this code

And another question

What the hell is going on, this message was supposed to be write with yellow, but not, its write with red, and if I put any color its write with red...

Code:
client.Send(new Message("MESSAGE HERE", System.Drawing.Color.[COLOR="Red"][B]Yellow[/B][/COLOR], GamePackets.Message.Center));
HerpDerpNigga is offline  
Old 09/07/2011, 14:26   #2
 
elite*gold: 0
Join Date: May 2011
Posts: 1,769
Received Thanks: 756
About the color, don't you have to write it in hex?

like 0xFFFFF
BaussHacker is offline  
Old 09/07/2011, 16:00   #3
 
elite*gold: 0
Join Date: Feb 2009
Posts: 262
Received Thanks: 161
Code:
    public enum Color : uint
    {
        None = 0,
        aliceblue = 0xf0f8ff,// 	240,248,255
        antiquewhite = 0xfaebd7,// 	250,235,215
        aqua = 0x00ffff,// 	0,255,255
        aquamarine = 0x7fffd4,// 	127,255,212
        azure = 0xf0ffff,// 	240,255,255
        beige = 0xf5f5dc,// 	245,245,220
        bisque = 0xffe4c4,// 	255,228,196
        black = 0x000000,// 	0,0,0
        blanchedalmond = 0xffebcd,// 	255,235,205
        blue = 0x0000ff,// 	0,0,255
        blueviolet = 0x8a2be2,// 	138,43,226
        brown = 0xa52a2a,// 	165,42,42
        burlywood = 0xdeb887,// 	222,184,135
        cadetblue = 0x5f9ea0,// 	95,158,160
        chartreuse = 0x7fff00,// 	127,255,0
        chocolate = 0xd2691e,// 	210,105,30
        coral = 0xff7f50,// 	255,127,80
        cornflowerblue = 0x6495ed,// 	100,149,237
        cornsilk = 0xfff8dc,// 	255,248,220
        crimson = 0xdc143c,// 	220,20,60
        cyan = 0x00ffff,// 	0,255,255
        darkblue = 0x00008b,// 	0,0,139
        darkcyan = 0x008b8b,// 	0,139,139
        darkgoldenrod = 0xb8860b,// 	184,134,11
        darkgray = 0xa9a9a9,// 	169,169,169
        darkgreen = 0x006400,// 	0,100,0
        darkgrey = 0xa9a9a9,// 	169,169,169
        darkkhaki = 0xbdb76b,// 	189,183,107
        darkmagenta = 0x8b008b,// 	139,0,139
        darkolivegreen = 0x556b2f,// 	85,107,47
        darkorange = 0xff8c00,// 	255,140,0
        darkorchid = 0x9932cc,// 	153,50,204
        darkred = 0x8b0000,// 	139,0,0
        darksalmon = 0xe9967a,// 	233,150,122
        darkseagreen = 0x8fbc8f,// 	143,188,143
        darkslateblue = 0x483d8b,// 	72,61,139
        darkslategray = 0x2f4f4f,// 	47,79,79
        darkslategrey = 0x2f4f4f,// 	47,79,79
        darkturquoise = 0x00ced1,// 	0,206,209
        darkviolet = 0x9400d3,// 	148,0,211
        deeppink = 0xff1493,// 	255,20,147
        deepskyblue = 0x00bfff,// 	0,191,255
        dimgray = 0x696969,// 	105,105,105
        dimgrey = 0x696969,// 	105,105,105
        dodgerblue = 0x1e90ff,// 	30,144,255
        firebrick = 0xb22222,// 	178,34,34
        floralwhite = 0xfffaf0,// 	255,250,240
        forestgreen = 0x228b22,// 	34,139,34
        fuchsia = 0xff00ff,// 	255,0,255
        gainsboro = 0xdcdcdc,// 	220,220,220
        ghostwhite = 0xf8f8ff,// 	248,248,255
        gold = 0xffd700,// 	255,215,0
        goldenrod = 0xdaa520,// 	218,165,32
        gray = 0x808080,// 	128,128,128
        green = 0x008000,// 	0,128,0
        greenyellow = 0xadff2f,// 	173,255,47
        grey = 0x808080,// 	128,128,128
        honeydew = 0xf0fff0,// 	240,255,240
        hotpink = 0xff69b4,// 	255,105,180
        indianred = 0xcd5c5c,// 	205,92,92
        indigo = 0x4b0082,// 	75,0,130
        ivory = 0xfffff0,// 	255,255,240
        khaki = 0xf0e68c,// 	240,230,140
        lavender = 0xe6e6fa,// 	230,230,250
        lavenderblush = 0xfff0f5,// 	255,240,245
        lawngreen = 0x7cfc00,// 	124,252,0
        lemonchiffon = 0xfffacd,// 	255,250,205
        lightblue = 0xadd8e6,// 	173,216,230
        lightcoral = 0xf08080,// 	240,128,128
        lightcyan = 0xe0ffff,// 	224,255,255
        lightgoldenrodyellow = 0xfafad2,// 	250,250,210
        lightgray = 0xd3d3d3,// 	211,211,211
        lightgreen = 0x90ee90,// 	144,238,144
        lightgrey = 0xd3d3d3,// 	211,211,211
        lightpink = 0xffb6c1,// 	255,182,193
        lightsalmon = 0xffa07a,// 	255,160,122
        lightseagreen = 0x20b2aa,// 	32,178,170
        lightskyblue = 0x87cefa,// 	135,206,250
        lightslategray = 0x778899,// 	119,136,153
        lightslategrey = 0x778899,// 	119,136,153
        lightsteelblue = 0xb0c4de,// 	176,196,222
        lightyellow = 0xffffe0,// 	255,255,224
        lime = 0x00ff00,// 	0,255,0
        limegreen = 0x32cd32,// 	50,205,50
        linen = 0xfaf0e6,// 	250,240,230
        magenta = 0xff00ff,// 	255,0,255
        maroon = 0x800000,// 	128,0,0
        mediumaquamarine = 0x66cdaa,// 	102,205,170
        mediumblue = 0x0000cd,// 	0,0,205
        mediumorchid = 0xba55d3,// 	186,85,211
        mediumpurple = 0x9370db,// 	147,112,219
        mediumseagreen = 0x3cb371,// 	60,179,113
        mediumslateblue = 0x7b68ee,// 	123,104,238
        mediumspringgreen = 0x00fa9a,// 	0,250,154
        mediumturquoise = 0x48d1cc,// 	72,209,204
        mediumvioletred = 0xc71585,// 	199,21,133
        midnightblue = 0x191970,// 	25,25,112
        mintcream = 0xf5fffa,// 	245,255,250
        mistyrose = 0xffe4e1,// 	255,228,225
        moccasin = 0xffe4b5,// 	255,228,181
        navajowhite = 0xffdead,// 	255,222,173
        navy = 0x000080,// 	0,0,128
        oldlace = 0xfdf5e6,// 	253,245,230
        olive = 0x808000,// 	128,128,0
        olivedrab = 0x6b8e23,// 	107,142,35
        orange = 0xffa500,// 	255,165,0
        orangered = 0xff4500,//	255,69,0
        orchid = 0xda70d6,// 	218,112,214
        palegoldenrod = 0xeee8aa,// 	238,232,170
        palegreen = 0x98fb98,// 	152,251,152
        paleturquoise = 0xafeeee,//	175,238,238
        palevioletred = 0xdb7093,//	219,112,147
        papayawhip = 0xffefd5,//	255,239,213
        peachpuff = 0xffdab9,//	255,218,185
        peru = 0xcd853f,// 	205,133,63
        pink = 0xffc0cb,// 	255,192,203
        plum = 0xdda0dd,//	221,160,221
        powderblue = 0xb0e0e6,//	176,224,230
        purple = 0x800080,//	128,0,128
        red = 0xff0000,//	255,0,0
        rosybrown = 0xbc8f8f,// 	188,143,143
        royalblue = 0x4169e1,// 	65,105,225
        saddlebrown = 0x8b4513,//	139,69,19
        salmon = 0xfa8072,//	250,128,114
        sandybrown = 0xf4a460,//	244,164,96
        seagreen = 0x2e8b57,//	46,139,87
        seashell = 0xfff5ee,//	255,245,238
        sienna = 0xa0522d,// 	160,82,45
        silver = 0xc0c0c0,// 	192,192,192
        skyblue = 0x87ceeb,//	135,206,235
        slateblue = 0x6a5acd,//	106,90,205
        slategray = 0x708090,//	112,128,144
        slategrey = 0x708090,//	112,128,144
        snow = 0xfffafa,//255,250,250
        springgreen = 0x00ff7f,//	0,255,127
        steelblue = 0x4682b4,//	70,130,180
        tan = 0xd2b48c,//	210,180,140
        teal = 0x008080,//	0,128,128
        thistle = 0xd8bfd8,//	216,191,216
        tomato = 0xff6347,// 	255,99,71
        turquoise = 0x40e0d0,//	64,224,208
        violet = 0xee82ee,//	238,130,238
        wheat = 0xf5deb3,//	245,222,179
        white = 0xffffff,//	255,255,255
        whitesmoke = 0xf5f5f5,// 	245,245,245
        yellow = 0xffff00,// 	255,255,0
        yellowgreen = 0x9acd32,//	154,205,50
    }
teroareboss1 is offline  
Old 09/07/2011, 16:18   #4
 
pwerty's Avatar
 
elite*gold: 0
Join Date: Jul 2010
Posts: 55
Received Thanks: 11
if (client.Entity.MapID == 6003) || client.Disconnect(); <- don't make sense for me.

saving is simple ... If you want save on any map then save loc like you save any other variable(Level,Name .......). else make something like
Code:
if(!unsavablemaps(map))
{
   save.loc(player);
}
else
{
   teleport(player.prevmap)
   save.loc(player)
}

public static bool unsavablemaps(int map)
{
   ..... // homework
}
about colors.. i don't think you can make it change since client can change color of any msg type (in options).
pwerty is offline  
Thanks
1 User
Old 09/07/2011, 18:45   #5
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,381
@ the previous example given...

Tq binaries are great to steal certain things from because it lets you know how the game is INTENDED to work.

If you look at the cq_map table it contains statuses for each map id. These are bitflag values which determine certain conditions for map... one of which is known as "Record disable". This means that when a user logs in on this map they are sent to their PREVIOUS map.

Personally for all my saving I ALWAYS keep track of their current map/x/y and save this on character logout/server shut down... But when a user logs in I check...

if(MapInformations[user.Map].ContainsFlag(MapEnums.RecordDisable))
{
user.Map = user.PreviousMap;
user.X = MapInformations[user.PreviousMap].SpawnX;
user.Y = MapInformations[user.PreviousMap].SpawnY;
}

Something like this...

Then you can ALWAYS easily return to previous map via npc or during logging back into the game. You simply need to set previous map any time you teleport to a new map WHICH DOES NOT HAVE RECORD DISABLED.

Quite simple in theory and should solve 90 pct of the issues you're having.
pro4never is offline  
Old 09/07/2011, 19:11   #6
 
elite*gold: 0
Join Date: May 2011
Posts: 84
Received Thanks: 2
Quote:
Originally Posted by pro4never View Post
@ the previous example given...

Tq binaries are great to steal certain things from because it lets you know how the game is INTENDED to work.

If you look at the cq_map table it contains statuses for each map id. These are bitflag values which determine certain conditions for map... one of which is known as "Record disable". This means that when a user logs in on this map they are sent to their PREVIOUS map.

Personally for all my saving I ALWAYS keep track of their current map/x/y and save this on character logout/server shut down... But when a user logs in I check...

if(MapInformations[user.Map].ContainsFlag(MapEnums.RecordDisable))
{
user.Map = user.PreviousMap;
user.X = MapInformations[user.PreviousMap].SpawnX;
user.Y = MapInformations[user.PreviousMap].SpawnY;
}

Something like this...

Then you can ALWAYS easily return to previous map via npc or during logging back into the game. You simply need to set previous map any time you teleport to a new map WHICH DOES NOT HAVE RECORD DISABLED.

Quite simple in theory and should solve 90 pct of the issues you're having.
Where exactly do I have to put that code, I know it will not work, but just tell me where do I have to create it?
In what cs file, in entitytable, packethandler, kernel.cs etc?
Thanks.
HerpDerpNigga is offline  
Old 09/07/2011, 23:02   #7
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,381
... Nevermind.

What I'm talking about is re-writing how your server deals with player positions.

It's not simply "paste this in entity.cs line 500!". It's a CONCEPT you use when re-writing game features. It's not source specific and it's not even code. It's just an idea of how you should be writing it.

Disclaimer: There is obviously no be all and end all solution in programming. Things have different uses in different places... the fact is though that it's how TQ handles the system and therefor it mimics how things work on official servers flawlessly (which is often the main goals of pservers)
pro4never is offline  
Reply


Similar Threads Similar Threads
Stuck Players and restart save
08/19/2010 - Metin2 Private Server - 4 Replies
Hello, first of all i want to say that this is a really nice community So lets get to the point, i have two problems: 1.On our server people keep logging out on theyre horses in the middle of the town or they teleport with theyre horses and that causes them to get stuck in the map and makes them unable to login with that character. My questions is: Does anyone know if you can make an NPC that can change the coordinates of a character to a preset location, so you just enter the name of...
Relog Bot
09/18/2008 - Metin2 - 3 Replies
Was is falsch ô.O: While (1) Sleep (1000) PixelGetColor ( 218, 459 ) ; If 0x531919 Then ; Sleep (1000) Send ( "xxx" , 1 ) Sleep (200) Send ( "{TAB}" , 0 )
Relog Bug Von PS
11/07/2006 - Kal Online - 5 Replies
zb ich hab ne +13 wep un 3 clean weps im inventar... dan relogge ich un schwub sind die 3 clean weps auch +13... wie kann ich diesen bug fixen??? bitte keine dumme antworten bin halt kein erfarender..... thx im vorraus Mfg Xz00m



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


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.