Register for your free account! | Forgot your password?

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

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

Advertisement



Help Compose Stone using +1

Discussion on Help Compose Stone using +1 within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jul 2011
Posts: 70
Received Thanks: 2
Angry Help Compose Stone using +1

hello sir/maam

i would ask if where i get wrong code for this error i already put item id for composition like +1 item not stone, ants working but my main concern that.

how do i make my items used the +1stone in wuxingoven npc to make it +1 sir/maam here some pic..

here is my compose.cs

Code:
namespace NewestCOServer.PacketHandling
{
    public class Compose
    {
        public static void Handle( Main.GameClient GC, byte[] Data)
        {
                uint MainUID = BitConverter.ToUInt32(Data, 8);
                uint MinorUID1 = BitConverter.ToUInt32(Data, 12);

                Item MainI = GC.MyChar.FindInvItem(MainUID);
                Item MinorI = GC.MyChar.FindInvItem(MinorUID1);
                Item MainISec = MainI;
                Item MinorISec = MinorI;
            if (OfSameType(MainI.ID, MinorI.ID))
            {
                if (MainI.ID != 0 && MinorI.ID != 0 && MainI.Plus <= 8 && MinorI.Plus > 0)
                {
                    try
                    {
                        if (GC.MyChar.InventoryContains(MinorI.UID) && GC.MyChar.InventoryContains(MainI.UID))
                        {
                            if (MainI.UID != MinorI.UID)
                            {
                                uint Progress = MainI.Progress;
                                Progress += Database.StonePts[MinorI.Plus];

                                //GC.MyChar.RemoveItem(MainI);
                                // if (GC.MyChar.RemoveItem(MainI.UID))
                                {
                                    if (GC.MyChar.RemoveItem(ref MinorI))
                                    {

                                        while (Progress >= Database.ComposePts[MainI.Plus] && MainI.Plus <= 8)
                                        {
                                            Progress = (uint)(Progress - Database.ComposePts[MainI.Plus]);
                                            MainI.Plus++;
                                        }

                                        if (MainI.Plus >= 9)
                                        {
                                            Progress = 0;
                                            MainI.Plus = 9;
                                        }
                                        MainI.Progress = (ushort)Progress;
                                        GC.AddSend(Packets.UpdateItem(MainI, 0));
                                        Game.World.DebugAdd += GC.MyChar.Name + " #composecheck -- Just composed Main Item ID " + MainI.ID + " with minor item ID " + MinorI.ID + "! \r\n";
                                        //GC.MyChar.AddItem(MainI);

                                        if (!GC.MyChar.InventoryContains(MainI.UID))// || GC.MyChar.InventoryContains(MinorI.UID))
                                        {
                                            //if (!GC.MyChar.InventoryContains(MainI.UID))
                                            //   {
                                            Game.World.DebugAdd += GC.MyChar.Name + " doesn't have Main Item after compose (should be added) \r\n";
                                            Console.WriteLine(GC.MyChar.Name + " doesn't have Main Item after compose (should be added)");
                                            //  }
                                            /*  else// (GC.MyChar.Inventory.Contains(MinorI))
                                              {
                                                  Game.World.DebugAdd += GC.MyChar.Name + " has the minor item bofore compose (should be removed) \r\n";
                                                  Console.WriteLine(GC.MyChar.Name + " has the minor item bofore compose (should be removed)");
                                              }*/
                                            Game.World.DebugAdd += GC.MyChar.Name + " used main item: " + MainI.ID + "~" + MainI.Plus + "~" + MainI.Enchant + "~" + MainI.Bless + "~" + MainI.Soc1 + "~" + MainI.Soc2 + "~" + MainI.Progress + "~" + MainI.UID + " and minor: " + MinorI.ID + "~" + MinorI.Plus + "~" + MinorI.Enchant + "~" + MinorI.Bless + "~" + MinorI.Soc1 + "~" + MinorI.Soc2 + "~" + MinorI.Progress + "~" + MinorI.UID + "\r\n";
                                            Game.World.DebugAdd += GC.MyChar.Name + " used main (backup) item: " + MainISec.ID + "~" + MainISec.Plus + "~" + MainISec.Enchant + "~" + MainISec.Bless + "~" + MainISec.Soc1 + "~" + MainISec.Soc2 + "~" + MainISec.Progress + " and minor (backup): " + MinorISec.ID + "~" + MinorISec.Plus + "~" + MinorISec.Enchant + "~" + MinorISec.Bless + "~" + MinorISec.Soc1 + "~" + MinorISec.Soc2 + "~" + MinorISec.Progress + "\r\n";
                                        }
                                    }
                                    else Game.World.DebugAdd += GC.MyChar.Name + " used main item: (removed) " + MainI.ID + "~" + MainI.Plus + "~" + MainI.Enchant + "~" + MainI.Bless + "~" + MainI.Soc1 + "~" + MainI.Soc2 + "~" + MainI.Progress + "~" + MainI.UID + " and minor: (not removed) " + MinorI.ID + "~" + MinorI.Plus + "~" + MinorI.Enchant + "~" + MinorI.Bless + "~" + MinorI.Soc1 + "~" + MinorI.Soc2 + "~" + MinorI.Progress + "~" + MinorI.UID + "\r\n";
                                }
                                //else Game.World.DebugAdd += GC.MyChar.Name + " used main item: (not removed) " + MainI.ID + "~" + MainI.Plus + "~" + MainI.Enchant + "~" + MainI.Bless + "~" + MainI.Soc1 + "~" + MainI.Soc2 + "~" + MainI.Progress + "~" + MainI.UID;
                            }
                        }
                    }
                    catch (Exception Exc)
                    {
                        Game.World.ExcAdd += Exc.ToString() + "\r\n";
                        Game.World.DebugAdd += GC.MyChar.Name + " used main item: " + MainI.ID + "~" + MainI.Plus + "~" + MainI.Enchant + "~" + MainI.Bless + "~" + MainI.Soc1 + "~" + MainI.Soc2 + "~" + MainI.Progress + " and minor: " + MinorI.ID + "~" + MinorI.Plus + "~" + MinorI.Enchant + "~" + MinorI.Bless + "~" + MinorI.Soc1 + "~" + MinorI.Soc2 + "~" + MinorI.Progress + "\r\n";
                        Game.World.DebugAdd += GC.MyChar.Name + " used main (backup) item: " + MainISec.ID + "~" + MainISec.Plus + "~" + MainISec.Enchant + "~" + MainISec.Bless + "~" + MainISec.Soc1 + "~" + MainISec.Soc2 + "~" + MainISec.Progress + " and minor (backup): " + MinorISec.ID + "~" + MinorISec.Plus + "~" + MinorISec.Enchant + "~" + MinorISec.Bless + "~" + MinorISec.Soc1 + "~" + MinorISec.Soc2 + "~" + MinorISec.Progress + "\r\n";
                    }
                }
                if (MainI.ID == 0 || MinorI.ID == 0) // make sure your not jailing for a rare glitch (itemid = 0) (backup check)
                {
                    Game.Character C = Game.World.CharacterFromName(GC.MyChar.Name);
                    C.MyClient.LocalMessage(2005, "Compose Error(#2)! One of the Item ID's are invalid! Main Item ID: " + MainI.ID + " Minor item ID: " + MinorI.ID + " if this continues to happen, contact an admin!");
                }
            }
            else //auto jail cheaters
            {
                Game.Character C = Game.World.CharacterFromName(GC.MyChar.Name);
                if (MainI.ID == 0 || MinorI.ID == 0) // make sure your not jailing for a rare glitch (itemid = 0)
                {
                    C.MyClient.LocalMessage(2005, "Compose Error(#1)! One of the Item ID's are invalid! Main Item ID: " + MainI.ID + " Minor item ID: " + MinorI.ID + " if this continues to happen, contact an admin! One of the items you are using is fake!");
                }
                else
                {
                    C.BOTJailed = true;
                    C.BOTJailedDays = 30;
                    C.Teleport(6003, 30, 72);
                    C.MyClient.LocalMessage(2011, "You are now botjailed for " + C.BOTJailedDays + " days for attempting to compose exploit!");
                    C.MyClient.LocalMessage(2011, "If you feel this is a mistake, please contact the admins immediately.");
                    Game.World.DebugAdd += GC.MyChar.Name + " Was botjailed for " + C.BOTJailedDays + " days for attempting to compose item " + MainI.ID + " with minor item " + MinorI.ID + "! \r\n";
                    //Game.World.SendMsgToAll("SYSTEM", GC.MyChar.Name + " was auto botjailed for attempting to compose items that don't belong to the same type.", 2005, 0);
                }
                
                /*ArrayList Items = new ArrayList();
                foreach (Game.Item I in GC.MyChar.Inventory)
                    Items.Add(I);
                foreach (Game.Item I in Items)
                    GC.MyChar.RemoveItem(I);
                GC.LocalMessage(2005, "Inventory Cleared!"); */
            }
                
        }
    
        static bool OfSameType(uint ID1, uint ID2)
        {
            ushort Part1 = (ushort)ItemIDManipulation.Part(ID1, 0, 3);
            ushort Part2 = (ushort)ItemIDManipulation.Part(ID2, 0, 3);
            //ushort Part3 = (ushort)ItemIDManipulation.Part(ID1, 0, 2);
            //ushort Part4 = (ushort)ItemIDManipulation.Part(ID2, 0, 2);

            if (ItemIDManipulation.Digit(ID1, 1) == ItemIDManipulation.Digit(ID2, 1) && (ItemIDManipulation.Digit(ID1, 1) == 4 || ItemIDManipulation.Digit(ID1, 1) == 5 && Part2 != 500))
                return true; // 1 hander or 2 hander weapon, except bows
            else if (Part1 == Part2)
                return true; // both items are identical in type
            return false; // item types don't math server side, or missing something...
                
                
            //else if (ItemIDManipulation.Digit(ID1, 5) == ItemIDManipulation.Digit(ID1, 3) && Part1 == 112)
            //    return true;
            //else if (ItemIDManipulation.Digit(ID2, 5) == ItemIDManipulation.Digit(ID1, 3) && Part2 == 112)
            //    return true;
            //else if (Part1 >= 135 && Part1 <= 139 && Part2 == Part1 - 5)
            //    return true;
            //else if (Part2 >= 135 && Part2 <= 139 && Part1 == Part2 - 5)
            //    return true;
            
        }
    }
}
Attached Images
File Type: jpg 2.jpg (35.4 KB, 33 views)
pureone is offline  
Old 11/29/2016, 06:10   #2
 
Nyorai's Avatar
 
elite*gold: 200
Join Date: Sep 2011
Posts: 202
Received Thanks: 108
I had almost forgot how ugly Gump's base used to look like.

In case you haven't realized the first if statement is checking if both items belong to the same type so my hint would be that since +n stones and equipment are from different ID groups it's not actually composing the item.
Nyorai is offline  
Old 11/29/2016, 23:31   #3
 
Asphy×ia's Avatar
 
elite*gold: 0
Join Date: Feb 2014
Posts: 156
Received Thanks: 81
If this was the original ncos, I believe it was a simple fix. I don't think the stones bought from mall/looted were initially given the value of actually being +1 - the name was just shown as +1Stone. I don't quite remember the code being wrong - I think it was the + value of the item.

edit:

Try spawning in a +1stone instead

/item +stoneID 1 0 0 0 0
Asphy×ia is offline  
Old 11/30/2016, 06:23   #4
 
elite*gold: 0
Join Date: Jul 2011
Posts: 70
Received Thanks: 2
Quote:
Originally Posted by Asphy×ia View Post
If this was the original ncos, I believe it was a simple fix. I don't think the stones bought from mall/looted were initially given the value of actually being +1 - the name was just shown as +1Stone. I don't quite remember the code being wrong - I think it was the + value of the item.

edit:

Try spawning in a +1stone instead

/item +stoneID 1 0 0 0 0
Same problem as my first post cant put stone to make plus on items
pureone is offline  
Old 11/30/2016, 07:36   #5
 
turk55's Avatar
 
elite*gold: 130
Join Date: Oct 2007
Posts: 1,655
Received Thanks: 706
How exactly is this a guide or release ?
turk55 is offline  
Thanks
1 User
Old 11/30/2016, 07:42   #6
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,283
Received Thanks: 4,192
Quote:
Originally Posted by turk55 View Post
How exactly is this a guide or release ?
It's not. It was posted to the wrong section.
Spirited is offline  
Old 11/30/2016, 17:15   #7
 
elite*gold: 0
Join Date: Jul 2011
Posts: 70
Received Thanks: 2
request to be posted in correct section sir/maam

thank you
pureone is offline  
Old 12/01/2016, 15:37   #8

 
Arby's Avatar
 
elite*gold: 83
Join Date: May 2011
Posts: 11,029
Received Thanks: 6,037
Arrow CO2 PServer Guides & Releases -> CO2 PServer - Dis…

#moved
Arby is offline  
Reply


Similar Threads Similar Threads
[Buying] lvl4 combit vitality stone and combi block stone Urzark
07/24/2013 - Archlord Trading - 0 Replies
titel say all pls sell me (lol and i mean combi not combit ofc^^)
5165 stone compose problem
09/23/2012 - CO2 Private Server - 1 Replies
I have this problem on my 5165 source. When I go to the wuxingoven to compose you can select all + items and compose normally but when I use +2, +3...+8 it doesnt allow you to select them to compose. How do i fix this? Note: +1 stones work fine.
Compose Stone Bug
07/08/2012 - CO2 Private Server - 7 Replies
anyone can fixed it Dura Problem http://www14.0zz0.com/2012/07/08/14/695413598.jpg Stone Problem http://www14.0zz0.com/2012/07/08/14/908850303.jpg
Difference between advocate stone and getaway stone
05/21/2012 - Archlord - 2 Replies
What is the difference between advocate stone and getaway stone ? and which one we need ?



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


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.