Register for your free account! | Forgot your password?

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

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

Advertisement



proplem in load FreeItems in 5165

Discussion on proplem in load FreeItems in 5165 within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Sep 2007
Posts: 188
Received Thanks: 8
proplem in load FreeItems in 5165

i have a proplem of loading freeitems (bound) in 5165

and here is my packets
public static byte[] AddItem(Game.Item I, byte Pos)
{
byte[] Packet = new byte[8 + 48];
COPacket P = new COPacket(Packet);
try
{
P.WriteUshortAddPos2((ushort)(Packet.Length - 8));
P.WriteUshortAddPos2((ushort)0x3f0);
P.WriteUintAddPos4(I.UID);
P.WriteUintAddPos4(I.ID);
P.WriteUshortAddPos2(I.CurDur);
P.WriteUshortAddPos2(I.MaxDur);
P.WriteUshortAddPos2(1);
P.WriteUshortAddPos2(Pos);
P.WriteUintAddPos4(I.TalismanProgress);
P.WriteByteAddPos1((byte)I.Soc1);
P.WriteByteAddPos1((byte)I.Soc2);
P.WriteUshortAddPos2((ushort)I.Effect);
P.WriteByteAddPos1(I.Plus);
P.WriteByteAddPos1(I.Bless);
if (I.FreeItem)
P.WriteByteAddPos1(1);
else
P.WriteByteAddPos1(0);
P.WriteByteAddPos1(I.Enchant);
P.WriteUintAddPos4(0);
P.WriteUshortAddPos2(0);
//P.Move(6);
if (I.Locked == 1)
P.WriteUshortAddPos2(1);
else if (I.Locked == 2)
P.WriteUshortAddPos2(1);
else
P.WriteUshortAddPos2(0);
if (I.Color == 0)
I.Color = (Game.Item.ArmorColor)new Random().Next(1, 9);
P.WriteUintAddPos4((uint)I.Color);
P.WriteUintAddPos4(I.Progress);
}
catch (Exception Exc) { Program.WriteLine(Exc); }
return P.AddTQServer8Byte();
}

and this code for get items free
PHP Code:
 case "#item":
                                                    {
                                                        
uint ID 0;
                                                        foreach (
DatabaseItem DI in Database.DatabaseItems.Values)
                                                            if (
DI.Name == Cmd[1])
                                                            {
                                                                
ID DI.ID;
                                                                
Game.ItemIDManipulation e = new Game.ItemIDManipulation(ID);
                                                                
Game.Item.ItemQuality Quality e.Quality;

                                                                if (
Cmd[2].ToLower() == "refined"Quality Game.Item.ItemQuality.Refined;
                                                                else if (
Cmd[2].ToLower() == "unique"Quality Game.Item.ItemQuality.Unique;
                                                                else if (
Cmd[2].ToLower() == "elite"Quality Game.Item.ItemQuality.Elite;
                                                                else if (
Cmd[2].ToLower() == "super"Quality Game.Item.ItemQuality.Super;
                                                                else if (
Cmd[2].ToLower() == "simple"Quality Game.Item.ItemQuality.Simple;
                                                                else if (
Cmd[2].ToLower() == "fixed"Quality Game.Item.ItemQuality.Fixed;
                                                                else if (
Cmd[2].ToLower() == "poor"Quality Game.Item.ItemQuality.Poor;
                                                                else if (
Cmd[2].ToLower() == "normal"Quality Game.Item.ItemQuality.Normal;
                                                                if (
e.Quality == Quality)
                                                                    break;
                                                            }
                                                        if (
ID != && GC.MyChar.Inventory.Count 40)
                                                        {
                                                            
Game.ItemIDManipulation e = new Game.ItemIDManipulation(ID);
                                                            
Game.Item.ItemQuality Quality e.Quality;
                                                            
bool change true;
                                                            if (
Cmd[2].ToLower() == "refined"Quality Game.Item.ItemQuality.Refined;
                                                            else if (
Cmd[2].ToLower() == "unique"Quality Game.Item.ItemQuality.Unique;
                                                            else if (
Cmd[2].ToLower() == "elite"Quality Game.Item.ItemQuality.Elite;
                                                            else if (
Cmd[2].ToLower() == "super"Quality Game.Item.ItemQuality.Super;
                                                            else if (
Cmd[2].ToLower() == "simple"Quality Game.Item.ItemQuality.Simple;
                                                            else if (
Cmd[2].ToLower() == "fixed"Quality Game.Item.ItemQuality.Fixed;
                                                            else if (
Cmd[2].ToLower() == "poor"Quality Game.Item.ItemQuality.Poor;
                                                            else if (
Cmd[2].ToLower() == "normal"Quality Game.Item.ItemQuality.Normal;
                                                            else 
change false;
                                                            if (
change)
                                                                
e.QualityChange(Quality);
                                                            
ID e.ToID();
                                                            if (!
Database.DatabaseItems.ContainsKey(ID))
                                                            {
                                                                return;
                                                            }
                                                            
Game.Item I = new NewestCOServer.Game.Item();
                                                            if (
e.Part(02) == 11 || e.Part(02) == 13 || e.Part(03) == 123 || e.Part(03) == 141 || e.Part(03) == 142)
                                                                
I.Color NewestCOServer.Game.Item.ArmorColor.Orange;
                                                            
I.FreeItem true;
                                                            
I.ID ID;
                                                            
I.UID = (uint)Program.Rnd.Next(10000000);
                                                            try
                                                            {
                                                                
I.MaxDur I.DBInfo.Durability;
                                                                
I.CurDur I.MaxDur;
                                                            }
                                                            catch (
Exception Exc) { Program.WriteLine(Exc); }
                                                            try
                                                            {
                                                                
I.Plus byte.Parse(Cmd[3]);
                                                            }
                                                            catch { }
                                                            try
                                                            {
                                                                
I.Bless byte.Parse(Cmd[4]);
                                                            }
                                                            catch { }
                                                            try
                                                            {
                                                                
I.Enchant byte.Parse(Cmd[5]);
                                                            }
                                                            catch { }
                                                            try
                                                            {
                                                                
I.Soc1 = (Game.Item.Gem)byte.Parse(Cmd[6]);
                                                            }
                                                            catch { }
                                                            try
                                                            {
                                                                
I.Soc2 = (Game.Item.Gem)byte.Parse(Cmd[7]);
                                                            }
                                                            catch { }
                                                            try
                                                            {
                                                                if (
Cmd[8] == "Poison")
                                                                {
                                                                    
I.Effect NewestCOServer.Game.Item.RebornEffect.Poison;
                                                                }
                                                                else if (
Cmd[8] == "HP")
                                                                {
                                                                    
I.Effect NewestCOServer.Game.Item.RebornEffect.HP;
                                                                }
                                                                else if (
Cmd[8] == "MP")
                                                                {
                                                                    
I.Effect NewestCOServer.Game.Item.RebornEffect.MP;
                                                                }
                                                                else if (
Cmd[8] == "Shield")
                                                                {
                                                                    
I.Effect NewestCOServer.Game.Item.RebornEffect.Shield;
                                                                }
                                                                else if (
Cmd[8] == "Horsie")
                                                                {
                                                                    
I.Effect NewestCOServer.Game.Item.RebornEffect.Horsie;
                                                                }
                                                                else
                                                                    
I.Effect NewestCOServer.Game.Item.RebornEffect.None;

                                                            }
                                                            catch { }

                                                            
GC.MyChar.AddFullItem(I.IDI.BlessI.PlusI.EnchantI.Soc1I.Soc2I.ColorI.ProgressI.TalismanProgressI.EffectI.FreeItemI.CurDurI.MaxDurI.SuspiciousI.LockedI.LockedDaysI.RBG[0], I.RBG[1], I.RBG[2], I.RBG[3]);
                                                        }
                                                        break;
                                                    } 
koko425 is offline  
Old 10/06/2010, 12:52   #2
 
elite*gold: 0
Join Date: Nov 2009
Posts: 342
Received Thanks: 17
nice!
|xabi| is offline  
Old 10/06/2010, 14:04   #3
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
I assume they are working when you create but not saving?

Ensure you are writing the free status to your database and loading it when items are loaded back into the server on login. If not it will obviously reset every login.
pro4never is offline  
Old 10/06/2010, 21:08   #4
 
elite*gold: 0
Join Date: Sep 2007
Posts: 188
Received Thanks: 8
Quote:
Originally Posted by pro4never View Post
I assume they are working when you create but not saving?

Ensure you are writing the free status to your database and loading it when items are loaded back into the server on login. If not it will obviously reset every login.
ya this write but not load
koko425 is offline  
Old 10/07/2010, 03:15   #5
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
Then modify the reader you use to load character items on login.
pro4never is offline  
Old 10/08/2010, 23:48   #6
 
elite*gold: 0
Join Date: Sep 2007
Posts: 188
Received Thanks: 8
Quote:
Originally Posted by pro4never View Post
Then modify the reader you use to load character items on login.
ya i am sure i modified to read it but not load
koko425 is offline  
Reply


Similar Threads Similar Threads
a proplem in GW in 5165 +pic of proplem
08/04/2010 - CO2 Private Server - 1 Replies
i got this error when 2 guilds damge pole http://img294.imageshack.us/img294/4554/201008040 04450.jpg http://img830.imageshack.us/img830/4227/201008040 04604.jpg can any one fix this error
5165 load screen
07/20/2010 - CO2 Private Server - 8 Replies
hi i need help anyone know edit the loading screen. I have darkside so right and and i was trying to find the loadscreen but i can't. i just want to change the darkside co's name to find client name. ty:)
can any one solve this proplem i got it when i logged in 2nd time (5165)
06/19/2010 - CO2 Private Server - 0 Replies
when i close my acc and then opened it agine i got this error System.InvalidOperationException: Connection must be valid and open at MySql.Data.MySqlClient.MySqlCommand.CheckState() at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader( CommandBehavior behavior) at MySql.Data.MySqlClient.MySqlCommand.System.Data.ID bCommand.ExecuteReader(CommandBehavior behavior) at System.Data.Common.DbDataAdapter.FillInternal(Data Set dataset, DataTable datatables, Int32 startRecord, Int32...
i have proplem whit load all nobility in patch 5165 sql
05/03/2010 - CO2 Private Server - 0 Replies
hay all can any one help me for load all nobil in sql patch 5165 when i logging in with one acc its load his donation only not other players else if i logging in another acc load 2 acc only i want to load all donation and all nobil can any one know?
i have abig proplem with 5165
02/21/2010 - CO2 Private Server - 2 Replies
in my server archers killes me one hit 5132356444 for hit can any one explain it



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


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.