Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server > CO2 PServer Guides & Releases
You last visited: Today at 17:12

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

Advertisement



[HellmouthSource]Full Gem Socket System

Discussion on [HellmouthSource]Full Gem Socket System within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Apr 2011
Posts: 10
Received Thanks: 0
[HellmouthSource]Full Gem Socket System

Hello
This is my 1st code i post
adding Socket Gem System

go to PacketHandler.cs
find
Quote:
case 2220:
above it put
Quote:
#region 1027 Put Gems
case 1027:
{
string P = ""; string Phex = "";
for (byte bit = 0; bit < Data.Length - 8; bit++)
{
int Pi = Data[bit];
P += Data[bit] + " ";
Phex += Pi.ToString("X") + " ";
}

uint MainUID = BitConverter.ToUInt32(Data, 8);
uint GemUID = BitConverter.ToUInt32(Data, 12);
Struct.ItemInfo MainItem = Client.InventoryItem(MainUID);//Retrieves iteminfo from Client of MainUID
Struct.ItemInfo Gem = Client.InventoryItem(GemUID);//Retrieves iteminfo from Client of MinorUID
byte mode = Data[18];
byte slot = Data[16];

if (mode == 0)
{
if (slot == 1)
{

MainItem.Soc1 = Convert.ToByte(Gem.ID - 700000);
Client.RemoveItems(Gem.ID, 1); Client.Inventory[MainItem.UID] = MainItem; Database.UpdateItem(MainItem.UID, (int)MainItem.Soc1, "Soc1"); Database.UpdateItem(MainItem.UID, (int)MainItem.Soc2, "Soc2"); Client.Send(Packets.ItemInfo(MainItem, 3));
}
if (slot == 2)
{
MainItem.Soc2 = Convert.ToByte(Gem.ID - 700000);
Client.RemoveItems(Gem.ID, 1); Client.Inventory[MainItem.UID] = MainItem; Database.UpdateItem(MainItem.UID, (int)MainItem.Soc1, "Soc1"); Database.UpdateItem(MainItem.UID, (int)MainItem.Soc2, "Soc2"); Client.Send(Packets.ItemInfo(MainItem, 3));
}


}
else
{
if (slot == 1)
{
MainItem.Soc1 = 255;
Client.Send(Packets.ItemInfo(MainItem, 3));
Client.Inventory[MainItem.UID] = MainItem;
Database.UpdateItem(MainItem.UID, (int)MainItem.Soc1, "Soc1");
Database.UpdateItem(MainItem.UID, (int)MainItem.Soc2, "Soc2");
}
if (slot == 2)
{
MainItem.Soc2 = 255;
Client.Send(Packets.ItemInfo(MainItem, 3));
Client.Inventory[MainItem.UID] = MainItem;
Database.UpdateItem(MainItem.UID, (int)MainItem.Soc1, "Soc1");
Database.UpdateItem(MainItem.UID, (int)MainItem.Soc2, "Soc2");
}

}
break;
}
#endregion
Just2Me is offline  
Old 04/02/2011, 14:24   #2
 
elite*gold: 0
Join Date: Nov 2010
Posts: 1,162
Received Thanks: 370
Where did you leech it?
Syst3m_W1z4rd is offline  
Old 04/02/2011, 14:28   #3
 
elite*gold: 0
Join Date: Apr 2011
Posts: 10
Received Thanks: 0
what you mean with that?
Just2Me is offline  
Old 04/02/2011, 16:10   #4
 
elite*gold: 0
Join Date: Sep 2007
Posts: 188
Received Thanks: 8
may be from newscoserver
koko425 is offline  
Old 04/02/2011, 16:12   #5
 
elite*gold: 0
Join Date: Apr 2011
Posts: 10
Received Thanks: 0
You right it is from newestcoserver
there is problem?
Just2Me is offline  
Old 04/02/2011, 16:43   #6
 
AndreaCo's Avatar
 
elite*gold: 0
Join Date: Mar 2009
Posts: 510
Received Thanks: 104
hey i have a 2 questions

1. What does this section do

Quote:
string P = ""; string Phex = "";
for (byte bit = 0; bit < Data.Length - 8; bit++)
{
int Pi = Data[bit];
P += Data[bit] + " ";
Phex += Pi.ToString("X") + " ";
}
since i already coded the system in myself and i dont have this in their so i just wanna learn what it does

and my 2nd questions is. How would i get the actual GUI to open, caus i already coded in the system but im confused on how to open the GUI
AndreaCo is offline  
Old 04/02/2011, 16:51   #7
 
elite*gold: 0
Join Date: Apr 2011
Posts: 10
Received Thanks: 0
this code for slot1 and slot2
and you can open GUI with this npc

Quote:
#region Soc System
case 1200:
{
switch (LinkBack)
{
case 0:
{
Client.Send(Packets.GeneralData(Client.UID, 7, Client.X, Client.Y, 126));
}
return;
}
}
return;
#endregion
Just2Me is offline  
Old 04/02/2011, 17:09   #8
 
elite*gold: 0
Join Date: Nov 2010
Posts: 1,162
Received Thanks: 370
Quote:
Originally Posted by AndreaCo View Post
hey i have a 2 questions

1. What does this section do



since i already coded the system in myself and i dont have this in their so i just wanna learn what it does

and my 2nd questions is. How would i get the actual GUI to open, caus i already coded in the system but im confused on how to open the GUI
Hex.
Syst3m_W1z4rd is offline  
Old 04/02/2011, 17:13   #9
 
AndreaCo's Avatar
 
elite*gold: 0
Join Date: Mar 2009
Posts: 510
Received Thanks: 104
the npc doesnt seem to work :/
AndreaCo is offline  
Reply


Similar Threads Similar Threads
[AD] ZhyperMU | Full Season 4 | Socket System + Anti Cheat | 24/7 Dedicated Server
10/28/2011 - General Gaming Discussion - 1 Replies
http://i25.tinypic.com/316lzt5.gif WELCOME TO ZHYPERMU ZHYPERMU SEASON4 !! Server Is ONLINE] Server Is Up For 24/7! You are in a place with no way out (...) -
Question. Socket system
12/19/2010 - CO2 Private Server - 0 Replies
request #remove
socket system tut ?
09/09/2010 - Silkroad Online - 7 Replies
hello. i`m looking for a socket system tutorial. any help please?
What about coding an efficient socket system?
08/10/2010 - CO2 Private Server - 22 Replies
I want to start a new project from scratch, and I thought about using my sockets from my last unfinished projects until I saw the .NET 3.5 methods. What do you guys think about the methods used in the sample which was released by MS? I`m talking about the BufferManager approach, and the pool for the SocketAsyncEventArgs. It seems nice to me, I implemented this in my project, with some modifications to fit my needs, what do you guys think about it? #edit : Also, would it be better if I coded...



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


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.