|
You last visited: Today at 09:31
Advertisement
[GUIDE] Upgrading to 5156 with CoEmu
Discussion on [GUIDE] Upgrading to 5156 with CoEmu within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.
11/23/2009, 22:50
|
#1
|
elite*gold: 0
Join Date: Nov 2009
Posts: 754
Received Thanks: 544
|
[GUIDE] Upgrading to 5156 with CoEmu
Hey pvpers!
(Questions will be answered)
I've been wondering from time to time and it's time to move on on this forum,
In this guide i will explain how to upgrade to 5156.
Let's check the following recent changes
Quote:
- Encryption Key ( DR654dt34trg4UI6 ) default one.
- DHKey packet
- Packets values
- Blocked IP's
|
What's the DHKey packet?
There is a sort of encryption that waits for a value in a packet to continue with the authentication. It waits for 2 strings in this case (5156):
First : "A320A85EDD79171C341459E94807D71D39BB3B3F3B5161CA8 4894F3AC3FC7FEC317A2DDEC83B66D30C29261C6492643061A ECFCF4A051816D7C359A6A7B7D8FB\0"
Second "5"
You can simply send them by using the ManagedOpenSSL library and then use it like this:
Quote:
client = new byte[8];
server = new byte[8];
OpenSSL.DH Key;
string S1 = "A320A85EDD79171C341459E94807D71D39BB3B3F3B5161CA8 4894F3AC3FC7FEC317A2DDEC83B66D30C29261C6492643061A ECFCF4A051816D7C359A6A7B7D8FB\0";
string S2 = "5";
Key = new OpenSSL.DH(OpenSSL.BigNumber.FromHexString(S1), OpenSSL.BigNumber.FromHexString(S2));
Key.GenerateKeys();
return GeneratePacket(server, client, S1, S2, Key.PublicKey.ToHexString());
|
Quote:
Packet values
There are some recent changes but the most needed packets at the moment to connect and move are :
Quote:
-General packet
- SpawnChar Packet
- CharInfo Packet
- Walk packet
|
First off all i will compare the functions of NewestCoServer of the packetbuilder, to CoEmu's.
NewestCoServer -> CoEmu
Quote:
WriteByte -> Int
WriteInt16 -> Short
WriteInt32 -> Long
WriteInt64 -> ULong
WriteString -> Text
WriteBytes -> Byte
Move -> Int
|
Then second of all this is how lengths and types work in the source:
Quote:
byte[] Packet = new byte[8 + 36]; Length is 36 since see (2) so you can forget the ( 8 + length)
COPacket P = new COPacket(Packet);
P.WriteInt16((ushort)(Packet.Length - 8)); (2) Length - 8
P.WriteInt16((ushort)1033); This is the type
|
To save some failures some time correct values of the packets (I'm gonna regret this ) :
**General
public static byte[] General(int Identifier, int Value1, int Value2, int Value3, int Value4, int Value5, Struct.DataType PacketType)
{
PacketBuilder Packet = new PacketBuilder(10010, 28);
Packet.Long(Identifier);
Packet.Long(Value1);
Packet.Long(Timer);
Packet.Long((int)PacketType);
Packet.Short(Value2);
Packet.Short(Value3);
Packet.Long(4);
return Packet.getFinal();
}
**SpawnChar
public static byte[] SpawnCharacter(ClientSocket CSocket)
{
PacketBuilder P = new PacketBuilder(10014, 138 + CSocket.Client.Name.Length);
P.Long(CSocket.Client.Model);// Model/Mesh
P.Long(CSocket.Client.ID); // CharID
P.Short(CSocket.Client.GuildID); // Guild ID
P.Int(1); // unknown
P.Int((byte)CSocket.Client.GuildRank); // Guld rank
P.Long(0); // Status effect value
if (!CSocket.Client.Dead && !CSocket.Client.Transformed)
{
int Garment = 0;
int Head = 0;
int Armor = 0;
int RH = 0;
int LH = 0;
int Steed = 0;
foreach (KeyValuePair<int, Struct.ItemInfo> Item in CSocket.Client.Equipment)
{
if (Item.Value.Position == 1)
Head = Item.Value.ItemID;
else if (Item.Value.Position == 3 && Armor == 0)
Armor = Item.Value.ItemID;
else if (Item.Value.Position == 4)
RH = Item.Value.ItemID;
else if (Item.Value.Position == 5)
LH = Item.Value.ItemID;
else if (Item.Value.Position == 9)
Garment = Item.Value.ItemID;
else if (Item.Value.Position == 12)
Steed = Item.Value.ItemID;
}
P.Long(Head); // Headgear
P.Long(Garment); // Garment
P.Long(Armor); // Armor
P.Long(LH); // LH
P.Long(RH); // RH
P.Long(Steed); // Steed
}
else
{
P.Long(0); // Headgear
P.Long(0); // Garment
P.Long(0); // Armor
P.Long(0); // LH
P.Long(0); // RH
P.Long(0); // Steed
}
P.Long(12);
P.Short(0);
P.Short(0);
P.Short(CSocket.Client.Hair); // hair
P.Short(CSocket.Client.X); // X
P.Short(CSocket.Client.Y); // Y
P.Int(CSocket.Client.Direction); // Direction
P.Int(CSocket.Client.Action); // Action
P.Int(4);
P.Int(CSocket.Client.Reborn); // Reborn
P.Short(CSocket.Client.Level); // Level
P.Int(0); // 0 = screen / 1 = window
P.Int(16);
P.Long((byte)Nano.Nobility[CSocket.Client.ID].NobilityStage); // nobility rank
if (CSocket.Client.Equipment.ContainsKey(3))
{
Struct.ItemInfo Item = CSocket.Client.Equipment[3];
P.Short(Item.Color); // ARMOR color
P.Short(Item.Color); // LH color
P.Short(Item.Color); // Headgear color
}
P.Long(CSocket.Client.UPoints); // University points
P.Short(0); // Steed plus
P.Long(0);
P.Long(0); // Talisman progress
P.Int(24);
P.Int(1);
P.Int(CSocket.Client.Name.Length); // Name Length
P.Text(CSocket.Client.Name); // Name
return P.getFinal();
}
**CharInfo
public static byte[] CharacterInfo(ClientSocket CSocket)
{
PacketBuilder Packet = new PacketBuilder(1006, 78 + CSocket.Client.Name.Length + CSocket.Client.Spouse.Length);
Packet.Long(CSocket.Client.ID);
Packet.Long(CSocket.Client.Model);
Packet.Short(CSocket.Client.Hair); //Hairstyle
Packet.Long(CSocket.Client.Money); // Money
Packet.Long(CSocket.Client.CPs); // Conquer Points
Packet.Long(CSocket.Client.Exp);
Packet.Long(0);
Packet.Long(3);// ""
Packet.Long(3);// ""
Packet.Long(3);// ""
Packet.Long(3);// ""
Packet.Long(3);// ""
Packet.Short(CSocket.Client.Strength); // STR
Packet.Short(CSocket.Client.Dexterity); // DEX
Packet.Short(CSocket.Client.Vitality); // VIT
Packet.Short(CSocket.Client.Spirit); // SPI
Packet.Short(CSocket.Client.StatPoints); //Attribute Points
Packet.Short(CSocket.Client.CurrentHP); // Current HP
Packet.Short(CSocket.Client.CurrentMP); // Current MP
Packet.Short(CSocket.Client.PkPoints); // PK Points
Packet.Int(CSocket.Client.Level); // Level
Packet.Int((int)CSocket.Client.Class);//Class
Packet.Int(3); // Unknown
Packet.Int(CSocket.Client.Reborn); // Reborn count
Packet.Int(3); // Unknown
Packet.Long(CSocket.Client.QuizShowPoints); // Quiz Show Points!
Packet.Int(2); // String count
Packet.Int(CSocket.Client.Name.Length);
Packet.Text(CSocket.Client.Name);
Packet.Int(CSocket.Client.Spouse.Length);
Packet.Text(CSocket.Client.Spouse);
return Packet.getFinal();
}
**Walk
public static byte[] Walk(int Direction, int UID)
{
Random Rnd = new Random();
PacketBuilder Packet = new PacketBuilder(10005, 16);
Packet.Long(Direction);
Packet.Long(UID);
Packet.Long(Timer);
return Packet.getFinal();
}
Blocked IP's
Quote:
-127.0.0.1
-localhost
-127.0.1.1
Probably your local ip of your network but i didn't test that yet so hamachi will work fine.
|
See you later.
|
|
|
11/23/2009, 22:53
|
#2
|
elite*gold: 0
Join Date: Nov 2009
Posts: 256
Received Thanks: 63
|
lol ty
|
|
|
11/23/2009, 23:03
|
#3
|
elite*gold: 0
Join Date: Nov 2009
Posts: 131
Received Thanks: 48
|
Very nice release
|
|
|
11/23/2009, 23:11
|
#4
|
elite*gold: 0
Join Date: Nov 2009
Posts: 754
Received Thanks: 544
|
Quote:
Originally Posted by airborne.
lol ty
|
Thanks,
I'm currently working on getting steeds to work i added the Items.txt for the debug folder for the 5156 items already, When i done it i will add the guide here.
For the item position you can do at the void DeterminePosition
if(Item.ItemID == 300000)
{
return 12;
}
The item name is : Steed and the color is just like the armor color.
[
Feedback welcome,
Immune.
|
|
|
11/23/2009, 23:39
|
#5
|
elite*gold: 0
Join Date: Aug 2009
Posts: 930
Received Thanks: 448
|
very helpful, thanks for contribution. this will provide a great deal, even though you said yourself, "i will regret this". haha, thanks again.
|
|
|
11/24/2009, 07:14
|
#6
|
elite*gold: 20
Join Date: Dec 2006
Posts: 945
Received Thanks: 175
|
I hate you for releasing this but i mean hey at least you dident release where to get the encryption key at least something needs to stay secret : )
|
|
|
11/24/2009, 11:00
|
#7
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
|
Quote:
Originally Posted by hunterman01
I hate you for releasing this but i mean hey at least you dident release where to get the encryption key at least something needs to stay secret : )
|
Coemu V2 has the full encryption in it, its not a secret anymore.
|
|
|
11/24/2009, 13:50
|
#8
|
elite*gold: 0
Join Date: Nov 2009
Posts: 754
Received Thanks: 544
|
Quote:
Originally Posted by Korvacs
Coemu V2 has the full encryption in it, its not a secret anymore.
|
He ment where to get the DHKey.
|
|
|
11/24/2009, 13:57
|
#9
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
|
Quote:
Originally Posted by ImmuneOne
He ment where to get the DHKey.
|
Yeah, its all in coemu, nothing has been hidden in that source.
|
|
|
11/24/2009, 15:02
|
#10
|
elite*gold: 0
Join Date: Sep 2008
Posts: 1,683
Received Thanks: 505
|
Quote:
Originally Posted by hunterman01
I hate you for releasing this but i mean hey at least you dident release where to get the encryption key at least something needs to stay secret : )
|
Korvac's is right, if you mean the new key, you can find it in that new source that got released.
|
|
|
11/24/2009, 15:18
|
#11
|
elite*gold: 0
Join Date: Nov 2009
Posts: 754
Received Thanks: 544
|
By the way people if you got any errors while running through the guide feel free to ask me about it!
|
|
|
11/24/2009, 15:51
|
#12
|
elite*gold: 0
Join Date: Apr 2009
Posts: 773
Received Thanks: 441
|
Quote:
Originally Posted by hunterman01
I hate you for releasing this but i mean hey at least you dident release where to get the encryption key at least something needs to stay secret : )
|
do you mean this:
Code:
public byte[] CreateServerKeyPacket()
if isn't anyway it's easy to change...... most of the things are in gameencyption.... also a question.... need to change something more at login server??
OBs.: I don't see anything tha is related to client.... so i don't think so... but just for ask : D
aa...
Edit:
DarkSideCO client works for that one right??? ( i'm downloading it right now : P )
|
|
|
11/24/2009, 16:06
|
#13
|
elite*gold: 0
Join Date: Nov 2009
Posts: 754
Received Thanks: 544
|
The loginserver is fine it hasn't changed untill 5183, And yes darksideco client's working for this.
|
|
|
11/24/2009, 16:13
|
#14
|
elite*gold: 0
Join Date: Apr 2009
Posts: 773
Received Thanks: 441
|
Thanks....
I don't got any error... .but for login at login server and game server i'm using the ip of hamachi.... in client what should be my ip???
hamachi ip or 127.0.0.1? ( i know this is blocked )
|
|
|
11/24/2009, 16:16
|
#15
|
elite*gold: 0
Join Date: Sep 2008
Posts: 1,683
Received Thanks: 505
|
12tails, I am able to use both my hamachi and local ip.
You have to edit a small thing in the server.dat, find out what yourself.
|
|
|
|
|
Similar Threads
|
[Guide] Umlimited Nobility king and queens 5156
04/19/2010 - CO2 PServer Guides & Releases - 3 Replies
ok first of all open your database and find this
Change the requirements for Duke and Prince to the same as Knight, Baron and Earl but with a increased amount required
Now change
else if (C.Nobility.ListPlace <= 3)
To
else if (C.Nobility.ListPlace <=9999)
|
[Help] Upgrading items (CoEmu v2)
09/05/2009 - CO2 Private Server - 4 Replies
hi all!
i've got error whith this:
public static int NextEquipLevel(int ItemId)
{
int NewItem = ItemId;
Struct.ItemData Item = Nano.Items;
if(ArmorType(ItemId) == false || WeaponType(Convert.ToString(ItemId)) == 117)
{
|
[Guide]Upgrading (Upgrade Core)
08/28/2008 - Cabal Guides & Templates - 5 Replies
edit by St!gmata:
Credits belong to: cabalwiki.com
Link: http://www.cabalwiki.com/wiki/Upgrading
Here a small guide how to use upgrade cores, wich u will get and what are the chances and penalties.
Upgrade Cores
Low Core: Increasing stats on equip lower then Titanium. Un-equip the item you are upgrading, right click on the Low Core and then left click on the item, if it's successful then your item will be +1. (Assuming it was 0)
Medium Core: Increasing stats on Titanium or lower...
|
All times are GMT +2. The time now is 09:31.
|
|